Back to Scripts page
Click in the text area below, select all and copy to grab the script
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Butterfly</title> <script type="text/javascript" language="Javascript"> <!-- Hide script from older browsers maxHeight = window.innerHeight-40 maxWidth = window.innerWidth-40 function moveIt() { chgXBy = Math.floor(Math.random() * 10) if ((halfChance() || document.mover.top >= maxHeight) && document.mover.top > 5) { document.mover.top-=chgXBy } else { document.mover.top+=chgXBy } chgYBy = Math.floor(Math.random() * 10) if ((halfChance() || document.mover.left >= maxWidth) && document.mover.left > 5) { document.mover.left-=chgYBy } else { document.mover.left+=chgYBy } setTimeout("moveIt()",20) } function halfChance() { if (Math.random() < .5) { return true } return false } // End hiding script --> </script> <style type="text/css"> <!-- #mover {position: absolute; left: 5; top: 5;} --> </style> </head> <body bgcolor="#FFFFFF" onload="moveIt()"> <div id="mover"> <img src="images/butterfly.gif" width="32" height="32" alt="Butterfly" /> </div> </body> </html>
Images:
(Some scripts do not have associated images)