Table of Contents

EventDispatcher:addEventListener

Available since version: Gideros 2011.6

Description:

Registers a listener function and an optional data value so that the listener function is called when an event
of a particular type occurs.

Syntax:

EventDispatcher:addEventListener(type, listener [, data])

Parameters:

  • type: (string) The type of event.
  • listener: (function) The listener function that processes the event.
  • data: An optional data parameter that is passed as a first argument to the listener function.

See Also: