# Pause within a FOR loop

**URL:** <https://forum.kirupa.com/t/pause-within-a-for-loop/286407>\
**Category:** flash\
**Created:** [April 15, 2009, 4:54am UTC](https://forum.kirupa.com/t/pause-within-a-for-loop/286407 "2009-04-15T04:54:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sarumitai](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@sarumitai](https://forum.kirupa.com/u/sarumitai)\
**Post date:** [April 15, 2009, 4:54am UTC](https://forum.kirupa.com/t/pause-within-a-for-loop/286407/1 "2009-04-15T04:54:07Z")

</div>

How can I pause within a for loop?

Not do some other function or pause the playhead, just:

for (i=0;i\<=10;i++) {  
trace(i);

```
   wait for 1 second;

   trace(i);

   wait for another second;

```

}

I can’t make it wait within the loop. I can use setTimeout or setInterval to delay the calling of the for loop, but once it’s called it just flips through all the iterations.
