The
keyword used in the body of the function is set to the shared object instance returned
this
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 handler function called
var mySO = SharedObject.get("userList", false);
mySO.broadcastMsg = function(msg1, msg2){
trace(msg1 + " : " + msg2);
}
SharedObject.lock
Availability
Flash Communication Server MX.
Usage
SharedObject.lock()
Parameters
None.
Returns
An integer indicating the lock count: 0 or greater indicates success, -1 indicates failure. For
proxied shared objects, always returns -1.
Description
Method; locks the shared object instance. This method gives the server-side script exclusive access
to the shared object; when the
and one update message is sent to all the clients subscribed to this shared object. If you nest the
SharedObject.lock
every
; otherwise, clients are blocked from accessing the shared object.
lock
You cannot use the
Example
This example locks the
unlocks the object:
var myShared = SharedObject.get("foo");
myShared.lock();
// insert code here that operates on the shared object
myShared.unlock();
SharedObject.name
Availability
Flash Communication Server MX.
Usage
SharedObject.name
Description
Property (read-only); the name of a shared object.
.
SharedObject.unlock
and
SharedObject.unlock
method on proxied shared objects.
SharedObject.lock
shared object, executes the code that is to be inserted, and then
myShared
:
broadcastMsg
method is called, all changes are batched
methods, make sure there is an
Server-Side Communication ActionScript
for
unlock
49
Need help?
Do you have a question about the FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY and is the answer not in the manual?