In AS2, i used to write
for(i=0; i<5; i++){
this.createEmptyMovieClip("menu"+i, i);
this["menu"+i].alpha = 50;
}
In AS3, i try
public class main extends Sprite{
public function main() {
for(i=0; i<5; i++){
this.["menu"+i] = new MovieClip();
}
}
}
but it doesnt work. I get an “Error #1056: Cannot create property menu0 on main.”
Can somebody please help me? Tnx in advance.