
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
89
SharedObject.onSync()
so.onSync = function(list){}
Invoked when a shared object changes. Use the onSync() handler to define a function that handles changes made
to a shared object by subscribers.
For proxied shared objects, defines the function to get the status of changes made by the server and other subscribers.
Note: You cannot define the
onSync() handler on the prototype property of the SharedObject class in Server-Side
ActionScript.
Availability
Flash Communication Server 1
Parameters
list An array of objects that contain information about the properties of a shared object that have changed since
the last time the
onSync() handler was called. The notifications for proxied shared objects are different from the
notifications for shared objects that are owned by the local application instance. The following table describes the
codes for local shared objects:
Note: Changing or deleting a property on the server side by using the
SharedObject.setProperty() method always
succeeds, so there is no notification of these changes.
The following table describes the codes for local shared objects:
Note: The
SharedObject.onSync() handler is invoked when a shared object has been successfully synchronized with
the server. If there is no change in the shared object, the list object may be empty.
Local 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.
Proxied 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
another. This event is typically followed by a change message to restore all of 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 valid only for the reject, change, and delete codes.
Commenti su questo manuale