
137
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
application.appStart = function() {
nc = new NetConnection();
nc.connect("rtmp://" + master_server + "/" + master_instance);
proxySO = SharedObject.get("myProxy",true,nc);
// Now, whenever the client asks for a persistent
// shared object called myProxy, it receives themyProxy
// shared object from master_server/master_instance.
};
SharedObject.getProperty()
so.getProperty(name)
Retrieves the value of a named property in a shared object. The returned value is a copy associated with the property,
and any changes made to the returned value do not update the shared object. To update a property, use the
SharedObject.setProperty() method.
Availability
Flash Communication Server 1
Parameters
name A string indicating the name of a property in a shared object.
Returns
The value of a SharedObject property. If the property doesn’t exist, returns null.
Example
The following example gets the value of the name property on the user shared object and assigns it to the firstName
variable:
firstName = user.getProperty("name");
See also
SharedObject.setProperty()
SharedObject.getPropertyNames()
so.getPropertyNames()
Enumerates all the property names for a given shared object.
Availability
Flash Communication Server 1
Returns
An array of strings that contain all the property names of a shared object.
Example
The following example calls getPropertyNames() on the myInfo shared object and places the names in the names
variable. It then enumerates those property names in a
for loop.
Komentáře k této Příručce