Jump to content
xisto Community
Sign in to follow this  
Carson

Google Rolling Image Trick

Recommended Posts

You might already know this but it doesn't really matter....
OK this isnt a useful trick or something, its just something thats fun to see.

1. Goto Google

2. Click "images"

3. Type "jesus" or any other word

4. You will get a page which is full of images

5. Then delete the item from the address bar and paste the below script:

java script: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)

Edited by Carson (see edit history)

Share this post


Link to post
Share on other sites

Did it come up with a google search? I accidentally put a space in the word javascript, so it would not have worked. I edited the code in the first post, try it again. I'm using the latest version of Firefox, and it works for me. You can do this with any site, but on some sites the images just go out of place. It works well with the google image search though.

Share this post


Link to post
Share on other sites

Yes! it works!
All images fly like a snake.

I followed your code made another one, try it if you are interest in.

java script:R=0; x1=0.01; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=600; 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.cos(R*x1*x2+i*x2+x3)*Math.cos(R*x1*x2+i*x2+x3)*x4; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0)

Share this post


Link to post
Share on other sites

you need to remove the space between java and script in order for this to work it should look like this:

java script: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)

It works in Firefox just not IE7 anyone try this on IE6?

I tried one myself talk about getting a seizure :P

java script:R=0; x1=0.01; y1=.05; x2=.15; y2=.24; x3=1.6; y3=.24; x4=1900; y4=1700; x5=100; 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.cos(R*x1*x2+i*x2+x3)*Math.cos(R*x1*x2+i*x2+x3)*x4; DIS.top=Math.cos(R*y1+i*y2+y3)*y4+y5}R++}setInterval('A()',5); void(0)

Funny I seen this post before but that was like in 2005 I think so that topic is long been buried in here. Also you don't have to do just Jesus you can do any image search since the script is about moving the images themselves and not what hte search is about.
Edited by Saint_Michael (see edit history)

Share this post


Link to post
Share on other sites

Now that's interesting.... I tried both variations, and they worked for me in the latest firefox as well. The only thing I noticed with the second code though is when I tried to come over to this page to post my findings, I was unable to switch between tabs while the javascript was still running. So I had to refresh my page to stop the images. I was able to switch tabs fine while I ran the first code.Still that's some pretty interesting pieces of javascript. I haven't delved too far into that whole language, and am hoping to learn more of what it can do soon :PAnyway, thanks for the neat trick :D

Share this post


Link to post
Share on other sites

Wow, that is awesome. I was really getting frustrated at first because I was getting the google search, then I kept reading the whole thread and found out about the space. Guess you got to read all the instructions or the whole thread before you get the prize. Pretty neat effect.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.