View Full Version : Resolved Carousel Slideshow II Stop/Start Button

04-21-2009, 10:26 PM
1) Script Title: Carousel Slideshow II

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

3) Describe problem: I'd like to have a stop/start button on this script. I've been trying to add one and I can't make it work. Any ideas?

Example: http://www.learnwithjenza.com/testimonials.html

04-22-2009, 05:20 AM
Are you using Carousel Slideshow II:


as you state and link to in your post or Carousel Slideshow:


as is used on your example page (testimonials.html)?

04-22-2009, 05:53 AM
You are right, I made a mistake. I am using Carousel Slideshow I.

04-22-2009, 06:13 AM
Not a big deal, but both scripts are complicated and different, so I didn't want to launch into a whole explanation of how to stop one, when you really wanted to know how to stop the other.

Basically the script you are using:


works off of the C_Stppd variable. But it is used for pausing the show onmouseover, so we really shouldn't co-opt it.

Let's make our own here (addition highlighted):

/***************** DO NOT EDIT BELOW **********************************/
CW_I=new Array(Car_NoOfSides/2+1);C_ClcW=new Array(Car_NoOfSides/2);
C_Coef=new Array(
3*Math.PI/2,0,3*Math.PI/2,11*Math.PI/6,Math.PI/6,3*Math.PI/2,7*Math.PI/4, 0,
var C_CoefOf=Car_NoOfSides==4?0:Car_NoOfSides==6?2:Car_NoOfSides==8?5:9;
C_Pre_Img=new Array(Car_Image_Sources.length);
var C_Angle=Car_Direction?Math.PI/(Car_NoOfSides/2):0,C_CrImg=Car_NoOfSides,C_MaxW,C_TotalW,

And add it to the test for C_Stppd here:

function CarImages(){
if(!C_Stppd && !show_stopped){
C_ . . .

Now your stop button can look like so:

<input type="button" onclick="this.value = show_stopped? 'Stop' : 'Start'; show_stopped = !show_stopped;" value="Stop">

04-22-2009, 07:05 AM
It's so simple when you know what you are looking for. I did realize that the C_Stppd was the key I just didn't know the right way to tweak it. Thanks for your help!

BTW, are you on Experts-exchange.com? I have an open question about this over there. You could make 500 points if you add your answer there. I'll wait to close that question until I hear from you.

Thanks again! :)

04-22-2009, 07:15 AM
Nope, I'm not on that.

04-22-2009, 07:48 AM
Thanks again.