Dynamic Scroller

[Total: 0    Average: 0/5]

Creates a dynamic scroller box that features scrolling messages like you’d have seen on many professional web sites.

Head Code:

<script language="javascript">
<!--- Fully customizable ad scroller by Vivian Jason...



/*******************************************************

Free JavaScript Source Code by Vivian Jason
Use this on your web sites!!

Please leave this header intact
Hey, Give me credit for what I've done myself guys 🙂

E-mail : vivekcog@yahoo.com

*******************************************************/




/*******************************************

Place this in the HEAD of your web pages...

********************************************/


arr=new Array();  // Array Declaration, don't tamper with...


/*
Your messages go here. HTML Tags allowed. Make sure you number your messages 0,1,2,3... and so on. Critical for proper execution of script...
*/


arr[0]="This is some sample random text.";
arr[1]="I am the greatest <br>programmer in the world";
arr[2]="And, If that sounds <b>vain</b> to you..."
arr[3]="Don't worry, I'm <b>just kidding</b>";
arr[4]="Do visit my homepage...";
arr[5]="<a href='http://www.geocities.com/vivekcog/'>Vivian's Savage Garden Land!!</a>";
arr[6]="Use this script!! <br><b>Have fun :)</b>";



// End of messages...




pause = 400  // Controls the "pause time" between 2 messages...

scroll_speed = 250;  // The speed of the scrolling message... The greater the quicker...




// Don't alter code below this line...


i=0;
setTimeout("begin()",400);

function begin()
{
news_ex.innerHTML=arr[i];
news_ex.style.paddingTop=news_ex.offsetHeight - 20;

i++
if (i==arr.length) i=0;
setTimeout("begin2()",1000);
}

function begin2()
{
a=parseInt(news_ex.style.paddingTop)-2;
if (a < 5) {clearTimeout("t"); setTimeout("begin()",pause); return false};
news_ex.style.paddingTop=a;
t=setTimeout("begin2()",scroll_speed);
}


// End of script... --->
</script>
<!-- This goes in the HEAD as well. Adjust the TOP and LEFT attributes to position the scroller wherever you desire.... -->

<style>
#news_ex {font-family:arial;font-size:14;position:absolute;top:200;left:300;background-color:a6ccf4;height:120;text-align:center;padding-left:10;padding-right:10;}
</style>

<!--- End of the code for the HEAD section --->

Body Code:

<!-- Place this one line anywhere in the BODY of your web pages... --->

<div id="news_ex"></div>

<!--- End of BODY code... --->

Times Viewed: 4

Leave a Reply

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