User Guide
116 Server-Side ActionScript Language Reference
The following example uses a named function, callback1, to send the message “interval
called” to the server log:
function callback1(){
trace("interval called");
}
setInterval(callback1, 1000);
The following example also uses a named function, callback2, to send the message “interval
called” to the server log, but it passes the message to the function as a parameter:
function callback2(s){
trace(s);
}
setInterval(callback2, 1000, "interval called");
SharedObject class
Availability
Flash Communication Server MX 1.0.
The SharedObject class lets you store data on the server and share data between multiple
client applications in real time. Shared objects can be temporary, or they can persist on the
server after an application has closed; you can consider shared objects as real-time data transfer
devices.
The following list describes common ways to use shared objects in server-side ActionScript:
■ Storing and sharing data on a server
A shared object can store data on the server for other clients to retrieve. For example, you
can open a remote shared object, such as a phone list, that is persistent on the server.
Whenever a client makes a change to the shared object, the revised data is available to all
clients that are currently connected to the object or that connect to it later. If the object is
also persistent locally and a client changes the data while not connected to the server, the
changes are copied to the remote shared object the next time the client connects to the
object.
NOTE
This entry explains the server-side SharedObject class. You can also create shared
objects with the client-side SharedObject class. For more information, see
“SharedObject class” in
Client-Side ActionScript Language Reference for Flash Media
Server 2.