PDA

View Full Version : Flying images



maxorator
11-14-2006, 06:38 AM
Copy this to your address bar and press enter:


javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("img"); DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++} setInterval('A()',5); void(0)


All the images are going to fly around.

manutd
11-14-2006, 06:50 AM
Sorry Max, but it doesn't work for me :eek: IE7

vart
11-14-2006, 07:05 AM
nice, but page has to have already some pictures... on the blank page no effect...

maxorator
11-14-2006, 10:34 AM
It works in my IE7.

twomers
11-14-2006, 11:26 AM
That's pretty cool!

maxorator
11-14-2006, 11:28 AM
Mess with some numbers in it and you get quite funny shapes :D

I got it from a friend who got it from a friend who got it from somewhere...

Decrypt
11-14-2006, 03:26 PM
I got it from a friend who got it from a friend who got it from somewhere...
Maybe from here (http://cboard.cprogramming.com/showthread.php?t=83908)? :)

divineleft
11-14-2006, 03:34 PM
lol..

dwks
11-14-2006, 03:34 PM
It runs really fast on google (google.ca), since there's only one image . . . On wikipedia's English homepage (http://en.wikipedia.org/wiki/Main_Page), it resizes the scroll bar as the images move; if you scroll to the left you get neat effects . . . The possibilities are endless . . .

I'm currently using IE 6.

dwks
11-14-2006, 03:39 PM
Maybe from here (http://cboard.cprogramming.com/showthread.php?t=83908)? :)
The code is a little different; the version in the link you posted doesn't work for me.

manutd
11-14-2006, 03:51 PM
Never mind, I'm an idiot. I tried to run it on a blank page :p

Dark_Phoenix
11-14-2006, 05:50 PM
Like, Psycodelic, Dude!

manutd
11-14-2006, 05:52 PM
oh, bad pun :)

Decrypt
11-14-2006, 06:28 PM
I didn't check the code, I just remembered a similar thread. Now that you mention it, there's a space in the other one you have to get rid of before it will work.

Dark_Phoenix
11-14-2006, 09:30 PM
Sorry, couldn't resist :p

taelmx
11-14-2006, 10:57 PM
That is awesome!!! I'm gonna go try it on google images or something.

maxorator
11-15-2006, 09:21 AM
The code is a little different; the version in the link you posted doesn't work for me.
Neither does it work for me.

I didn't check the code, I just remembered a similar thread. Now that you mention it, there's a space in the other one you have to get rid of before it will work.
I removed the space from that one, still didn't work.

Decrypt
11-15-2006, 10:20 AM
Hmm...try this:

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300;y4=200; x5=300; y5=200; DI=document.images; DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=Math.sin(R*x1+i*x2+x3)*x4+x5; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterv al('A()',5); void(0);

Works OK for me on IE6.

swgh
11-15-2006, 10:25 AM
Wow, its like.... totally surreal dude............

maxorator
11-15-2006, 10:53 AM
It's the same thing as I posted, but it doesn't work in Firefox. Only in IE.

g4j31a5
11-15-2006, 09:10 PM
>>It's the same thing as I posted, but it doesn't work in Firefox. Only in IE.

I used Firefox and it worked fine. Although the code did not work on every website, but it worked on most.

BTW, awesome dude.

Decrypt
11-16-2006, 10:39 AM
Doesn't work for me on Firefox either; it just moves the pictures off to the left...

Maxorator: Yours works on Firefox for me, just really slowly. (I think that may be this computer's problems, though)

dwks
11-22-2006, 01:19 PM
You have to scroll to the top of the page.