|
-
Is there a way to make a group of movies I made with Swish load at random in a fixed position on a web page? The goal is to let the user see a different movie each time they visit the page, or use refresh. Anyone??? HELPPPP!!!! :o)
-
Taper Boy for the Prophets of the Funk
use javascript to load each SWF from an array....each time the person revisits the page, the random script runs an selects a new SWF from the array.
-
Chief of Molecules
Here is the script that I used on a number of my pages - it goes in the body of the html page, and please leave the author's name in the comment section:
<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 block
you'll need to modify! Insert the path to the movies (you can add or remove movies
as you wish!) and enter their height and width (in pixels)
That's all! You're ready to roll! */
var movies = new Array("soft1.swf", "soft2.swf", "soft3.swf", "soft4.swf", "soft5.swf")
var s_width = new Array("600","600","600","600","600")
var s_height = new Array("200","200","200","200","200")
// Nothing needs to be edited here! Change at your own risk... :-)
len = movies.length;
today=new Date();
today=today.getTime()/10;
temp_number=today%len;
rnd = Math.round(temp_number);
// Output into the source:
document.writeln('<EMBED src="'+ movies[rnd] +'" quality=high WIDTH="'+ s_width[rnd] +'" HEIGHT="'+ s_height[rnd] +'" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
document.writeln('</EMBED>');
// End of Script -->
</script>
Hope this helps, the page that this is from is http://www.wellesley.edu/Chemistry/1...1software.html but I have used this on dozens of different pages.
Flick
-
Thank you!!!
Thank you so much!! I'm off to give it a try.
I'll post the URL when it's online!
Originally posted by wcoleman
Here is the script that I used on a number of my pages - it goes in the body of the html page, and please leave the author's name in the comment section:
<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 block
you'll need to modify! Insert the path to the movies (you can add or remove movies
as you wish!) and enter their height and width (in pixels)
That's all! You're ready to roll! */
var movies = new Array("soft1.swf", "soft2.swf", "soft3.swf", "soft4.swf", "soft5.swf")
var s_width = new Array("600","600","600","600","600")
var s_height = new Array("200","200","200","200","200")
// Nothing needs to be edited here! Change at your own risk... :-)
len = movies.length;
today=new Date();
today=today.getTime()/10;
temp_number=today%len;
rnd = Math.round(temp_number);
// Output into the source:
document.writeln('<EMBED src="'+ movies[rnd] +'" quality=high WIDTH="'+ s_width[rnd] +'" HEIGHT="'+ s_height[rnd] +'" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">');
document.writeln('</EMBED>');
// End of Script -->
</script>
Hope this helps, the page that this is from is http://www.wellesley.edu/Chemistry/1...1software.html but I have used this on dozens of different pages.
Flick
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|