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

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 87
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
85
SharedObject.getProperty()
so.getProperty(name)
Retrieves the value of a named property in a shared object. The returned value is a copy associated with the property,
and any changes made to the returned value do not update the shared object. To update a property, use the
Share-
dObject.setProperty()
method.
Availability
Flash Communication Server 1
Parameters
name A string indicating the name of a property in a shared object.
Returns
The value of a SharedObject property. If the property doesn’t exist, returns
null.
Example
The following example gets the value of the
name property on the user shared object and assigns it to the firstName
variable:
firstName = user.getProperty("name");
See also
SharedObject.setProperty()
SharedObject.getPropertyNames()
so.getPropertyNames()
Enumerates all the property names for a given shared object.
Availability
Flash Communication Server 1
Returns
An array of strings that contain all the property names of a shared object.
Example
The following example calls
getPropertyNames() on the myInfo shared object and places the names in the names
variable. It then enumerates those property names in a
for loop.
myInfo = SharedObject.get("foo");
var addr = myInfo.getProperty("address");
myInfo.setProperty("city", San Francisco");
var names = myInfo.getPropertyNames();
for (x in names){
var propVal = myInfo.getProperty(names[x]);
trace("Value of property " + names[x] + " = " + propVal);
}
SharedObject.handlerName()
so.handlerName = function([p1,..., pN]){}
Vedere la pagina 87
1 2 ... 83 84 85 86 87 88 89 90 91 92 93 ... 154 155

Commenti su questo manuale

Nessun commento