Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: How to avoid any fade duration during slide transition

  1. #1
    Join Date
    Aug 2013
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default How to avoid any fade duration during slide transition

    1) Script Title: Simple Controls Gallery

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

    I am using the gallery to display weather maps (gif/png images) in a loop. When transitioning from one slide (image) to the next, I don't want to there to be any fade...just an instant display of the next slide. I tried placing the fadeduration down to 1 ms, but there's still an "annoying" flash between images in the loop. I tried setting this to zero and I'm getting no images to display at all when it is at zero. Sometimes the first run through the loop is fine and then the next run flashes between slides. Makes it hard to see details/changes between slides (important for weather map displays).

    Any help would be appreciated.

    Here's a little code snipit.
    Code:
    var mygallery=new simpleGallery({
    	wrapperid: "simplegallery1", //ID of main gallery container,
    	dimensions: [x_dimension, y_dimension], //width/height of gallery in pixels. Should reflect dimensions of the images exactly
    	imagearray: [ <?php for($index=0;$index<sizeof($xml->TAB[$p_index]->IMAGE);$index++)
     {?>
    [<?php if($xml->TAB[$p_index]->IMAGE[$index]->URL != '' && url_validate($xml->TAB[$p_index]->IMAGE[$index]->URL)){?>"<?=$xml->TAB[$p_index]->IMAGE[$index]->URL?>",<? } else {?> "http://<?=$_SERVER['HTTP_HOST']?>/wx/photo_not_available.jpg", <? } ?> <?php if($xml->TAB[$p_index]->IMAGE[$index]->LINK != '')
        	{ ?> "<?=$xml->TAB[$p_index]->IMAGE[$index]->LINK?>", <? } else { if(!empty($xml->TAB[$p_index]->IMGGENERICLINK)){?> "<?=$xml->TAB[$p_index]->IMGGENERICLINK?>", <? } else {?> "nolink", <?} } ?> "_new", <?php if($xml->TAB[$p_index]->IMAGE[$index]->LABEL!=''){?>"<?=$xml->TAB[$p_index]->IMAGE[$index]->LABEL?>",<?php } else {?> " ",<?php } ?>""]<?php if($index<sizeof($xml->TAB[$p_index]->IMAGE)-1){?>,<? }	 ?>
    <? } ?>
    		
    	],
    	autoplay: [false, delay, 2], //[auto_play_boolean, delay_btw_slide_millisec, cycles_before_stopping_int]
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 1, //transition duration (milliseconds)
    	oninit:function(){ //event that fires when gallery has initialized/ ready to run
    		//Keyword "this": references current gallery instance (ie: try this.navigate("play/pause"))
    	},
    	onslide:function(curslide, i){ //event that fires after each slide is shown
    		//Keyword "this": references current gallery instance
    		//curslide: returns DOM reference to current slide's DIV (ie: try alert(curslide.innerHTML)
    		//i: integer reflecting current image within collection being shown (0=1st image, 1=2nd etc)
    	}
    })

  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

    I'm not getting any 'flash' at fadeduration 1 in Google Chrome. What browser(s) are you using? What can happen is, if images are updated and/or new, you will see white or some other solid color while the image loads. But you say this problem is more common the 2nd time around. Are the images cached at that point, or do they continue to update with current weather conditions?

    If you want more help, please include a link to the page on your site that contains the problematic code so we can check it out.
    Last edited by jscheuer1; 12-14-2013 at 06:38 PM. Reason: add line
    - 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:

    sdenn (12-14-2013)

  4. #3
    Join Date
    Aug 2013
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    John,

    I'm using the latest version of Chrome on Windows 7 and Vista. The images are static and don't get updated. My website requires a subscription, but you can see the result in this video here:

    http://avwxworkshops.com/etips/image...ng-Gallery.mp4

  5. #4
    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

    Give me a free subscription. To do so, respond here, then PM me the details. You must respond first though, otherwise your post count will be too low to qualify for PM privileges.

    I ask because the video is ambiguous. It looks like the images aren't loading in time. But it could be something else. I would have to see the actual page to know for sure. If it's only that the images aren't loading in time, they can probably be preloaded.
    - John
    ________________________

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

  6. #5
    Join Date
    Aug 2013
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Okay, I'll send you a pm with the details.

  7. #6
    Join Date
    Aug 2013
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Tried to PM you and it says that I don't have the privileges.

  8. #7
    Join Date
    Mar 2011
    Posts
    1,944
    Thanks
    59
    Thanked 105 Times in 103 Posts
    Blog Entries
    4

    Default

    sdenn you're now a Junior Coder and you're able to send John that PM.

  9. The Following User Says Thank You to keyboard For This Useful Post:

    sdenn (12-15-2013)

  10. #8
    Join Date
    Aug 2013
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Thanks. PM Sent.

  11. #9
    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

    OK I got that and have been looking over what it does. It appears to be browser dependent. And of the browsers I've looked at it in, Chrome is the worst. It looks like there is no caching of the images. But I'm not sure that's the issue. What I would suggest is using a different script. Here are the two that I would recommend considering for this:

    http://www.dynamicdrive.com/dynamici...nslideshow.htm

    Or:

    http://www.dynamicdrive.com/dynamici...army/index.htm

    The first one would have to be tweaked to provide a stop/start button, but that's simple enough. Its advantage is that its setup is very similar to what you're used to with Simple Controls Gallery. The advantage that either of these scripts have over Simple Controls, is that they're less likely to need to reload the image each time. The first because all of its scripted images remain in the DOM (in Simple Controls these come and go). In the second one they come and go as well, but the way that slideshow works might be smoother. BTW, in browsers which cache the images and type convert null (Opera and Firefox), the current script is smooth.
    Last edited by jscheuer1; 12-15-2013 at 05:23 PM.
    - John
    ________________________

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

  12. #10
    Join Date
    Aug 2013
    Posts
    11
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    John,

    Chrome and Safari (on my iPad) flash pretty bad. I'll take a look at the first script to see how much effort this will be for my developer. Thanks for your help.

Similar Threads

  1. Ultimate Fade-in Slideshow -- Fade Duration and Pause
    By ellenjones6 in forum Dynamic Drive scripts help
    Replies: 6
    Last Post: 02-21-2014, 05:18 PM
  2. Multiframe slide show - how to avoid restart on new page
    By mylcorp in forum Dynamic Drive scripts help
    Replies: 5
    Last Post: 10-07-2012, 04:31 PM
  3. Resolved featured content glider slide duration
    By tspore in forum Dynamic Drive scripts help
    Replies: 3
    Last Post: 02-17-2009, 07:21 PM
  4. Fade Duration in Slideshow
    By xOli in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 03-30-2008, 10:03 AM
  5. Fade-in duration in fadeinslideshow
    By clair in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 01-17-2008, 11:07 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
  •