PDA

View Full Version : Step Carousel - How can I stop it?



metty
10-21-2008, 07:45 AM
1) Script Title:
Step Carousel Viewer

2) Script URL (on DD):
http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm

3) Describe problem:
Hello people,

I've got a little question about the Step Carousel Viewer. I integrated it into a homepage, I enabled autostep and disabled defaultbuttons.
Is there a way to stop the scrolling with a function call? I don't want to enable the defaultbuttons. If I use stepto(); it goes to next step, but the autostep will not be disabled.

Another thing: Is it possible to run the Script in the NoConflict Mode of jQuery?

Thanks
Metty

ddadmin
10-21-2008, 09:00 AM
To stop the auto stepping of the Carousel dynamically, you can use a function such as:


<script type="text/javascript">

function stopautostep(carouselid){
var config=stepcarousel.configholder[carouselid]
clearTimeout(config.steptimer)
clearTimeout(config.resumeautostep)
config.autostep.status="stopped"
}

</script>

Then, a link to stop the Carousel with main ID "mygallery" would look like this:


<a href="javascript:stopautostep('mygallery')">Step auto stepping</a>

BTW, there was a bug in the script that prevented auto stepping from being canceled when you called stepBy() or stepTo() dynamically. They have now been fixed in v1.6.1: http://www.dynamicdrive.com/dynamicindex4/stepcarousel.htm (just update the .js file).

metty
10-21-2008, 09:23 AM
You mean, if I just update the .js file i can stop autostepping by calling stepBy(); ?

ddadmin
10-21-2008, 09:29 AM
You mean, if I just update the .js file i can stop autostepping by calling stepBy(); ?

Yep. :)

metty
10-21-2008, 09:30 AM
Thanks! :)
Is there also a way to start it again?

metty
12-18-2008, 02:32 PM
*push*

Sorry, but, if I stopped the carousel, can I start the autostep again?

ddadmin
12-19-2008, 01:16 AM
Untested, but you can try and revive the Carousel again once it's stopped with a function like:


function startautostep(carouselid){
var config=stepcarousel.configholder[carouselid]
clearTimeout(config.steptimer)
config.steptimer=setTimeout(function(){stepcarousel.autorotate(config.galleryid)}, config.autostep.pause)
}

Usage wise it's the same as its counterpart above.
}

metty
12-19-2008, 08:20 AM
Hmmm, this doesn't work... :(
The function is called and executed, but nothing happened.

This could be a feature in the next version. ;)