Results 1 to 2 of 2

Thread: Slideshow cycle once -stay on last slide

  1. #1
    Join Date
    Jan 2010
    Location
    Michigan
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Slideshow cycle once -stay on last slide

    1) Script Title: :: Ultimate Fade-in slideshow (v2.1)

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

    3) Describe problem: The Ultimate Fade In Slideshow is great. Easy, does jujst what I need, except...

    I only have 6 slides in my array. I want it to cycle once, which it does. I want the last slide to be the remaining static slide instead of the returning to the first.

    The only way I have found to accomplish this is to set persist to false and modify line 25 of fadeslideshow.js as

    [CODE] setting.curimage=setting.curimage || 5 //account for curimage being null if cookie is empty -----SteveH set last slide to default if Cookie Empty [CODE]

    The thing I do not like about this hack is that anytime we change the number of slide in the array, the js must also be modified.

    Any suggestions?

    Thanks!

  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

    Revert to the original script. Use this as an example for your show's initialization:

    Code:
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    	dimensions: [468, 500], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["http://i26.tinypic.com/11l7ls0.jpg", "", "", "Nothing beats relaxing next to the pool when the weather is hot."],
    		["http://i29.tinypic.com/xp3hns.jpg", "http://en.wikipedia.org/wiki/Cave", "_new", "Some day I'd like to explore these caves!"],
    		["http://stickmanlabs.com/images/kevin_vegas.jpg"],
    		["http://i30.tinypic.com/531q3n.jpg"],
    		["http://i31.tinypic.com/119w28m.jpg", "", "", "What a beautiful scene with everything changing colors."] //<--no trailing comma after very last image element!
    	],
    	displaymode: {type:'auto', pause:2500, cycles:1, wraparound:false},
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 500, //transition duration (milliseconds)
    	descreveal: "ondemand",
    	togglerid: "",
    	onslide: function(){
    			if(this.setting.currentstep === this.setting.totalsteps - 1){
    				this.navigate(this.setting.imagearray.length - 1);
    			}
    		}
    })
    - 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
  •