# Clearing a function?

**URL:** <https://forum.kirupa.com/t/clearing-a-function/51350>\
**Category:** flash\
**Created:** [May 12, 2004, 7:49am UTC](https://forum.kirupa.com/t/clearing-a-function/51350 "2004-05-12T07:49:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![El\_Phantom](https://avatars.discourse-cdn.com/v4/letter/e/d6d6ee/32.png) [@El\_Phantom](https://forum.kirupa.com/u/El_Phantom)\
**Post date:** [May 12, 2004, 7:49am UTC](https://forum.kirupa.com/t/clearing-a-function/51350/1 "2004-05-12T07:49:39Z")

</div>

Hey everybody, quick question.

I set a function for

this.onEnterFrame = function(){  
code;  
}

but later I want this onEnterFrame to stop functioning to conserve on processor resources. setInterval isn’t too good of an option from the way I have things set up, so right now I just set it to a new function with a trace action which overwrites the old one.

Is there a command to simply just clear or break the function from executing?

–EP
