Full version: jsB@nk » Text » Animation » 4 Direction Moving Text
URL: https://www.javascriptbank.com/4-direction-moving-text.html
This JavaScript makes the text that moves four direction at the same time.
Full version: jsB@nk » Text » Animation » 4 Direction Moving Text
URL: https://www.javascriptbank.com/4-direction-moving-text.html
<STYLE type=text/css>BODY {BACKGROUND-COLOR: black; color: white;}SPAN.scripts {FONT-WEIGHT: bold; FONT-SIZE: 25px; Z-INDEX: 3; VISIBILITY: visible; COLOR: white; POSITION: relative}A {FONT-WEIGHT: bold; FONT-SIZE: 20px; COLOR: lightyellow; LETTER-SPACING: 3px}A:hover {COLOR: #00ff00}</STYLE><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<SCRIPT language=JavaScript type=text/javascript><!--var message=new Array("JavaScriptBank.com","Bank of ","over 2000+","free JavaScripts","JavaScriptBank.com");var POSTOP=20;var POSLEFT=40;var posTP=POSTOP,posTN=-(POSTOP),posLP=POSLEFT,posLN=-(POSLEFT);var gcount=0;var count=0;var bool=true;var spans=new Array(5);function Hucko(){ for(var x=0;x<spans.length;x++) { spans[x]=document.getElementById('sid'+x);if(x!=2) setSpanID(x); spans[x].onclick=DYNAMICSCRIPTS; } Richard_Huckos_effect();}function setSpanID(IDno){ switch(IDno) {case 0: // - Dynamic Scripts By Richard Hucko with(spans[0].style) { top=POSTOP;visibility="hidden"; } break; case 1: with(spans[1].style) { left=POSLEFT;visibility="hidden"; }break;case 3: with(spans[3].style) { left=-(POSLEFT);visibility="hidden"; }break;case 4: with(spans[4].style) { top=-(POSTOP);visibility="hidden"; }}}function Richard_Huckos_effect(){ if(posTP>-20&&gcount<message.length) { if(gcount==message.length-1){ with(spans[2].style) { color="#00ff00"; }} spans[4].innerHTML=spans[3].innerHTML=spans[2].innerHTML=spans[1].innerHTML=spans[0].innerHTML=message[gcount]; for(var x=0;x<spans.length;x++) spans[x].style.visibility="visible"; spans[0].style.top=posTP; spans[1].style.left=posLP; spans[3].style.left=posLN; spans[4].style.top=posTN; posTP--;posLP-=2;posLN+=2;posTN++; } else if(gcount<message.length) { gcount++;posTP=POSTOP,posTN=-(POSTOP),posLP=POSLEFT,posLN=-(POSLEFT); } else if(bool==true) { if(count>=5) bool=false; count++; } else { for(var x=0;x<spans.length;x++) { spans[x]=document.getElementById('sid'+x); if(x!=2) setSpanID(x); }spans[2].style.color="white"; clearTimeout('timer'); } timer=setTimeout("Richard_Huckos_effect();",20); // - 2004 Splash Intro Page JavaScript Effect}function DYNAMICSCRIPTS(){ location.replace("#");}window.onload=Hucko;//--></SCRIPT><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->
<SPAN class=scripts id=sid0 style="COLOR: red"></SPAN><BR><SPAN class=scripts id=sid1 style="COLOR: blue"></SPAN><SPAN class=scripts id=sid2></SPAN><SPAN class=scripts id=sid3 style="COLOR: green"></SPAN><BR><SPAN class=scripts id=sid4 style="COLOR: yellow"></SPAN><!-- This script downloaded from www.JavaScriptBank.com Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->