EventDispatcher
Supported platforms:
Available since: Gideros 2011.6
Description
All classes that dispatch events inherit from `EventDispatcher`. The target of an event is a listener function and an optional data value.
When an event is dispatched, the registered function is called.
If the optional data value is given, it is used as a first parameter while calling the listener function.
Event dispatching and event targets are the core part of the Gideros event model. Different event types (such as `Event.ENTER_FRAME`, `Event.TOUCHES_BEGIN` or `Event.MOUSE_DOWN`) flow through the scene tree hierarchy differently. When a touch or mouse event occurs, Gideros dispatches an event object into the event flow from the root of the scene tree.
On the other hand, `Event.ENTER_FRAME` event is dispatched to all `Sprite` objects.
If you want to define a class that dispatches events, you can inherit your class from `EventDispatcher`.
{|-
| style="width: 50%;"|
Methods
| style="width: 50%;"|
Events
Constants
|}