User Guide
SharedObject class 139
Returns
An integer indicating the number of properties.
Description
Method; returns the total number of valid properties in a shared object.
Example
The following example gets the number of properties of a shared object and assigns that
number to the variable
len:
var myShared = SharedObject.get("foo", true);
var len = myShared.size();
SharedObject.unlock()
Availability
Flash Communication Server MX 1.0.
Usage
mySO.unlock()
Parameters
None.
Returns
An integer indicating the lock count: 0 or greater if successful, -1 otherwise. For proxied
shared objects, this method always returns -1.
Description
Method; unlocks a shared object instance. It causes the script to relinquish exclusive access to
the shared object and lets other clients update the instance. This method also causes the server
to commit all changes made after the
SharedObject.lock() method is called and sends an
update message to all clients.
You cannot use the
SharedObject.unlock method on proxied shared objects.
Example
The following example shows how easy it is to unlock a shared object:
var myShared = SharedObject.get("foo", true);
myShared.lock();
// Insert code to manipulate the shared object.
myShared.unlock();