Nidht, 5Tons is right. A better example for what you're trying to do would be:
Code:
var myKey = "Name";
var myArray:Object = {
     myKey: "Bobby"
};

trace(myArray.Name); // also outputs "Bobby"
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:
myKey = "Name";
var myArray:Object = {
     Name: "Bobby"
};

trace(myArray[myKey]);