I’ve created an Array with the names of my image-Classes in the library.
var myArr:Array = new Array("myPic1","myPic2","myPic3");
Normally if I would like to create an object of my class I would
var libraryImage:Bitmap;
libraryImage = new Bitmap(new myPic1(0,0));
But how can I iterate through the array and create my images dynamically?
for(var i:uint = 0; i<myArr.length; i++){
var libraryImage:Bitmap;
libraryImage = new Bitmap(new myArr[i](0,0));
}
doesn’t works
Try this: