Results 1 to 3 of 3

Thread: Fade-in slideshow start from other than first image

  1. #1
    Join Date
    Apr 2013
    Location
    Germany
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Fade-in slideshow start from other than first image

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

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

    3) Describe problem: How is it possible to start the slideshow automatically when page is loading from another picture than the first one?
    The scenario: I got a thumbnail gallery and want to start the slideshow with the correspondig slideshow image.
    I know that a certain image can be startet with the nav buttons via extrabuttons.js but I don't know how to put the start number in the gallery options.
    I tried to use an array with the desired image in first place, but then the status shows 1 of X instead of 5 of X when starting with the fifth image.

    Note: the thumbnail gallery links to a pop-up window in which the Fade-in slideshow is working, so I need to put a url parameter into the options. It's not the same page!

    Ist there an option giving a starting index?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,925
    Thanks
    43
    Thanked 3,190 Times in 3,154 Posts
    Blog Entries
    12

    Default

    So you already know how to retrieve a URL parameter (this can be easily done server side, fairly easily with javascript alone) if you already know how to do that and just want somewhere to plug it into the script, we could add an option to the on page var mygallery=new fadeSlideShow init code:

    Code:
    startindex: 4, //Zero based starting index
    Then, using a text only editor like NotePad, near the beginning of the fadesliseshow.js script, change the highlighted line as shown:

    Code:
     . . . peed: 200 //speed of description panel animation (in millisec)
    }
    
    //No need to edit beyond here...
    
    jQuery.noConflict()
    
    function fadeSlideShow(settingarg){
    	this.setting=settingarg
    	settingarg=null
    	var setting=this.setting
    	setting.fadeduration=setting.fadeduration? parseInt(setting.fadeduration) : 500
    	setting.curimage=(setting.persist)? fadeSlideShow.routines.getCookie("gallery-"+setting.wrapperid) : (setting.startindex || 0)
    	setting.curimage=setting.curimage || 0 //account for curimage being null if cookie is empty
    	setting.currentstep=0 //keep track of # of slides slideshow has gone through (applicable in displaymode='auto' only)
    	setting.totalsteps=setting.imagearray.length*( . . .
    If you need help sending/retrieving the URL parameter, or have any other questions, just let me know.
    - 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:

    markusr (04-18-2013)

  4. #3
    Join Date
    Apr 2013
    Location
    Germany
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thank you, John.

    This works great. The url parameter is processed by a php script which is writing the whole code. The filenames are delivered by a database, so I just had to figure out the index of the actual picture. The filenames and the starting index (and dimension, speed etc.) are parsed into a template.
    I think this is a useful new parameter.

    (I'm familiar with html, php and mysql... but javascript is not my favorite )

Similar Threads

  1. Ultimate Fade-in Slideshow re-start
    By cockatoo in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 11-30-2010, 12:18 PM
  2. Fade-in slideshow 2.4 - Mouseover to start the show?
    By dmassphoto in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 09-25-2010, 05:24 PM
  3. Ultimate Fade-in slideshow - Link to start image
    By Toefoe in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 07-30-2010, 08:27 AM
  4. Ultimate Fade-In Slideshow - how to delay start
    By ragandboneshop in forum Dynamic Drive scripts help
    Replies: 4
    Last Post: 07-04-2010, 06:45 AM
  5. Ultimate Fade-in slideshow -- How to start on command?
    By Brad in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 05-03-2006, 08:45 AM

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
  •