That really won't work real well, I just realized. Once the conveyor is stopped, using the new button I made, simply moving the mouse over the conveyor and then off of it will restart the motion. So, more work is needed. Start over from the original script. Find this line:
Code:
write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
Make it look like this:
Code:
write('<div id="control" style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')
Where we added code the last time, just below this line:
Code:
document.write('</td></table>')
This time put this instead:
Code:
if (iedom)
write('<div style="width:'+sliderwidth+';"><center><input style="width:75px;" type="button" value="Pause" onclick="pR(this)"></center></div>')
Just above the </script> tag, put this function:
Code:
function pR(el){
var ctrl=document.getElementById? document.getElementById('control') : document.all['control']
if (el.value=='Pause'){
ctrl.onmouseout=''
el.value='Resume'
copyspeed=0
return;
}
ctrl.onmouseout=function(){copyspeed=slidespeed}
el.value='Pause'
copyspeed=slidespeed
}
Bookmarks