Hi guys,

I've read (and tried) that this works -

Code:
var test1:string = "hello"
trace(this["test" + 1])
BUT - when i try this in a function - with a local variable, it wont work

Code:
function myFunction():void{
var test1:string = "hello"
trace(this["test" + 1])
}
I think it's because the local variable cannot be found by "this"


Can someone please help how to get the variable name in the function - using a string!

Thankyou!