I have a jpeg that I have exported to actionscript via the library.
The jpeg class is “adcouncil”. If I want to add it to the stage I would use the following code:
var adcouncil = new adcouncil1(150,150);
var myImage:Bitmap = new Bitmap(adcouncil)
printMC.addChild(myImage);
The problem is that I want to ad these Bitmaps to the stage dynamically. My first instinct is:
var adcouncil = new this["adcouncil1"](150,150);
var myImage:Bitmap = new Bitmap(adcouncil)
printMC.addChild(myImage);
But, that returns this error:
TypeError: Error #1007: Instantiation attempted on a non-constructor.
at index_v1_fla::MainTimeline/frame4()
Any clue how to do this?