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 firstTime = true function moveIt() { if (firstTime) { maxHeight = document.body.clientHeight-40 maxWidth = document.body.clientWidth-40 document.all.mover.style.pixelTop = 5 document.all.mover.style.pixelLeft = 5 firstTime = false } chgXBy = Math.floor(Math.random() * 10) if ((halfChance() || document.all.mover.style.pixelTop >= maxHeight) && document.all.mover.style.pixelTop > 5) { document.all.mover.style.pixelTop -= chgXBy } else { document.all.mover.style.pixelTop += chgXBy } chgYBy = Math.floor(Math.random() * 10) if ((halfChance() || document.all.mover.style.pixelLeft >= maxWidth) && document.all.mover.style.pixelLeft > 5) { document.all.mover.style.pixelLeft -= chgYBy } else { document.all.mover.style.pixelLeft += 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: 5px; top: 5px;} --> </style> </head> <body bgcolor="#FFFFFF" onload="moveIt()"> <img src="images/butterfly.gif" width="32" height="32" alt="Butterfly" id="mover" /> </body> </html>
Images:
(Some scripts do not have associated images)