SharedObject class
129
Description
Method; locks the shared object instance. This method gives the server-side script exclusive
access to the shared object; when the
SharedObject.unlock()
method is called, all changes
are batched and one update message is sent, through the
SharedObject.onSync
handler, to
all the clients that subscribe to this shared object. If you nest the
SharedObject.lock()
and
SharedObject.unlock()
methods, make sure there is an
unlock()
method for every
lock()
method; otherwise, clients are blocked from accessing the shared object.
You cannot use the
SharedObject.lock()
method on proxied shared objects.
Example
The following example locks the
myShared
shared object, executes the code that is to be
inserted, and then unlocks the object:
var myShared = SharedObject.get("foo");
myShared.lock();
// Insert code here that operates on the shared object.
myShared.unlock();
SharedObject.mark()
Availability
Flash Media Server 2.
Usage
mySO
.mark(
handlerName
,
p1, ..., pN
)
Parameters
handlerName
Calls the specified function property on the client-side SharedObject
instance. For example, if the
handlerName
parameter is
onChange
, the client invokes the
SharedObject.onChange()
method with all the
p1, ...,pN
parameters.
NOT
E
Do not use a built-in method name for a handler name. For example, the subscribing
stream will be closed if the handler name is
close
.
Содержание FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT...
Страница 1: ...Server Side ActionScript Language Reference...
Страница 4: ...4 Contents...
Страница 228: ...228 Server Side ActionScript Language Reference...
Страница 234: ...234 Server Side Information Objects...