# Delay in a for loop

**URL:** <https://forum.kirupa.com/t/delay-in-a-for-loop/216194>\
**Category:** flash\
**Created:** [February 14, 2007, 11:57am UTC](https://forum.kirupa.com/t/delay-in-a-for-loop/216194 "2007-02-14T11:57:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Salad](https://avatars.discourse-cdn.com/v4/letter/s/f08c70/32.png) [@Salad](https://forum.kirupa.com/u/Salad)\
**Post date:** [February 14, 2007, 11:57am UTC](https://forum.kirupa.com/t/delay-in-a-for-loop/216194/1 "2007-02-14T11:57:17Z")

</div>

The titles a bit vague, but it’s the best way I could have put it.

```auto
 
for (var i = _currentframe; i>0; i--) {
  trace(i);
  prevFrame();
  
 }

```

I have the above code, which should go reverse through my timeline and I believe it does so. But at the moment it skips right back to frame 1, how do I get a delay so that it goes from frame to frame gradually.

I’ve been using flash since November, so it’s mostly new to me and this is a great site.

Thanks
