PDA

View Full Version : Left-Right Scrolling Window Script



Buellboy
04-21-2005, 01:08 AM
I'd like to modify this script so that when the mouse is over the scrolling frame the scrolling stops, and restarts when the mouse is moved off. Can anyone help? To get an idea of why I'm asking, surf to http://www.popsrun.org/ and click on any of the "Photos from..." links.

jscheuer1
04-22-2005, 06:48 AM
First of all you have some syntax errors. Wherever you have:
onMouseOut="window.status='2001 Pop's Run Photo Album'; return true"it should be:
onMouseOut="window.status='2001 Pop\'s Run Photo Album'; return true;"this is true of all places you have Pop's in the onMouseOut events, regardless of the year involved. Also the 'return true' in the onMouseOver & onMouseOut events should be 'return true;' but, that (the semicolon) isn't critical. Once that is taken care of you can go about creating your pause like so, replace this line:
setInterval("scrollwindow()",10)with:
ralph=setInterval("scrollwindow()",10)add this line:
var ralphunder this line:
var speed=1Replace this line:
strength=(which==0)? 1 : 0.7with these lines:
if (which==0){
strength=1;
clearInterval(ralph);
}
if (which==1){
strength=0.7;
startit();
}That's it, works here in IE6, NS7.2 & FF1.0.3

Buellboy
04-22-2005, 02:28 PM
Ah, thank you. I corrected the apostrophe in the main page, but missed that in the scripts that generate the photo albums. Once my broadband access is restored I'll make those changes you've suggested. I've forgotten how BAD dial up access can be!!

Buellboy
04-23-2005, 03:56 PM
Thank you, that did the trick! It's working the way I envisioned. I've also added a link on my pages back to Dynamic Drive so you guys get the credit even if people don't view the page source. Thanks again!