»
EnglishFrenchVietnamese

Print - Blinker News Ticker 3.0 - JavaScriptBank.com

Full version: jsB@nk » Text » Animation » Blinker News Ticker 3.0
URL: http://www.javascriptbank.com/blinker-news-ticker-3-0.html

Blinker News Ticker 3.0 © JavaScriptBank.comThe script blinks any number of messages/images. It features configurable speed, pause, size, background - color or image - and number of blinks. Pauses while mouse is placed over too. Any basic HTML code is allowed. Multi-OS and Cross-Browser Javascript Blinker News Ticker. The script below is a W3C Standards compliant javascript.

Full version: jsB@nk » Text » Animation » Blinker News Ticker 3.0
URL: http://www.javascriptbank.com/blinker-news-ticker-3-0.html



CSS
<STYLE type=text/css>A {TEXT-DECORATION: none}A:link {COLOR: blue}A:visited {COLOR: blue}A:hover {COLOR: red; BACKGROUND-COLOR: #66ffff}.tabc {FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: navy; FONT-FAMILY: Arial,Helvetica; TEXT-ALIGN: center}.tabbc {FONT-WEIGHT: bold; FONT-SIZE: 12px; FONT-FAMILY: Arial,Helvetica; TEXT-ALIGN: center}.tanc {FONT-WEIGHT: bold; FONT-SIZE: 10px; COLOR: navy; FONT-FAMILY: Arial,Helvetica; TEXT-ALIGN: center}</STYLE>


JavaScript
<SCRIPT language=JavaScript>/************************************   http://javascripts.vbarsan.com/*   This notice may not be removed ***********************************/// begin: Parameters of the Blinker follow: -->//width of the Blinker in pixels: set to your own;var mswidth=300;//height of the Blinker in pixels: set to your own;var msheight=80;//message pause: message in sight!var mspause=1000 //1000=1s//blinks speed: message out of sight!var msspeed=200 // 1000=1s//blinks per message: set to your own - value from 1 up;var msblinks=3 //if only one message: value 0 (indefinitely).//BACKGROUND: either color(1) or image(2) ;//1.Background color: could be like: "aqua";//set it "" for no background color;var sbcolor="#ffffff";//or 2.Background image: "imagename.ext";//leave it "" for no image background;var sbground="";//border for blinking area: 1, ... ;//set it 0(zero) for no border;var sborder=3; // <-- end Parameters // begin: Blinker's Messages -->var singlemessage=new Array();//Messages --> as many as you'd like: set to your own;//A <DIV class=... ...> and </DIV> pair is recommended for each //row of a message for alignment and/or Size, Color, ... control.//Inside any message you MUST use ' in lieu of ';singlemessage[0]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td height="80" valign="middle"><div class=tanc><A class=tabbc target="_self" href="http://vertical-scroller.vbarsan.com/">1. Vertical Scroller 7.0 - Javascript Script</A><br />Messages may scroll & pause along 2 different patterns:<br />- Singles: pause at top or may automatically be centered.<br />- One_or_More-up-to-area-size: Messages go equidistant<br />each & every message pausing when reaches top edge.</div></td></tr></table>';singlemessage[1]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td height="80" valign="middle"><div class=tanc><A class=tabbc target="_self" href="http://news-scroller.vbarsan.com/">2. Horizontal Scroller 7.0 - Javascript Script</A><br />Messages may scroll & pause along 2 different patterns:<br />- Singles: pause at left or centered depending upon CSS.<br />- One_or_More-up-to-area-size: Messages go equidistant<br />each & every message pausing when reaches left edge.</div></td></tr></table>';singlemessage[2]='<table CELLSPACING="0" CELLPADDING="0" align="center"><tr><td height="80" valign="middle"><div class=tanc><A class=tabbc target="_self" href="http://news-ticker.vbarsan.com/">3. Typewriter Scroller 5.0 - Javascript Script</A><br />Typewriter ticker has 2 portions: typewriting & scrolling<br>with first one at the bottom - Scrolling portion is optional.<br />Typewriting portion may hold as many rows as desired.<br />Scrolling goes up with the size of actual typewritten text.</div></td></tr></table>';singlemessage[3]='<div align="center" class=tabc><br />'+'<u>4. Any number of Messages/Images.</u>'+'<br />BLINKING stops while Mouse is placed Over.'+'<br />Multi-OS & Cross-browser compatible.</div>';singlemessage[4]='<div align="center" class=tabc><u>5. Runs messages as large as you'd like.</u><br><br>Inside you MUST use \' in lieu of '.<br>Preload is recommended for images.<br>Set your own number of blinks per message.</div>';//    ...//singlemessage[...]='...'// <-- end Messages // begin: Blinker's Algorithm -->var kkk=0;var timer1 = null;var timer2 = null;if(singlemessage.length==1) msblinks=0;var resumesmsb=msblinks;var iki=0;function dmmg11(){dmdiv.innerHTML=singlemessage[iki];timer1=setTimeout("dmmg12(dmdiv.style.top=msheight)",mspause);if(singlemessage.length>1&&msblinks>0) msblinks--;return;}function dmmg12(){timer2=setTimeout("dmmg11(dmdiv.style.top=0)",msspeed);if(singlemessage.length>1&&msblinks==0){msblinks=resumesmsb;if(iki==singlemessage.length-1) iki=0;else iki++;}return;}function ns4mg11(){ns4blinkdiv.document.write(singlemessage[iki]);ns4blinkdiv.document.close();timer1=setTimeout("ns4mg12(ns4blinkdiv.top=msheight)",mspause);if(singlemessage.length>1&&msblinks>0) msblinks--;return;}function ns4mg12(){timer2=setTimeout("ns4mg11(ns4blinkdiv.top=0)",msspeed);if(singlemessage.length>1&&msblinks==0){msblinks=resumesmsb;if(iki==singlemessage.length-1) iki=0;else iki++;}return;}function startb(){if(document.getElementById){dmdiv=document.getElementById('blinkingdiv');dmmg11(dmdiv);}else if(document.all){dmdiv=blinkingdiv;dmmg11();}else if(document.layers){ns4blinkdiv=document.ns4blinkb0.document.ns4blinkb1;ns4blinkdiv.visibility='show';ns4mg11();}}window.onload = startb;// <-- end Algorithm </SCRIPT>


HTML
<SCRIPT language=JavaScript>document.write('<table align="center" border='+sborder+' CELLSPACING="0" CELLPADDING="0" background='+sbground+'><tr><td width='+mswidth+'>');if(document.all||document.getElementById){document.writeln('<div style="position:relative;overflow:hidden;width:'+mswidth+';height:'+msheight+';clip:rect(0 '+mswidth+' '+msheight+' 0);background-color:'+sbcolor+';" onMouseover="if (timer1!=null){ clearTimeout(timer1);dmdiv.style.top=0; kkk=1;} if (timer2!=null) {kkk=1; clearTimeout(timer2);}" onMouseout="if (kkk==1) { kkk=0; timer2=setTimeout('dmmg11(dmdiv.style.top=0)',msspeed);}"><div id="blinkingdiv" style="position:relative;width:'+mswidth+';height:'+msheight+';"></div></div>');}</SCRIPT><ILAYER id=ns4blinkb0 bgcolor="&{sbcolor};" height="&{msheight};" width="&{mswidth};"><LAYER id=ns4blinkb1 onmouseover="if (timer1!=null){ clearTimeout(timer1); ns4blinkdiv.top=0; kkk=1;} if (timer2!=null){ kkk=1; clearTimeout(timer2); }" onmouseout='if (kkk==1) {kkk=0; timer2=setTimeout("ns4mg11(ns4blinkdiv.top=0)",msspeed);}' height="&{msheight};" width="&{mswidth};"></LAYER></ILAYER></TD></TR></TABLE>