MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Manuale Utente Pagina 85

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 84
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
82
Detaches a reference from a shared object. A call to the SharedObject.get() method returns a reference to a
shared object instance. The reference is valid until the variable that holds the reference is no longer in use and the
script is garbage collected. To destroy a reference immediately, you can call
SharedObject.close(). You can use
SharedObject.close() when you no longer want to proxy a shared object.
Availability
Flash Communication Server 1
Example
In the following example,
so is attached as a reference to shared object foo. When you call so.close(), you detach
the reference
so from the shared object foo.
so = SharedObject.get("foo");
// Insert code here.
so.close();
See also
SharedObject.get()
SharedObject.commit()
so.commit([name])
Static; stores either a specific persistent shared object instance or all persistent shared object instances with an
isDirty property whose value is true. Use this method if the SharedObject.autoCommit property is false and
you need to manage when a shared object is stored locally.
Availability
Flash Media Server 2
Parameters
name A string indicating the name of the persistent shared object instance to store. If no name is specified, or if an
empty string is passed, all persistent shared objects are stored. This parameter is optional.
Returns
A boolean value indicating success (
true) or failure (false).
Example
The following code commits all dirty shared objects to local storage when the application stops:
application.onAppStop = function (info){
// Insert code here.
SharedObject.commit();
}
SharedObject.flush()
so.flush()
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
Vedere la pagina 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 154 155

Commenti su questo manuale

Nessun commento