# Trying to archieve a delay for each movieclip

**URL:** <https://forum.kirupa.com/t/trying-to-archieve-a-delay-for-each-movieclip/213586>\
**Category:** Uncategorized\
**Created:** [January 21, 2007, 8:30am UTC](https://forum.kirupa.com/t/trying-to-archieve-a-delay-for-each-movieclip/213586 "2007-01-21T08:30:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenisfam](https://avatars.discourse-cdn.com/v4/letter/k/b9bd4f/32.png) [@kenisfam](https://forum.kirupa.com/u/kenisfam)\
**Post date:** [January 21, 2007, 8:30am UTC](https://forum.kirupa.com/t/trying-to-archieve-a-delay-for-each-movieclip/213586/1 "2007-01-21T08:30:09Z")

</div>

Hi there.

I hope someone can help me grasping the concept of delay.

My problem is the next.  
I am making a kind of gallery using an xml file.

Now ,when i attach a movieclip for each generated item i have into my main mc,  
“this movieclip is kind of a holder for an image with some information and a button”  
They come up all at once ,  
i would like them so show up ,for example 500 msec after each one.

so i thought i could accomplish this with setInterval ,  
but with no luck for now

The code that attaches it is:

```auto
 
for (var g=offset; g < fin ; g++) {
var BoxHolder = moviecl.attachMovie("new_item","item"+my_counter, my_counter);
 

```

I tried to change this to:

```auto
 
myfunction(mc,attachmc,attachId,my_counter)
{
return BoxHolder = mc.attachMovie("attachmc","attachId"+my_counter, my_counter);
}
 
for (var g=offset; g < fin ; g++) {
setinterval(myfunction,500,"myID"+my_counter);
var Box =myfunction(moviecl,new_item,item,my_counter);
clearInterval("myID"+my_counter);

```

If anyone could help me or tell me how to accomplish this , would be greatly appreciated.

If i am not clear to you ,please let me know to see if i can explain it better.

Thanks in advance

Luck
