# Need help with setinterval

**URL:** <https://forum.kirupa.com/t/need-help-with-setinterval/134142>\
**Category:** Uncategorized\
**Created:** [January 15, 2005, 12:18am UTC](https://forum.kirupa.com/t/need-help-with-setinterval/134142 "2005-01-15T00:18:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![iselsewhere](https://avatars.discourse-cdn.com/v4/letter/i/ac91a4/32.png) [@iselsewhere](https://forum.kirupa.com/u/iselsewhere)\
**Post date:** [January 15, 2005, 12:18am UTC](https://forum.kirupa.com/t/need-help-with-setinterval/134142/1 "2005-01-15T00:18:37Z")

</div>

Hello!  
I want to do a small delay for just a couple of frame between each duplicating in the script below. Can you show me how to do this? Is there any easier way than using setinterval? I have tried using setinterval but I don’t understand how to do it. Please help me with this or show me another way to create timing with actionscript…

function makeItems() {  
button.\_visible = 0;  
for (var i = 0; i\<item.length; i++) {  
// I want a delay between each loop!  
var btn = button.duplicateMovieClip(i, 100+i);  
btn.id = i;  
btn.\_x = button.\_x+(i\*30);  
btn.onRelease = function() {  
firstImage(this.id);  
};

}  
}
