Why doesnt my AS3 MovieClip show
Posted on 2011-04-27
I'm just trying to show a movieclip (that i draw in code) on the stage but it doesnt appear.
Here's my code:
(this is my class referenced from the FLA)ie. the class in the "Class" field of "Publish" details.
Every thing else i put in here works so it's not my class and fla syntax that doesnt work.
public class CBitmap2 extends MovieClip
protected var m_spTest:MovieClip;
public function CBitmap2()
m_spTest = new MovieClip();
m_spTest.x = 50;
m_spTest.y = 50;
m_spTest.width = 100;
m_spTest.height = 100;
m_spTest.graphics.beginFill( 0xff00ff );
m_spTest.graphics.drawRect(0, 0, 100, 100);
m_spTest.visible = true;
//Now i try 3 ways but none work