Convert my script into something more useful

I am not an actionscript guru by any means but I know the basics.

I would appreciate if someone could point me in the right direction. I like this example:
http://www.signaturemazda.com

The flash movie pulls in one random image and when the page is refreshed it shows another.

I have a script here that loads a jpg on refresh but not into a movie clip. It also is limited to cycling through a predetermined amount of images. I would like it to just load whatever images are in the folder or directory.

This is what I have.

var myImageSequence = 3;
var myRandomNumber = Math.floor(Math.random()*myImageSequence)+1;
var myImageName = myRandomNumber + ".jpg";
loadMovieNum(myImageName, 1);

Could someone please lead me in the right direction or get me started…

Much appreciated.