Board Logo

Stop Slideshow when manually skipping slides
lxxl - 9/25/2007 at 03:45 PM


although the topic doesn't seem to be frequented a lot, i'm going to have a try. First off: Thank you very much for this free script, because it comes very very close to what I've been looking for for quite a long time.
For I'm not versed in javascript (well. generally my scripting experience has almost gone with the years :( ), I'd like to know, whether it would be possible/easy to prevent the Slidshow from going on automatically when using manual previous/next-buttons.
While I've been able to achieve the latter by using the following code from within the HTML page

"javascript:mySlideShow.f_goto(mySlideShow.n_currentSlide - '1', true)"

I just have no idea, where to place a stop command in the tfader.js. Principally, it should be working like pushing the previous/next-Button and then the Stop-Button. But adding mySlideShow.f_stop() to the command line (of the HTML page) doesn't seem to work.

Well, maybe there's someone around, who could give me a hint.



lxxl - 9/26/2007 at 01:59 PM

Still not found a solution. Seems to be a bit more complicated, because the fading animations need to run. A simple this.f_stop(); somewhere in the .js just stops the proceeding without getting to the next or previous slide. I guess, I won't get far with my limited knowledge.

lxxl - 9/26/2007 at 05:54 PM

Alright, found a workaround: Putting this.a_tpl['slidetime'] = 1000; in the tslide_goto function will at least increase the duration of each slide to an amount comparable to a stop.
Of course, if you want to go on with the regular slidetime, you'll have to reset the the property slidetime to the original value. I did it with a modified duplicate of the f_run function:

this.f_restart = function () { this.a_tpl['slidetime'] = 2; this.b_running = 1; this.f_goto(); };

Certainly, there are smarter ways to realise a real stop, however it also does the job this way.

tigra - 9/28/2007 at 09:56 PM

yep, f_stop() kills it right there. If you need to finish the transition first then you can add another parameter to f_goto() that will indicate that you want to stop after the transition is done. Just don't initiate another slide show pause and exit the function.

Back to forum: