
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
91
SharedObject.resyncDepth
so.resyncDepth
An integer that indicates when the deleted properties of a shared object should be permanently deleted. You can use
this property in a server-side script to resynchronize shared objects and to control when shared objects are deleted.
The default value is infinity.
If the current revision number of the shared object minus the revision number of the deleted property is greater than
the value of
SharedObject.resyncDepth, the property is deleted. Also, if a client connecting to this shared object
has a client revision that, when added to the value of
SharedObject.resyncDepth, is less than the value of the
current revision on the server, all the current elements of the client shared object are deleted, the valid properties are
sent to the client, and the client receives a “clear” message.
This method is useful when you add and delete many properties and you don’t want to send too many messages to
the client. Suppose that a client is connected to a shared object that has 12 properties and then disconnects. After
that client disconnects, other clients that are connected to the shared object delete 20 properties and add 10
properties. When the client reconnects, it could, for example, receive a delete message for the 10 properties it previ-
ously had and then a change message on two properties. You can use
SharedObject.resyncDepth property to send
a “clear” message, followed by a change message for two properties, which saves the client from receiving 10 delete
messages.
Availability
Flash Communication Server 1
Example
The following example resynchronizes the shared object
so if the revision number difference is greater than 10:
so = SharedObject.get("foo");
so.resyncDepth = 10;
SharedObject.send()
so.send(methodName, [p1, ..., pN])
Executes a method in a client-side script. You can use SharedObject.send() to asynchronously execute a method
on all the Flash clients subscribing to a shared object. The server does not receive any notification from the client on
the success, failure, or return value in response to this message.
Availability
Flash Communication Server 1
Parameters
methodName A string indicating the name of a method on a client-side shared object. For example, if you specify
"
doSomething", the client must invoke the SharedObject.doSomething() method, with all the p1, ..., pN
parameters.
p1, ..., pN Parameters of any type, including references to other objects. These parameters are passed to the
specified
methodName on the client.
Returns
A boolean value of
true if the message was sent to the client; otherwise, false.
Commenti su questo manuale