Latest Entries »

Minggu, 31 Juli 2011

Membuat efek lampu Berjalan di Teks

mau tau caranya?? :ngakak :ngacir ini diaa.. :
<b><script language="JavaScript1.2"> var message="TULISAN DI DALAM TANDA PETIK INI ADALAH TULISAN YANG BEREFEK LAMPU BERJALAN" var neonbasecolor="gray" var neontextcolor="orange" var neontextcolor2="#3300ff" var flashspeed=1 var flashingletters=10 // jumlah huruf yang tersorot oleh flash var flashingletters2=3 // jumlah warna di ekor flash var flashpause=1 /// var n=0 if (document.all||document.getElementById){ document.write('<font color="'+neonbasecolor+'">') for (m=0;m<message.length;m++) document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>') document.write('</font>') } else document.write(message) function crossref(number){ var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number) return crossobj } function neon(){ //Change all letters to base color if (n==0){ for (m=0;m<message.length;m++) crossref(m).style.color=neonbasecolor } //cycle through and change individual letters to neon color crossref(n).style.color=neontextcolor if (n>flashingletters-1) crossref(n-flashingletters).style.color=neontextcolor2 if (n>(flashingletters+flashingletters2)-1) crossref(n-flashingletters-flashingletters2).style.color=neonbasecolor if (n<message.length-1) n++ else{ n=0 clearInterval(flashing) setTimeout("beginneon()",flashpause) return } } function beginneon(){ if (document.all||document.getElementById) flashing=setInterval("neon()",flashspeed) } beginneon() </script> </b>
sobat tinggal ganti aja tulisan berwarna merah sesuai dengan keinginan sobat,keren kaan? :ngakak :malu

Artikel Terkait:

0 komentar:

Posting Komentar

Daftar Isi


ShoutMix chat widget