Packagesandy.events
Classpublic class EventBroadcaster
SubclassesBubbleEventBroadcaster

The event broadcaster of Sandy.



Public Methods
 MethodDefined 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
Constructor detail
EventBroadcaster()constructor
public function EventBroadcaster()

Constructor.

Method detail
addEventListener()method
public function addEventListener(type:String, listener:Object, ... rest):Boolean

Adds a listener to the event broadcaster.

Parameters
type:String — The type of event.
 
listener:Object — The listener function that processes the event.
 
... rest — Extra parameters for the listener function.

Returns
Boolean — Whether the listener was successfully added.
broadcastEvent()method 
public function broadcastEvent(e:Event):void

Broadcasts an event.

Parameters
e:Event — The event being broadcasted.
getListenerCollection()method 
public function getListenerCollection(type:String = null):Dictionary

Returns listeners in the event broadcaster of the given type.

Parameters
type:String (default = null) — The event type of listeners to retrieve.

Returns
Dictionary — A list of listeners.
hasListenerCollection()method 
public function hasListenerCollection(type:String):Boolean

Determines whether the event broadcaster has a certain type of event registered to it.

Parameters
type:String — The event type to check for.

Returns
Boolean — Whether the event type is found in the event broadcaster.
isRegistered()method 
public function isRegistered(listener:Object, type:String = null):Boolean

Determines whether a listener is registered to the event broadcaster.

Parameters
listener:Object — The listener function to check for.
 
type:String (default = null) — The event type of the listener function.

Returns
Boolean — Whether the listener is registered.
removeEventListener()method 
public function removeEventListener(type:String, listener:Object):Boolean

Removes a listener from the event broadcaster.

Parameters
type:String — The event type of the listener.
 
listener:Object — The listener function that processes the event.

Returns
Boolean — Whether the listener was successfully removed.
removeListenerCollection()method 
public function removeListenerCollection(type:String):void

Removes listeners from the event broadcaster of the given type.

Parameters
type:String — The event type of listeners to remove.