Actionscript Q
Actionscript Q
- Started
- Last post
- 4 Responses
- nosaj
I want to set a variable to the value of another variable that is called by concatinating a string and another variable,
for example:
varnum=3
newvar = ["var" + varnum];instead of getting:
newvar = varvarnum
i want:
newvar = var3Any help is greatly appreciated.
- nosaj0
nm I got it:
newvar = eval ("var" + varnum);
- myobie0
if the variable is in the _root, you can also do _root["string"] i think, so you could just do _root[name_of_variable_is_in_me...
iono, been a while since i did it
- mrbee28280
or
this["blah + blah];
NEVER USE ROOT
- dbloc0
var varnum:Number = 3
var newvar:String = "var" + varnum;
trace(newvar)