»
EnglishFrenchVietnamese

Print - Text Wheel - JavaScriptBank.com

Full version: jsB@nk » Text » Animation » Text Wheel
URL: https://www.javascriptbank.com/text-wheel.html

Text Wheel © JavaScriptBank.comSpectacular way to welcome your visitors. Text Wheel rotate your messages like a wheel in the middle of your webpage. You may add as many messages as you like. Easy configuration of font, font-size, font-color and font-weight.

Full version: jsB@nk » Text » Animation » Text Wheel
URL: https://www.javascriptbank.com/text-wheel.html



JavaScript
<SCRIPT>// Text Wheel/////////////////////////////////////////////////////////////////////////////// Edit the code below this line/////////////////////////////////////////////////////////////////////////////// Set your messages. Add as many as you likevar text=new Array()text[0]=" >>>> BE HAPPY"text[1]=" >>>> DO NOT WORRY"text[2]=" >>>> MAKE FRIENDS"text[3]=" >>>> FALL IN LOVE"text[4]=" >>>> TAKE IT EASY"text[5]=" >>>> TRY IT AGAIN"// Set the fontvar textfont="Arial"// Set the font-sizevar textfontsize=32// Set the font-colorvar textfontcolor="#ff0000"// Set the font-weight (values from 100 to 900)var textweight="900"/////////////////////////////////////////////////////////////////////////////// Do not edit the code below this line/////////////////////////////////////////////////////////////////////////////var textitalic="0"var message=new Array()var x_textposition=0var y_textposition=0var i_segments=Math.round(360/text.length)var i_grad=0var grad=0var colorrgbredvar colorrgbgreenvar colorrgbbluevar windowwidthvar windowheightvar ns4=document.layers?1:0var ns6=document.getElementById&&!document.all?1:0 var ie=document.all?1:0if (textweight=="bold") {textweight=900}if (textweight=="normal") {textweight=100}if (textitalic=="italic") {textitalic=1}if (textitalic=="normal") {textitalic=0}for (i=0;i<=text.length-1;i++) {message[i]=text[i].replace(/'/g,"`")}translateintorgb()function translateintorgb() {var hexanewred=textfontcolor.substring(1,3)var hexanewgreen=textfontcolor.substring(3,5)var hexanewblue=textfontcolor.substring(5,7)colorrgbred=parseInt("0x"+hexanewred)colorrgbgreen=parseInt("0x"+hexanewgreen)colorrgbblue=parseInt("0x"+hexanewblue)}function initiate() {windowheight=parseInt(document.body.clientHeight)/2windowwidth=parseInt(document.body.clientWidth)-40for (i=0;i<text.length;i++) {var thisspan=eval("document.all.rotationstyle"+i)thisspan.style.posLeft=20thisspan.style.posTop=0}settexts()}function settexts() {for (i=0;i<text.length;i++) {var thisid="rotationobj"+ivar thisspan=eval("rotationstyle"+i)thisspan.innerHTML='<OBJECT ID="'+thisid+'" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6" STYLE="position:relative;width:'+windowwidth+'px;height:'+2*windowheight+'px">'+        '<PARAM NAME="Line0001" VALUE="SetLineStyle(0)">'+        '<PARAM NAME="Line0002" VALUE="SetLineColor(0,0,0)">'+'<PARAM NAME="Line0003" VALUE="SetFillColor('+colorrgbred+','+colorrgbgreen+','+colorrgbblue+')">'+'<PARAM NAME="Line0004" VALUE="SetFont(\''+textfont+'\', '+textfontsize+', '+textweight+', '+textitalic+', 0, 0)">'+'<PARAM NAME="Line0005" VALUE="Text(\''+message[i]+'\',0, 2, 0)">'+'</OBJECT>'}for (i=0;i<text.length;i++) {var thisobj=eval("rotationobj"+i)thisobj.Rotate(0,i_grad,0) i_grad+=i_segments}startscroll()}function startscroll() {for (i=0;i<text.length;i++) {var thisobj=eval("rotationobj"+i)thisobj.Rotate(1,2,0) }timer=setTimeout("startscroll()",20)}if (ie) {for (i=0;i<text.length;i++) {var thisid="rotationstyle"+ivar thisobjid="rotationobj"+idocument.write("<SPAN ID='"+thisid+"' STYLE='position:absolute'>")document.write("<OBJECT ID='"+thisobjid+"' CLASSID='CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6'>")document.write("</OBJECT>")document.write("</SPAN>")onload=initiate}}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->