# Interval

**URL:** https://forum.kirupa.com/t/interval/287985
**Category:** Uncategorized
**Created:** [May 8, 2009, 8:31pm UTC](https://forum.kirupa.com/t/interval/287985 "2009-05-08T20:31:54Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![fstyler](https://avatars.discourse-cdn.com/v4/letter/f/59ef9b/32.png) [@fstyler](https://forum.kirupa.com/u/fstyler)
#### Post date: [May 8, 2009, 8:31pm UTC](https://forum.kirupa.com/t/interval/287985/1 "2009-05-08T20:31:54Z")

</div>

hi guys,

I realy need you…

can you help me to set MOVE Interval for every duplicating Mc

(i want my “item” to tween with interval, when i press “btn” = move with “first item” [COLOR=red]interval[/COLOR] “second item” [COLOR=red]interval [/COLOR]etc… )

here is my code WITHOUT interval

//////////////////////////////////////////////////////////////////////

stop();  
var tween:Number = 3;  
stageX = 0;  
mcWidth = 110;  
posX = 0;  
total = 8  
for (i=0; i\<total; i++) {  
this.item\_mc.item.duplicateMovieClip(“item”+i,i);  
this.item\_mc.item.\_visible = false;  
this.item\_mc[“item”+i].mc = i;  
this.item\_mc[“item”+i].\_x = mcWidth\*i;  
if (i == total-1) {  
mc = 0;  
}

}  
this.onEnterFrame = function() {  
posX = stageX-item\_mc[“item”+mc].\_x-item\_mc.item.\_width/2;  
item\_mc.\_x += (posX-item\_mc.\_x)/tween;  
};  
btn.onPress = function() {  
mc += 1;  
};

//////////////////////////////////////////////////////////////////////

Thank you…
