Fully Customizable Scrolling Text in Status Bar

[Total: 0    Average: 0/5]

This script creates a series of scrolling messages in the status bar.

Head Code:

<script language="javascript">
<!--- Hiding from older browsers


/**********************************************************
*                                                         *
*                                                         *
*      Scrolling Text Script by Vivian Jason              * 
*                                                         *
*          Please leave this header intact                * 
*                                                         *
*             if you use this script                      *
*                                                         *
*           E-mail : vivekcog@yahoo.com                   *
*                                                         *
*                                                         *
**********************************************************/



/***************************************************************************************
*                                                                                      *
*      This script creates a series of scrolling messages in the status bar. The       *
*   script is fully customizable. You can customize the following elements of the      *
*   script.                                                                            *
*                                                                                      *
*                                                                                      *
*       A. Number of scrolling messages [no limit]                                     *
*       B. Scroll speed                                                                *
*       C. Number of times each message is to be displayed                             *
*                                                                                      *
*       Do note however, that the messages only scroll from left to right...           *
*                                                                                      *
*                                                                                      *
***************************************************************************************/


// Array declaration, Don't tamper with....

messages = new Array(1);




// Add any number of messages.... 
// Only number them messages[0],messages[1],messages[2] and so on ...




messages[0]="My name is Vivian Jason...";
messages[1]="I live in India...";
messages[2]="I am 19 years old...";
messages[3]="I like [LOVE] playing chess online...";
messages[4]="But, it's been a long time since I've really done so...";
messages[5]="This is a fifth message...";
messages[6]="I hope this works...";
messages[7]="I'm gonna change the scroll speed!!...";




// End of all your messages...
// Ensure messages are properly numbered... Critical for proper execution of script...





scroll_speed=10;  // Change this value to change text scrolling speed...

times = 5;       // Determines how many times each message is displayed...

                  // Setting 'times' to '-1' causes the messages to scroll forever...





// Do not edit below this line...


window.status="";  // Necessary to make the script work cleanly with NetScape...


function scroll_text(current_message, index)
{

if (times == 0) return 0;


c=current_message; i=index;

if (c == messages.length)
{
window.status="";
setTimeout("scroll_text(0,0)",scroll_speed);
times--;
}

else if (i > messages[c].length)
{
window.status="";
c++;
setTimeout("scroll_text(c,0)",scroll_speed); 
}

else
{
window.status += messages[c].charAt(i);
i++;
setTimeout("scroll_text(c,i)",scroll_speed);
}
}
scroll_text(0,0); /* this starts it going */
// Script ends here...
//  Ending Hiding from older browsers...  -->
</script>

Body Code:

<h2 align="center"><font face="Arial">Scrolling Text In The Status Bar</font></h2>
<p>This script creates a series of scrolling messages in the status bar. The
script is fully customizable. You can customize the following elements of the
script.</p>
<ul>
  <li>Number of scrolling messages [no limit]</li>
  <li>Scrolling speed</li>
  <li>Number of times each message is to be displayed</li>
</ul>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *