Flash actionscript 3.0: EventDispatcher example in as3.0

EventDispatcher example in as3.0

Posted by Sankar.G | Posted in | Posted on 11:04 PM

The EventDispatcher class is the base class for all classes that dispatch events.
The EventDispatcher class implements the IEventDispatcher interface and is the base class for the DisplayObject class.
The EventDispatcher class allows any object on the display list to be an event target and as such,
to use the methods of the IEventDispatcher interface.

In general, the easiest way for a user-defined class to gain event dispatching capabilities is to extend EventDispatcher.
If this is impossible (that is, if the class is already extending another class),
you can instead implement the IEventDispatcher interface, create an EventDispatcher member,
and write simple hooks to route calls into the aggregated EventDispatcher.


Comments (0)