EventListenerSource
SimpleEventListenerSource manages listeners in the simplest way possible.
public function addListener(listener):Void
Adds the passed-in listener.
The listener will only be added if it is neither null nor
undefined and if it has not already been added to this listener source.
listener | the listener to add |
public function addAllListeners(listeners:Array):Void
Adds all listeners contained in the passed-in listeners array.
If the passed-in listeners array is null or undefined
it will be ignored. If an individual listener is null or
undefined it will be ignored too.
Note that the order of the listeners contained in the passed-in
listeners array is preserved.
listeners | the listeners to add |
addAllListeners() in org.as2lib.env.event.EventListenerSource
public function removeListener(listener):Void
Removes the passed-in listener.
The removal will be ignored if the passed-in listener is null
or undefined.
listener | the listener to remove |
removeListener() in org.as2lib.env.event.EventListenerSource
public function removeAllListeners(Void):VoidRemoves all added listeners.
removeAllListeners() in org.as2lib.env.event.EventListenerSource
public function getAllListeners(Void):ArrayReturns all added listeners.
all added listeners
getAllListeners() in org.as2lib.env.event.EventListenerSource