1. Welcome to Tacoma World!

    You are currently viewing as a guest! To get full-access, you need to register for a FREE account.

    As a registered member, you’ll be able to:
    • Participate in all Tacoma discussion topics
    • Communicate privately with other Tacoma owners from around the world
    • Post your own photos in our Members Gallery
    • Access all special features of the site

Cool Google Trick...!

Discussion in 'Off-Topic Discussion' started by fasn8dave, May 13, 2009.

  1. May 14, 2009 at 4:03 PM
    #41
    Evil Monkey

    Evil Monkey There's an evil monkey in my truck

    Joined:
    Aug 8, 2007
    Member:
    #2352
    Messages:
    8,262
    Gender:
    Male
    First Name:
    Robert
    Escondido, CA
    Vehicle:
    07 4x4 DC SR5 TRD Off-road
    Weathertech front & rear mats, rear suspension TSB, Toytec AAL for TSB, Hi-Lift Jack, Bilstein 5100 & Toytec Adjustable coilovers, Built Right UCAs, KMC XD 795 Hoss Wheels, Definity Dakota MTs 285/75R16, Leer XR, Thule Tracker II & Thule MOAB basket
    It helps to rearrange the code to make it more readable. I added line numbers to explain it:
    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; 
     
    [B]function A()[/B]{
    2.   for(i=0; i<DIL; i++) {
    3.      DIS=DI[ i ].style; 
    4.      DIS.position='absolute'; 
    5.      DIS.left=Math. sin(R*x1+ i*x2+x3)* x4+x5;
    6.      DIS.top=Math. cos(R*y1+ i*y2+y3)* y4+y5
         }
    7.   R++ 
    }
    8.  setInterval('A()',5); 
    9.  void(0)
    
    Here's an explanation:
    Line 1 is setting up variables to be used in function A( )
    DI is an array of the document images. It has one slot for each image on the web page (10 images, 10 slots). Slots are numbered starting with 0, so the first item is position 0, the second is position 1, etc.
    DIL is the length of the document array (tells the for loop how many images are on the page).
    Line 2 is the start of the for loop. It will do the process between the { } below for each image in the web page. The number stored in "i" will get incremented by one for each loop until it reaches the maximum number (DIL: the number of images on the webpage).
    Line 5 & 6 are the functions that move the graphics.
    Line 8 sets the speed in milliseconds. Change the 5 to 100 or 1000 to slow it down (1000 = 1 second). It tells the browser how long to wait before running the function "A()" again.

    Try it out with a real high interval (1000) on the main google search page. That way you only see one graphic image moving very slowly. It'll help to see how changing something makes a difference.

    As for chicks digging you for it....well good luck with that.
     
  2. May 14, 2009 at 4:08 PM
    #42
    ST77

    ST77 Wandering doesn't mean you're lost

    Joined:
    Apr 16, 2009
    Member:
    #16048
    Messages:
    2,850
    Gender:
    Male
    First Name:
    Brian
    Sandy, Or
    Vehicle:
    2018 TRD OR DCSB
    Bone Stock
    :rofl:
     
  3. May 14, 2009 at 8:52 PM
    #43
    derekabraham

    derekabraham Living vicariously through everybody

    Joined:
    Jul 8, 2008
    Member:
    #7822
    Messages:
    28,873
    Gender:
    Male
    First Name:
    TW'S Hippy Liberal
    Portland, OR
    Vehicle:
    2002 4x4 4Runner
    Stick on hood scoop from Autozone.

    What? :D
     
  4. May 15, 2009 at 4:20 AM
    #44
    higherlux

    higherlux Well-Known Member

    Joined:
    Dec 5, 2008
    Member:
    #11307
    Messages:
    6,927
    Gender:
    Male
    First Name:
    Blake
    middle of S.C.
    Vehicle:
    1998 tacoma 2.7l 4wd/1986 POS
    Mall crawler status
    NERD!!!!!!!:p
     
  5. May 15, 2009 at 10:45 AM
    #45
    Evil Monkey

    Evil Monkey There's an evil monkey in my truck

    Joined:
    Aug 8, 2007
    Member:
    #2352
    Messages:
    8,262
    Gender:
    Male
    First Name:
    Robert
    Escondido, CA
    Vehicle:
    07 4x4 DC SR5 TRD Off-road
    Weathertech front & rear mats, rear suspension TSB, Toytec AAL for TSB, Hi-Lift Jack, Bilstein 5100 & Toytec Adjustable coilovers, Built Right UCAs, KMC XD 795 Hoss Wheels, Definity Dakota MTs 285/75R16, Leer XR, Thule Tracker II & Thule MOAB basket
    Got the tattoo to prove it.
    tattoo.jpg
     
  6. May 15, 2009 at 3:31 PM
    #46
    SaltySteve

    SaltySteve Well-Known Member

    Joined:
    Apr 22, 2009
    Member:
    #16293
    Messages:
    903
    Gender:
    Male
    First Name:
    Steve
    Denver
    Vehicle:
    2012 4runner
    Binary code tattoo and you're telling me good luck with the chicks?!? Oh man, I'm doomed. :D I only need to impress one lady in my life . . . . and this did nothing for her. Thought for sure she'd want some lovin after that.

    Nice explanation man. You got that stuff down. Can you make it so the images form a hand flippin the "bird"? That'd be a good one to mass email to people.
     
  7. May 15, 2009 at 3:53 PM
    #47
    Krazie Sj

    Krazie Sj Resident Jackass

    Joined:
    Oct 9, 2008
    Member:
    #9849
    Messages:
    13,771
    Gender:
    Male
    First Name:
    Power Serge
    LV-426 (Acheron)
    Vehicle:
    07 TRD Off Road 4x4
    Borla Catback Exhaust, Snorkel, 33s on either 16's or 18's, ARB Bumper, All Pro LT w/Walker Evan Shocks front and back, All Pro expedition leaf pack, 10,000lb Superwinch, Intake Manifold Spacer, Bed Rack with ARB RTT, Rotopack and Hi Lift mounted, Husky Liner mats and an air freshener from 1995.
    Doesn't work in Mozilla. Had to use evil IE.
     
  8. May 15, 2009 at 3:56 PM
    #48
    FlawedXJ

    FlawedXJ mall crawlin', web wheelin', concrete cowboy

    Joined:
    Oct 28, 2008
    Member:
    #10334
    Messages:
    5,955
    Gender:
    Male
    First Name:
    Paul
    NorAla
    Vehicle:
    13 F150 FX4, 99 jeep xj, 04 msm miata
    I actually have a jeep now. Imagine that.
    works fine on my firefox.
     
  9. May 15, 2009 at 4:01 PM
    #49
    tacoholic

    tacoholic Well-Known Member

    Joined:
    Jan 11, 2009
    Member:
    #12480
    Messages:
    4,072
    Gender:
    Male
    East Bay, CA
    Awesome...:rasta:
     

Products Discussed in

To Top