ActionScript 2.0 Language Reference |
|
|
|
| ActionScript classes > AsBroadcaster > addListener (AsBroadcaster.addListener method) | |||
public addListener(listenerObj:Object) : Boolean
Registers an object to receive event notification messages. This method is called on the broadcasting object and the listener object is sent as an argument.
Availability: ActionScript 1.0; Flash Player 6
listenerObj:Object - The name of the listener object that receives event notification.
Boolean - Although this method technically returns a Boolean value, in practical terms it returns Void because it always returns the value true.
The following example is an excerpt from the full example provided in the entry for the AsBroadcaster.initialize() method.
someObject.addListener(myListener1); // Register myListener1 as listener. someObject.addListener(myListener2); // Register myListener2 as listener.
initialize (AsBroadcaster.initialize method), removeListener (AsBroadcaster.removeListener method)
|
|
|
|