statuScroll

Demo

Copyright (C)1996 Philip Tan Boon Yew

All Rights Reserved. These functions can be re-used or modified, if credit is given in the source code. I will not be held responsible for any unwanted effects due to the usage of these functions or any derivative. No warrantees for usability for any specific application are given or implied.
Philip Tan, 22nd of April, 1996.

function statuScroll(textIndex)

This function will scroll a string in the status line at the bottom of the screen. It repeatedly triggers off setTimeout so that the the scrolling continues. Since statuScroll refers to single variables for all its alterable properties, it's easy to tailor the speed, cycle delay and message for your preferences. Just alter the variables in statuScroll to refer to fixed numbers instead of textarea values when using statuScroll as an uncontrollable scroller.

Also, the variable sclTimer is used to maintain the timeout cycles of statuScroll. Don't use sclTimer for anything other than running or stopping statuScroll, the effects are unpredictable.

About the function...

statuScroll is actually based on Chris Skinner's scrollit_r21, which is an excellent status scroller, but a little tricky to alter certain things like the speed of the scrolling and the amount of spaces given for each scroll-past, since the constants are all scattered through the code.

Apparently, status scrollers, if left alone long enough, will eventually run Netscape out of memory (!) Although I've yet to see this happen to statuScroll, I think it's entirely possible that it will happen. statuScroll is very compact considering the code executed, so you might have to wait really long before it'll crash.

On the other hand, you've got to have a very good page before anybody's going to spend that long looking at your page. If your page is so good, why distract browsers with a status scroller? :)

Look at the source of this HTML document to get at the code. They are fully annotated and should be easy enough to tailor for your own uses.

Demo

This demo shows how statuScroll works. Although statuScroll is running when this page is opened, you can stop it by clicking on 'Stop statuScroll'. Restarting the scrolling is done by clicking 'Run statuScroll'. You can actually have 2 or more statuScrolls running simultaneously, but it looks bad. Try it, though...

To illustrate statuScroll's single-location variables, you can alter the properties for the speed of scrolling and number of blank spaces put behind your message after the message completes one cycle. Changes are real-time. Once you confirm the changes by clicking anywhere outside the field you are changing, the changes will take effect. Try it out!!

Scroll message:

Speed of scrolling:

Number of blank spaces:

Back to the JavaScript Archives
Copyright © 1996 Philip Tan