Results 1 to 4 of 4

Thread: Change the PAUSE behaviour ....

  1. #1
    Join Date
    Mar 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Change the PAUSE behaviour ....

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

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

    3) Describe problem: First of all, thank you VERY MUCH for the existence of Dynamic HTML. I've been using it for many time !!!!

    Ok, my question is : I'm using this slideshow to show images very fast, as you can see in this the link www.montanashoplisboa.com/slide.htm ....

    Is is possible, instead making a PAUSE on mouse over, reduce the speed of the slideshow (Pause = Original value x 10) ...i don't know if i am making me understand .....

    (i'm sorry about my bad english .......... )

    Thanks in advanced,
    Luis Bernardo.

  2. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    You can easily change the pause between image changes in your config code:

    Code:
    var mygallery=new fadeSlideShow({
    wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    dimensions: [250, 180], //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://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:0, wraparound:false},
    persist: false, //remember last viewed slide and recall within same session?
    fadeduration: 500, //transition duration (milliseconds)
    descreveal: "ondemand",
    togglerid: ""
    })
    Change 2500 to the desired pause in milliseconds.
    DD Admin

  3. #3
    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

    That will only change the 'pause' (rotation rate) for the entire show. I think that what luisbernas wants though is to change the mouseover pause (which currently actually stops the show temporarily) to a mouseover slowing of the rotation rate to one that's 10 times slower than the configured rate. Then on mouseout, instead of what it currently does (which is resume the show), instead of that, speed back up to the configured rate.

    If I have that much right, we need to change (from the source code of www.montanashoplisboa.com/slide.htm):

    Code:
    <script type="text/javascript">
    
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    	dimensions: [450, 600], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["tee/1.jpg"],
    		["tee/2.jpg"],
    		["tee/3.jpg"],
    		["tee/3.jpg"],
    		["tee/4.jpg"],
    		["tee/5.jpg"],
    		["tee/6.jpg"],
    		["tee/7.jpg"],
    		["tee/8.jpg"],
    		["tee/9.jpg"],
    		["tee/10.jpg"] //<--no trailing comma after very last image element!
    	],
    	displaymode: {type:'auto', pause:500, cycles:0, wraparound:false,randomize:true},
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 10, //transition duration (milliseconds)
    	descreveal: "ondemand",
    	togglerid: ""
    })
    
    </script>
    to (additions highlighted):

    Code:
    <script type="text/javascript">
    
    var mygallery=new fadeSlideShow({
    	wrapperid: "fadeshow1", //ID of blank DIV on page to house Slideshow
    	dimensions: [450, 600], //width/height of gallery in pixels. Should reflect dimensions of largest image
    	imagearray: [
    		["tee/1.jpg"],
    		["tee/2.jpg"],
    		["tee/3.jpg"],
    		["tee/3.jpg"],
    		["tee/4.jpg"],
    		["tee/5.jpg"],
    		["tee/6.jpg"],
    		["tee/7.jpg"],
    		["tee/8.jpg"],
    		["tee/9.jpg"],
    		["tee/10.jpg"] //<--no trailing comma after very last image element!
    	],
    	displaymode: {type:'auto', pause:500, cycles:0, wraparound:false,randomize:true},
    	persist: false, //remember last viewed slide and recall within same session?
    	fadeduration: 10, //transition duration (milliseconds)
    	descreveal: "ondemand",
    	togglerid: "",
    	oninit: function(){
    		var show = this.setting, inst = this, savedpause = show.displaymode.pause;
    		show.$wrapperdiv.unbind('mouseenter mouseleave').hover(function(){
    			clearTimeout(show.playtimer);
    			show.displaymode.pause = savedpause * 10;
    			show.playtimer = setTimeout(function(){inst.showslide(++show.curimage);}, show.displaymode.pause);
    		}, function(){
    			clearTimeout(show.playtimer);
    			show.displaymode.pause = savedpause;
    			inst.showslide(++show.curimage);
    		});
    	}
    })
    
    </script>
    Notes: Be sure not to miss the added comma (red) here:

    Code:
    	togglerid: "",
    Also, further refinement may be required.
    Last edited by jscheuer1; 03-03-2010 at 04:32 AM. Reason: deal with editor glitch
    - John
    ________________________

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

  4. The Following User Says Thank You to jscheuer1 For This Useful Post:

    luisbernas (03-03-2010)

  5. #4
    Join Date
    Mar 2010
    Posts
    4
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    John,

    THANK YOU VERY MUCH !!!!!

    I have no words to express what i felt when I saw my slideshow working the way I wanteded !!!!!

    John rules !!!!

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
  •