# Simple question

**URL:** <https://forum.kirupa.com/t/simple-question/180715>\
**Category:** Uncategorized\
**Created:** [March 3, 2006, 12:15am UTC](https://forum.kirupa.com/t/simple-question/180715 "2006-03-03T00:15:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wickedrand](https://avatars.discourse-cdn.com/v4/letter/w/a6a055/32.png) [@wickedrand](https://forum.kirupa.com/u/wickedrand)\
**Post date:** [March 3, 2006, 12:15am UTC](https://forum.kirupa.com/t/simple-question/180715/1 "2006-03-03T00:15:33Z")

</div>

this is pretty simple however i haven’t got a clue on how to fix it…so here it goes, im doing an animation for a show were doing, the animation is split into 4 scenes, 5 with the preloader…on scene3, i have an a.s. setup, here is the code…and what id does is basically its a bubbles script that duplicates an mc…

```auto

// ------------------------------------------------------------
// Bubbles effect
// ------------------------------------------------------------
// Where possible please acknowledge my work.
// 
// © Ben Lowry
// [www.eyeontime.com](http://www.eyeontime.com)
// ------------------------------------------------------------
// it's pretty self explanatory.
// code to randomly size and speed the bubbles is embedded in
// the bubble clip.

function bubbles(){
 
 xpos = Stage.width*(Math.random());
 xpos = Math.round(xpos);
 
 _root.attachMovie("bubble", "bubble"+xpos, 999+xpos);
  
 _root["bubble"+xpos]._x = xpos;
 _root["bubble"+xpos]._y = 200;
}
interval1 = setInterval(bubbles, 50);

```

here is the other part of the code htat is located IN the mc “Bubbles”

```auto

// constant
this._alpha = 100;
// randomise the size 
this.scale = 250*(Math.random());
this._xscale = scale;
this._yscale = scale;
// randomise the speed
this.speed = 4*(Math.random())+1;
this.speed = Math.round(this.speed);
this.onEnterFrame = function(){
 if(this._alpha > 0){
  this._y -= this.speed;
  this._alpha -= this.speed;
 } else {
  delete this.onEnterFrame;
  this.removeMovieClip();
 }
}

```

ok now my question is, when it enters the final scene, i want the bubbles to dissappear, i know it has something todo with mcname.removeMovieClip(); or something similar to it, however i can’t figure it out…help would be greatly appreciated, Thanks!
