Breaking News
Loading...
Monday 20 May 2013

How to Add Flying Text Following Mouse Cursor in Blog of Blogger


How to Add Flying Text Following Mouse Cursor in Blog of BloggerWell you may have seen low priority blogs mistreatment this type of script that shows text flying, wobbling and following the mouse cursor position, therefore wherever ever the mouse goes the text follows in recreation means, well if you've got seen that result and you've got needed to possess that on your blog then on you'll add that result to your blog too.

So it essentially done mistreatment JavaScript, therefore follow below steps to feature it to your blogger blog, and add that awing recreation text to your mouse cursor.


Follow this Steps-

1. Open Blogger –> Template –> Edit HTML.
2. Now press Ctrl+F and search for </body> tag & paste below code above it.

<script type='text/javascript'>var text='Blog of Blogger.com'</script><script type='text/javascript'>//<![CDATA[
function moveid(e,t,n){if(ns4)e.moveTo(t,n);else{e.style.left=t+"px";e.style.top=n+"px"}}function animate(e){x1=Xoff+(ie4||ie5?event.clientX+document.body.scrollLeft:e.pageX);y1=Yoff+(ie4||ie5?event.clientY+document.body.scrollTop:e.pageY)}function getidleft(e){if(ns4)return e.left;else return parseInt(e.style.left)}function getidtop(e){if(ns4)return e.top;else return parseInt(e.style.top)}function getwindowwidth(){if(ie4||ie5)return document.body.clientWidth+document.body.scrollLeft;else return window.innerWidth+pageXOffset}function movetxts(){for(i=text.length;i>1;i=i-1){if(getidleft(txtA[i-1])+txtw*2>=getwindowwidth()){moveid(txtA[i-1],0,-1e3);moveid(txtA[i],0,-1e3)}else moveid(txtA[i],getidleft(txtA[i-1])+txtw,getidtop(txtA[i-1]))}moveid(txtA[1],x1,y1)}var delay=40;var Xoff=20;var Yoff=20;var txtw=14;var beghtml='<font color="#ff0004"><b>';var endhtml="</b></font>";ns4=navigator.appName.indexOf("Netscape")>=0&&document.layers?true:false;ie4=document.all&&!document.getElementById?true:false;ie5=document.all&&document.getElementById?true:false;ns6=document.getElementById&&navigator.appName.indexOf("Netscape")>=0?true:false;var txtA=new Array;text=text.split("");var x1=0;var y1=-1e3;var t="";for(i=1;i<=text.length;i++){t+=ns4?'<layer left="0" top="-100" width="'+txtw+'" name="txt'+i+'" height="1">':'<div id="txt'+i+'" style="position:absolute;top:-100px;left:0px;height:1px;width:'+txtw+';visibility:visible;">';t+=beghtml+text[i-1]+endhtml;t+=ns4?"</layer>":"</div>"}document.write(t);window.onload=function(){for(i=1;i<=text.length;i++)txtA[i]=ns4?document.layers["txt"+i]:ie4?document.all["txt"+i]:document.getElementById("txt"+i);if(ns4)document.captureEvents(Event.MOUSEMOVE);document.onmousemove=animate;setInterval("movetxts()",delay)}//]]></script>

3. Now just change Blog of Blogger.com to your desired text.
4. You can even change the color of the text by changing that code #ff0004.
Speeds and other stuff is also customizable just change delay=40.

So that's it now the test will be live on your blog following your cursor in a dancing way, do comment about how you liked this tutorial.

You Also Like:

HeadLine Ticker for Blog and Site
Make Headline News In Blog and Sites

0 comments:

Post a Comment

 
Toggle Footer