# Using the swapDepths method

**URL:** https://forum.kirupa.com/t/using-the-swapdepths-method/228660
**Category:** Uncategorized
**Created:** [June 10, 2007, 7:02am UTC](https://forum.kirupa.com/t/using-the-swapdepths-method/228660 "2007-06-10T07:02:55Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bigimaginations](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bigimaginations/32/3200_2.png) [@bigimaginations](https://forum.kirupa.com/u/bigimaginations)
#### Post date: [June 10, 2007, 7:02am UTC](https://forum.kirupa.com/t/using-the-swapdepths-method/228660/1 "2007-06-10T07:02:55Z")

</div>

I have a small photo gallery that shuffles the thumbnails randomly. When you click them, they move to the center, which I’ve figured out using the slideTo method.

The problem is that when I use:  
this.swapDepths(1000);  
to bring the image to the front, I can’t figure out how to make it go back to a lower depth. I’ve tried using (0), (1), (-1000), (back), (bottom) and a whole slew of others.

I’m positive there’s a way to send something to a lower depth, but I can’t figure out what it is. Anybody have a suggestion or run into this problem before? Any help you could give me would be great. Thanks.
