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