# SlideShow

**URL:** https://forum.kirupa.com/t/slideshow/233832
**Category:** flash
**Created:** [July 27, 2007, 11:14am UTC](https://forum.kirupa.com/t/slideshow/233832 "2007-07-27T11:14:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jeancnicolas](https://avatars.discourse-cdn.com/v4/letter/j/7bcc69/32.png) [@jeancnicolas](https://forum.kirupa.com/u/jeancnicolas)
#### Post date: [July 27, 2007, 11:14am UTC](https://forum.kirupa.com/t/slideshow/233832/1 "2007-07-27T11:14:28Z")

</div>

Hello \>

I am trying to make a slide show, which selects the next picture at random from an array.

Unfortunately, the image is undefined when traced…  
Here is my code … Any help would be most appreciated!

var slides:Array =newArray(“image1.jpg”,“image2.jpg”,“image3.jpg”,“image4.jpg”,“image5.jpg”);

function show (){

var ran:Number = Math.random()\*5;  
var i:Number = Math.round(ran);

\_root.movie\_clip.loadMovie(slides\*);

};

setInterval(show,5000);
