# Loadin Random Pics + Timer

**URL:** <https://forum.kirupa.com/t/loadin-random-pics-timer/253509>\
**Category:** flash\
**Created:** [March 2, 2008, 7:01am UTC](https://forum.kirupa.com/t/loadin-random-pics-timer/253509 "2008-03-02T07:01:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luigi\_Vercotti](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@Luigi\_Vercotti](https://forum.kirupa.com/u/Luigi_Vercotti)\
**Post date:** [March 2, 2008, 7:01am UTC](https://forum.kirupa.com/t/loadin-random-pics-timer/253509/1 "2008-03-02T07:01:29Z")

</div>

Hi guys

I’ve got this code for random loading images after the main page reload.  
I would like to change the image after let say 15sec if the user stay on the one page.  
Can you please help?

```auto

// Sets the number of images in the random sequence
    // IMPORTANT: Set this number to how many images you have
    var myImageSequence = 11;

    // Creates a random number:
    var myRandomNumber = Math.floor(Math.random()*myImageSequence)+1;

    // Creates the full image name like: 1.jpg
    // IMPORTANT: If you're NOT using Jpegs change jpg to png or gif
    var myImageName = "image" + myRandomNumber + ".jpg";

    // Loads the random image:
    loadMovieNum(myImageName, 1);

```
