# Removing cursor effect

**URL:** <https://forum.kirupa.com/t/removing-cursor-effect/207209>\
**Category:** Uncategorized\
**Created:** [November 15, 2006, 4:27pm UTC](https://forum.kirupa.com/t/removing-cursor-effect/207209 "2006-11-15T16:27:10Z")\
**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 15, 2006, 4:27pm UTC](https://forum.kirupa.com/t/removing-cursor-effect/207209/1 "2006-11-15T16:27:10Z")

</div>

i used a tutorial to dynamically attach a movie clip to create a bubble effect that occurs when the mouse is moved. It looks great but as i am not used to attaching movies via AS and not manually i have no idea how to remove this effect when it is not required later in the movie. Any help would be great. Sorry for the repeat thread but i am really struggling with this. here is the actionscript i have used:

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\_m c.getNextHighestDepth());  
i++;  
t.\_x = \_xmouse;  
t.\_y = \_ymouse;  
t.\_xscale = t.\_yscale = (Math.random()\*80)+20;  
}
