I have an array as follow.
var array:Array = new Array();
array["Circle"] = 1;
array["Rect"] = 2;
I wantto read the values by using a variable.
var key:String = "Circle";
trace(array[key]);
Can anyone guide me how to achieve this. Its not neccessary to go with Array only. I may switch to whichever collection in which this is possible.