Dark Bit Factory & Gravity

GENERAL => General chat => Topic started by: ferris on September 23, 2006

Title: Bored? Java mini-demo!
Post by: ferris on September 23, 2006
If you're ever bored, go to a site with lots of images (like this one, it works great ;) ) and enter this code into the adress bar:


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++ }setInterval('A()',5); void(0)


Have fun kids!
Title: Re: Bored? Java mini-demo!
Post by: Voltage on September 23, 2006
That's freaky and cool.   >:D
Title: Re: Bored? Java mini-demo!
Post by: Rbz on September 23, 2006
Very nice  :D
Title: Re: Bored? Java mini-demo!
Post by: Tetra on September 24, 2006
Thats Awesome!
Title: Re: Bored? Java mini-demo!
Post by: benny! on September 24, 2006
Damn cool ... nice idea. I really like it !
Title: Re: Bored? Java mini-demo!
Post by: Shockwave on September 24, 2006
Cool :)
Title: Re: Bored? Java mini-demo!
Post by: ferris on September 24, 2006
This one'll creep people out:


javascript:im = document.images;iml = im.length;ix = new Array(iml);iy = new Array(iml);for(i = 0;i < iml;i++) {ix[i] = document.images[i].width;iy[i] = document.images[i].height;}function bounce() {for(i = 0;i < iml;i++) {ix[i] = ix[i] + 2;iy[i] = iy[i] + 2;document.images[i].width = ix[i];document.images[i].height = iy[i];}}setInterval('bounce()',10);void(0 )


It scales all images on a given page endlessly!
Muahahaha.
Title: Re: Bored? Java mini-demo!
Post by: Shockwave on September 24, 2006
:)
Title: Re: Bored? Java mini-demo!
Post by: benny! on September 24, 2006
Hehe ... wonder at which image-size my browser would crash  ::)
Title: Re: Bored? Java mini-demo!
Post by: ferris on September 24, 2006
I'm finding it's very addicting writing scripts that ruin someone else's hard html works  ;D
Title: Re: Bored? Java mini-demo!
Post by: benny! on September 24, 2006
Quote from: thygrion on September 24, 2006
I'm finding it's very addicting writing scripts that ruin someone else's hard html works  ;D

lol :: your scripts are the worst nightmares for each webdesigner ;-)
Title: Re: Bored? Java mini-demo!
Post by: Clyde on September 24, 2006
Sorry to be the thick one here; im sure they are wicked the effects etc, but where's the script code at dudes?
Title: Re: Bored? Java mini-demo!
Post by: Shockwave on September 25, 2006
They are in the code boxes in Thygrions posts mate. Can you see them?
Title: Re: Bored? Java mini-demo!
Post by: Clyde on September 25, 2006
Nope, all I can see is a slider bar with the word Code above it
Title: Re: Bored? Java mini-demo!
Post by: relsoft on September 27, 2006
Yeah, slider bar here too.
Title: Re: Bored? Java mini-demo!
Post by: benny! on September 27, 2006
@Clyde+Relsoft:

seems to be a browser problem then. which browser do you use ?

here to un'coded' code :

Code#1

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++ }setInterval('A()',5); void(0)

Code#2

javascript:im = document.images;iml = im.length;ix = new Array(iml);iy = new Array(iml);for(i = 0;i < iml;i++) {ix = document.images.width;iy = document.images.height;}function bounce() {for(i = 0;i < iml;i++) {ix = ix + 2;iy = iy + 2;document.images.width = ix;document.images.height = iy;}}setInterval('bounce()',10);void(0 )


I prefer using these fx on a site like goole.
Title: Re: Bored? Java mini-demo!
Post by: Clyde on September 27, 2006
Im using Internet Explorer 7.
Title: Re: Bored? Java mini-demo!
Post by: slinks on September 27, 2006
That probebly explains it. IE=hell I recomend firefox, and I'm sure I'm not the only one!
Title: Re: Bored? Java mini-demo!
Post by: benny! on September 28, 2006
Definately. I just read an aritcle about the IE7 in a rather good german computer magazine
( called iX ). It seems that there are still many bugs in it and a lot of fixes missing. Really
cannot understand why microsoft doesnt seem to be able to produce a better browser...

You should give an alternative a try. I recommend firefox, too.
Title: Re: Bored? Java mini-demo!
Post by: relsoft on September 28, 2006
Awesomeness!!!
Title: Re: Bored? Java mini-demo!
Post by: taj on September 28, 2006
Very nice Benny. I didnt even know this was possible. Thanks for sharing. I'd be happy to see more...
Title: Re: Bored? Java mini-demo!
Post by: benny! on September 28, 2006
Just to make this clear. I just reposted the code. Its not mine .. (unfortunately ;-) ).
thygrion did it !!!!