# Problem with swapDepth

**URL:** https://forum.kirupa.com/t/problem-with-swapdepth/325557
**Category:** flash
**Created:** [October 22, 2011, 11:43pm UTC](https://forum.kirupa.com/t/problem-with-swapdepth/325557 "2011-10-22T23:43:15Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![pm4698](https://avatars.discourse-cdn.com/v4/letter/p/278dde/32.png) [@pm4698](https://forum.kirupa.com/u/pm4698)
#### Post date: [October 22, 2011, 11:43pm UTC](https://forum.kirupa.com/t/problem-with-swapdepth/325557/1 "2011-10-22T23:43:15Z")

</div>

Hi there.  
I use the code at the attached txt file to load an xml gallery.  
I have 2 buttons which i have convert to movieclips with instance names mc1 and mc2.  
I want to make these movieclips to appear in front of the loaded images and not behind.  
I tried at the end of my code this:

mc1.swapDepths(myContainer\_mc);  
mc2.swapDepths(myContainer\_mc);

but nothing happens.

Any ideas?

THanks in advance

P.S. I use as2
