Dynamically refreshing image

I got an query to ask you

Situation:I have a main movie.swf and I would like to load 3 or more than that JPEG images, which we need to be incorporated into my movie.swf file. Now what we need is that when you view the web page for the first time then My movie.swf should be played with the first JPEG image, the next time you refresh the web page then My movie.swf should be played with the second JPEG image.

If again refreshed or the user closes the browser and opens a new browser window to view the web page he/she should be able to view My movie.swf with the third JPEG image.

This functionality should be in any random order.

Note: only the JPEG image has to change within the swf on refresh of the web page but the other dynamic functionality of the swf remains the same.

Your help is much appreciated. Thanks in advance.



Just wanted to clarify what you want. It sounds like, simple stated, that you want to be able to randomly load a different JPG when your page loads. Right? This one is easy.

Or, are you saying that you need to make sure that, when the page is loaded again, that the previous image is not loaded and some other is loaded? This would require a cookie, and is not as simple.

If the former is okay, here’s some simple code for that:

loadMovie(“image0” + g + “.jpg”, imageholder01);
trace(“image0” + g + “.jpg”)


Change the “6” in the first line to reflect the number of images you want to load randomly.

Rename your images as image00.jpg, image01.jpg, image02.jpg, etc.

“imageholder01” is the name of the mc into which the jpg’s will load.