How to create Web sites easily

The most complete guide for the Web page builder
All you'll
ever need to know about homepages and HTML

How to do JavaScript ticker-tapes

Click here to return to the index

Finally, the JavaScript marquees are here, brought to you by The Omega. Soon we'll have a preview for each of those marquees.

We have the following scrolly types, ready to suit any tastes:

NOTE: The scrollies will make the text in the "msg" variable to scroll on the bottom line of your browser (that is the status bar). If you would like to make it work for a text box, do the following:

  1. Change "window.status=disp" to "document.scrolly.scrollybox.value=disp"
  2. Add the following HTML to your page, where you want the scrolly:
<FORM NAME="scrolly">
<INPUT TYPE="text" NAME="scrollybox" SIZE=80>
</FORM>

To change the text of the message:
Find the statement "msg=..." on the scrolly's code, and change the text accordingly

Here is the code for each scrolly:

Bounce scrolly

Put this right after the <HEAD> tag:

<SCRIPT>
<!-- Scrolly script
// written by The Omega
// http://www.oocities.org/Area51/Corridor/4381
// the_omega@oocities.com
function bounceScrolly(num,dir){
var msg="Wanna play ping pong?"
var disp=" "
var len=msg.length
if ((num<1)||(num>150))
dir=-dir
for (var i=0;i<num;i++){disp+=" "}
disp+=msg
num+=dir
window.status=disp
Scrollytimer=window.setTimeout("bounceScrolly("+num+","+dir+")",100)}
//-->
</SCRIPT>

Add this to the <BODY> tag:

onLoad="bounceScrolly(100,1)"

Contract scrolly

Put this right after the <HEAD> tag:

<SCRIPT>
<!-- Scrolly script
// written by The Omega
// http://www.oocities.org/Area51/Corridor/4381
// the_omega@oocities.com
function contractScrolly(num,pos){
var msg="Come in! Come in!"
var spaces=" "
var len=msg.length
if (num<-10)
num=50
var pos2=pos-Math.floor(len/2)
for (var i=1;i<num;i++){spaces+=" "}
var disp=spaces
for (var i=0;i<len;i++){disp+=msg.substring(i,i+1)+spaces}
x=Math.floor(pos-disp.length/2)
if (x<0)
disp=disp.substring(-x,disp.length)
else
for (i=0;i<x;i++){disp=" "+disp}
num--
window.status=disp
Scrollytimer=window.setTimeout("contractScrolly("+num+","+pos+")",10)}
//-->
</SCRIPT>

Add this to the <BODY> tag:

onLoad="contractScrolly(50,80)"

Expand scrolly

Put this right after the <HEAD> tag:

<SCRIPT>
<!-- Scrolly script
// written by The Omega
// http://www.oocities.org/Area51/Corridor/4381
// the_omega@oocities.com
function expandScrolly(num,pos){
var msg="And away we go!"
var spaces=" "
var len=msg.length
if (num>50)
num=-10
var pos2=pos-Math.floor(len/2)
for (var i=1;i<num;i++){spaces+=" "}
var disp=spaces
for (var i=0;i<len;i++){disp+=msg.substring(i,i+1)+spaces}
x=Math.floor(pos-disp.length/2)
if (x<0)
disp=disp.substring(-x,disp.length)
else
for (i=0;i<x;i++){disp=" "+disp}
num++
window.status=disp
Scrollytimer=window.setTimeout("expandScrolly("+num+","+pos+")",10)}
//-->
</SCRIPT>

Add this to the <BODY> tag:

onLoad="expandScrolly(0,80)"

"One" scrolly

Put this right after the <HEAD> tag:

<SCRIPT>
<!-- Scrolly script
// written by The Omega
// http://www.oocities.org/Area51/Corridor/4381
// the_omega@oocities.com
function oneScrolly(num,idx){
var msg="One by one..."
var disp=" "
var len=msg.length
if (num<0)
{idx++
num=160}
if (idx>len-1)
idx=0
disp=msg.substring(0,idx)
for (var i=0;i<num;i++){disp+=" "}
disp+=msg.substring(idx,idx+1)
num-=5
window.status=disp
Scrollytimer=window.setTimeout("oneScrolly("+num+","+idx+")",1)}
//-->
</SCRIPT>

Add this to the <BODY> tag:

onLoad="oneScrolly(160,0)"

Regular scrolly

Put this right after the <HEAD> tag:

<SCRIPT>
<!-- Scrolly script
// written by The Omega
// http://www.oocities.org/Area51/Corridor/4381
// the_omega@oocities.com
function Scrolly(num){
var msg="The dreaded scrolly script!"
var disp=" "
var len=msg.length
if ((num<=len)&&(num>0))
disp=msg.substring(len-num,len)
else{
if (num<=0)
num=200+len
else
{for (var i=0;i<num-len;i++){disp+=" "}
disp+=msg}}
num--
window.status=disp
Scrollytimer=window.setTimeout("Scrolly("+num+")",100)}
//-->
</SCRIPT>

Add this to the <BODY> tag:

onLoad="Scrolly(100)"

Reverse scrolly

Put this right after the <HEAD> tag:

<SCRIPT>
<!-- Scrolly script
// written by The Omega
// http://www.oocities.org/Area51/Corridor/4381
// the_omega@oocities.com
function bounceScrolly(num,dir){
var msg="Wanna play ping pong?"
var disp=" "
var len=msg.length
if ((num<1)||(num>150))
dir=-dir
for (var i=0;i<num;i++){disp+=" "}
disp+=msg
num+=dir
window.status=disp
Scrollytimer=window.setTimeout("bounceScrolly("+num+","+dir+")",100)}
//-->
</SCRIPT>

Add this to the <BODY> tag:

onLoad="bounceScrolly(100,1)"

Vibe scrolly

Put this right after the <HEAD> tag:

<SCRIPT>
<!-- Scrolly script
// written by The Omega
// http://www.oocities.org/Area51/Corridor/4381
// the_omega@oocities.com
function vibeScrolly(num,dir){
var msg="Shake, rattle, and roll!"
var disp=" "
var len=msg.length
dir=-dir
for (var i=0;i<num;i++){disp+=" "}
disp+=msg
num+=dir
window.status=disp
Scrollytimer=window.setTimeout("vibeScrolly("+num+","+dir+")",1)}
//-->
</SCRIPT>

Add this to the <BODY> tag:

onLoad="vibeScrolly(60,1)"

Bottom note - please read

A note from the scrollies' author. He has helped me so much that I'm going to put his read me file with his requests to anyone using the scrollies' code:

Ok, you really want a scrolly, don't you. Fine... Might as well use one of mine :)

Just choose which one you want, and add the text as indicated to your source. If you would rather have something like I had on the example page, do the following:

  1. Change "window.status=disp" to "document.scrolly.scrollybox.value=disp"
  2. Add the following HTML to your page, where you want the scrolly:
<FORM NAME="scrolly">
<INPUT TYPE="text" NAME="scrollybox" SIZE=80>
</FORM>

To change the message: change msg="..." to msg="your message here"


You may use these scripts as long as you leave all the comments in (the lines with my name and stuff). I'd appreciate it if you gave me a link to your page. If you want a graphic, download

http://www.oocities.org/Area51/Corridor/4381/helped.zip
Otherwise, a text link would be appreciated.

Also appreciated would be an e-mail (the_omega@oocities.com) just to say "hey I'm using one of your scrollies", so I know SOMEONE is!

Internet Link Exchange
Member of the ILE Free Home Pages at GeoCities


[Main page] [HTML help] [MIDI page] [Murphy's Laws] [More information]
[Feedback form to email me] [Sign guestbook] [Mail me!]