<!-- This script is featured at JavaScript Planet at
http://www.js-planet.com Check out
JavaScript Planet for more scripts, links,
etc.
Please leave this comment intact.
-->
<SCRIPT LANGUAGE="JavaScript">
<!-- hide script from old browsers
//-------------------------------------------------------------------------------------------
// JavaScript function "stack" written by Rick Glusick, January 1997.
// Please use at your own risk. I am not responsible for any
damage caused by this function.
// This code can be used and modified as long as my name is attached
to this function.
// Email : glusick@dave-world.net
// Copyright 1997
//-------------------------------------------------------------------------------------------
var phrase = "This is an example of the 'stack' function written in
JavaScript.";
var lenPhrase = phrase.length;
var phraseOut = "";
var pause = 25;
var i=0;
var j=0;
var animateWidth = 20;
var position=animateWidth;
function stack() {
if (phrase.charAt(i) != " ") {
phraseOut = "";
for (j=0; j<i; j++) {
phraseOut += phrase.charAt(j);
}
for (j=i; j<position; j++) {
phraseOut += " ";
}
phraseOut += phrase.charAt(i);
for (j=position; j<animateWidth;
j++) {
phraseOut += " ";
}
window.status = phraseOut;
if (position == i) {
animateWidth++;
position = animateWidth;
i++;
}
else {
position--;
}
}
else {
i++
}
if (i<lenPhrase) {
setTimeout("stack()",pause);
}
}
// end hiding contents -->
</SCRIPT>
<BODY BGCOLOR="BLACK" TEXT="WHITE" OnLoad="stack()"> |