# Set interval help

**URL:** https://forum.kirupa.com/t/set-interval-help/37397
**Category:** flash
**Created:** [December 9, 2003, 8:11pm UTC](https://forum.kirupa.com/t/set-interval-help/37397 "2003-12-09T20:11:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Reginald](https://avatars.discourse-cdn.com/v4/letter/r/9dc877/32.png) [@Reginald](https://forum.kirupa.com/u/Reginald)
#### Post date: [December 9, 2003, 8:11pm UTC](https://forum.kirupa.com/t/set-interval-help/37397/1 "2003-12-09T20:11:10Z")

</div>

I want to attack a movieclip every second, ive tried having a go at added adding a set interval command, but i cant get it to work.  
Here’s ma code

attach = function () {  
for (i=0; i\<40; i++) {  
repeat = this.attachMovie(“ball”, “ball”+i, i);  
repeat.\_x = ((i_3)+30);  
repeat.\_y = ((i_3)+30);  
repeat.\_rotation = (20\*(i\*2));  
}  
};

I can get it to attach them all at once, but i cant get it to do it one by one

thanks  
🙂
