# setInterval delay

**URL:** <https://forum.kirupa.com/t/setinterval-delay/224550>\
**Category:** flash\
**Created:** [May 3, 2007, 8:08am UTC](https://forum.kirupa.com/t/setinterval-delay/224550 "2007-05-03T08:08:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rollwithit80](https://avatars.discourse-cdn.com/v4/letter/r/ad7895/32.png) [@rollwithit80](https://forum.kirupa.com/u/rollwithit80)\
**Post date:** [May 3, 2007, 8:08am UTC](https://forum.kirupa.com/t/setinterval-delay/224550/1 "2007-05-03T08:08:49Z")

</div>

Hi,  
I have a button when mouse over loads and image into a movie clip, however i want it to have a few second delay before it calls the function. Here is the code i have at the moment.

```auto
b1.onRollOut = function(){
 
 setInterval(loadImage("p.jpg"),2000);
 
}

```

Even if i change the interval number there isnt any change in delay, it pretty much happens [COLOR=black][FONT=Arial][FONT=Calibri][SIZE=3]instantaneously. [/SIZE][/FONT][/FONT][/COLOR]  
[COLOR=black][FONT=Arial][FONT=Calibri][SIZE=3][/SIZE][/FONT][/FONT][/COLOR]  
[COLOR=black][FONT=Arial][FONT=Calibri][SIZE=3]Thanks[/SIZE][/FONT][/FONT][/COLOR]  
[COLOR=black][FONT=Arial][FONT=Calibri][SIZE=3][/SIZE][/FONT][/FONT][/COLOR]  
[COLOR=black][FONT=Arial][FONT=Calibri][SIZE=3]Daniel[/SIZE][/FONT][/FONT][/COLOR]
