Results 1 to 9 of 9

Thread: Ultimate Fade-in Timing Issue

  1. #1
    Join Date
    Apr 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Ultimate Fade-in Timing Issue

    1) Script Title: Ultimate Fade-in

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

    3) Describe problem: I've selected "always" for descreval. I have fadeduration and pause at 2500. I like the nice, slow transition. Problem is, the captions appear as soon as the fade-in begins. It makes it look like the captions appear way before the image. Is there any way to delay the captions a little, so they appear near the end of the fade-in?

  2. #2
    Join Date
    Jul 2008
    Location
    Derbyshire, UK
    Posts
    1,933
    Thanks
    16
    Thanked 303 Times in 302 Posts
    Blog Entries
    9

    Default

    Towards the top of the fadeslideshow.js file there's a line that looks like this;
    Code:
    slidespeed: 200 //speed of description panel animation (in millisec)
    Try increasing the value from 200 to 2500. You might need to do a hard refresh to pull through the new js file (CTRL+F5 on Windows)
    Focus on Function Web Design | Latest News RSS | Facebook | Twitter |
    Fast Edit (A flat file, PHP web page editor & CMS. Small, FREE, no database!) | Fast Edit BE (Snippet Manager) (Web content editor for multiple editable regions!) | Fast Apps |
    The only limit to creativity is imagination: JemCon.org

  3. #3
    Join Date
    Apr 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    The slidespeed seems to only effect the timing if you have the description panel set to "peekaboo." I can set the slidespeed to any number and it won't affect captions set to "always." Change descreval to "peekaboo" and the transition speed changes with slidespeed values.
    Here's a link to a test page:
    http://www.canfieldsci.com/imaging_s..._hub_demo.html
    You can see how the caption arrives too soon if the fadeduration is set to a slow rotation.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,924
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    You can try this. Using a text only editor like NotePad, edit the fadeslideshow.js file. About two thirds of the way down find this code:

    Code:
    		if (setting.$descpanel){
    			setting.$descpanel.css({visibility:(setting.imagearray[imgindex][3])? 'visible' : 'hidden'})
    			if (setting.imagearray[imgindex][3]) //if this slide contains a description
    				setting.$descinner.empty().html(setting.closebutton + setting.imagearray[imgindex][3])
    		}
    Add the highlighted (two places on one line, contents of the code block might be wrapped):

    Code:
    		if (setting.$descpanel){
    			setting.$descpanel.css({visibility:(setting.imagearray[imgindex][3])? 'visible' : 'hidden'})
    			if (setting.imagearray[imgindex][3]) //if this slide contains a description
    				setTimeout(function(){setting.$descinner.empty().html(setting.closebutton + setting.imagearray[imgindex][3]);}, 750);
    		}
    Save and use that version. Untested.

    The browser cache may need to be cleared and/or the page refreshed to see changes.
    - John
    ________________________

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

  5. #5
    Join Date
    Apr 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, John

    This solves the timing problem.

    There is one glitch. Our first image does not have a caption. It's more of a title slide. With this new code, an incorrect caption appears briefly with the second "slide." It's the caption from the last slide.

    See the problem here:
    http://www.canfieldsci.com/imaging_s..._hub_demo.html

    So far, the only solution I've found is to add a caption to the title slide, which we didn't really want. Now the glitch appears only at the beginning of the first cycle.
    Warning: there is some nudity. Our customers are plastic surgeons:
    http://www.canfieldsci.com/imaging_s..._hub_test.html

  6. #6
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,924
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    That (the partial nudity) is PG and not intended to excite, so it's fine. Even if it weren't we would still allow a text only link for purposes of receiving help here.

    OK, let's try (same code area in the fadeslideshow.js file as before - additions highlighted, 3 lines, code may wrap):

    Code:
    		if (setting.$descpanel){
    			setting.$descpanel.css({visibility:(setting.imagearray[imgindex][3])? 'visible' : 'hidden'})
    			setting.previmage = imgindex>0? imgindex-1 : totalimages-1; //get reference for the previous slide
    			if(!setting.imagearray[setting.previmage][3]) //if previous slide had no description
    				setting.$descinner.empty(); //empty the description area right away without waiting for the next description
    			if (setting.imagearray[imgindex][3]) //if this slide contains a description
    				setTimeout(function(){setting.$descinner.empty().html(setting.closebutton + setting.imagearray[imgindex][3]);}, 1500);
    		}
    Again, untested, and -

    The browser cache may need to be cleared and/or the page refreshed to see changes.


    Added Later:

    Or, you could replace that entire block of code with:

    Code:
    		if (setting.$descpanel){
    			setting.previmage = imgindex>0? imgindex-1 : totalimages-1; //get reference for the previous slide
    			if(!setting.imagearray[setting.previmage][3]) //if previous slide had no description
    				setting.$descinner.empty(); //empty the description area right away without waiting for the next description
    			setting.$descpanel.css({visibility:(setting.imagearray[imgindex][3] && setting.imagearray[setting.previmage][3])? 'visible' : 'hidden'})
    			if (setting.imagearray[imgindex][3]){ //if this slide contains a description
    				setTimeout(function(){
    					setting.$descpanel.css({visibility: 'visible'});
    					setting.$descinner.empty().html(setting.closebutton + setting.imagearray[imgindex][3]);
    				}, 1500);
    			}
    		}
    I was able to test that in a limited way and it seems to work out quite well.
    Last edited by jscheuer1; 04-24-2013 at 03:05 AM. Reason: merge, update timeout milliseconds
    - John
    ________________________

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

  7. #7
    Join Date
    Apr 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks, John

    This works great. And I really appreciate the commenting in the code.

    SpinyNorman

  8. #8
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,924
    Thanks
    43
    Thanked 3,187 Times in 3,151 Posts
    Blog Entries
    12

    Default

    Good. One thing I didn't notice until now is that:

    Your page is in violation of Dynamic Drive's usage terms, which, among other things, state that the script credit must appear in the source code of the page(s) using the script. Please reinstate the notice first.


    Please take care of that by changing this on the page:

    Code:
    <script type="text/javascript" src="/js/fadeslideshow.js"></script>
    to:

    Code:
    <script type="text/javascript" src="/js/fadeslideshow.js">
    /***********************************************
    * Ultimate Fade In Slideshow v2.0- (c) Dynamic Drive DHTML code library (www.dynamicdrive.com)
    * This notice MUST stay intact for legal use
    * Visit Dynamic Drive at http://www.dynamicdrive.com/ for this script and 100s more
    ***********************************************/
    </script>
    Thanks.
    - John
    ________________________

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

  9. #9
    Join Date
    Apr 2013
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    done. Thanks again.

Similar Threads

  1. Ultimate Fade-in slideshow (v2.4) - Stager the timing of multiple fadeshows
    By enderSFTD in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 03-20-2013, 03:41 PM
  2. Using Ultimate Fade-in Slideshow v 2.4 issue
    By cloudbase in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 01-11-2012, 02:49 PM
  3. Ultimate Fade-In Slideshow timing
    By Puckspeare in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 05-21-2011, 04:07 AM
  4. Ultimate Fade-in Slideshow v2.4 Timing Issues
    By krislynch in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 12-22-2010, 03:07 AM
  5. how to slow down fade timing in ultimate slideshow?
    By tarkin789 in forum Dynamic Drive scripts help
    Replies: 1
    Last Post: 02-05-2008, 06:55 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
  •