Groups | Blog | Home
all groups > flash actionscript > march 2004 >

flash actionscript : variable help


kit_hoffman
3/3/2004 8:01:20 PM
here's my problem... i'm trying to create a new variable in kind of a different
way than usual, heres what i'm doing...

"someText"+anotherVariable = 5;

I know that you can do things like..

eval("someText"+anotherVariable )._alpha = 5;

but howcome you can't create new variables using this method or something like
it.
is there any ideas or sugestions on how to create a new variable by combiniing
"someText"+anotherVariable?
Jack.
3/3/2004 8:19:02 PM
anotherVariable = 1;

this["someText"+anotherVariable] = 5;

/* Variable List
Variable _level0.anotherVariable = 1
Variable _level0.someText1 = 5
kit_hoffman
3/3/2004 8:34:52 PM
AddThis Social Bookmark Button