| Package | sandy.events |
| Class | public class EventBroadcaster |
| Subclasses | BubbleEventBroadcaster |
| Method | Defined by | ||
|---|---|---|---|
|
Constructor.
| EventBroadcaster | ||
|
addEventListener(type:String, listener:Object, ... rest):Boolean
Adds a listener to the event broadcaster.
| EventBroadcaster | ||
|
broadcastEvent(e:Event):void
Broadcasts an event.
| EventBroadcaster | ||
|
getListenerCollection(type:String = null):Dictionary
Returns listeners in the event broadcaster of the given type.
| EventBroadcaster | ||
|
hasListenerCollection(type:String):Boolean
Determines whether the event broadcaster has a certain type of event registered to it.
| EventBroadcaster | ||
|
isRegistered(listener:Object, type:String = null):Boolean
Determines whether a listener is registered to the event broadcaster.
| EventBroadcaster | ||
|
removeEventListener(type:String, listener:Object):Boolean
Removes a listener from the event broadcaster.
| EventBroadcaster | ||
|
removeListenerCollection(type:String):void
Removes listeners from the event broadcaster of the given type.
| EventBroadcaster | ||
| EventBroadcaster | () | constructor |
public function EventBroadcaster()Constructor.
| addEventListener | () | method |
public function addEventListener(type:String, listener:Object, ... rest):BooleanAdds a listener to the event broadcaster.
Parameterstype:String — The type of event.
|
|
listener:Object — The listener function that processes the event.
|
|
... rest — Extra parameters for the listener function.
|
Boolean — Whether the listener was successfully added.
|
| broadcastEvent | () | method |
public function broadcastEvent(e:Event):voidBroadcasts an event.
Parameterse:Event — The event being broadcasted.
|
| getListenerCollection | () | method |
public function getListenerCollection(type:String = null):DictionaryReturns listeners in the event broadcaster of the given type.
Parameterstype:String (default = null) — The event type of listeners to retrieve.
|
Dictionary — A list of listeners.
|
| hasListenerCollection | () | method |
public function hasListenerCollection(type:String):BooleanDetermines whether the event broadcaster has a certain type of event registered to it.
Parameterstype:String — The event type to check for.
|
Boolean — Whether the event type is found in the event broadcaster.
|
| isRegistered | () | method |
public function isRegistered(listener:Object, type:String = null):BooleanDetermines whether a listener is registered to the event broadcaster.
Parameterslistener:Object — The listener function to check for.
|
|
type:String (default = null) — The event type of the listener function.
|
Boolean — Whether the listener is registered.
|
| removeEventListener | () | method |
public function removeEventListener(type:String, listener:Object):BooleanRemoves a listener from the event broadcaster.
Parameterstype:String — The event type of the listener.
|
|
listener:Object — The listener function that processes the event.
|
Boolean — Whether the listener was successfully removed.
|
| removeListenerCollection | () | method |
public function removeListenerCollection(type:String):voidRemoves listeners from the event broadcaster of the given type.
Parameterstype:String — The event type of listeners to remove.
|