# Changing Characters Depth

**URL:** <https://forum.kirupa.com/t/changing-characters-depth/118789>\
**Category:** Uncategorized\
**Created:** [August 9, 2004, 7:15am UTC](https://forum.kirupa.com/t/changing-characters-depth/118789 "2004-08-09T07:15:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skribble](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@Skribble](https://forum.kirupa.com/u/Skribble)\
**Post date:** [August 9, 2004, 7:15am UTC](https://forum.kirupa.com/t/changing-characters-depth/118789/1 "2004-08-09T07:15:51Z")

</div>

hi guys, i was wondering how i would go about changing a characters depth. I need it to be applicable to any MC i apply the code to though.

I did try doing it myself but i have never delt with “depth” , in depth b4. (no pun intended)

```auto
onClipEvent (enterFrame){
 if (_root.man._y>this._y) {
  this.swapDepths(_root.man);
 } else {
  _root.man.swapDepths(this);
 }
}

```

i tried that but i know its wrong because it looks to simple for such a complex thing lol.

Ok guys thanx alot i hope sumone can help
