# Wee swap depths problem

**URL:** <https://forum.kirupa.com/t/wee-swap-depths-problem/8466>\
**Category:** flash\
**Created:** [November 21, 2002, 9:22pm UTC](https://forum.kirupa.com/t/wee-swap-depths-problem/8466 "2002-11-21T21:22:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![yorkshirepuddin](https://avatars.discourse-cdn.com/v4/letter/y/aeb1de/32.png) [@yorkshirepuddin](https://forum.kirupa.com/u/yorkshirepuddin)\
**Post date:** [November 21, 2002, 9:22pm UTC](https://forum.kirupa.com/t/wee-swap-depths-problem/8466/1 "2002-11-21T21:22:25Z")

</div>

Hi,

I have managed to script the swap depth AS into my movie, however, I have come across this problem.

I have three MCs on the stage acting as buttons. On rollover, the expand and slightly cover this other MCs. This is fine as long as that particular MC is on top.

So, here’s what I did:

\_root.button1.onRollOver = function() {  
this.swapDepther(button2,button);  
};

this works fine except it only does it once. I need to do it everytime they roll over.

I tried putting a goToAndStop on the \_down frame in the actual MC, but it didn’t make a difference.

Any ideas? YP

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 21, 2002, 10:12pm UTC](https://forum.kirupa.com/t/wee-swap-depths-problem/8466/2 "2002-11-21T22:12:31Z")

</div>

Not to worry guys, problem solved! 🙂
