# AS3 Loop with Timer

**URL:** <https://forum.kirupa.com/t/as3-loop-with-timer/258689>\
**Category:** flash\
**Created:** [April 26, 2008, 8:29pm UTC](https://forum.kirupa.com/t/as3-loop-with-timer/258689 "2008-04-26T20:29:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattjp18](https://avatars.discourse-cdn.com/v4/letter/m/e8c25b/32.png) [@mattjp18](https://forum.kirupa.com/u/mattjp18)\
**Post date:** [April 26, 2008, 8:29pm UTC](https://forum.kirupa.com/t/as3-loop-with-timer/258689/1 "2008-04-26T20:29:27Z")

</div>

Hi -

I’m having some trouble figuring out how to add a timer to delay the adding of each thumbnail to the list. I want them to stagger loading in, so they don’t all show up at once. I figure I need to use a timer somehow…

Here’s the loop code that is loading in the thumbs and displaying them in a list:

```auto
 
for(var a:int=0; a<thumbArray.length; a++){
   var nextThumb:Thumbnail = new Thumbnail();
   nextThumb.displayImage = thumbArray[a];
   nextThumb.displayTxt = txtArray[a];
   nextThumb.x = 0;
   nextThumb.y = (a*nextThumb.height)+a*10;
   thumbs.addChild(nextThumb);
}

```

Any help would be appreciated.

Thanks,

Matt
