Forum Moderators: open

Message Too Old, No Replies

Flash video before random image

         

darkfortress

3:26 pm on Feb 8, 2011 (gmt 0)

10+ Year Member



I've been working with a code that loads a random image each time the page refreshes. I got it to work, but for dramatic effect, I'd like to have a flash video run for a few seconds before the random image loads. It will be the same video before each image. The video could also be an animated graphic or MPEG, it doesn't have to be flash. What is the best way to go about this?

Here's the script I'm using now:

<script type="text/javascript" language="JavaScript">

NumberOfImagesToRotate = 24;

FirstPart = '<img src="picture';
LastPart = '.jpg" height="434" width="434">';

function printImage() {
var r = Math.ceil(Math.random() * NumberOfImagesToRotate);
document.write(FirstPart + r + LastPart);
}
//-->
</script>

<script type="text/javascript" language="JavaScript"><!--
printImage();
//--></script>

rocknbil

6:39 pm on Feb 8, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think for that to work, you'll have to call the image loader from within the flash movie. How else will the page know the movie has ended?