You can access the values and properties of your object using either the point operator or the array access operator:
var myObject:Object = new Object();
myObject.propString = "I'm a String";
myObject.propNumber = 22;
myObject.propObject = {keyOne: "Key String", keyTwo: 23};
trace(myObject["propString"], myObject.propNumber);
trace(myObject.propObject.keyOne, myObject.propObject["keyTwo"]);
the above variable myObject can also be written as follows:
var myObject:Object = {propString: "I'm a String", propNumber: 22, propObject: {keyOne: "Key String", keyTwo: 23}};
source
share