Loading Random Jpegs

Hi,

Still pretty new to flash, and am currently working on an exhibition working closely with bluetooth.

I wanted to make a piece of flash that reads any jpeg image from a specific folder and loads one randomly. Or multiple images in a different stage positions.

I’ve tried some of the turoials but all of them load swfs only. This usually wouldn’t be a problem but the concept of our exhibit is that people bluetooth their images from a phone. Sending a jpeg into the parent folder and flash loads one of these images randomly every 5 minutes or so. Nobody would be there to do any converting to swfs, and its suppose to run for two weeks. So it needs to read jpegs. We can assume the jpegs will be the same size.

This is the script i borrowed from a tutorial i tried to ammend.

choice = Math.round(Math.random()*5);
_alpha;
switch (choice) {
case 0 :
location.loadMovie(“image0.swf”);
break;
case 1 :
location.loadMovie(“image1.swf”);
break;
case 2 :
location.loadMovie(“image2.swf”);
break;
case 3 :
location.loadMovie(“image3.swf”);
break;
case 4 :
location.loadMovie(“image4.swf”);
break;
case 5 :
location.loadMovie(“image5.swf”);
break;
}

I just ended up changing bits like (obviously i resized jpegs to those names in the parent folder too)

  location.loadMovie("image5.jpg");
   break;

  location.load("image5.jpg");
   break;

etc. But to no avail

Also I was wondering is there any option like location.load 1 ("*.jpg");
As when the photos will be bluetoothed to the pc, we will never know the name, so the script will be required to pull images randomly without knowing the name…is that possible?

Sorry if this seems a lot, but this is way over my head compared to simple flash sites i make.

Thanks in advance