Results 1 to 2 of 2

Thread: Multiframe Slide Show with Random Images

  1. #1
    Join Date
    Jun 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Multiframe Slide Show with Random Images

    I have been using the Multiframe Image Slideshow on a website for a while.

    http://www.dynamicdrive.com/dynamici...frameslide.htm

    Id like to do random images, rather than a specified sequence. Is this possible? One caveat Id like it to either:

    a.) blank pause (no images) for a few seconds before beginning the display, or

    b.) Display 3 particular images and then continue with the random display.

    The reason is that I have a 3 image logo that Id like to be seen for a couple seconds before the images start to overlay on top of it.

    As an added bonus, it would be great for either the blank pause (a) or the 3 particular images (b) to occur every so often within in the random sequence.

    And bonus #2 would be to start a background load of the images while (a) or (b) are first happening.

    (yes, Im asking a lot!)

    To see the context of what I am doing, have a look:
    http://www.brooklynveloforce.org

    Thanks in advance.
    Scott

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I'd try adding (in red):

    Code:
    var seqslides=new Array()
    //Set Path to Image plus optional URL ("" for no URL):
    seqslides[0]=["image1.gif", "http://www.dynamicdrive.com"]
    seqslides[1]=["image2.gif", "http://www.javascriptkit.com"]
    seqslides[2]=["image3.gif", "http://www.google.com"]
    seqslides[3]=["image4.gif", "http://www.yahoo.com"]
    seqslides[4]=["image5.gif", "http://www.google.com"]
    
    seqslides.sort(function() {return 0.5 - Math.random();}) //thanks to Mike (aka Mwinter) :)
    Just after the array definition as shown, and perhaps at other key spots in the code. This will mix up the order. You could also throw in some blank images to the array.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •