Hello,
I'm trying to declare a few variables in a for statement using the variable in the for statement. In older flash versions I would use something like this.
But now I can't get it to work in AS3. I've tried doing different variations of...Code:for(a=0;a<10;a++) { _root["variable"+a] = "Some text "+a; }
But no luck.Code:for(var a:int=0;a<10;a++) { var ["variable"+a]:String = "Some text "+a; }
If anyone knows an alternate way to declare variables and use a different variable to help name it, please help me!
Thanks in advance!
~Bill




Reply With Quote