Hi guys,

You'll have to forgive me as I'm more of a designer by nature but as
part of this utilised a bit of prototype javascript and upon being
asked to change a variable 6 months down the line, am a bit stuck.

It's code somebody else has created called the news scroller and
basically it scrolls content in a layer. Nothing exciting, I just
can't see any speed control variables and was wondering if there's an
easy way to get one in there. The prototype library it is currently
using is 1.5, but I can update it if needs be.

The code is as follows.

<script language="javascript">
            var boxHeight = $('news').style.height.replace('px','')
            var repeatHeight = $('news').scrollHeight //get the
current height so we know when to wrap
            $('news').innerHTML = $('news').innerHTML + $
('news').innerHTML  //add a second copy so we can scroll down to the
wrap point
            var stopScroll = 0
            var x
            function scrollMe() {
                clearTimeout(x)
                if(stopScroll==1) {
                    return
                }
                $('news').scrollTop=$('news').scrollTop+1
                if($('news').scrollTop<=repeatHeight) {
                    // keep on scrolin'
                    x = setTimeout("scrollMe()",40)
                }
                else { //we have hit the wrap point
                    $('news').scrollTop=0
                    x = setTimeout("scrollMe()",40)
                }
            }
            x = setTimeout("scrollMe()",3000)
            // start scrolling after one second
            </script>


Thanks in advance, hopefully you can offer some assistance,
Ed Barton

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to