Parameters
- The name of the event to broadcast. The name of any listener methods
eventName:String
must match this parameter in order to receive the broadcast event. You can pass arguments to
the listener methods by including additional arguments after
Example
The following example is an excerpt from the first full example provided in the entry for the
AsBroadcaster.initialize()
someObject.broadcastMessage("someEvent"); // Broadcast the "someEvent"
message.
The following example is an excerpt from the second full example provided in the entry for
the
AsBroadcaster.initialize()
methods.
someObject.broadcastMessage("someEvent", 3, "arbitrary string");
See also
initialize (AsBroadcaster.initialize method)
(AsBroadcaster.removeListener method)
initialize (AsBroadcaster.initialize method)
public static initialize(obj:Object) : Void
Adds event notification and listener management functionality to a given object. This is a
static method; it must be called by using the AsBroadcaster class (where
name of the object to be initialized as an event broadcaster):
AsBroadcaster.initialize(someObject);
A common mistake is to capitalize the second letter of
AsBroadcaster.initialize()
misspelling of
AsBroadcaster
This method adds the
object specified by the
obj.addListener()
obj.removeListener()
obj.broadcastMessage()
Availability: ActionScript 1.0; Flash Player 6
268
ActionScript classes
method:
method. It shows how to send arguments to listener
method, ensure that the second letter is lowercase. Any
fails silently.
property along with the following three methods to the
_listeners
parameter:
obj
.
eventName
,
removeListener
someObject
. When calling the
AsBroadcaster
is the
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?