Example
This example creates a shared object named
is passed a parameter,
function onProcessCmd(cmd){
// insert code here
var shObj = SharedObject.get("foo", true);
propName = cmd.name;
shObj.getProperty (propName, cmd.newAddress);
}
The following example uses a proxied shared object. A proxied shared object resides on a server or
in an application instance (called master) that is different than the server or application instance
that the client connects to (called proxy). When the client connects to the proxy and gets a remote
shared object, the proxy connects to the master and gives the client a reference to this shared
object. The following code is in the main.asc file:
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 they will receive myProxy
// shared object from the master_server/master_instance
}
SharedObject.getProperty
Availability
Flash Communication Server MX.
Usage
mySharedObject.getProperty(name)
Parameters
The name of the property in the shared object.
name
Returns
The value of a SharedObject property.
Description
Method; 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
Example
The following example gets the value of the
value = sharedInfo.getProperty(name);
See also
SharedObject.setProperty
foo
, that is assigned to a property in the shared object.
cmd
SharedObject.setProperty
name
inside the function
onProcessCmd
property and passes it to the
Server-Side Communication ActionScript
. The function
method.
variable:
value
47
Need help?
Do you have a question about the FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY and is the answer not in the manual?
Questions and answers