# Cant get the setInterval to delay for me

**URL:** <https://forum.kirupa.com/t/cant-get-the-setinterval-to-delay-for-me/239340>\
**Category:** Uncategorized\
**Created:** [September 20, 2007, 5:34pm UTC](https://forum.kirupa.com/t/cant-get-the-setinterval-to-delay-for-me/239340 "2007-09-20T17:34:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevincompton](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/kevincompton/32/4049_2.png) [@kevincompton](https://forum.kirupa.com/u/kevincompton)\
**Post date:** [September 20, 2007, 5:34pm UTC](https://forum.kirupa.com/t/cant-get-the-setinterval-to-delay-for-me/239340/1 "2007-09-20T17:34:44Z")

</div>

ok what i have is an array that I want to display each image once when the page loads.

so I tried the following, in in the init I called the function

```auto
this.delaySlideShow();

```

then down below I have the code for that:

```auto
this.delaySlideShow = function() {
    myInt = setInterval(playSlideShow, 2000);
}

this.playSlideShow = function() {
    this.setIcon(2);
}

```

where the function setIcon tweens to the appropriate i in my array.

When i go to publish this it doesn’t ever activate the function playSlideShow, i tried activating it directly and it works, but i cant get a delay to it.

What I want is for the swf to load, wait two seconds then activate setIcon(2).

Any ideas what I’m doing wrong?
