Fancy Message Center

[Total: 0    Average: 0/5]

This shows how to have a fancy message center.

Head Code:

<style>
H6 {
COLOR: white; FONT-FAMILY: Arial,  helvetica CE, helvetica; FONT-SIZE: 8pt; FONT-STYLE: normal; FONT-WEIGHT: normal
}
A {
COLOR: yellow; FONT-FAMILY: Arial,  helvetica CE, helvetica; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-WEIGHT:normal;
text-decoration: none;
}
BODY {
COLOR: white; FONT-FAMILY: Arial,  helvetica CE, helvetica; FONT-SIZE: 9pt; FONT-STYLE: normal; FONT-WEIGHT: normal;
overflow-x:hidden;
overflow-y:scroll;
}
</style>
<script language="JavaScript">
var imgX=10;
var imgY=10;
var _tmr=30;
var chng=10;
var _path="/data/ex_799/";

var _dtext=new Array();
_dtext[0]="Here you can have any text you want.";
_dtext[1]="Also you can write numbers like 1 2 3 or 4 or bigger...";

if (document.images)
{
_d_0a=new Image(7,13);
_d_0a.src=_path+'0-na.gif';
_dtec=new Image(7,13);
_dtec.src=_path+'tecka.gif';
_dteca=new Image(7,13);
_dteca.src=_path+'tecka.gif';
_dvyk=new Image(7,13);
_dvyk.src=_path+'vykric.gif';
_dota=new Image(7,13);
_dota.src=_path+'otaznik.gif';
_d0=new Image(7,13);
_d0.src=_path+'0.gif';
_d1=new Image(7,13);
_d1.src=_path+'1.gif';
_d2=new Image(7,13);
_d2.src=_path+'2.gif';
_d3=new Image(7,13);
_d3.src=_path+'3.gif';
_d4=new Image(7,13);
_d4.src=_path+'4.gif';
_d5=new Image(7,13);
_d5.src=_path+'5.gif';
_d6=new Image(7,13);
_d6.src=_path+'6.gif';
_d7=new Image(7,13);
_d7.src=_path+'7.gif';
_d8=new Image(7,13);
_d8.src=_path+'8.gif';
_d9=new Image(7,13);
_d9.src = _path+'9.gif';
_d_a=new Image(7,13);
_d_a.src=_path+'a.gif';
_d_b=new Image(7,13);
_d_b.src=_path+'b.gif';
_d_c=new Image(7,13);
_d_c.src=_path+'c.gif';
_d_d=new Image(7,13);
_d_d.src=_path+'d.gif';
_d_e=new Image(7,13);
_d_e.src=_path+'e.gif';
_d_f=new Image(7,13);
_d_f.src=_path+'f.gif';
_d_g=new Image(7,13);
_d_g.src=_path+'g.gif';
_d_h=new Image(7,13);
_d_h.src=_path+'h.gif';
_d_i=new Image(7,13);
_d_i.src=_path+'1.gif';
_d_j=new Image(7,13);
_d_j.src=_path+'j.gif';
_d_k=new Image(7,13);
_d_k.src=_path+'k.gif';
_d_l=new Image(7,13);
_d_l.src=_path+'l.gif';
_d_m=new Image(7,13);
_d_m.src=_path+'m.gif';
_d_n=new Image(7,13);
_d_n.src=_path+'n.gif';
_d_o=new Image(7,13);
_d_o.src=_path+'0.gif';
_d_p=new Image(7,13);
_d_p.src=_path+'p.gif';
_d_q=new Image(7,13);
_d_q.src=_path+'q.gif';
_d_r=new Image(7,13);
_d_r.src=_path+'r.gif';
_d_s=new Image(7,13);
_d_s.src=_path+'s.gif';
_d_t=new Image(7,13);
_d_t.src=_path+'t.gif';
_d_u=new Image(7,13);
_d_u.src=_path+'u.gif';
_d_v=new Image(7,13);
_d_v.src=_path+'v.gif';
_d_w=new Image(7,13);
_d_w.src=_path+'w.gif';
_d_x=new Image(7,13);
_d_x.src=_path+'x.gif';
_d_y=new Image(7,13);
_d_y.src=_path+'y.gif';
_d_z=new Image(7,13);
_d_z.src=_path+'z.gif';
}

var _dswt=0;
var fldInd=0;
var curNum=0;

function initDisp()
{
with (document)
{
write("<div id='display' style='position:absolute; left="+imgX+";top:"+imgY+"'><img src='"+_path+"display.gif' border=0></div>");
write("<DIV style='position:absolute;left:"+(imgX+80)+"px;top:"+(imgY+9)+";visibility:visible'><img name='d_0' src='"+_path+"0a.gif' width=7 height=13></DIV>");write("<DIV style='position:absolute;left:"+(imgX+70)+"px;top:"+(imgY+9)+";visibility:visible'><img name='d_1' src='"+_path+"0a.gif' width=7 height=13></DIV>");write("<DIV style='position:absolute;left:"+(imgX+60)+"px;top:"+(imgY+9)+";visibility:visible'><img name='d_2' src='"+_path+"0a.gif' width=7 height=13></DIV>");write("<DIV style='position:absolute;left:"+(imgX+50)+"px;top:"+(imgY+9)+";visibility:visible'><img name='d_3' src='"+_path+"0a.gif' width=7 height=13></DIV>");write("<DIV style='position:absolute;left:"+(imgX+40)+"px;top:"+(imgY+9)+";visibility:visible'><img name='d_4' src='"+_path+"0a.gif' width=7 height=13></DIV>");write("<DIV style='position:absolute;left:"+(imgX+30)+"px;top:"+(imgY+9)+";visibility:visible'><img name='d_5' src='"+_path+"0a.gif' width=7 height=13></DIV>");write("<DIV style='position:absolute;left:"+(imgX+20)+"px;top:"+(imgY+9)+";visibility:visible'><img name='d_6' src='"+_path+"0a.gif' width=7 height=13></DIV>");write("<DIV style='position:absolute;left:"+(imgX+10)+"px;top:"+(imgY+9)+";visibility:visible'><img name='d_7' src='"+_path+"0a.gif' width=7 height=13></DIV>");}for(var i=0;i<_dtext.length;i++){_dtext[i] = _dtext[i].toLowerCase();}counter();}function counter(){resetD();if (fldInd==_dtext.length)fldInd=0;showText(fldInd,0);}function resetD(){for (var i=0; i<8; i++){document.images[new String("d_"+i)].src = _d_0a.src;}}function showText(_ind,_i){var i=_i;switch(_dtext[_ind].charAt(i)){case "0":reD(_d0);break;case "1":reD(_d1);break;case "2":reD(_d2);break;case "3":reD(_d3);break;case "4":reD(_d4);break;case "5":reD(_d5);break;case "6":reD(_d6);break;case "7":reD(_d7);break;case "8":reD(_d8);break;case "9":reD(_d9);break;case ".":reD(_dteca);break;case "?":reD(_dota);break;case "!":reD(_dvyk);break;case " ":reD(_d_0a);break;case "a":reD(_d_a);break;case "b":reD(_d_b);break;case "c":reD(_d_c);break;case "d":reD(_d_d);break;case "e":reD(_d_e);break;case "f":reD(_d_f);break;case "g":reD(_d_g);break;case "h":reD(_d_h);break;case "i":reD(_d_i);break;case "j":reD(_d_j);break;case "k":reD(_d_k);break;case "l":reD(_d_l);break;case "m":reD(_d_m);break;case "n":reD(_d_n);break;case "o":reD(_d_o);break;case "p":reD(_d_p);break;case "q":reD(_d_q);break;case "r":reD(_d_r);break;case "s":reD(_d_s);break;case "t":reD(_d_t);break;case "u":reD(_d_u);break;case "v":reD(_d_v);break;case "w":reD(_d_w);break;case "x":reD(_d_x);break;case "y":reD(_d_y);break;case "z":reD(_d_z);break;}if (i<_dtext[_ind].length){i++;setTimeout("showText("+_ind+","+i+")",400);} else {for(var r=0;r<8;r++)setTimeout("reD(_d_0a)",500);_dswt=0;fldInd++;setTimeout("counter()",500);}}function reD(img){for (var i=7;i>=0;i--){if (i==0) document.images["d_0"].src=img.src;else document.images[new String("d_"+i)].src=document.images[new String("d_"+(i-1))].src}}
</script>

Body Code:

<script language="javascript">initDisp();</script><br><br>
<a href="http://www.cleverlance.com"><h6>Copyright by Cleverlance 2001<h6></a>
<BR>
<i>Special permission was granted to JS-X to display this example here.</i>

Times Viewed: 4

Leave a Reply

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