PDA

View Full Version : can you AddChild to a specific layer?



SchmackLab
October 28th, 2008, 04:05 PM
I am using addChild to add a new instance of a shape to my stage. However I want that shape to be placed below other objects that are already present. How do you specify where you want the new object to be placed. The current default is on top of everything. Do levels have anything to do with this? I have no idea what they are.

Thanks for your help!

creatify
October 28th, 2008, 04:10 PM
I am using addChild to add a new instance of a shape to my stage. However I want that shape to be placed below other objects that are already present. How do you specify where you want the new object to be placed. The current default is on top of everything. Do levels have anything to do with this? I have no idea what they are.

Thanks for your help!



addChildAt(yourChild, 0);


that will add your to the bottom indice (0) and everything else will get pushed up.