User Guide

EventDispatcher.dispatchEvent() 503
EventDispatcher.dispatchEvent()
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX 2004 and Flash MX Professional 2004.
Usage
dispatchEvent(eventObject)
Parameters
eventObject A reference to an event object. The event object must have a type property
that is a string indicating the name of the event. Generally, the event object also has a
target
property that is the name of the instance broadcasting the event. You can define other
properties on the event object that help a user capture information about the event when it is
dispatched.
Returns
Nothing.
Description
Method; dispatches an event to any listener registered with an instance of the class. This
method is usually called from within a component’s class file. For example, the
SimpleButton.as class file dispatches the
click event.
Example
The following example dispatches a click event:
dispatchEvent({type:"click"});