Hello, I'm a fairly experienced AS2 programmer transitioning in progress to AS3 programmer. I'm using Flash CS4 as my IDE with Actionscript 3 and Flash Player 10. I'm working on a bigger project but the area I'm struggling in is dynamically pulling an image from the flash library (already loaded). I've been finding the same answers to my question all over and they seem to keep producing the same error so apparently I'm just not getting some little detail. I have an image loaded in the library called test1.jpg. I've right clicked on it and selected 'Export for ActionScript' and 'Export in frame 1'. The class is 'MyMc' and the Base class is 'flash.display.BitmapData'. My code is the following:
var mc:MyMc = new MyMc();
addChild(mc);
- var mc:MyMc = new MyMc();
- addChild(mc);
and it produces the following errors:
1136: Incorrect number of arguments. Expected 2.
1067: Implicit coercion of a value of type MyMc to an unrelated type flash.display:DisplayObject.
I get these errors, yet this is the answer I see posted all over. The code itself makes sense, just doesn't work like everyone says it should. Help???