Hello,
I’ve got little problems to create dynamic variables and i’m looking everywhere for the right syntax, but i cannot get this code works :
public function drawStage(tBitmaps:Array){
var c0:Bitmap ;var c1:Bitmap ;var c2:Bitmap ;
//here i'd like to place a loop to create my c's dynamically
//but got some syntax problems i guess
var lng:int = 3;
for(var i:int=0;i<lng; i++){
this["c"+i]= new Bitmap( tBitmaps*);
//here it wont work, unless i wrote
//c0 = new Bitmap( tBitmaps*);
}
}
What’s the main difference between c0 (working) and this[“c”+0] (not working) ?