Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Community > MacNN Lounge > How did they do that?

How did they do that?
Thread Tools
Mac Elite
Join Date: Jun 2001
Location: NYNY
Status: Offline
Reply With Quote
Nov 1, 2004, 06:55 AM
 
This was linked to from /. But go to this site and check out what happens..I'm guessing it doesn't do this for Windows..kinda cool but I could see this getting out of hand, its almost, borderline invasive....having said that, anyone know how its done?

http://www.pompeiisites.org/
     
Grizzled Veteran
Join Date: Nov 2003
Location: Hebburn, UK
Status: Offline
Reply With Quote
Nov 1, 2004, 06:58 AM
 
You mean the fact that it shakes the window? It'll just be a little bit of JavaScript, with window.moveTo/By(); being the main part of it

Nice and simple - and it'll work on Windows too (unless for some reason they specifically exclude Windows browsers...)

Edit: In fact, here's the code behind it:
Code:
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); } } } }
Which is called onload.

[Edited again because there's no point in the other two functions...]
(Last edited by Black Book; Nov 1, 2004 at 07:06 AM. )
Just who are Britain? What do they? Who is them? And why?

Formerly Black Book
     
Professional Poster
Join Date: Nov 2003
Location: Hamburg
Status: Offline
Reply With Quote
Nov 1, 2004, 06:58 AM
 
Originally posted by Moderator:
..I'm guessing it doesn't do this for Windows..
You guessed wrong! (if you mean what I think you mean...)
     
Mac Elite
Join Date: Jul 2002
Location: My Powerbook, in Japan!
Status: Offline
Reply With Quote
Nov 1, 2004, 07:19 AM
 
That is annoying.
     
Mac Elite
Join Date: Jun 2001
Location: NYNY
Status: Offline
Reply With Quote
Nov 1, 2004, 07:21 AM
 
Originally posted by badidea:
You guessed wrong! (if you mean what I think you mean...)
guess so...I thought Windows lacked the ability to animate itself like that...I figured if it did it'd have an Expose like feature by now...maybe it does..I don't know sh_t about Windows.

At any rate, I see browser hi-jacking in my not so distant future...maybe Apple will give us the option to block
     
Moderator
Join Date: Mar 2004
Location: Copenhagen
Status: Offline
Reply With Quote
Nov 1, 2004, 07:48 AM
 
Originally posted by Moderator:
guess so...I thought Windows lacked the ability to animate itself like that...I figured if it did it'd have an Expose like feature by now...maybe it does..I don't know sh_t about Windows.

At any rate, I see browser hi-jacking in my not so distant future...maybe Apple will give us the option to block
It's not really "animating itself" - it's simply a script that tells the browser to move the window. Just like you can resize the size of a pop-up window through JavaScript (for instance), you can also get the current window to move, that's all this does. It just moves more than one time.

As for stats, it doesn't work in Opera. It works in IE and Netscape, although in Netscape it also, for some reason, resizes the window after shaking it around a little. Dunno about FireFox, won't run anymore
     
Mac Elite
Join Date: Nov 2003
Location: New Haven CT.
Status: Offline
Reply With Quote
Nov 1, 2004, 09:01 AM
 
tis cool
     
Addicted to MacNN
Join Date: Sep 2000
Location: Madison, WI
Status: Offline
Reply With Quote
Nov 1, 2004, 09:06 AM
 
Originally posted by Moderator:
This was linked to from /. But go to this site and check out what happens..I'm guessing it doesn't do this for Windows..kinda cool but I could see this getting out of hand, its almost, borderline invasive....having said that, anyone know how its done?

http://www.pompeiisites.org/
I'm not seeing anything special other than a normal series of web pages. What should I be seeing? (running Safari in 10.3.5)
One should never stop striving for clarity of thought and precision of expression.
I would prefer my humanity sullied with the tarnish of science rather than the gloss of religion.
     
Addicted to MacNN
Join Date: Oct 2001
Location: Yokohama, Japan
Status: Offline
Reply With Quote
Nov 1, 2004, 10:59 AM
 
I hate that crap. Luckily Firefox lets you turn off most of those annoying JavaScript effects.
     
Addicted to MacNN
Join Date: Jul 2001
Location: Behind the dryer, looking for a matching sock
Status: Offline
Reply With Quote
Nov 1, 2004, 11:05 AM
 
That's a pretty old trick actually.
     
Senior User
Join Date: Jan 2003
Location: Tallahassee, FL
Status: Offline
Reply With Quote
Nov 1, 2004, 11:12 AM
 
heh neat
     
Mac Elite
Join Date: Jun 2004
Location: College
Status: Offline
Reply With Quote
Nov 1, 2004, 11:50 AM
 
this is the only good use of that trick:
Dub Dub
to get the full effect you NEED to view this in Windows. It is MUCH funnier in Windows. Mac browsers don't do it right, I tested em all.
     
Mac Elite
Join Date: Mar 2002
Location: Clogland
Status: Offline
Reply With Quote
Nov 1, 2004, 12:12 PM
 
Originally posted by MacMan4000:
this is the only good use of that trick:
I beg to differ....

NOT SAFE FOR WORK
     
Mac Elite
Join Date: Feb 2004
Location: Paris, NY, Rome, etc
Status: Offline
Reply With Quote
Nov 1, 2004, 01:46 PM
 
Originally posted by skalie:
I beg to differ....

NOT SAFE FOR WORK
*lights a cigarette*

Adopt-A-Yankee
     
Moderator
Join Date: Apr 2001
Location: Wasilla, Alaska
Status: Offline
Reply With Quote
Nov 1, 2004, 02:58 PM
 
     
Addicted to MacNN
Join Date: Apr 2001
Location: The bottom of Cloud City
Status: Offline
Reply With Quote
Nov 1, 2004, 03:05 PM
 
Old trick but it totally makes me feel ill.

"Ahhhhhhhhhhhhhhhh"
     
Posting Junkie
Join Date: Jun 2003
Location: Dangling something in the water… of the Arabian Sea
Status: Offline
Reply With Quote
Nov 1, 2004, 03:07 PM
 
Originally posted by AKcrab:
I like this one:
http://www.lebonze.co.uk/stuff/move.htm
Yep, a classic.
     
Baninated
Join Date: Jun 2000
Location: Cambridge, Chicago, Jerusalem (school/home/heart)
Status: Offline
Reply With Quote
Nov 1, 2004, 03:08 PM
 
Originally posted by Moderator:
This was linked to from /. But go to this site and check out what happens..I'm guessing it doesn't do this for Windows..kinda cool but I could see this getting out of hand, its almost, borderline invasive....having said that, anyone know how its done?

http://www.pompeiisites.org/
I think it's funny that your nick is "Moderator" but you not. And you're from BOston.
     
Professional Poster
Join Date: Jan 2001
Location: Between Sydney and Melbourne
Status: Offline
Reply With Quote
Nov 2, 2004, 04:21 AM
 
This site does it too click the "shake well" bit at the top.
http://www.drinkmars.com/
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 12:38 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2