# SwapDepths on multiple movieclips/buttons?

**URL:** <https://forum.kirupa.com/t/swapdepths-on-multiple-movieclips-buttons/305394>\
**Category:** flash\
**Created:** [February 24, 2010, 3:02pm UTC](https://forum.kirupa.com/t/swapdepths-on-multiple-movieclips-buttons/305394 "2010-02-24T15:02:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Amymation](https://avatars.discourse-cdn.com/v4/letter/a/bc8723/32.png) [@Amymation](https://forum.kirupa.com/u/Amymation)\
**Post date:** [February 24, 2010, 3:02pm UTC](https://forum.kirupa.com/t/swapdepths-on-multiple-movieclips-buttons/305394/1 "2010-02-24T15:02:22Z")

</div>

I have a problem!  
I’m making a website where you click a character and a board drops down behind the character. But I have this for many other buttons. For example board 1 is already placed, I click button 2 and board 2 comes down infront of the first board (which I wanted btw) HOWEVER the board also goes infront of the characters, I’ve been trying to sort this but nothings working … HELP MEH.

Button 1 code:  
on (release) {  
//Movieclip GotoAndPlay Behavior  
\_root.home.gotoAndPlay(2);  
\_root.home.swapDepths(1);  
//End Behavior

}

I also added code into the mainframe so swapDepths are allowed on movieclips;

Button.prototype.swapDepths = MovieClip.prototype.swapDepths;

Help is apprechiated. 🙂
