// Function - Shake()
// Description - shake the screen
function shake(n) {
for (i = 10; i > 0; i--) {
for (j = n; j > 0; j--) {
// Shake the window
// Moveby (x,y) where x = number of pixels to move the window to the right
// and y is the number of pixels to move the window down
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
}
}
}
|