# Wait a few seconds, then execute function? Action Delay

**URL:** https://forum.kirupa.com/t/wait-a-few-seconds-then-execute-function-action-delay/285109
**Category:** Uncategorized
**Created:** [March 27, 2009, 2:31am UTC](https://forum.kirupa.com/t/wait-a-few-seconds-then-execute-function-action-delay/285109 "2009-03-27T02:31:12Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![artriste](https://avatars.discourse-cdn.com/v4/letter/a/f475e1/32.png) [@artriste](https://forum.kirupa.com/u/artriste)
#### Post date: [March 27, 2009, 2:31am UTC](https://forum.kirupa.com/t/wait-a-few-seconds-then-execute-function-action-delay/285109/1 "2009-03-27T02:31:12Z")

</div>

Hi,

is it possible to insert a delay before a function is executed.  
Here is a simple sample code where it could be used:

```auto

myButton.onRelease = function () {
//// INSERT A 3 seconds DELAY BEFORE THE gotoAndPlay is executed
myMC.gotoAndplay("10");
}

```

This has to be simple…  
Thanks
