|
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member
Join Date: Jul 2008
Location: Manhattan, New York City. (New York City??)
Posts: 37
|
I am trying to set the depth of the of the movie clip that I created in AS3.
Basically I want the movie clip to be at the bottom of the stacking order. And it keeps appearing on top of my design or items I placed in the timeline how can I make it so this object or movie clip is at the bottom or if I wanted to bring it to a different level? |
|
|
|
|
|
#2 |
|
Ө_ө sleepy mod
Join Date: Mar 2003
Location: Oregon, USA
Posts: 2,330
|
Whenever you use addChild, the object is put on the top of the display list (highest z-index). You can use a couple different methods to manually set the index - also, remember that you have to use an index thats in bounds, you can only set an index to 100 if there are 100 other things on stage.
addChildAt(mc, 0); <= this will add to the back addChildAt(mc, 10); <= this will add to layer 10 and bump anything already there setChildIndex(mc, 20); <= this moves mc to index 20, bumping anything else setChildIndex(mc, this.numChildren - 1); <= bring mc to the top swapChildren(mc, mc2); <= switches the two swapChildrenAt(0, 10); <= switches whatever is at 0 with whatever is at 10 |
|
|
|
|
|
#3 |
|
Member
Join Date: Jul 2008
Location: Manhattan, New York City. (New York City??)
Posts: 37
|
This cleared things up.. thanks. I saved this code.. I am sure I will be using it often now. Thanks again
|
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|