# Can you delay actionscript?

**URL:** <https://forum.kirupa.com/t/can-you-delay-actionscript/171927>\
**Category:** flash\
**Created:** [December 9, 2005, 11:05am UTC](https://forum.kirupa.com/t/can-you-delay-actionscript/171927 "2005-12-09T11:05:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aussie01](https://avatars.discourse-cdn.com/v4/letter/a/ac91a4/32.png) [@Aussie01](https://forum.kirupa.com/u/Aussie01)\
**Post date:** [December 9, 2005, 11:05am UTC](https://forum.kirupa.com/t/can-you-delay-actionscript/171927/1 "2005-12-09T11:05:27Z")

</div>

Can you delay actionscript so that it executes on a specific frame?

I have an animation and a button on the stage. I want the button to do something, but only when the animation gets to a certain point. So I’ve made the main timeline 60 frames long (my animation in embedded in a movie clip that loops every 60 frames) yet my actionscript is on frame 1.

If the button is pressed anywhere between frame 1 and 59 the animation jumps to the target of the button, whereas frame 60 of the first animation and frame 1 of the second (which the button links to) glide seamlessly. Can I write some code that will say something like…

“Do what I ask, but wait until frame 60 to do it”?

Cheers,
