# Delete function

**URL:** <https://forum.kirupa.com/t/delete-function/262975>\
**Category:** Uncategorized\
**Created:** [June 11, 2008, 3:14pm UTC](https://forum.kirupa.com/t/delete-function/262975 "2008-06-11T15:14:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nnnswordfish](https://avatars.discourse-cdn.com/v4/letter/n/65b543/32.png) [@nnnswordfish](https://forum.kirupa.com/u/nnnswordfish)\
**Post date:** [June 11, 2008, 3:14pm UTC](https://forum.kirupa.com/t/delete-function/262975/1 "2008-06-11T15:14:37Z")

</div>

i have this function on frame 5

function playit() {  
play();  
}

setTimeout(playit,5000);

and i want to delete it on frame 10 how to do this try like this but nothing

delete playit();

---

<div class="post-metadata">

**Author:** ![nnnswordfish](https://avatars.discourse-cdn.com/v4/letter/n/65b543/32.png) [@nnnswordfish](https://forum.kirupa.com/u/nnnswordfish)\
**Post date:** [June 11, 2008, 5:40pm UTC](https://forum.kirupa.com/t/delete-function/262975/2 "2008-06-11T17:40:06Z")

</div>

i have a button on stage and when i press on it its paly frame 10 and thats wy i want to delete this time out,if u dont press on it in 5 secont it should play automatic

---

<div class="post-metadata">

**Author:** ![glosrfc](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/glosrfc/32/8334_2.png) [@glosrfc](https://forum.kirupa.com/u/glosrfc)\
**Post date:** [June 11, 2008, 7:08pm UTC](https://forum.kirupa.com/t/delete-function/262975/3 "2008-06-11T19:08:03Z")

</div>

```auto
stop();
my_btn.onRelease = function() {
	clearInterval(playInterval);
	gotoAndPlay(10);
};
function playit() {
	gotoAndPlay(10);
}
playInterval = setInterval(playit, 5000);

```

---

<div class="post-metadata">

**Author:** ![nnnswordfish](https://avatars.discourse-cdn.com/v4/letter/n/65b543/32.png) [@nnnswordfish](https://forum.kirupa.com/u/nnnswordfish)\
**Post date:** [June 11, 2008, 8:00pm UTC](https://forum.kirupa.com/t/delete-function/262975/4 "2008-06-11T20:00:15Z")

</div>

thanks 🙂 thanks thanks 🙂
