# Setinterval for a loop function

**URL:** https://forum.kirupa.com/t/setinterval-for-a-loop-function/151546
**Category:** Uncategorized
**Created:** [June 16, 2005, 5:51am UTC](https://forum.kirupa.com/t/setinterval-for-a-loop-function/151546 "2005-06-16T05:51:41Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![icube](https://avatars.discourse-cdn.com/v4/letter/i/f19dbf/32.png) [@icube](https://forum.kirupa.com/u/icube)
#### Post date: [June 16, 2005, 5:51am UTC](https://forum.kirupa.com/t/setinterval-for-a-loop-function/151546/1 "2005-06-16T05:51:41Z")

</div>

```auto
_root.leftButton.onRelease = function() { 
        for(var i=0; i<6; i++){
		animateThumbsToLeft(variable_1, variable2);
	}	
};

```

ok how and where do i put the setInterval script if i want to execute the “animateThumbsToLeft” function for 6 times and inbetween each time have a delay of say half a second…

i tried alot of ways and i still can’t get it to work…

thanks
