
141
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
SharedObject.onStatus()
so.onStatus = function(info) {}
Invoked when errors, warnings, and status messages associated with either a local instance of a shared object or a
persistent shared object occur.
Availability
Flash Communication Server 1
Parameters
info An information object.
Example
The following client-side code defines an anonymous function that just traces the level and code properties of the
specified shared object:
so = SharedObject.get("foo", true);
so.onStatus = function(infoObj){
//Handle status messages passed in infoObj.
trace(infoObj.level + "; " + infoObj.code);
};
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:
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.
Commenti su questo manuale