Question
Bring layers to top
I'm wondering how to bring layers to the top in actionscript
3.
I've created many "boxes" using the addChild function as follows:
for(i=0;i<40;i++){
var b:MovieClip = new box();
stage.addChild(b);
b.addEventListener(Event.ENTER_FRAME, boxChange);
}
The boxes scale larger and overlap according to mouse position and the movieclips that were created later always overlap the ones created previously. How do I bring a desired box to the front?
Thanks!
I've created many "boxes" using the addChild function as follows:
for(i=0;i<40;i++){
var b:MovieClip = new box();
stage.addChild(b);
b.addEventListener(Event.ENTER_FRAME, boxChange);
}
The boxes scale larger and overlap according to mouse position and the movieclips that were created later always overlap the ones created previously. How do I bring a desired box to the front?
Thanks!