SharedObject class
135
Parameters
handlerName
A string that identifies the message; also the name of the ActionScript handler
to receive the message. The handler name can be only one level deep (that is, it can’t be of the
form
parent
/
child
) and is relative to the shared object.
p1, ...,pN
Optional parameters that can be of any type. They are serialized and sent over
the connection, and the receiving handler receives them in the same order. If a parameter is a
circular object (for example, a linked list that is circular), the serializer handles the references
correctly.
Returns
Nothing.
Description
Method; broadcasts a message to all clients connected to
myRemote_so
, including the client
that sent the message. To process and respond to the message, create a function named
handlerName
attached to the shared object.
Example
The following example shows how to use
send
to display a message in the Output panel.
/* Create a remote shared object called myRemote_so.
Place an Input Text text box named inputMsgTxt on the Stage
Attach this code to a button labeled "Send Message". */
on (release) {
_root.myRemote_so.send("testMsg",inputMsgTxt);
}
// Attach this code to the frame containing the button
_root.myRemote_so.testMsg = function(recvStr){
trace(recvStr);
}
// Type data in the text box and press the button to see the results.
NO
T
E
Do not use a reserved term for a handler name. For example,
myRemote_so.send("close")
will fail.
Содержание FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER...
Страница 1: ...Client Side ActionScript Language Reference for Flash Media Server 2...
Страница 4: ...4 Contents...
Страница 148: ...148 Client Side ActionScript Language Reference...