//flex table opened by JP

Click to See Complete Forum and Search --> : Shake the screen?


dragonB
07-18-2001, 06:29 PM
Hey guys,
I was at a website(an online rpg text type game) and when an event happened it seemed like the screen shook. Big time, freaked me out. The site uses cgi and some funky javascript stuff, so I couldn't get at any source code.
Anyone know any idea how you would do this? I was thinking it might be DHTML, but I'm not sure that could do it.
Since I've only seen it a few times, and it only happens for a second, I'm not exactly sure what shakes. It looked like everything on the screen, but it may have only been everything in the maximized browser window.(One would think that is...)
Pretty cool though, and if abused could be pretty annoying on the web.
Any ideas?
thx, dragonB

Vagabond
07-18-2001, 06:42 PM
It prob Javascript (but I am sure it does not have to be) I found a Javascript that would do that- do a search for free javascripts and I am sure you will find it. I would have posted the url but dont remember it.

gl

[This message has been edited by Vagabond (edited 07-18-2001).]

dragonB
07-18-2001, 06:54 PM
Well, why are the simplest answers always the hardest. lol
Did a search and found a ton of links on it.. here's one.
http://javascript.internet.com/bgeffects/shake-screen.html

like it says, cool, but not really useful.
dragonB

Cabinetmaker
07-19-2001, 02:10 AM
<head>
<SCRIPT LANGUAGE="JavaScript1.2">

<!---
bName = navigator.appName;
bVer = parseInt(navigator.appVersion);
if (bName == "Netscape" && bVer == 3) ver = "n3";
else if (bName == "Netscape" && bVer == 2) ver = "n2";
else if (bName == "Netscape" && bVer >= 4) ver = "n4";
else if (bName == "Microsoft Internet Explorer" && bVer == 2) ver = "e3";
else if (bName == "Microsoft Internet Explorer" && bVer > 2) ver = "e4";

if (navigator.appVersion.indexOf("Mac") != -1) ver+="m";
function shake() {
if (ver == "n4" | | ver == "n4m" | | ver == "e4" | | ver == "e4m") {
for (i = 10; i > 0; i--) {
for (z = 4; z > 0; z--) {
self.moveBy(0,i);
self.moveBy(i,0);
self.moveBy(0,-i);
self.moveBy(-i,0);
} }
}
}
setTimeout('shake()',1000);

// --->

</SCRIPT>
</head>

The above only works when the pages loads.

[This message has been edited by Cabinetmaker (edited 07-19-2001).]