[Javascript] RE: Random file on page load... or at least that was the idea :(

Philip Mason mason-p at orange.net
Thu Feb 10 18:21:50 CST 2005

I have found this script that was posted a while back. 
Thought it was a good idea and tried to test it.
I have copied the script into a text file and renamed it to an html file
however I cannot get it to play anything? I have the files 1-8.swf in the
same directory however nothing appears. The web page appears blank.
Am I making a simple mistake?
Here is the script:
<script language="JavaScript">
<!-- Random Flash Player by Raphael Pirker (www.nr1webresource.com)
/* Let's make the Array of movies and the height and width. This is the only
you'll need to modify! Insert the path to the movies (you can add or remove
as you wish!) and enter their height and width (in pixels) 
That's all! You're ready to roll! */ 
var movies = new
Array("1.swf","2.swf","3.swf ","4.swf ","5.swf ","6.swf ","7.swf ","8.swf")
// Nothing needs to be edited here! Change at your own risk... :-) 
rnd = (Math.floor(Math.random() * movies.length));
// Output into the source:
document.writeln('<EMBED src="'+ movies[rnd] +'" quality=high
Version=ShockwaveFlash" WIDTH="610" HEIGHT="200">'); 
// End of Script -->


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20050211/fdc4d18b/attachment.htm>

More information about the Javascript mailing list