| Previous | Next | Frames | No Frames |
| Summary: Field | Property | Contructor | Method | Detail: Field | Property | Contructor | Method |
Method Summary | |
| public | addEventListener ( target: Object, event: String, handler: Object, method: Object, tag: String ): Void |
| Registers a listener to a component instance. | |
| public | dispatchEvent ( target: Object, e: Event ): Void |
| Dispatches an event programmatically. | |
| public | removeEventListener ( target: Object, event: String, handler: Object, tag: String, all: Boolean ): Void |
| Removes an event listener from a component instance. | |
|
| Registers a listener to a component instance. | |||||||||||||||
|
|
| Dispatches an event programmatically. 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. | ||||||
|
|
| Removes an event listener from a component instance. | |||||||||||||||
|
When the event occurs, the listener object or function is notified.
You can call this method from any component instance.
For example, the following code registers a listener to the component instance myButton:
myButton.addEventListener("click", myListener);