Shaking Browser Window

Hey guys, I have a question. How can you make the window of an interent browser shake by itself as in this link: http://www.ebaumsworld.com/dubdub2.html ?

Thanks in advance.

-Nick

LoL, i’ve never seen the browser shake method used like that… I like it! Anywho, here is what you get when you do a search on K:

http://www.kirupaforum.com/forums/search.php?searchid=71990

I’m sure you’ll find what you need, I’ve used it once b4 and found it here.

thanks for the link! anyway I figured it out and it’s very easy to do. Here’s how for anyone else that is interested.

  1. insert this code under the <head> tag of your page’s html:

<SCRIPT LANGUAGE=“JavaScript1.2”>
function shake_xy(n) {
if (self.moveBy) {
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);
}
}
}
}
function shake_x(n) {
if (self.moveBy) {
for (i = 10; i > 0; i–) {
for (j = n; j > 0; j–) {
self.moveBy(i,0);
self.moveBy(-i,0);
}
}
}
}
function shake_y(n) {
if (self.moveBy) {
for (i = 10; i > 0; i–) {
for (j = n; j > 0; j–) {
self.moveBy(0,i);
self.moveBy(0,-i);
}
}
}
}
//–>
</SCRIPT>

  1. in flash,
    a) just pick a frame
    b) use the getURL option
    c) for the URL insert “javascript:shake_xy(n)” (no quotes)

shake_xy(n) : Shakes the screen in x and y directions, n is a size number, bigger means more shaking!
shake_x(n) : Shakes the screen in the x direction!
shake_y(n) : Shakes the screen in the y direction!

  1. Just insert your .swf in the page with the code!

Helpful Sites:

http://www.flashkit.com/tutorials/Special_Effects/Shaking_-Mark_Fen-7/index.php

http://www.permadi.com/tutorial/jsquake/

The basic answer to this question is…YOU DON’T!!!

Next to popups and Flash boxes that take up your entire screen when you mouseover, these are one of the most rubbish effects on the web. Nobody cares!

Plus, if someone tries to scroll while it’s shaking like that, you get caught in an endless loop of errors! Just try it on your eBaum link above.

Actually, I think it’s a very catchy and surprising effect. It really depends on how you use it. I’m going to apply it so it shakes the browser window after an explosion and I think it would enhance the effect.

OK, apologies…
After an explosion on your page, it might be kinda cool but just don’t milk it as far as the duration goes!

http://www.gorillaglue.com is a nice example of well window shaking.

That music page was by far the best use of the shake browser code I’ve seen

if you scroll it stops shaking nothing else