»
EnglishFrenchVietnamese

Print - Wind-Up Text Writer JavaScript - JavaScriptBank.com

Full version: jsB@nk » Text » Animation » Wind-Up Text Writer JavaScript
URL: https://www.javascriptbank.com/wind-up-text-writer-javascript.html

Wind-Up Text Writer JavaScript © JavaScriptBank.comWind-Up Text Writer is a DHTML Effect that simulates a wind up action before it displays each phrase. Any amount of phrses can be added or subtracted. CROSS-BROWSER (IE 5+, Netscape 7+, Opera 7+, Mozilla 1+).

Full version: jsB@nk » Text » Animation » Wind-Up Text Writer JavaScript
URL: https://www.javascriptbank.com/wind-up-text-writer-javascript.html



CSS
<STYLE type=text/css>/*BODY {BACKGROUND-COLOR: black; COLOR: white}*/BODY SPAN.line {COLOR: gray; FONT-SIZE: 20px; FONT-WEIGHT: 900; POSITION: relative; VISIBILITY: visible}BODY TT#typing {CURSOR: hand; FONT-SIZE: 20px; FONT-WEIGHT: 900}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT language=JavaScript type=text/javascript><!--/**********************************************************************************************************************************************************************************/// - Wind-Up Text Writer JavaScript Effect - 2004 CROSS-BROWSER (IE 5+, Opera 7+, Netscape 7+, Mozilla 1+)///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////* Edit Variables Below . . . */var mess=["JavaScriptBank.com", "Bank of over", "2000+ free JavaScripts"]; // - messages, you may add as many phrases as you like, just add a comma and quotes (just like it is written out)var StartColor="lightyellow";var EndColor="rgb(0,255,255)";var HREF="http://JavaScriptBank.com";/* End Edit *///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////var gcount=0; // - Global Counter to loop through mess Arrayvar T; // - Timer (in milliseconds)var Count=0;var typeCount=0;var lineOne=new Array();var lineTwo=new Array();lineOne=["|","/","--","\\"];lineTwo=["|","\\","--","/"];var ArrayOfArrays=[lineOne,lineTwo,lineOne,lineTwo];var lines=new Array("one","two","three","four"); // - IDs of Spansvar writing="";var RHUCKO1=0; window.onload=loadVars;function loadVars(){ for(var x=0;x<lines.length;x++)  lines[x]=document.getElementById(lines[x]);  writing=document.getElementById('typing');  writing.style.color=StartColor;setVals();}function setVals(){ if(Count<lineOne.length&&typeCount<mess[gcount].length) {  T=15;  lines[0].innerHTML=ArrayOfArrays[0][Count];lines[1].innerHTML=ArrayOfArrays[1][Count];lines[2].innerHTML=ArrayOfArrays[2][Count];lines[3].innerHTML=ArrayOfArrays[3][Count];Count+=1; } else {   Count=0; } if(typeCount<=mess[gcount].length) {   writing.style.position="relative"; writing.innerHTML=mess[gcount].substring(typeCount-1,typeCount);  typeCount++; } else if(RHUCKO1<=mess[gcount].length) {   T=100;   writing.innerHTML=mess[gcount].substring(0,RHUCKO1); RHUCKO1++; } else if(gcount<mess.length-1) {    if(gcount==mess.length-2){ for(var x=0;x<lines.length;x++)  lines[x].style.visibility="hidden";    writing.style.color=EndColor; }     Count=0;typeCount=0;RHUCKO1=0;   gcount++; } setTimeout("setVals();",T);}function DynamicMove(){  location.href=HREF;}//--></SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<DIV style="TEXT-ALIGN: center"><SPAN class=line id=one></SPAN><BR><SPAN class=line id=two></SPAN><B style="VISIBILITY: hidden">__</B><TT id=typing onclick=DynamicMove();></TT><B style="VISIBILITY: hidden">__</B> <SPAN class=line id=three></SPAN><BR><SPAN class=line id=four style="POSITION: relative"></SPAN><DIV></DIV></DIV><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->