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

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 90
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
88
myShared.lock();
myShared.setProperty("name", "Stephen");
myShared.setProperty("address", "Xyz lane");
myShared.setProperty("city", "SF");
myShared.mark("onAdrChange", "name");
myShared.setProperty("account", 12345);
myShared.mark("onActChange");
myShared.unlock();
The following example shows the receiving client-side script:
connection = new NetConnection();
connection.connect("rtmp://flashmediaserver/someApp");
var x = SharedObject.get( "foo", connection.uri, true);
x.connect(connection);
x.onAdrChange = function(str) {
// Shared object has been updated,
// can look at the “name”, “address” and “city” now.
}
x.onActChange = function(str) {
// Shared object has been updated,
// can look at the “account” property now,
}
SharedObject.name
so.name
Read-only; the name of a shared object.
Availability
Flash Communication Server 1
SharedObject.onStatus()
so.onStatus = function(info) {}
Invoked when errors, warnings, and status messages associated with either a local instance of a shared object or a
persistent shared object occur.
Availability
Flash Communication Server 1
Parameters
info An information object.
Example
The following client-side code defines an anonymous function that just traces the
level and code properties of the
specified shared object:
so = SharedObject.get("foo", true);
so.onStatus = function(infoObj){
//Handle status messages passed in infoObj.
trace(infoObj.level + “; “ + infoObj.code);
};
Vedere la pagina 90
1 2 ... 86 87 88 89 90 91 92 93 94 95 96 ... 154 155

Commenti su questo manuale

Nessun commento