Help: php script in flash mx

ok im finishing up the rest of my site layout and the head banner on my site is going to be flash and there is a blank spot on it for a rotating banner avertisements that people send me to advertise them. i have a php that radomizes the images that get displayed here is the php script…

-- Random Quote Script 1.0 by Rockin2go

$font ="Verdana"; // change to the font of your choice
$fontsize ="3"; // change to the font size of your choice
$textfile ="quotes.txt"; // change to the filename/path of your file with quotes.

//Do not change anything after this line
echo "<font face=\"$font\" size=\"$fontsize\">";
$quotes = file("$textfile");
$quote = rand(0, sizeof($quotes)-1);
echo $quotes[$quote];
echo "</font>";

what that does is take a line in the file quotes.txt, in my case im going to use it for images this time, so every line of quotes.txt you put a html link to the image and when you go to the php file is chooses a random line and display that image.
i need the flash to display that random image in a certain spot, can someone help me out here?
my aim is Rockin2go

ok well that php doesnt matter i can use that if someone can help me but if anyone has a better idea all i need to do is load a random image in a set spot, please help lol


and your jpg-only images named pic0.jpg, pic1.jpg,…
just need to set the numberOfImgs var…