# Someone who knows something about "random" functions

**URL:** <https://forum.kirupa.com/t/someone-who-knows-something-about-random-functions/195374>\
**Category:** Uncategorized\
**Created:** [July 31, 2006, 8:36am UTC](https://forum.kirupa.com/t/someone-who-knows-something-about-random-functions/195374 "2006-07-31T08:36:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clark](https://avatars.discourse-cdn.com/v4/letter/c/6de8d8/32.png) [@Clark](https://forum.kirupa.com/u/Clark)\
**Post date:** [July 31, 2006, 8:36am UTC](https://forum.kirupa.com/t/someone-who-knows-something-about-random-functions/195374/1 "2006-07-31T08:36:01Z")

</div>

Hi, I’m trying to make a random image display function for scotty’s xml gallery but Im not very advanced and unsure how to do it properly. This is what I’ve got so far:

```auto
myInterval = setInterval(containerMC, "loadpic", 2000, random(30));

```

It half works, in that it’ll load a random image after 2 seconds, but the random value doesn’t refresh. It picks one image randomly out of 30, and then just keeps reloading it again and again??
