PDA

View Full Version : Manual Scroller



masterchef
05-30-2007, 10:27 AM
1) Script Title: Manual Scroller

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex2/manualscroll.htm

3) Describe problem: I need this script to jump back to the start at the end of the scroll, my javascript is very poor I am more of a PHP man, any help woul dbe much appreciated.

Thxs
IJS

djr33
05-30-2007, 10:34 AM
More PHP for me too.

However, a question of clarification--
Should it loop or jump back? The difference is that looping would be smooth and jumping would be obvious to someone watching it. Depending on use, you might need one or the other.

masterchef
05-30-2007, 10:54 AM
A loop would be great or a jump back to the top as in the top action in the script

masterchef
05-31-2007, 11:19 AM
I have tried a few things with this but , i still have not managed it, any help would be much appreciated

ddadmin
05-31-2007, 02:36 PM
I assume you mean move back up and scroll down again in a loop? If so, just replace the old function movedown() with the below instead:


function movedown(){
if (window.moveupvar) clearTimeout(moveupvar)
if (iens6){
if (parseInt(crossobj.style.top)>=(contentheight*(-1)+100))
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
else
crossobj.style.top=0
}
else if (ns4&&crossobj.top>=(contentheight*(-1)+100))
crossobj.top-=speed
movedownvar=setTimeout("movedown()",20)
}

masterchef
06-01-2007, 12:55 PM
Many Thanks!!

The function works perfect, one last tweak would be great, could I set a delay before it jumps back to the top?

ddadmin
06-02-2007, 04:00 AM
To enable a pause before the content scrolls back up and downwards again, use the below movedown() function instead:


function movedown(){
if (window.moveupvar) clearTimeout(moveupvar)
if (iens6){
if (parseInt(crossobj.style.top)>=(contentheight*(-1)+100)){
crossobj.style.top=parseInt(crossobj.style.top)-speed+"px"
movedownvar=setTimeout("movedown()",20)
}
else
movedownvar=setTimeout("crossobj.style.top=0; movedown()", 1000)
}
}

Here 1000 means wait for 1 second- you can change that to your own.

masterchef
06-02-2007, 04:35 PM
You are a star, many many thanks!