# Issues with depthSwap();

**URL:** <https://forum.kirupa.com/t/issues-with-depthswap/271128>\
**Category:** flash\
**Created:** [September 18, 2008, 7:18pm UTC](https://forum.kirupa.com/t/issues-with-depthswap/271128 "2008-09-18T19:18:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bostondesign](https://avatars.discourse-cdn.com/v4/letter/b/5fc32e/32.png) [@bostondesign](https://forum.kirupa.com/u/bostondesign)\
**Post date:** [September 18, 2008, 7:18pm UTC](https://forum.kirupa.com/t/issues-with-depthswap/271128/1 "2008-09-18T19:18:30Z")

</div>

I am trying to make a user be able to move images around, bring the clicked on one to the front, and on reset set them all back up, not sure what the heck is goin on, any help would be appreciated.

large1\_mc.large1.loadMovie(“homepics/large1.jpg”);  
med1\_mc.med1.loadMovie(“homepics/med1.jpg”);  
med2\_mc.med2.loadMovie(“homepics/med2.jpg”);  
med3\_mc.med3.loadMovie(“homepics/med3.jpg”);  
square1\_mc.square1.loadMovie(“homepics/square1.jpg”);  
port1\_mc.port1.loadMovie(“homepics/port1.jpg”);

buttons.onRelease = function() {

large1\_mc.\_x=873.5;  
large1\_mc.\_y=363.1;  
large1\_mc.swapDepths(6);

med1\_mc.\_x=684.1;  
med1\_mc.\_y=136.4;  
med1\_mc.swapDepths(5);

med2\_mc.\_x=628;  
med2\_mc.\_y=136;  
med2\_mc.swapDepths(4);

med3\_mc.\_x=705;  
med3\_mc.\_y=130.6;  
med3\_mc.swapDepths(3);

square1\_mc.\_x=577.4;  
square1\_mc.\_y=160.4;  
square1\_mc.swapDepths(2);

port1\_mc.\_x=534;  
port1\_mc.\_y=184;  
port1\_mc.swapDepths(1);

}

/_Controls Drag & depth function_/

large1\_mc.onPress = function() {  
this.startDrag(false, 328.8, 253.9, 1039.5, 709.2);  
this.swapDepths(this.getNextHighestDepth());  
}  
large1\_mc.onRelease = large1\_mc.onReleaseOutside = function() {  
this.stopDrag();  
buttons.gotoAndPlay(“dragout”);  
}

med1\_mc.onPress = function() {  
this.startDrag(false, 70, -65, 855, 600);  
this.swapDepths(this.getNextHighestDepth());  
}  
med1\_mc.onRelease = med1\_mc.onReleaseOutside = function() {  
this.stopDrag();  
}

med2\_mc.onPress = function() {  
this.startDrag(false, -9.9,-52.6,888,417);  
this.swapDepths(this.getNextHighestDepth());  
}  
med2\_mc.onRelease = med2\_mc.onReleaseOutside = function() {  
this.stopDrag();  
}

med3\_mc.onPress = function() {  
this.startDrag(false, 89, -65.3, 900, 598);  
this.swapDepths(this.getNextHighestDepth());  
}  
med3\_mc.onRelease = med1\_mc.onReleaseOutside = function() {  
this.stopDrag();  
}

square1\_mc.onPress = function() {  
this.startDrag(false, -25.6, -6.5, 879.4, 630.4);  
this.swapDepths(this.getNextHighestDepth());  
}  
square1\_mc.onRelease = square1\_mc.onReleaseOutside = function() {  
this.stopDrag();  
}

port1\_mc.onPress = function() {  
this.startDrag(false, -24.9,33.9,924,626);  
this.swapDepths(this.getNextHighestDepth());  
}  
port1\_mc.onRelease = port1\_mc.onReleaseOutside = function() {  
this.stopDrag();  
}

stop();
