Broadcastmessage (Asbroadcaster.broadcastmessage Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Parameters
listenerObj:Object
Returns
- Although this method technically returns a Boolean value, in practical terms it
Boolean
returns
because it always returns the value
Void
Example
The following example is an excerpt from the full example provided in the entry for the
AsBroadcaster.initialize()
someObject.addListener(myListener1); // Register myListener1 as listener.
someObject.addListener(myListener2); // Register myListener2 as listener.
See also
initialize (AsBroadcaster.initialize method)
(AsBroadcaster.removeListener method)
broadcastMessage
(AsBroadcaster.broadcastMessage method)
public broadcastMessage(eventName:String) : Void
Sends an event message to each object in the list of listeners. When the message is received by
the listening object, Flash Player attempts to invoke a function of the same name on the
listening object. Suppose that your object broadcasts an event message like this:
obj.broadcastMessage("onAlert");
When this message is received, Flash Player invokes a method named
receiving listener object.
You can pass arguments to your listener functions by including additional arguments to
the
broadcastMessage()
parameter are received as arguments by the listener method.
You can call this method only from an object that was initialized by using the
AsBroadcaster.initialize()
Availability: ActionScript 1.0; Flash Player 6
- The name of the listener object that receives event notification.
method.
method. Any arguments that appear after the
method.
.
true
,
removeListener
on the
onAlert()
eventName
AsBroadcaster
267

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF