Flash Media Server |
|||
| Server-Side ActionScript Language Reference > Server-Side ActionScript Language Reference > SharedObject class > SharedObject.handlerName | |||
Flash Communication Server MX 1.0.
mySO.onBroadcastMsg= function([p1,..., pN]){}
onBroadcastMsg A property name.
p1, ..., pN Optional parameters passed to the handler method if the message contains user-defined parameters. These parameters are the user-defined JavaScript objects passed to the SharedObject.send method.
Any return value is ignored by the server.
Event handler; a placeholder for an event handler (onBroadcastMsg in the Usage example 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 SharedObject.send() method.
The this keyword used in the body of the function is set to the shared object instance returned by SharedObject.get().
If you don't want the server to receive a particular broadcast message, do not define this handler.
The following example defines a function called broadcastMsg:
var mySO = SharedObject.get("userList", false);
mySO.broadcastMsg = function(msg1, msg2){
trace(msg1 + " : " + msg2);
};
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/fms/2/docs/00000756.html