MACROMEDIA FLASH COMMUNICATION SERVER MX-SERVER-SIDE COMMUNICATION ACTIONSCRIPT DICTIONARY Specifikace Strana 348

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 369
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 347
48
SharedObject.getPropertyNames
Availability
Flash Communication Server MX.
Usage
mySharedObject.getPropertyNames()
Parameters
None.
Returns
An array containing all the property names of a shared object.
Description
Method; enumerates all the property names for a given shared object. This method returns an
array of strings that refer to the current properties.
Example
This example calls getPropertyNames on the sharedInfo shared object and places the names
into 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 = sharedInfo.getPropertyNames();
for (x in names){
var propVal = sharedInfo.getProperty(names[x]);
trace("Value of property " + names[x] + " = " + propVal);
}
SharedObject.handlerName
Availability
Flash Communication Server MX.
Usage
SharedObject.onBroadcastMsg = function([p1, ..., pN]){
// insert code here
};
Parameters
p1, ..., pN Optional parameters passed to the handler method if the message contains user-
defined parameters. These parameters are the user-defined JavaScript objects passed to the
SharedObject.send method.
Returns
Any return value is ignored by the server.
Description
Event handler; a placeholder for a property name (onBroadcastMsg in the Usage example above)
that specifies a function object that is invoked when the shared object receives a broadcast
message whose method name matches the property name.
Zobrazit stránku 347
1 2 ... 343 344 345 346 347 348 349 350 351 352 353 ... 368 369

Komentáře k této Příručce

Žádné komentáře