# How do I turn this function off?

**URL:** <https://forum.kirupa.com/t/how-do-i-turn-this-function-off/274533>\
**Category:** Uncategorized\
**Created:** [October 31, 2008, 1:51am UTC](https://forum.kirupa.com/t/how-do-i-turn-this-function-off/274533 "2008-10-31T01:51:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtrace](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@dtrace](https://forum.kirupa.com/u/dtrace)\
**Post date:** [October 31, 2008, 1:51am UTC](https://forum.kirupa.com/t/how-do-i-turn-this-function-off/274533/1 "2008-10-31T01:51:01Z")

</div>

var i:Number = 0;  
onMouseDown = function () {  
this.onEnterFrame = function() {  
i++;  
var b:MovieClip = this.attachMovie(“brush”, “brush”+i, this.getNextHighestDepth());  
b.\_x = this.\_xmouse;  
b.\_y = this.\_ymouse;  
b.\_rotation = Math.floor(Math.random()\*360);  
b.\_xscale = b.\_yscale=Math.floor(Math.random()\*40)+30;  
b.\_alpha = Math.floor(Math.random()\*40)+40;  
};  
};  
onMouseUp = function () {  
delete this.onEnterFrame;  
};

This function basically attaches a movie clip from the library onto the mouse cursor when you drag. But how can I turn it off? And how can I remove the drawings it creates if I want to ‘clear’ everything?

This function is in a movieclip called ‘we’ on the root timeline.

Thanks.
