User Guide

418 Chapter 6: Components Dictionary
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 will 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"});
EventDispatcher.removeEventListener()
Availability
Flash Player 6 (6.0 79.0).
Edition
Flash MX 2004 and Flash MX Professional 2004.
Usage
componentInstance.removeEventListener(event, listener)
Parameters
event
A string that is the name of the event.
listener A reference to a listener object or function.
Returns
Nothing.
Description
Method; unregisters a listener object from a component instance that is broadcasting an event.