# Dettaching movie clips using AS

**URL:** <https://forum.kirupa.com/t/dettaching-movie-clips-using-as/207123>\
**Category:** Uncategorized\
**Created:** [November 14, 2006, 11:02pm UTC](https://forum.kirupa.com/t/dettaching-movie-clips-using-as/207123 "2006-11-14T23:02:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![andyryan](https://avatars.discourse-cdn.com/v4/letter/a/edb3f5/32.png) [@andyryan](https://forum.kirupa.com/u/andyryan)\
**Post date:** [November 14, 2006, 11:02pm UTC](https://forum.kirupa.com/t/dettaching-movie-clips-using-as/207123/1 "2006-11-14T23:02:00Z")

</div>

hi there,

i used a tutorial on [learnflash.com](http://learnflash.com) to attach a bubble effect to the cursor using this actionscript:

var i:Number = 0;

this.createEmptyMovieClip(“canvas\_mc”,50);

var myListener:Object = new Object();  
Mouse.addListener(myListener);  
myListener.onMouseMove = function(){  
var t:MovieClip = canvas\_mc.attachMovie(“bubble”,“bubble”+i,canvas\_mc.getNextHighestDepth());  
i++;  
t.\_x = \_xmouse;  
t.\_y = \_ymouse;  
t.\_xscale = t.\_yscale = (Math.random()\*80)+20;  
}

my question is how can i then remove this bubble effect in a later frame in my movie?  
I am not familiar with creating movie clips using actionscript so any help would be great.
