View Full Version : how do i assign values to dynamically generated variables ?
how do i assign dynamic values to dynamically generated variables ? for example:
for(i=1; i<10; i++){
("a"+i)=i
}
how do i get
a1=1
a2=2
..
..
and so on
thanks
CyanBlue
12-04-2003, 08:06 AM
Howdy and Welcome... ;)
You can add proper path to the variable you are creating like this...for (i = 1 ; i < 10 ; i++)
{
this["a" + i] = i;
_level0["a" + i] = i;
_root["a" + i] = i;
_level0.someMovieClip["a" + i] = i;
}
[useastags]
|
vBulletin® v3.8.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.