PDA

View Full Version : Crazy Java Stuff



NorthernChaosGod
10-31-2006, 08:21 PM
No not coffee...Simply copy and paste this into your address bar in the same window you're view this thread and see what happens :]


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);

I promise its not malicious.

Quindiana Jones
10-31-2006, 08:24 PM
Crazy Jabba (http://www.cybertronical.com/allsites/starwars/main/aliens/jabba_the_hutt/jabba.jpg) stuff.

McLovin'
10-31-2006, 08:46 PM
:D

That is tight.

Spatvark
10-31-2006, 09:09 PM
I have to admit, that's pretty damn cool. Probably also raping my resources.

Old Manus
10-31-2006, 09:25 PM
It won't stop!

I Took the Red Pill
10-31-2006, 09:28 PM
That's sexy.

Xander
10-31-2006, 09:30 PM
Flying chocobos! I couldn't hit the reply button. I loved it a whole lot more than I expected. Yay :D

NorthernChaosGod
10-31-2006, 09:37 PM
I have to admit, that's pretty damn cool. Probably also raping my resources.

Yeah, probably. Depending on the site I do it on, my computer slows down a bit.

And I'm glad you guys like it. :cool:

The Summoner of Leviathan
10-31-2006, 09:38 PM
Freaky.

Ryth
10-31-2006, 10:09 PM
Hey, that is pretty cool! Nice stuff. :)

McLovin'
10-31-2006, 10:29 PM
My internet hypnotized me.

Rainecloud
10-31-2006, 10:39 PM
Impressive. Most impressive. :p

Yavanna
11-01-2006, 08:45 AM
Cool. I can think of a lot of things you could do with that.



Edit: People! Try it with and IMVU or myspace page or somthing.

RiseToFall
11-01-2006, 08:49 AM
It's 3 in the morning, and to see that, is just trippy. I was trying to find Rainecloud's little army floating everywhere.

NorthernChaosGod
11-01-2006, 11:53 AM
Cool. I can think of a lot of things you could do with that.



Edit: People! Try it with and IMVU or myspace page or somthing.

What's IMVU?

And I would imagine that a myspace would completely kill my computer since a forum slows it down noticeably.

Sylvie
11-01-2006, 11:57 AM
IMVU is a 3D chat, and its pretty crappy in my opinion. Getting money isn't free.

Anyway, that first thing is awesome. :D

Christmas
11-01-2006, 12:21 PM
You make me so giddy. :(

Reles
11-01-2006, 05:10 PM
Weird.

Zeromus_X
11-01-2006, 05:21 PM
Full of Hate. o_0;

starseeker
11-01-2006, 06:45 PM
My head is spinning.

KuRt
11-01-2006, 07:25 PM
Wicked :choc2:

Chloe.
11-01-2006, 09:24 PM
That is sooo cool :bigsmile:

NorthernChaosGod
11-01-2006, 09:36 PM
You make me so giddy. :(

That's a bad thing? :(

Should I do something to fill you with hate now?

mooglebunni608
11-01-2006, 09:52 PM
I can't copy it. It won't let me?
Wait, it works now. That's friggen wierd!

Dreddz
11-01-2006, 10:08 PM
Replying to this thread was like shooting practise.

Nominus Experse
11-02-2006, 04:07 AM
How did you happen upon this code, NCG?

It's most definately cool.

Reine
11-02-2006, 07:39 AM
Nothing happened. Mind explaining what it does, or how I am exactly supposed to do this?

Markus. D
11-02-2006, 08:12 AM
Nothing happened. Mind explaining what it does, or how I am exactly supposed to do this?

NorthernChaosGod
11-02-2006, 10:11 PM
Nothing happened. Mind explaining what it does, or how I am exactly supposed to do this?



Nothing happened. Mind explaining what it does, or how I am exactly supposed to do this?
To answer both of your questions.



copy and paste this into your address bar in the same window you're viewing this thread and see what happens :]


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);

I promise its not malicious.

It has to be on a page with content tagged by IMG code. It makes all content tagged by IMG code float around in an oval shaped pattern.

Dr Unne
11-02-2006, 10:59 PM
Java is not the same thing as Javascript. That is Javascript. It's pretty neat though. It sets the style of each img tag to :bou::bou::bou::bou::bou::bou::bou::bou::bou::bou:absolute then uses two trig functions to change the X and Y coordinates of all the img tags. The two functions are

300 * SIN(0.1x + 0.25y + 1.6) + 300
200 * COS(0.05x + 0.24y + 0.24) + 200

x increases linearly and y varies from 1 to the number of images on the page you're viewing. It changes the images' position every 5 milliseconds.

If you mess with the parameters you can change the shape or behavior of the cloud. Try these:


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.tan(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',5); void(0);


javascript:R=0; x1=.1; y1=.05; x2=.55; 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);


javascript:R=0; x1=0; 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);


javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=300; x5=300; y5=300; 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+i)*x4+x5)+"px"; DIS.top=(Math.cos(R+i)*y4+y5)+"px"}R++}setInterval('A()',50); void(0);

Cruise Control
11-02-2006, 11:01 PM
Jeez, Unne. Do you have to show everybody up?

Reine
11-03-2006, 04:37 AM
Its still not doing anything.

NorthernChaosGod
11-03-2006, 08:45 AM
I got pwned in my own thread. :cry: :(



Its still not doing anything.

Then you're probably doing something wrong.

crono_logical
11-03-2006, 09:00 AM
Seems dodgy to think the browser even allows that to happen :p Does it do it if you click a link that has that set as the URL? :p

Quindiana Jones
11-03-2006, 11:35 AM
laaaaaaaaaaaaaaaaaaag. laaaaaaaaaaaaaaaaaaag. Crikey that was fun. Not the lagging. The javascript. I like the one where you type in a message and it creates a warning pop-up. It's funny, because you can scare people.

Keyblade Hybrid
11-05-2006, 10:57 AM
Haha. I cant believe anything this small looks so great, I love javascript, best thing apart from HTML