Results 1 to 3 of 3

Thread: Effect pause time for individual images in Ultimate Slideshow

  1. #1
    Join Date
    Sep 2010
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Effect pause time for individual images in Ultimate Slideshow

    1) Script Title: Ultimate Fade-in slideshow

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...nslideshow.htm

    3) Describe problem: I would like to add a timer variable into the individual image so I can change the pause time and/or fade time for each image.

    So something like this:
    ["image", "", "", "", "pause-time-override", "fade-time-override"],
    ["image", "", "", "", "pause-time-override", "fade-time-override"]

    And then I'd assume it would be left "" if it were to be the default times in the script.

    Any and all help much appreciated!!

  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

    Sure, do the on page init like so:

    Code:
    <script type="text/javascript">
    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: [
    		["photo1.jpg", "", "", "", 1000, 100],
    		["photo2.jpg", "", "", "", 6000, 1000],
    		["photo3.jpg", "", "", "", 10000, 5000],
    		["photo4.jpg", "", "", ""],
    		["photo5.jpg", "", "", ""],
    		["photo6.jpg", "", "", ""],
    		["photo7.jpg", "", "", ""],
    		["photo8.jpg", "", "", ""],
    		["photo9.jpg", "", "", ""],
    		["photo10.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: "",
    	oninit: function(){
    			this.setting.dpause = this.setting.displaymode.pause;
    			this.setting.dfade = this.setting.fadeduration;
    		},
    	onslide: function(c, i){
    			this.setting.displaymode.pause = this.setting.imagearray[i][4] || this.setting.dpause;
    			this.setting.fadeduration = this.setting.imagearray[i][5] || this.setting.dfade;
    		}
    })
    </script>
    - John
    ________________________

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

  3. #3
    Join Date
    Sep 2010
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, that worked perfectly!

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
  •