User Guide

42 Using Media Classes
About remote shared objects
Using client-side ActionScript, you can create and reference shared objects that are available to
other Flash Media Server application instances running on the same or different clients.
Like local shared objects, these objects can persist on the local computer. However, they can
also persist on the server, so that any user who connects to the shared object has access to the
same information.
For example, you can open a remote shared object, such as a phone list, that is persistent on
the server. Whenever a client makes any changes to the shared object, the revised data is
available to all clients that are currently connected to the object or who later connect to it. If
the object is also persistent locally and a client changes the data while not connected to the
server, the changes are synchronized with the remote shared object the next time the client
connects to the object.
Of all the types of shared objects, you will probably use remote shared objects most often in
your Flash Media Server applications. For information about where persistent remote shared
object data is stored, see About shared object files” on page 82. For more information about
remote shared objects, see the
SharedObject.getRemote() entry in the Client-Side
ActionScript Language Reference for Flash Media Server 2.
About proxied shared objects
A proxied shared object is a remote shared object that, instead of being shared between a client
and server application, is shared between two different Flash Media Server applications, or
between instances of the same application. For example, consider two instances of the same
chat application,
/chat_01 and /chat_02. On the server, the /chat_01 application instance
could connect to a shared object defined in
/chat_02 and then use the information in that
shared object as if it were defined in
/chat_01.
For more information about proxied shared objects, see the SharedObject.get() entry in
the Server-Side ActionScript Language Reference.
About the Application class
The Application class lets you accept and reject client connection attempts, register and
unregister classes and proxies, and create functions that are invoked when an application starts
or stops, or when a client connects or disconnects. This section includes recommendations on
setting up
application.OnConnect and application.OnDisconnect functions, and using
Application.onConnectAccept and Application.onConnectReject handlers with
applications that use media components.