
Server-Side Communication ActionScript 51
Local shared objects
Note: Changing or deleting a property on the server side using the SharedObject.setProperty method always
succeeds, so there is no notification of these changes.
Proxied shared objects
Note: The SharedObject.onSync method is called when a shared object has been successfully synchronized
with the server. The list object may be empty if there is no change in the shared object.
Returns
Nothing.
Description
Event handler; invoked when a shared object changes. You should set this method to point to a
function you define in order to receive notification of changes made by other subscribers for
shared objects owned by the local application instance. You should also set this method to get the
status of changes made by the server as well as by other subscribers for proxied shared objects.
Code Meaning
change A property was changed by a subscriber.
delete A property was deleted by a subscriber.
name The name of a property that has changed or been deleted.
oldValue The old value of a property. This is true for both change and delete messages; on the client,
oldValue is not set for delete.
Code Meaning
success A server change of the shared object was accepted.
reject A server change of the shared object was rejected. The value on the remote instance was not
changed.
change A property was changed by another subscriber.
delete A property was deleted. This notification can occur when a server deletes a shared object or if
another subscriber deletes a property.
clear All the properties of a shared object are deleted. This can happen when the server’s shared
object is out of sync with the master shared object or when the persistent shared object
migrates from one instance to the other. This event is typically followed by a change message
to restore all the server’s shared object properties.
name The name of a property that has changed or been deleted.
oldValue The old value of the property. This is only valid for the reject, change and delete codes.
Commentaires sur ces manuels