# Need way to delay execution

**URL:** https://forum.kirupa.com/t/need-way-to-delay-execution/121000
**Category:** Uncategorized
**Created:** [August 29, 2004, 9:49pm UTC](https://forum.kirupa.com/t/need-way-to-delay-execution/121000 "2004-08-29T21:49:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![acor](https://avatars.discourse-cdn.com/v4/letter/a/e19b73/32.png) [@acor](https://forum.kirupa.com/u/acor)
#### Post date: [August 29, 2004, 9:49pm UTC](https://forum.kirupa.com/t/need-way-to-delay-execution/121000/1 "2004-08-29T21:49:09Z")

</div>

I just need a simple way for flash to delay the execution of a group of actions for a few seconds.

Here is the code I need delayed:

\_root.randomnumber=(random(20))

if (\_root.randomnumber\<=8){\_root.commentbox=“Hit!”}

if (\_root.randomnumber\<=8){\_root.enemyhp-=15, nextFrame()  
}

else {\_root.commentbox=“Miss!”  
}
