MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE Reference page 127

Server-side actionscript language reference
Table of Contents

Advertisement

SharedObject.handlerName
Availability
Flash Communication Server MX 1.0.
Usage
mySO.onBroadcastMsg = function([p1,..., pN]){}
Parameters
A property name.
onBroadcastMsg
Optional parameters passed to the handler method if the message contains
p1, ..., pN
user-defined parameters. These parameters are the user-defined JavaScript objects passed to
the
method.
SharedObject.send
Returns
Any return value is ignored by the server.
Description
Event handler; a placeholder for an event handler (
in the Usage example
onBroadcastMsg
above); the handler is invoked when a shared object receives a broadcast message with the
same name. You must define a function object and assign it to the event handler. A shared
object can receive a broadcast message from the client-side
method.
SharedObject.send()
The
keyword used in the body of the function is set to the shared object instance
this
returned by
.
SharedObject.get()
If you don't want the server to receive a particular broadcast message, do not define this
handler.
Example
The following example defines a function called
:
broadcastMsg
var mySO = SharedObject.get("userList", false);
mySO.broadcastMsg = function(msg1, msg2){
trace(msg1 + " : " + msg2);
};
SharedObject class
127

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

This manual is also suitable for:

Flash media server 2

Table of Contents