I am new to programing.
I want to declare 8 variables at the class level like this:
private var graphicDesign1:Sprite;
private var graphicDesign2:Sprite;
private var graphicDesign3:Sprite;
private var graphicDesign4:Sprite;
private var graphicDesign5:Sprite;
private var graphicDesign6:Sprite;
private var graphicDesign7:Sprite;
private var graphicDesign8:Sprite;
But I would like to do it with a for loop. Is that possible? If so i’m doing it wrong this is what I have.
for(var i = 1; i < 9; i++){
private var +"graphicDesign"+i:Sprite;
}
Will someone show me the correct way to do this?
Thanks!