How do you do it where myVar is the array? Is this possible? Or do
you always have to specify the array?
arr = new Array()
arr["elem1"] = "hello"
arr["elem2"] = "hi"
function testArray(myVar) {
trace(myVar["elem2"]);
};
testArray(arr);
On Mar 12, 2007, at 3:17 PM, Merrill, Jason wrote:
arr = new Array()
myVar = "elem2"
arr["elem1"] = "hello"
arr["elem2"] = "hi"
trace(arr[myVar])
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com