# Yet Another Random Image Problem

**URL:** <https://forum.kirupa.com/t/yet-another-random-image-problem/158488>\
**Category:** flash\
**Created:** [August 10, 2005, 2:01am UTC](https://forum.kirupa.com/t/yet-another-random-image-problem/158488 "2005-08-10T02:01:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt\_Blank](https://avatars.discourse-cdn.com/v4/letter/m/9fc29f/32.png) [@Matt\_Blank](https://forum.kirupa.com/u/Matt_Blank)\
**Post date:** [August 10, 2005, 2:01am UTC](https://forum.kirupa.com/t/yet-another-random-image-problem/158488/1 "2005-08-10T02:01:17Z")

</div>

Hiya guys,

First of all I just stumbled across this site…and WOW! It’s fantastic.

Anyhoo, I’ve got a problem with a random image and while I’ve searched and found topic upon topic with regards to help with random images, I couldn’t see anyone else that has my problem, which is:

I’m using the following code:

//Create an array of your movies  
var movieArray:Array = [“[http://www.mattblank.com/newsite/flash/random/image0.swf", “[url=“http://www.mattblank.com/newsite/flash/random/image1.swf”]http://www.mattblank.com/newsite/flash/random/image1.swf”, “[url=“http://www.mattblank.com/newsite/flash/random/image2.swf”]http://www.mattblank.com/newsite/flash/random/image2.swf”, “[url=“http://www.mattblank.com/newsite/flash/random/image3t.swf”]http://www.mattblank.com/newsite/flash/random/image3t.swf”, "[url=“http://www.mattblank.com/newsite/flash/random/image4.swf”]http://www.mattblank.com/newsite/flash/random/image4.swf](http://www.mattblank.com/newsite/flash/random/image0.swf)”]  
//Genarate a random number between 0 and the number of movies in your array  
var mc:Number = Math.round(Math.random() \* movieArray.length);  
//Create a container movieclip to load your movies into and position it where you want it  
createEmptyMovieClip(“container\_mc”, getNextHighestDepth());  
container\_mc.\_x = 440;  
container\_mc.\_y = 0;  
//Load the movie into your movie clip  
container\_mc.loadMovie(movieArray[mc]);

I want the random image to show on the right hand side of my swf, which it is doing, but it’s over-riding all other layers, so any buttons beneath or things I want to show can’t be seen. I’ve made sure it’s the bottom layer on my timeline, and double checked that by just puting a bmp in there to test, which worked fine. But the random image script just becomes top layer.

Here’s the swf if you’re interested to see what I mean:  
[http://www.mattblank.com/newsite/flash/test.swf](http://www.mattblank.com/newsite/flash/test.swf)

If you keep refreshing you’ll see that a second before the random pic on the right loads there are things below it.

Can anyone help at all to get this to become the bottom layer???  
Thanks!  
Matt Blank
