PDA

View Full Version : how to stop Mike's DHTML scroller



AKTrish
12-17-2006, 05:27 AM
Greetings,

Is there a way to stop Mike's DHTML scroller from scrolling?
http://www.dynamicdrive.com/dynamici...mikescroll.htm

I want it to only scroll the text once. I'm the process of creation and the page is not live yet, so no URL to provide.

Thanks in advance for any feedback!
Trish

jscheuer1
12-17-2006, 09:27 AM
In scroller.js change this:


// When we reach the end, start over.

if (scrollerList[i].currentY >= scrollerList[i].maxY) {
scrollerList[i].currentY -= scrollerList[i].maxY;
scrollerList[i].nextY = scrollerList[i].height;
}

to this:


// When we reach the end, start over.

if (scrollerList[i].currentY+scrollerList[i].height >= scrollerList[i].maxY) {
scrollerList[i].stopped=true;
return;
scrollerList[i].currentY -= scrollerList[i].maxY;
scrollerList[i].nextY = scrollerList[i].height;
}

AKTrish
12-17-2006, 11:47 AM
That's fantastic! Thank you :D http://www.dynamicdrive.com/dynamici...mikescroll.htm

Trish