# F8 - setInterval help?

**URL:** <https://forum.kirupa.com/t/f8-setinterval-help/171805>\
**Category:** flash\
**Created:** [December 8, 2005, 9:57am UTC](https://forum.kirupa.com/t/f8-setinterval-help/171805 "2005-12-08T09:57:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![unit009](https://avatars.discourse-cdn.com/v4/letter/u/e19b73/32.png) [@unit009](https://forum.kirupa.com/u/unit009)\
**Post date:** [December 8, 2005, 9:57am UTC](https://forum.kirupa.com/t/f8-setinterval-help/171805/1 "2005-12-08T09:57:37Z")

</div>

```php

button3.onPress = function(){
	myArray.sortOn(["color"]);
myInterval = setInterval(preloader, 10);
function preloader(){
	var i:Number=0;
	if (i<myArray.length){
		play();
		clearInterval(myInterval);
	}
	eval(myArray*.instance).slideTo(0,i*myArray*.instance._height,1,"easeOutBounce");
	i++;
}

}

```

trying to get something like this to work… click on the button, it sorts the array, then waits a bit moving each item in the array.

i can sort and move the array fine, when i try to add setInterval, it borks… by which i mean, i don’t know what i’m doing at 5am.
