# swapDepths for 2 side by side galleries

**URL:** <https://forum.kirupa.com/t/swapdepths-for-2-side-by-side-galleries/328628>\
**Category:** flash\
**Created:** [May 31, 2012, 5:45pm UTC](https://forum.kirupa.com/t/swapdepths-for-2-side-by-side-galleries/328628 "2012-05-31T17:45:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrGore](https://avatars.discourse-cdn.com/v4/letter/m/e19adc/32.png) [@MrGore](https://forum.kirupa.com/u/MrGore)\
**Post date:** [May 31, 2012, 5:45pm UTC](https://forum.kirupa.com/t/swapdepths-for-2-side-by-side-galleries/328628/1 "2012-05-31T17:45:02Z")

</div>

Hey dudes!  
I am making a web site and I need to have to separate side by side galleries and when I click the thumbs I want the image to show up big in the middle of the screen covering all the thumbs (from both galleries).  
With this code:  
loadMovieNum(“gal1.swf”,1);  
loadMovieNum(“gal2.swf”,2);  
on a empty flash doc, I have one issue, pictures from gal1.swf appear below the thumbs from gal2.swf;  
So I enhanced the code with:  
on (release) {  
this.swapDepths(this.getNextHighestDepth());  
gotoAndStop(the frame I got the image I wanna show);  
}  
on each thumb (they are buttons).  
It works well for a couple of times then it get’s crazy and every image I open appears behind the thumbs of the other gallery.  
Can someone help?

(I have adobe flash cs4)
