User Guide

SharedObject class 133
Proxied shared objects
Returns
Nothing.
Description
Event handler; 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, define the function to get the status of changes made by the server
and other subscribers.
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 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.
NOTE
The SharedObject.onSync handler is invoked 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.
NOTE
You cannot define the onSync handler on the prototype property of the SharedObject
class in server-side ActionScript.