Server-Side Communication ActionScript > SharedObject.getPropertyNames

 

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 myInfo 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 = myInfo.getPropertyNames();
for (x in names){
	var propVal = myInfo.getProperty(names[x]);
	trace("Value of property " + names[x] + " = " + propVal); 
}