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">
Bookmarks