# Frame delay action?

**URL:** <https://forum.kirupa.com/t/frame-delay-action/115284>\
**Category:** Uncategorized\
**Created:** [July 7, 2004, 10:36am UTC](https://forum.kirupa.com/t/frame-delay-action/115284 "2004-07-07T10:36:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmountain](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@jmountain](https://forum.kirupa.com/u/jmountain)\
**Post date:** [July 7, 2004, 10:36am UTC](https://forum.kirupa.com/t/frame-delay-action/115284/1 "2004-07-07T10:36:40Z")

</div>

Hey I’m trying to create a delay action on a button in a flash movie. Basically I want the first part of the action to perform immediately- gotoAndPlay(“launchwin\_sm”); but the second and third parts to have a frame delay. Is this possible? Ive seen some that use a time delay is a frame delay possible?

Here’s the code at the minute.

on (release) {  
gotoAndPlay(“launchwin\_sm”);  
setProperty(“missiontext”, \_visible, “1”);  
setProperty(“servicestext”, \_visible, “0”);  
}

Here’s the link online if what I’m saying doesn’t make sense. [http://jmountain.com/new/seg1.html](http://jmountain.com/new/seg1.html) When you click on mission at the top right the text is coming in too quickly. I don’t want it to appear until after the window has fully opened.

Any help/advise/improvements here would be appreciated.

Thanks  
Jim

---

<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:** [July 7, 2004, 11:06am UTC](https://forum.kirupa.com/t/frame-delay-action/115284/2 "2004-07-07T11:06:01Z")

</div>

You can use setInterval for that:)  
On your button:

```auto
on (release) {
	gotoAndPlay("launchwin_sm");
	id=setInterval(waitaWhile, 50);
}

```

"50’ is the time to wait in msecs, change it to the value you want;)  
And the function (on a frame):

```auto
function waitaWhile() {
	clearInterval(id);
	missiontext._visible = 1;
	servicestext._visible = 0;
}

```

scotty(-:
