Server-Side Communication ActionScript > SharedObject.flush |
SharedObject.flush
Availability
Flash Communication Server MX.
Usage
SharedObject.flush()
Parameters
None.
Returns
A Boolean value of true if successful, false otherwise.
Description
Method; causes the server to save the current state of the shared object instance. The shared object must have been created with the persistence option.
Example
The following example places a reference to the shared object foo in the variable myShared. It then locks the shared object instance so that no one can make any changes to it, and then saves the shared object by calling myShared.flush. After the shared object is saved, it is unlocked so that further changes can be made.
var myShared = SharedObject.get("foo", true);
myShared.lock();
// insert code here that operates on the shared object
myShared.flush();
myShared.unlock();