# Wait for x seconds on a frame

**URL:** <https://forum.kirupa.com/t/wait-for-x-seconds-on-a-frame/42452>\
**Category:** Uncategorized\
**Created:** [February 9, 2004, 1:40pm UTC](https://forum.kirupa.com/t/wait-for-x-seconds-on-a-frame/42452 "2004-02-09T13:40:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanjay2211](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@sanjay2211](https://forum.kirupa.com/u/sanjay2211)\
**Post date:** [February 9, 2004, 1:40pm UTC](https://forum.kirupa.com/t/wait-for-x-seconds-on-a-frame/42452/1 "2004-02-09T13:40:04Z")

</div>

I just want to stop my timeline for 5 seconds after an animation completes.

I try with SetInterval, but i do mistake somewhere,

can anyone gives me code for this.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 9, 2004, 4:33pm UTC](https://forum.kirupa.com/t/wait-for-x-seconds-on-a-frame/42452/2 "2004-02-09T16:33:30Z")

</div>

Paste this on the frame:

```auto
function unpause() {
	gotoAndPlay(_currentframe+1);
	clearInterval(my_interval);
}
my_interval = setInterval(unpause, 5000);
stop();

```
