User Guide

SharedObject class 123
SharedObject.get()
Availability
Flash Communication Server MX 1.0.
Usage
SharedObject.get(name, persistence [, netConnection])
Parameters
name Name of the shared object instance to return.
persistence A Boolean value: true for a persistent shared object; false for a
nonpersistent shared object. If no value is specified, the default value is
false.
netConnection A NetConnection object that represents a connection to an application
instance. You can pass this parameter to get a reference to a shared object on another server or
a shared object that is owned by another application instance. All update notifications for the
shared object specified by the
name parameter are proxied to this instance, and the remote
instance notifies the local instance when a persistent shared object changes. The
NetConnection object that is used as the
netConnection parameter does not need to be
connected when you call
SharedObject.get(). The server connects to the remote shared
object when the NetConnection state changes to connected. This parameter is optional.
Returns
A reference to an instance of the SharedObject class.
Description
Method (static); creates a shared object or returns a reference to an existing shared object. To
perform any operation on a shared object, the server-side script must get a reference to the
shared object using the
SharedObject.get() method. If the requested object is not found, a
new instance is created.
There are two types of shared objects, persistent and nonpersistent, and they have separate
namespaces. This means that a persistent and nonpersistent shared object can have the same
name and exist as two distinct shared objects. Shared objects are scoped to the namespace of
the application instance and are identified by a string. The shared object names should
conform to the URI specification.