Making a String contain the name of another variable

Hi,

I’ve posted about this problem earlier, but I think I managed to explain the problem really poorly, so I want to try again, this time boiling the problem down to the following simple example.

var myNumberArray:Array = new Array;
myNumberArray[1] = new Object;
myNumberArray[1].myProperty = 10;

var myStringVariable:String = “myNumberArray[1].myProperty”;
trace (myStringVariable);

This obviously traces out the string “myNumberArray[1].myProperty”, completely disregarding that there’s already a variable/property called myNumberArray[1].myProperty, which has a value of its own.

Tracing out this[myStringVariable] just gives an ‘undefined’.

Is there any way to get it to trace “10”, using only the ‘myStringVariable’? In other words, to make AS understand that myStringVariable contains the name of another variable/property?