Page 3 of 5 FirstFirst 12345 LastLast
Results 21 to 30 of 49

Thread: Trippy thing to do with "Google Images"

  1. #21
    tesco's Avatar woowoo
    Join Date
    Aug 2003
    Location
    Canadia
    Posts
    21,669
    Quote Originally Posted by SaveFerris View Post
    I made my own version of one of these when bored in school a few months back.
    Code:
    javascript:amm=20;sta=2;vri=8;stH=40;saW=screen.availWidth;fiA="<img src='http://fish.sferris.net/f3.png' />";fiB="<img src='http://fish.sferris.net/f2.png' />";poA=new Array();poB=new Array();i=0;for(i=0;i<amm;i++){poA[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiA;ff.id="fA"+i;ff.style.position='absolute';ff.style.left=poA[i]+"px";ff.style.top=(i*stH)+"px";document.body.appendChild(ff)}for(i=0;i<amm;i++){poB[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiB;ff.id="fB"+i;ff.style.position='absolute';ff.style.left=poB[i]+"px";ff.style.top=((i*stH)+(stH/2))+"px";document.body.appendChild(ff)}function lFi(){for(i=0;i<amm;i++){poA[i]+=(Math.random()*vri)+sta;if(poA[i]>saW)poA[i]=-100;document.getElementById("fA"+i).style.left=poA[i]+"px"}for(i=0;i<amm;i++){poB[i]-=(Math.random()*vri)+sta;if(poB[i]<-100)poB[i]=saW;document.getElementById("fB"+i).style.left=poB[i]+"px"}}lf=setInterval("lFi()",25);void(0)
    Scroll to the top of the page.
    That's cool. There's a bug in it though. The fishes swim too far to the right.

  2. Internet, Programming and Graphics   -   #22
    BANNED BT Rep: +12BT Rep +12BT Rep +12
    Join Date
    Feb 2009
    Posts
    767
    Quote Originally Posted by tesco View Post
    Quote Originally Posted by SaveFerris View Post
    I made my own version of one of these when bored in school a few months back.
    Code:
    javascript:amm=20;sta=2;vri=8;stH=40;saW=screen.availWidth;fiA="<img src='http://fish.sferris.net/f3.png' />";fiB="<img src='http://fish.sferris.net/f2.png' />";poA=new Array();poB=new Array();i=0;for(i=0;i<amm;i++){poA[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiA;ff.id="fA"+i;ff.style.position='absolute';ff.style.left=poA[i]+"px";ff.style.top=(i*stH)+"px";document.body.appendChild(ff)}for(i=0;i<amm;i++){poB[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiB;ff.id="fB"+i;ff.style.position='absolute';ff.style.left=poB[i]+"px";ff.style.top=((i*stH)+(stH/2))+"px";document.body.appendChild(ff)}function lFi(){for(i=0;i<amm;i++){poA[i]+=(Math.random()*vri)+sta;if(poA[i]>saW)poA[i]=-100;document.getElementById("fA"+i).style.left=poA[i]+"px"}for(i=0;i<amm;i++){poB[i]-=(Math.random()*vri)+sta;if(poB[i]<-100)poB[i]=saW;document.getElementById("fB"+i).style.left=poB[i]+"px"}}lf=setInterval("lFi()",25);void(0)
    Scroll to the top of the page.
    That's cool. There's a bug in it though. The fishes swim too far to the right.
    Perhaps they're supposed to do so.
    Or maybe your doobies put your cordination out of control?

  3. Internet, Programming and Graphics   -   #23
    tesco's Avatar woowoo
    Join Date
    Aug 2003
    Location
    Canadia
    Posts
    21,669
    Quote Originally Posted by Bone.W.Machine View Post
    Quote Originally Posted by tesco View Post
    That's cool. There's a bug in it though. The fishes swim too far to the right.
    Perhaps they're supposed to do so.
    Or maybe your doobies put your cordination out of control?
    actually they are supposed to do it but they're not supposed to be in the viewable area. The way it is now creates scroll bar at the bottom of the screen whenever they swim to the right..

  4. Internet, Programming and Graphics   -   #24
    SaveFerris's Avatar ŻŻŻŻŻŻŻŻŻŻŻŻ
    Join Date
    Oct 2006
    Location
    England
    Posts
    215
    Quote Originally Posted by tesco View Post
    Quote Originally Posted by SaveFerris View Post
    I made my own version of one of these when bored in school a few months back.
    Code:
    javascript:amm=20;sta=2;vri=8;stH=40;saW=screen.availWidth;fiA="<img src='http://fish.sferris.net/f3.png' />";fiB="<img src='http://fish.sferris.net/f2.png' />";poA=new Array();poB=new Array();i=0;for(i=0;i<amm;i++){poA[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiA;ff.id="fA"+i;ff.style.position='absolute';ff.style.left=poA[i]+"px";ff.style.top=(i*stH)+"px";document.body.appendChild(ff)}for(i=0;i<amm;i++){poB[i]=Math.round(Math.random()*saW);ff=document.createElement("div");ff.innerHTML=fiB;ff.id="fB"+i;ff.style.position='absolute';ff.style.left=poB[i]+"px";ff.style.top=((i*stH)+(stH/2))+"px";document.body.appendChild(ff)}function lFi(){for(i=0;i<amm;i++){poA[i]+=(Math.random()*vri)+sta;if(poA[i]>saW)poA[i]=-100;document.getElementById("fA"+i).style.left=poA[i]+"px"}for(i=0;i<amm;i++){poB[i]-=(Math.random()*vri)+sta;if(poB[i]<-100)poB[i]=saW;document.getElementById("fB"+i).style.left=poB[i]+"px"}}lf=setInterval("lFi()",25);void(0)
    Scroll to the top of the page.
    That's cool. There's a bug in it though. The fishes swim too far to the right.
    They swim until their entire body is off-screen, then flick back to the left. Yes this does cause problems as browsers try to stretch the page to fit but I haven't found an easy fix. I think there's a way to tell a page not to display horizontal scroll-bars but haven't looked into it, the other solution would be to use the CSS cropping function to cut them down as they slide out of view, but that would be way too much work.

  5. Internet, Programming and Graphics   -   #25
    RedRansom's Avatar Poster BT Rep: +9BT Rep +9
    Join Date
    Apr 2008
    Location
    don't know where
    Posts
    1,160
    Quote Originally Posted by tesco View Post
    Your code was cut off.
    And btw it works on any page. Even here.

    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.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',50); void(0);
    that's really cool and working like a charm...
    I hope you're kind enough to say me how can i will find all direct links of images on a web page?

  6. Internet, Programming and Graphics   -   #26
    tesco's Avatar woowoo
    Join Date
    Aug 2003
    Location
    Canadia
    Posts
    21,669
    Using javascirpt?

  7. Internet, Programming and Graphics   -   #27
    RedRansom's Avatar Poster BT Rep: +9BT Rep +9
    Join Date
    Apr 2008
    Location
    don't know where
    Posts
    1,160
    Doesnt matter..
    Just i need to find direct image links on some pages, pictures are thumbnail format...
    And when i saw this topic and flying images i thought this should be more compliated than what i am looking for
    I was using bulk image grabber for grab images but it's not working anymore...If i can get images direct links i can download all one easyly with a download manager(like flashget,internet download manager)

  8. Internet, Programming and Graphics   -   #28
    tesco's Avatar woowoo
    Join Date
    Aug 2003
    Location
    Canadia
    Posts
    21,669
    Code:
    javascript:imgurls='';imgurlsdup=new Array;count=document.images.length;for(i=0;i<count;i++){if (!imgurlsdup[document.images[i].src]) {imgurlsdup[document.images[i].src]=true;imgurls=imgurls+'<br />'+document.images[i].src;}}document.write(imgurls);
    You can paste that into the address bar.

  9. Internet, Programming and Graphics   -   #29
    RedRansom's Avatar Poster BT Rep: +9BT Rep +9
    Join Date
    Apr 2008
    Location
    don't know where
    Posts
    1,160
    Thank you sir...(It's just giving links of thumbnail not orginal photos but obviously this will help me as well.)
    This javascript issue looking very helpful for who interest in photos.

  10. Internet, Programming and Graphics   -   #30
    tesco's Avatar woowoo
    Join Date
    Aug 2003
    Location
    Canadia
    Posts
    21,669
    Well if there's something specific you want me to make for you I might be able to do it if it's not going to take me too long.
    You have to show me the site or give me some examples of how they code the thumbnail/links.

Page 3 of 5 FirstFirst 12345 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •