You can also call
SharedObject.get()
namespace of another application instance. This instance can be on the same server or on a
different server and is called a proxied shared object. To get a reference to a shared object from
another instance, create a NetConnection object and use the
method to connect to the application instance that owns the shared object. Pass the
NetConnection object as the
method. The server-side script must get a reference to a proxied shared object before there is a
request for the shared object from any client. To do this, call
application.onAppStart
If you call
SharedObject.get()
instance already has a shared object with the same name, the shared object converts to a
proxied shared object. All shared object messages for clients connected to a proxied shared
object are sent to the master instance.
If the connection state of the NetConnection object that was used as the
parameter changes state from connected to disconnected, the proxied shared object is set to
idle and any messages received from subscribers are discarded. The
NetConnection.onStatus
establish a connection to the remote instance and call
the state of the proxied shared object from idle to connected.
If you call
SharedObject.get()
object that is already connected and if the URI of the new NetConnection object doesn't
match the current NetConnection object, the proxied shared object unsubscribes from the
previous shared object, sends a
shared object instance. When a subscribe to a proxied shared object is successful, all
subscribers are reinitialized to the new state. This process lets you migrate a shared object
from one application instance to another without disconnecting the clients.
Updates received by proxied shared objects from subscribers are checked to see if the update
can be rejected based on the current state of the proxied shared object version and the version
of the subscriber. If the change can be rejected, the proxied shared object doesn't forward the
message to the remote instance; the reject message is sent to the subscriber.
The corresponding client-side ActionScript method is
124
Server-Side ActionScript Language Reference
to get a reference to a shared object that is in a
parameter of the
netConnection
handler.
with a
netConnection
handler is called when a connection is lost. You can then re-
with a new NetConnection object on a proxied shared
event to all subscribers, and subscribes to the new
clear
NetConnection.connect()
SharedObject.get()
SharedObject.get()
parameter and the local application
netConnection
SharedObject.get()
SharedObject.getRemote()
in the
, which changes
.
Need help?
Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?