PDA

View Full Version : Stop/Prev/Next in auto mode



Xdj
10-06-2009, 07:32 PM
1) Script Title: Ultimate Fade-in slideshow (v2.1)

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex14/fadeinslideshow.htm#displaymode

3) Describe problem: Option to have a stop/start button ("prev/next") on auto slide show. Also, is it possible to have the same controls as the manual demo in auto mode with a stop/stat button.

Greetings,
I was curious if it is possible to have the slide show with a stop/start button and manual controls while having the slide show fully automatic as well.
Plus, are there options for different transitions.
Thanks,

jscheuer1
10-07-2009, 05:30 AM
I've worked out a way to have stop/start buttons in any mode. For Stop:


<input type="button" onclick="mygallery.navigate(mygallery.setting.imgindex);" value="Stop">

where mygallery is the name of the variable used to define the instance, ex (from the demo page):


var mygallery=new fadeSlideShow({
wrapperid: "fades . . .

For Start:


<input type="button" onclick="var dm=mygallery.setting.displaymode;if(dm.type!=='auto'){dm.type='auto';mygallery.showslide('next');}" value="Go">

As for next/previous, it is undocumented, but if you give your gallery definition a togglerid, you may supply it a toggler element as described for the manual slide show, even if its mode is set to auto. The next and the previous buttons will perform as with the manual show - the only caveat is that they will throw the show into manual (stopped) mode when activated. But if you have a Go (start) button, users can activate auto mode again if they so choose.