Sorry for the completely uninformed question, but I'm trying to create a variable with a function that passes part of the variable name by an argument like this:
In this example, I'm trying to create a variable called mc_test but this doesn't work. to my understanding this["mc_"+testv ar] will create a string of "mc_test" but I can't set that string as a variable name.
Any help would be greatly appreciated.
Code:
function doit(testvar:Object):void {
var this["mc_"+testvar] = "Overview";
}
doit("test");
Any help would be greatly appreciated.