skip to main
|
skip to sidebar
Home
Posts RSS
Comments RSS
Edit
scrolling text with unique left bumb scroller
Wednesday, March 17, 2010
6:26 AM
Posted by Unknown
,
0 Comments
Labels:
scrolling text with unique left bumb scroller
Copy this code in HEAD tab.
<br /> <script language="JavaScript1.2"><br /> <br /> //leftbump scoller- © scrollingtext http://scrollingtext.blogspot.com<br /> //For full source code, many more DHTML scripts, and TOS,<br /> //visit http://scrollingtext.blogspot.com<br /> <br /> //Configure delay between messages (4000=4 secs):<br /> var delay=2000<br /> //Configure scroller width<br /> var scrollwidth="200px"<br /> //Configure scroller height<br /> var scrollheight="75px"<br /> var message=new Array()<br /> //Configure messages. Extend array as needed:<br /> var openingtag='<font face="Arial" size=3>'<br /> message[0]='<b>Message 1 here</b> scrolling text http://scrollingtext.blogspot.com'<br /> message[1]='<b>Message 2 here</b> many more scrolling styles'<br /> message[2]='<b>Message 3 here</b>powered by blogging-tips-tools.blogspot.com'<br /> var closingtag='</font>'<br /> <br /> //This variable specifies the initial negative offset of each msg<br /> //You may wish to increase it if your scroller is to the right of page horizontally<br /> var hoffset=-10<br /> <br /> </script>
and this code in body tab
<br /> <ilayer width=&{scrollwidth}; height=&{scrollheight}; name="sslide"><br /> <layer name="sslide2" width=&{scrollwidth}; height=&{scrollheight};></layer><br /> </ilayer><br /> <br /> <script language="JavaScript1.2"><br /> <br /> var inc=1<br /> var ns4=document.layers<br /> var ie5ns6=document.getElementById||document.all<br /> <br /> if (ie5ns6)<br /> document.write(openingtag+'<div id="flyin" style="position:relative;width:'+scrollwidth+';height:'+scrollheight+';">'+message[0]+'</div>'+closingtag)<br /> <br /> <br /> function updatemsg(){<br /> crossobj.style.left="-2000px"<br /> crossobj.style.fontStyle="italic"<br /> crossobj.innerHTML=message[inc]<br /> crossobj.style.left=crossobj.offsetWidth*(-1)+hoffset+"px"<br /> start=setInterval("animatein()",50)<br /> inc=(inc<message.length-1)? inc+1 : 0<br /> }<br /> <br /> function animatein(){<br /> if (parseInt(crossobj.style.left)<0)<br /> crossobj.style.left=parseInt(crossobj.style.left)+20+"px"<br /> else{<br /> crossobj.style.left=0+"px"<br /> crossobj.style.fontStyle="normal"<br /> clearInterval(start)<br /> }<br /> }<br /> <br /> function updatemsgns4(){<br /> document.sslide.document.sslide2.document.write(openingtag+message[inc]+closingtag)<br /> document.sslide.document.sslide2.document.close()<br /> inc=(inc<message.length-1)? inc+1 : 0<br /> }<br /> <br /> function initialize(){<br /> if (ie5ns6){<br /> crossobj=document.getElementById? document.getElementById("flyin") : document.all.flyin<br /> setInterval("updatemsg()",delay+1000)<br /> }<br /> else if (ns4){<br /> document.sslide.document.sslide2.document.write(openingtag+message[0]+closingtag)<br /> document.sslide.document.sslide2.document.close()<br /> setInterval("updatemsgns4()",delay)<br /> }<br /> }<br /> <br /> window.onload=initialize<br /> <br /> </script><br />
0 Response to "scrolling text with unique left bumb scroller"
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
SUBSCRIBE!
FOLLW ME!
0 Response to "scrolling text with unique left bumb scroller"
Post a Comment