# Call setInterval several times

**URL:** <https://forum.kirupa.com/t/call-setinterval-several-times/251919>\
**Category:** Uncategorized\
**Created:** [February 13, 2008, 11:09pm UTC](https://forum.kirupa.com/t/call-setinterval-several-times/251919 "2008-02-13T23:09:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pensamente](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/pensamente/32/1208_2.png) [@pensamente](https://forum.kirupa.com/u/pensamente)\
**Post date:** [February 13, 2008, 11:09pm UTC](https://forum.kirupa.com/t/call-setinterval-several-times/251919/1 "2008-02-13T23:09:10Z")

</div>

hi,

i’m not reaching this… so imagine 3 clips on stage (ma0, ma1, ma2)  
every rollOut it sould delay the call of a function, where it should trace the caller clip, and then clear the interval…

[AS]function out(who:MovieClip):Void  
{  
trace(who);  
clearInterval(intTim);  
}

for (var i:Number = 0; i\<3; i++)

```
this['ma'+i].onRollOut = function() 
{
	intTim = setInterval(_root, 'out', 1000, this);
}

```

var intTim:Number = new Number();[/AS]  
i can’t understand why the interval is not clear if you rollOut each clip before the current setInterval is running… :cyclops:

don’t know if i was clear, but it seams to me that i need some sort of way to create diferent “processes” for each clip… for example, if i create differet intervals for each clip and then clear each interval individually i can get this to work… but it’s sure not code wise.

any ideias on this?!

thx  
am
