MACROMEDIA FLASH MEDIA SERVER 2-DEVELOPING MEDIA Develop Manual page 35

Developing media applications
Table of Contents

Advertisement

After the client is connected to the shared object, the server sends out a synchronization
message for the shared object, which is handled by the
defined on the client. When the client, the server, or any other movie instance makes a change
to the shared object, the server again sends out a synchronization message for the shared
object.
Each synchronization message contains a code that specifies the nature of the change that
occurred to the shared object. The code changes depending on the circumstances. For
example, when a client first connects to a shared object, the code that accompanies the
synchronization message has a value of
successfully modified the contents of the shared object. For a complete list of codes and their
descriptions, see the
SharedObject.onSync
Reference for Flash Media Server 2.
The following diagram illustrates a scenario in which two clients, Client 1 and Client 2,
connect to the same remote shared object,
object, a
synchronization message is returned by the server. Client 1 then modifies a
clear
data property of
obj1
synchronization message, indicating that the change to the shared object was successful;
Client 2 receives a
change
modified.
CLIENT 1 FLOW
getRemote("obj1")
connect
onSync
"clear"
obj1.data.x=4
onSync
"success"
Shared object flow
clear
obj1
, called
, setting it equal to 4. Client 1 receives a
x
synchronization message, indicating that the
SERVER FLOW
(Initialize data)
(Update data)
SharedObject.onSync
; a value of
success
entry in the Client-Side ActionScript Language
. When each client first connects to the shared
Sync
Sync
Understanding application flow
event handler
indicates that the client
success
shared object is
obj1
CLIENT 2 FLOW
getRemote("obj1")
connect
onSync
"clear"
onSync
"change"
35

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MEDIA SERVER 2-DEVELOPING MEDIA and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash media server 2

Table of Contents