»
EnglishFrenchVietnamese

Print - GumScroller Text effect - JavaScriptBank.com

Full version: jsB@nk » Scrollers » Vertical scroller » GumScroller Text effect
URL: https://www.javascriptbank.com/gumscroller-text-effect.html

GumScroller Text effect © JavaScriptBank.comGumScroller uses the line-height-attribute in oder to build up the messages in a very unqieue way. Each message has a JavaScript link of its own. Configure all attributes without programming-knowledge in the head of the script: font-family, font-size, font-color, scrollerwidth, pause between the messages and so on. No images needed.

Full version: jsB@nk » Scrollers » Vertical scroller » GumScroller Text effect
URL: https://www.javascriptbank.com/gumscroller-text-effect.html



JavaScript
<SCRIPT language=JavaScript1.2>// GumScrollervar message= new Array()// Configure each message below like this:// message[indexnumber]="text|URL of link"// You may add as many messages as you like.message[0]="JavaScriptBank.com - Bank of over 2000+ free JavaScripts | http://www.JavaScriptBank.com"message[1]="Looking for new JavaScripts? Visit JavaScriptBank.com | http://www.JavaScriptBank.com"// width of the scrollerbox (pixels)var scrollerwidth=300// horizonal position: distance to the top border of the window (pixels)var scrollertop=10// vertical position: distance to the left border of the window (pixels)var scrollerleft=10// The target of your links// possible values are '_blank', '_self', '_top', '_parent' or the name of// the target window for instance 'main'var targetlink="_blank"// font attributes of the copytextvar font_face="Verdana"var font_color="AA0000"var font_size=15// standstill between the messages (milliseconds)var standstill=3000// Do not edit below this linevar lineheightmax=12var lineheight=lineheightmaxvar linestep=0.2var i_message=0var mes_joinedvar mes_splitvar contenttextvar pause=20function initiate() {if (document.all) {document.all.scrollertext.style.posTop=scrollertopdocument.all.scrollertext.style.posLeft=scrollerleftdocument.all.scrollertext.style.width=scrollerwidthlineup()}if (document.layers) {alert("This script works with Internet Explorer 4x or higher. Sorry Netscape-Folks!")}}function lineup(){mes_joined=message[i_message]mes_split=mes_joined.split("|")contenttext="<span style='position:relative;font-family:"+font_face+"; color:"+font_color+";font-size:"+font_size+"pt;line-height:"+lineheight+";width:"+scrollerwidth+"px'>"contenttext+=mes_split[0]contenttext+="</span>"if (lineheight>1.2) {scrollertext.innerHTML=contenttextvar timer=setTimeout("lineup()",pause)lineheight-=linestep}else {mes_joined=message[i_message]mes_split=mes_joined.split("|")contenttext="<span style='position:relative;font-family:"+font_face+"; color:"+font_color+";font-size:"+font_size+"pt;line-height:"+lineheight+";width:"+scrollerwidth+"px'>"contenttext+=mes_split[0]contenttext+="<br><a href='"+mes_split[1]+"' target='"+targetlink+"'>more ...</a>"contenttext+="</span>"scrollertext.innerHTML=contenttextclearTimeout(timer)var timer=setTimeout("squeeze()",standstill)}}function squeeze(){mes_joined=message[i_message]mes_split=mes_joined.split("|")contenttext="<span style='position:relative;font-family:"+font_face+"; color:"+font_color+";font-size:"+font_size+"pt;line-height:"+lineheight+";width:"+scrollerwidth+"px'>"contenttext+=mes_split[0]contenttext+="</span>"if (lineheight>0) {scrollertext.innerHTML=contenttextvar timer=setTimeout("squeeze()",pause)lineheight-=linestep/2}else {clearTimeout(timer)scrollertext.innerHTML=""changemessage()}}function changemessage() {i_message++if (i_message>message.length-1) {i_message=0}lineheight=lineheightmaxvar timer=setTimeout("lineup()",1000)}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=initiate()><DIV id=scrollertext style="POSITION: absolute"></DIV></BODY><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->