Results 1 to 7 of 7

Thread: Carousel Slideshow II Stop/Start Button

  1. #1
    Join Date
    Jan 2009
    Location
    Jersey Shore
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Carousel Slideshow II Stop/Start Button

    1) Script Title: Carousel Slideshow II

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici.../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
    Last edited by Snookerman; 04-22-2009 at 07:50 AM. Reason: added "Resolved" prefix

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

    Are you using Carousel Slideshow II:

    http://www.dynamicdrive.com/dynamici.../carousel2.htm

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

    http://www.dynamicdrive.com/dynamicindex14/carousel.htm

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

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

  3. #3
    Join Date
    Jan 2009
    Location
    Jersey Shore
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default drats...

    You are right, I made a mistake. I am using Carousel Slideshow I.

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

    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:

    http://www.dynamicdrive.com/dynamicindex14/carousel.htm

    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):

    Code:
    /***************** 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,
    		Math.PI/4,3*Math.PI/2,5*Math.PI/3,11*Math.PI/6,0,Math.PI/6,Math.PI/3);
    	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,
    	C_Stppd=false,show_stopped=false,i,C_LeftOffset,C_HalfNo=Car_NoOfSides/2;
    And add it to the test for C_Stppd here:

    Code:
    	function CarImages(){
    		if(!C_Stppd && !show_stopped){
    			C_TotalW=0;
    			for(i=0;i<C_HalfNo;i++){
    				C_ . . .
    Now your stop button can look like so:

    HTML Code:
    <input type="button" onclick="this.value = show_stopped? 'Stop' : 'Start'; show_stopped = !show_stopped;" value="Stop">
    - John
    ________________________

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

  5. #5
    Join Date
    Jan 2009
    Location
    Jersey Shore
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default That's Great!

    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!
    Last edited by jscheuer1; 11-11-2009 at 02:58 AM. Reason: remove spammy hotlink

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

    Nope, I'm not on that.
    - John
    ________________________

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

  7. #7
    Join Date
    Jan 2009
    Location
    Jersey Shore
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Okay.

    Thanks again.

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
  •