# Trouble with deleting MCs

**URL:** <https://forum.kirupa.com/t/trouble-with-deleting-mcs/22854>\
**Category:** flash\
**Created:** [June 9, 2003, 5:59pm UTC](https://forum.kirupa.com/t/trouble-with-deleting-mcs/22854 "2003-06-09T17:59:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ToddziLLa](https://avatars.discourse-cdn.com/v4/letter/t/3be4f8/32.png) [@ToddziLLa](https://forum.kirupa.com/u/ToddziLLa)\
**Post date:** [June 9, 2003, 5:59pm UTC](https://forum.kirupa.com/t/trouble-with-deleting-mcs/22854/1 "2003-06-09T17:59:21Z")

</div>

Hi guys -

I have this script in Frame 1 of a scene. On another layer, I have a button that goes to the next scene on click. For some reason, the MCs that this script creates are still there on the next scene. What and where do I have to do to get rid of this on the next scene??

function drawCircle(taille,col,pro){  
var mc=this.createEmptyMovieClip(“b”+pro,pro);  
mc.lineStyle(taille,col,100);  
mc.lineTo(.15,.45);  
return mc;}  
function drawThing(){  
cl1=drawCircle(a=30+random(50),0xffffff,(++prof)+10000);  
cl2=drawCircle(a+20,0,prof);  
cl1.\_x=cl2.\_x=random (550);  
cl1.\_y=cl2.\_y=random (400);  
cl1.onEnterFrame=cl2.onEnterFrame=function(){  
if (120 - this.\_xscale \> 1) this.\_xscale = this.\_yscale += (120 - this.\_xscale)/7;  
else this.onEnterFrame = function(){  
this.\_alpha -= 2;  
if (this.\_alpha \< 5) this.removeMovieClip();}}}  
setInterval(drawThing,30);  
stop();

---

<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:** [June 9, 2003, 11:27pm UTC](https://forum.kirupa.com/t/trouble-with-deleting-mcs/22854/2 "2003-06-09T23:27:58Z")

</div>

I don’t know if this will help, but something simular happened to me once. I had a duplicateMovieClip script on the main timeline that carried through to other scenes. I had to move that script to an emptyMovieClip that would not be in scene two. That’s solved my prob.

---

<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:** [June 10, 2003, 12:29am UTC](https://forum.kirupa.com/t/trouble-with-deleting-mcs/22854/3 "2003-06-10T00:29:07Z")

</div>

they’re still there because there’s no reason for them not to be 😉

[http://www.umbc.edu/interactive/flash/tutorials/showpage.php?p=depths](http://www.umbc.edu/interactive/flash/tutorials/showpage.php?p=depths)

… its mentioned in like the 15th paragraph down 🙂
