Quick question regarding variable scope in ActionScript 2.0. Did some testing today and was wondering how you would target a function's local variable through a concatenated variable string.
For example:
var txt = "Hello World";
function testing(msg) {
var test1 = msg;
trace(this["test"+1]);
}
testing(txt);
I'd expect the trace to be "Hello World" but rather is given "undefined". So if variables created outside functions are created on the main timeline, where are local function variables created and how would you access them?