Nidht, 5Tons is right. A better example for what you're trying to do would be:Which, won't work. You're trying to set the key to the value of a variable. For an example that DOES work, you'd need to do something like:Code:var myKey = "Name"; var myArray:Object = { myKey: "Bobby" }; trace(myArray.Name); // also outputs "Bobby"Code:myKey = "Name"; var myArray:Object = { Name: "Bobby" }; trace(myArray[myKey]);![]()




Reply With Quote