MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Especificações Página 349

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 369
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 348
Server-Side Communication ActionScript 49
The this keyword used in the body of the function is set to the shared object instance returned
by
SharedObject.get.
If you dont want the server to receive a particular broadcast message, do not define this handler.
Example
The following example defines a handler function called broadcastMsg:
var mySO = SharedObject.get("userList", false);
mySO.broadcastMsg = function(msg1, msg2){
trace(msg1 + " : " + msg2);
}
SharedObject.lock
Availability
Flash Communication Server MX.
Usage
SharedObject.lock()
Parameters
None.
Returns
An integer indicating the lock count: 0 or greater indicates success, -1 indicates failure. For
proxied shared objects, always returns -1.
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 to all the clients subscribed to this shared object. If you nest the
SharedObject.lock and SharedObject.unlock methods, make sure there is an unlock for
every
lock; otherwise, clients are blocked from accessing the shared object.
You cannot use the SharedObject.lock method on proxied shared objects.
Example
This 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.name
Availability
Flash Communication Server MX.
Usage
SharedObject.name
Description
Property (read-only); the name of a shared object.
Vista de página 348
1 2 ... 344 345 346 347 348 349 350 351 352 353 354 ... 368 369

Comentários a estes Manuais

Sem comentários