PDA

View Full Version : Conveyor Belt slideshow script



lommel
08-08-2005, 11:36 PM
Hello once again from germany and at first once again the same sentence as every year, i'm sorry for my bad english (bad or worse?? bad-worse-worst - oh, my school-time is long time ago... :) )!!
Okay, here is my question: I use the Conveyor Belt slideshow script
for my Homepage to show sponsoring-partners in our handball-club. The script is really fantastic to show the sponsors to the users.
But: Some older visitors said "oh, its to hard for my eyes to see the "belt" always in bottom of the page during the belt "runs". Now my question: Is it possible to install an ON/OFF-switch? ON: the "belt" runs, OFF: the "belt" stops. Thats all. Can you please tell me if this is possible and how to realize this on/off-switch!
Thank you very much, nice greetings from germany

Lommel

jmayle
11-19-2005, 06:00 PM
i dont have an answer butthats a great idea

jscheuer1
11-20-2005, 12:05 AM
Near the end of the script where it says:


document.write('</td></table>')

add just below that:


write('<div style="width:'+sliderwidth+';"><center><input style="width:75px;" type="button" value="Pause" onclick="if(this.value==\'Pause\'){copyspeed=0;this.value=\'Resume\'}else{copyspeed=slidespeed;this.value=\'Pause\'}"></center>')

jscheuer1
11-20-2005, 03:20 AM
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:


write('<div style="position:absolute;width:'+sliderwidth+';height:'+sliderheight+';background-color:'+slidebgcolor+'" onMouseover="copyspeed=0" onMouseout="copyspeed=slidespeed">')

Make it look like this:


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:


document.write('</td></table>')

This time put this instead:


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:


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
}