PDA

View Full Version : screen shaker script :)



gearplanet
02-21-2006, 12:06 PM
I like this script so i am post it! :) I spent 10 min playing with it

2 parts to this script
==============================================
part 1
===============================================
<SCRIPT LANGUAGE="JavaScript1.2">
<!-- Begin
netscape = (navigator.appName == "Netscape");
n4 = netscape && (parseInt(navigator.appVersion) >= 4);
explorer = (navigator.appName == "Microsoft Internet Explorer");
ie4 = explorer && (parseInt(navigator.appVersion) >= 4);

function shake(n) {
if (n4 || ie4) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
}
// End -->
</script>

===========================================================
Part 2
=========================================================
<!-- a1 --><center>
<form>
<input type=button onClick="shake(2)" value="Shake Screen">
</form>
</center><!-- -->