Hello,
Whenever I create a MovieClip in the IDE and draw on it with the IDE then use ActionScript to add more to it (add a Sprite, draw graphics etc…) the thing I added is always behind the graphics of the MovieClip that was drawn in the IDE. How do I bring the Sprite/Graphics that I draw/add to the MovieClip in front of the graphics that were drawn with the IDE?
I have tried doing this:
var myMC:mcDemo = new mcDemo(); //mcDemo being a MovieClip created in the IDE.
var sp:Sprite = new Sprite();
//drawing code goes here... I just don't feel like writing it now.
//along the lines of sp.graphics.beginFill() sp.graphics.drawRect sp.graphics.endFill...
myMc.addChildAt(sp,myMc.numChildren-1);
this.addChild(myMC);
The final product of this is the myMC movieclip on the screen with my sprite behind whatever I drew in the IDE for myMC. How do I make it so the sprite is in front of everything? I have tried setting it to numChildren-1 which should set it in front of all objects.
Thanks,
Noah