I’ve been attempting to attach bitmaps from the library in AS3, and have settled on a piece of code which works:
var myBitmap:Bitmap = new Bitmap(new pic1(0,0)); myMovieClip.addChild(myBitmap);
This seems to work fine, as long as the bitmap I’m attaching is the one given the Class ‘pic1’ in the Linkage Properties panel. However, I want to use a Timer event to load a new bitmap after a given interval, which I’m trying to do with the following code:
var bitmapName:String = "pic"+currentPic; var myBitmap:Bitmap = new Bitmap(new bitmapName(0,0)); myMovieClip.addChild(myBitmap);
However, I don’t seem to be having much joy. Could anyone explain what I’m doing wrong?