# Removing (stopping) a function

**URL:** https://forum.kirupa.com/t/removing-stopping-a-function/124718
**Category:** Uncategorized
**Created:** [October 6, 2004, 8:18am UTC](https://forum.kirupa.com/t/removing-stopping-a-function/124718 "2004-10-06T08:18:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Ubik](https://avatars.discourse-cdn.com/v4/letter/u/b38774/32.png) [@Ubik](https://forum.kirupa.com/u/Ubik)
#### Post date: [October 6, 2004, 8:18am UTC](https://forum.kirupa.com/t/removing-stopping-a-function/124718/1 "2004-10-06T08:18:39Z")

</div>

Hello all !  
I have a question :h: . I have this function

```auto
this.onEnterFrame = function(timer) {
        myTime = getTimer()/1000;
        hours = Math.floor(myTime/3600);
        minutes = Math.floor((myTime/3600-hours)*60);
        seconds = Math.floor(((myTime/3600-hours)*60-minutes)*60);
        mili = Math.floor((myTime-(seconds+(minutes*60)+(hours*3600)))*100);
        myhours = (hours<10) ? "0"+hours : hours;
        myseconds = (seconds<10) ? "0"+seconds : seconds;
        myminutes = (minutes<10) ? "0"+minutes : minutes;
        mymili = (mili<10) ? "0"+mili : mili;
        timerText.text = myhours+":"+myminutes+":"+myseconds+":"+mymili;
};

```

But i want that when i click a button some text appears in the timerText textfield, i tried that but when i click the button the text just appears a second and then the timer continue. So my question is how can i remove this function, i tried

```auto
delete this.onEnterFrame

```

but i doesn’t work, can someone help me ?  
Thanks

Ubik
