»
EnglishFrenchVietnamese

Print - Search Light - JavaScriptBank.com

Full version: jsB@nk » Image » Search Light
URL: https://www.javascriptbank.com/search-light.html

Search Light © JavaScriptBank.comIE filter called addcone gives a search light effect when put into motion.

Full version: jsB@nk » Image » Search Light
URL: https://www.javascriptbank.com/search-light.html



JavaScript
<SCRIPT language=JavaScript>// Randy Bennett , [email protected] right() {if (document.all &&(event.button == 1)) {setCone();return false;}return true;}document.onmousedown=right;if (document.layers) window.captureEvents(Event.MOUSEDOWN);window.onmousedown=right;xPos=-50a=5cone="off"function setCone(){if (document.all){if (cone=="off")cone="on", xx=setInterval("moveCone()",100)else cone="off", clearInterval(xx)}}function moveCone () {if (cone=="on"){xPos+=aif (xPos==170)a=a*(-1)if (xPos==(-50))a=a*(-1)MyPic.filters.light.movelight(0,xPos,150,5,1);}}function setlight() {if (document.all){net.innerHTML="<center><B>click here to start the search light<br>and click again to stop it</b></center>"MyPic.filters.light.addcone(20,-100,0,-50,200,255,255,155,25,4)MyPic.filters.light.addAmbient(0,0,100,85)}}</SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=setlight()><DIV id=net style="POSITION: relative; Z-INDEX: 2"></DIV><DIV id=pic style="POSITION: relative; Z-INDEX: 2">  <IMG border=0 id=MyPic src="logojs.gif" style="FILTER: light()"> </DIV></BODY><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->