Results 1 to 3 of 3

Thread: Slideshow Script - Slidetimes

  1. #1
    Join Date
    Jul 2010
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Talking Slideshow Script - Slidetimes

    Hey Guys,

    I need a bit of help please, so i'll try to keep it short.

    This is the script I'm using and its working fine:
    http://www.dynamicdrive.com/dynamici...nslideshow.htm

    BUT, my requirement is a little different. I want to program it so that I can give each slide a specfic time before it rotates. So for example image01.jpg after 3 seconds, image02.jpg after 6 seconds and image03.jpg after 10 seconds.

    Does anyone know how to achieve this?

    I'm thinking this the setting that has to be modified a bit, but then again I'm not sure:
    Code:
    var mygallery=new fadeSlideShow({
    wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    dimensions: [940, 314], //width/height of gallery in pixels. Should reflect dimensions of largest image
    imagearray: [
    ["images/slides/image01.jpg", ""],
    ["images/slides/image02.jpg", "", "", ""],
    ["images/slides/image03.jpg", "", "", ""],
    ["images/slides/image04.jpg", "", "", ""],
    ["images/slides/image05.jpg", "", "", ""],
    ["images/slides/image06.jpg", "", "", ""],
    ["images/slides/image07.jpg", "", "", ""],
    ["images/slides/image08.jpg", "", "", ""],
    ["images/slides/image09.jpg", "", "", ""],
    ["images/slides/image10.jpg", "", "", ""] //<--no trailing comma after very last image element!
    ],
    displaymode: {type:'auto', pause:7000, cycles:0, wraparound:false},
    persist: false, //remember last viewed slide and recall within same session?
    fadeduration: 500, //transition duration (milliseconds)
    descreveal: "ondemand",
    togglerid: ""
    })
    Any responses are highly appreciated.

    Thanks a lot

  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

    Add the highlighted:

    Code:
    var mygallery=new fadeSlideShow({
    wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    dimensions: [940, 314], //width/height of gallery in pixels. Should reflect dimensions of largest image
    imagearray: [
    ["images/slides/image01.jpg", ""],
    ["images/slides/image02.jpg", "", "", ""],
    ["images/slides/image03.jpg", "", "", ""],
    ["images/slides/image04.jpg", "", "", ""],
    ["images/slides/image05.jpg", "", "", ""],
    ["images/slides/image06.jpg", "", "", ""],
    ["images/slides/image07.jpg", "", "", ""],
    ["images/slides/image08.jpg", "", "", ""],
    ["images/slides/image09.jpg", "", "", ""],
    ["images/slides/image10.jpg", "", "", ""] //<--no trailing comma after very last image element!
    ],
    displaymode: {type:'auto', pause:3000, cycles:0, wraparound:false},
    persist: false, //remember last viewed slide and recall within same session?
    fadeduration: 500, //transition duration (milliseconds)
    descreveal: "ondemand",
    togglerid: "",
    onslide: function(c, i){
    		this.setting.displaymode.pause =
    			i === 0? 3000 :
    			i === 1? 6000 :
    			i === 2? 10000 :
    			3000;
    	}
    })
    Don't miss the added comma (red) after the togglerid value.

    Notice the 0?, 1?, 2? - those are the slide indexes. the first slide is 0, the second is 1 and so on. The times to the right of each number? are the pause for that slide, how long it will be visable, in milliseconds. You can add more numbers. The 3000 at the end is the default.

    If you specify a time for each slide index, you must still have a default. It will never be used, but is required to avoid a logical error.
    - John
    ________________________

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

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Adnan959 (09-30-2010)

  4. #3
    Join Date
    Jul 2010
    Posts
    17
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default

    John,

    This is amazing. Thank you so much. You're truly a star. Works like a charm.

    Thanks once again!

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
  •