# swapDepths

**URL:** <https://forum.kirupa.com/t/swapdepths/117191>\
**Category:** Uncategorized\
**Created:** [July 25, 2004, 4:42pm UTC](https://forum.kirupa.com/t/swapdepths/117191 "2004-07-25T16:42:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![uudens](https://avatars.discourse-cdn.com/v4/letter/u/ea5d25/32.png) [@uudens](https://forum.kirupa.com/u/uudens)\
**Post date:** [July 25, 2004, 4:42pm UTC](https://forum.kirupa.com/t/swapdepths/117191/1 "2004-07-25T16:42:36Z")

</div>

:run: 🅰

i have some movie clips duplicated, say ten, depths starting from 2, and i have an mc, on the root frame i put

> mclip.swapDepths(1);  
> and nothing happens 🅰 :run:  
> i even tried

> mclip.duplicateMovieClip(“mclip2”,1);  
> mclip.\_visible=false;

still nuttin

how to make the mc appear on TOP of other mc’s ?!?!?!?!  
i hate this

---

<div class="post-metadata">

**Author:** ![uudens](https://avatars.discourse-cdn.com/v4/letter/u/ea5d25/32.png) [@uudens](https://forum.kirupa.com/u/uudens)\
**Post date:** [July 26, 2004, 8:09am UTC](https://forum.kirupa.com/t/swapdepths/117191/2 "2004-07-26T08:09:08Z")

</div>

well … ?

---

<div class="post-metadata">

**Author:** ![ratbaggy](https://avatars.discourse-cdn.com/v4/letter/r/a3d4f5/32.png) [@ratbaggy](https://forum.kirupa.com/u/ratbaggy)\
**Post date:** [July 26, 2004, 8:19am UTC](https://forum.kirupa.com/t/swapdepths/117191/3 "2004-07-26T08:19:08Z")

</div>

have you tried the actionscript reference?

---

<div class="post-metadata">

**Author:** ![bobdoe](https://avatars.discourse-cdn.com/v4/letter/b/51bf81/32.png) [@bobdoe](https://forum.kirupa.com/u/bobdoe)\
**Post date:** [July 26, 2004, 8:33am UTC](https://forum.kirupa.com/t/swapdepths/117191/4 "2004-07-26T08:33:02Z")

</div>

well i noticed in flash that when you duplicate movies a lot, certain MCs get lost or replaced by others in the same depths. Try mc\_clip.swapDepths(1000) to see what you get. The depth value of 1 is a little small for my comfort, and remember flash puts higher number depths closer to your eye.

---

<div class="post-metadata">

**Author:** ![Behemoth\_Dan](https://avatars.discourse-cdn.com/v4/letter/b/779978/32.png) [@Behemoth\_Dan](https://forum.kirupa.com/u/Behemoth_Dan)\
**Post date:** [July 26, 2004, 8:39am UTC](https://forum.kirupa.com/t/swapdepths/117191/5 "2004-07-26T08:39:47Z")

</div>

Have it increment the depths. In the same Flash file I have needed help with, I am instancing a movie a few hundred times. So everytime you duplicate it, do something like mcDepth++ or whatever your depth variable name is.

---

<div class="post-metadata">

**Author:** ![uudens](https://avatars.discourse-cdn.com/v4/letter/u/ea5d25/32.png) [@uudens](https://forum.kirupa.com/u/uudens)\
**Post date:** [July 26, 2004, 3:15pm UTC](https://forum.kirupa.com/t/swapdepths/117191/6 "2004-07-26T15:15:13Z")

</div>

LOL

> [@bobdoe](#):
>
> and remember flash puts higher number depths closer to your eye.

i always thought that it puts smaller numbers closer to my eye like if the depth was 1 it was on top of everything  
LOL
