»
EnglishFrenchVietnamese

Print - Running Feet Trail - JavaScriptBank.com

Full version: jsB@nk » Pointer » Trailer » Running Feet Trail
URL: https://www.javascriptbank.com/running-feet-trail-index.html

Running Feet Trail © JavaScriptBank.comThis JavaScript makes the running feets on the web page.

Full version: jsB@nk » Pointer » Trailer » Running Feet Trail
URL: https://www.javascriptbank.com/running-feet-trail-index.html



JavaScript
<SCRIPT>var isNS = (navigator.appName == "Netscape");var STEPSIZE = 60;function processMouseIE() {if(event.clientX>(tmpX+STEPSIZE) || event.clientX<(tmpX-STEPSIZE) || event.clientY>(tmpY+STEPSIZE) || event.clientY<(tmpY-STEPSIZE)){document.all.left.style.visibility="visible";document.all.right.style.visibility="visible";//swap foot to moveif(current=="right")current="left";else current="right";tmpX=event.clientX;tmpY=event.clientY;if(current=="left")//left is topmost{   document.all.right.style.pixelLeft = event.clientX + document.body.scrollLeft - 0;   document.all.right.style.pixelTop = event.clientY + document.body.scrollTop + 5 ;}if (current=="right")//right is topmost{document.all.left.style.pixelLeft = event.clientX + document.body.scrollLeft - 0;document.all.left.style.pixelTop = event.clientY + document.body.scrollTop + 5 ;}}}function processMouseNS(e) {if(e.pageX>(tmpX+STEPSIZE) || e.pageX<(tmpX-STEPSIZE) || e.pageY>(tmpY+STEPSIZE) || e.pageY<(tmpY-STEPSIZE)){document.left.visibility="show";document.right.visibility="show";//swap foot to moveif(current=="right")current="left";else current="right";tmpX=e.pageX;tmpY=e.pageY;if(current=="left")//left is topmost{   document.right.left = e.pageX;   document.right.top = e.pageY;}if (current=="right")//right is topmost{document.left.left = e.pageX;document.left.top = e.pageY;}}}function hidef(){if(isNS){document.left.visibility="hide";document.right.visibility="hide";}else{document.all.left.style.visibility="hidden";document.all.right.style.visibility="hidden";}}function init() {current="right";setInterval("hidef();",2000);//turn feet off after 2 secsif(isNS){tmpX=100;//arbitory start positionstmpY=150;document.right.left = tmpX;document.right.top = tmpY;document.left.left = tmpX;document.left.top = tmpY+STEPSIZE;document.captureEvents(Event.MOUSEMOVE);document.onmousemove = processMouseNS;}else{tmpX=event.clientX;tmpY=event.clientY;document.all.right.style.pixelLeft = event.clientX + document.body.scrollLeft - 0;document.all.right.style.pixelTop = event.clientY + document.body.scrollTop + 5 ;document.all.left.style.pixelLeft = event.clientX + document.body.scrollLeft - 0;document.all.left.style.pixelTop = event.clientY + document.body.scrollTop + STEPSIZE;document.onmousemove = processMouseIE;}}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=init()><DIV id=left style="HEIGHT: 55px; LEFT: 0px; POSITION: absolute; TOP: 1px; VISIBILITY: hidden; WIDTH: 40px; Z-INDEX: 100">  <IMG border=0 src="l.gif" width="31" height="55"></DIV><DIV id=right style="HEIGHT: 55px; LEFT: 0px; POSITION: absolute; TOP: 1px; VISIBILITY: hidden; WIDTH: 40px; Z-INDEX: 10">  <IMG border=0 src="r.gif" width="31" height="55"></DIV></BODY><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


Files
http://javascriptbank.com/javascript/mouse/Running_Feet_Trail/l.gifhttp://javascriptbank.com/javascript/mouse/Running_Feet_Trail/r.gif