A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Random Load Multiple movies? Help!!

  1. #1
    Junior Member
    Join Date
    Mar 2002
    Posts
    2
    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)

  2. #2
    Taper Boy for the Prophets of the Funk
    Join Date
    Oct 2000
    Posts
    1,469
    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.

  3. #3
    Chief of Molecules wcoleman's Avatar
    Join Date
    Nov 2000
    Location
    Massachusetts
    Posts
    3,975
    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

  4. #4
    Junior Member
    Join Date
    Mar 2002
    Posts
    2

    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center