»
EnglishFrenchVietnamese

Print - Color Flasher effect - JavaScriptBank.com

Full version: jsB@nk » Text » Fade-Glow » Color Flasher effect
URL: http://www.javascriptbank.com/color-flasher-effect.html

Color Flasher effect © JavaScriptBank.comThis JavaScript just flashes a phrase with each letter a randomly chosen color.

Full version: jsB@nk » Text » Fade-Glow » Color Flasher effect
URL: http://www.javascriptbank.com/color-flasher-effect.html



JavaScript
<script language=javascript>///////////////////////////////////////////////////////////////////////                                                                 ////                    Created by Nick Trevino                      ////                                                                 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////                                                                 ////     Put whatever you want to flash different colors here.       ////                 Bigger phrases go slower.                       ////                                                                 ///////////////////////////////////////////////////////////////////////thePhrase="WOW, THE COLOR!";///////////////////////////////////////////////////////////////////////                                                                 ////           Put how big you want it to be. (0-5)                  ////                                                                 ///////////////////////////////////////////////////////////////////////size=5;///////////////////////////////////////////////////////////////////////                                                                 ////      Put how fast you want it to be. (1 fast - 20 slow)         ////                                                                 ///////////////////////////////////////////////////////////////////////speed=1;colors=new Array("red","blue","lime","yellow","purple","brown","black","orange","skyblue","darkorange")function setDiv(what){ phraseDiv=what getInit();}function getInit(){ phraseCharsOrig=new Array(); for(i=0;i<thePhrase.length;i++){  phraseCharsOrig[i]=thePhrase.charAt(i) } phraseCharsMod=new Array(phraseCharsOrig.length); for(i=0;i<thePhrase.length;i++){  phraseCharsMod[i]="" } window.setTimeout("MOD();",100);}function MOD(){ phraseDiv.innerHTML=""; if(size>5||size<0){size=5} for(i=0;i<phraseCharsMod.length;i++){  phraseChar=phraseCharsOrig[i];  color=colors[Math.floor(Math.random()*colors.length)]  phraseCharsMod[i]="<font color="+color+" size=+"+size+">"+phraseChar+"</font>";  phraseDiv.innerHTML+=phraseCharsMod[i]; } window.setTimeout("MOD();",speed*10);}</script><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<body onLoad="setDiv(phrase)"><div id=phrase></div></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->