# Problems with MC remaining in scene after swapDepth

**URL:** <https://forum.kirupa.com/t/problems-with-mc-remaining-in-scene-after-swapdepth/262976>\
**Category:** Uncategorized\
**Created:** [June 11, 2008, 3:15pm UTC](https://forum.kirupa.com/t/problems-with-mc-remaining-in-scene-after-swapdepth/262976 "2008-06-11T15:15:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pgh](https://avatars.discourse-cdn.com/v4/letter/p/f6c823/32.png) [@pgh](https://forum.kirupa.com/u/pgh)\
**Post date:** [June 11, 2008, 3:15pm UTC](https://forum.kirupa.com/t/problems-with-mc-remaining-in-scene-after-swapdepth/262976/1 "2008-06-11T15:15:51Z")

</div>

Hi, I’m trying to make a few movieclips grow when you rollover them and the shrink back down when you rollout. I tried using swapDepth to make it so each clip would stay on top. But then when I try to instruct its root movie clip to go back to frame 1 (which is blank with a stop command), it remains on the stage… any auggestions?? Please help! THANKS!!

Here’s the code for the movie clip to grow/shrink/swapDepths

stop();  
this.onEnterFrame = function() {  
if (rewind == true) {  
prevFrame();  
}  
};  
this.onRollOver = function() {  
rewind = false;  
play();  
\_root.x +=2;  
this.swapDepths(\_root.x);  
};  
this.onRollOut = function() {  
rewind = true;  
if (\_root.x\>=0) {  
\_root.x -= 3;  
this.swapDepths(\_root.x);  
}  
};

---

<div class="post-metadata">

**Author:** ![souled](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@souled](https://forum.kirupa.com/u/souled)\
**Post date:** [June 11, 2008, 3:54pm UTC](https://forum.kirupa.com/t/problems-with-mc-remaining-in-scene-after-swapdepth/262976/2 "2008-06-11T15:54:07Z")

</div>

Use

**mc.removeMovieClip();**

to remove it if you’ve given it a depth.
