MACROMEDIA FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER 2 Manuel d'utilisateur Page 138

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 172
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 137
135
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
Saves the current state of a persistent shared object. Invokes the SharedObject.onStatus() handler and passes it an
object that contains information about the success or failure of the call.
Availability
Flash Communication Server 1
Returns
A boolean value of true if successful; otherwise, false.
Example
The following example places a reference to the shared object foo in the variable so. It then locks the shared object
instance so that no one can make any changes to it and saves the shared object by calling
so.flush(). After the shared
object is saved, it is unlocked so that further changes can be made.
var so = SharedObject.get("foo", true);
so.lock();
// Insert code here that operates on the shared object.
so.flush();
so.unlock();
SharedObject.get()
SharedObject.get(name, persistence [, netConnection])
Static; creates a shared object or returns a reference to an existing shared object. To perform any operation on a shared
object, the server-side script must get a reference to the shared object by using the
SharedObject.get() method. If
the requested object is not found, a new instance is created.
Availability
Flash Communication Server 1
Parameters
name Name of the shared object instance to return.
persistence A boolean value: true for a persistent shared object; false for a nonpersistent shared object. If no
value is specified, the default value is
false.
netConnection A NetConnection object that represents a connection to an application instance. You can pass this
parameter to get a reference to a shared object on another server or a shared object that is owned by another application
instance. All update notifications for the shared object specified by the
name parameter are proxied to this instance,
and the remote instance notifies the local instance when a persistent shared object changes. The NetConnection object
that is used as the
netConnection parameter does not need to be connected when you call SharedObject.get().
The server connects to the remote shared object when the NetConnection state changes to connected. This parameter
is optional.
Returns
A reference to an instance of the SharedObject class.
Vue de la page 137
1 2 ... 133 134 135 136 137 138 139 140 141 142 143 ... 171 172

Commentaires sur ces manuels

Pas de commentaire