| Previous | Next | Frames | No Frames |
| Summary: Field | Property | Contructor | Method | Detail: Field | Property | Contructor | Method |
Object | +--xp.events.EventDispatcher
Field Summary | |
| public static | dispatcher: EventDispatcher |
| The global static default dispatcher | |
Constructor | |
| public | EventDispatcher ( ) |
| Constructs a new Dispatcher instance. | |
Method Summary | |
| public | addEventListener ( target: Object, event: String, handler: Object, method: Object, tag: String ): Void |
| Add a listener for a particular event | |
| public | dispatchEvent ( target: Object, e: Event ): Void |
| dispatch the event to all listeners | |
| public | removeEventListener ( target: Object, event: String, handler: Object, tag: String, all: Boolean ): Void |
| remove a listener for a particular event | |
| public static var dispatcher: EventDispatcher |
| The global static default dispatcher |
|
| Constructs a new Dispatcher instance. Generally the static default dispatcher is used instead of creating a new one |
|
| Add a listener for a particular event Registers a listener object with a component instance that is broadcasting an event. 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); | |||||||||||||||
|
|
| dispatch the event to all listeners 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. | ||||||
|
|
| remove a listener for a particular event | |||||||||||||||
|