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

HTML Help

Discussion in 'Technology' started by SilverSeven, Feb 27, 2009.

  1. Feb 27, 2009 at 7:31 AM
    #1
    SilverSeven

    SilverSeven [OP] Rock Solid Toy

    Joined:
    Nov 18, 2008
    Member:
    #10849
    Messages:
    2,590
    Gender:
    Male
    First Name:
    Jordon
    South Jurzee
    Vehicle:
    6" 35s mud and scratched to shit
    I have a website for my store, www.overkastword.com, if you go there you will see on the main page there is a table with some products in it, designed for the specials of the week or new products...

    What i would like to do is have say 50 pictures that rotate through the 9 product slots everytime the page is refreshed.

    what must i do to accomplish this?
     
  2. Feb 27, 2009 at 8:22 AM
    #2
    NetMonkey

    NetMonkey Well-Known Member

    Joined:
    Aug 14, 2008
    Member:
    #8536
    Messages:
    1,725
    Gender:
    Male
    Geogetown, TX
    Vehicle:
    2010, 4x4, DC, off-road, shortbed, automatic
    Toytec Ultimate Lift @ 3", Mickey Thompson MTZ's 285/75/16, Moto Metal 955b, rear 2" ALL, Marlin Crawler sliders
    i am pretty sure that you can do that with a simple javascript. for each square, you would define a random picture from a set of pictures. you probably want to define unique sets for each square so that you dont get duplicates displaying at the same time.

    EDIT:
    for each box, you would have:

    myBox1Pics = new Array(4);
    myBox1Pics[0] = "pathToBox1Pic1";
    myBox1Pics[1] = "pathToBox1Pic2";
    myBox1Pics[2] = "pathToBox1Pic3";
    myBox1Pics[3] = "pathToBox1Pic4";
    picNum = Math.floor(Math.random() * 3)
    box1Pic = myBox1Pics [picNum];

    then you can use the box1Pic variable in your link for box 1.


    i am sure that there is a better (more elaborate) way, but this is a simple, easy to implement approach.
     
  3. Feb 27, 2009 at 8:24 AM
    #3
    XrunnIT

    XrunnIT Well-Known Member

    Joined:
    Jul 6, 2008
    Member:
    #7770
    Messages:
    849
    Gender:
    Male
    Austin, TX
    Vehicle:
    1GR-GZE X-Runner
    Built Motor by LC Engineering Boosted by TRD
    embed a swf doc (flash). Setup up a flash file that will loop through based on X amount of time. Have it pull the pictures from a list. Set the list up in an external XML file, read them in dynamically. That way all you have to do is put new pictures in a folder, update your list and the flash will update itself automatically. Won't ever have to change the code. :thumbsup:
     
  4. Feb 27, 2009 at 8:31 AM
    #4
    SilverSeven

    SilverSeven [OP] Rock Solid Toy

    Joined:
    Nov 18, 2008
    Member:
    #10849
    Messages:
    2,590
    Gender:
    Male
    First Name:
    Jordon
    South Jurzee
    Vehicle:
    6" 35s mud and scratched to shit

    this is exactly what i am looking for. I dont know flash, only HTML. Where could I go to learn how to do this?
     
  5. Feb 27, 2009 at 8:39 AM
    #5
    NetMonkey

    NetMonkey Well-Known Member

    Joined:
    Aug 14, 2008
    Member:
    #8536
    Messages:
    1,725
    Gender:
    Male
    Geogetown, TX
    Vehicle:
    2010, 4x4, DC, off-road, shortbed, automatic
    Toytec Ultimate Lift @ 3", Mickey Thompson MTZ's 285/75/16, Moto Metal 955b, rear 2" ALL, Marlin Crawler sliders

    thats a great way to do it, but you will need a Flash devlopers kit. the cheapest i have seen those for is $400. (or maybe you could pay someone to do it for less?).
    its $700 on adobes site:
    http://www.adobe.com/products/flash/
     
  6. Feb 27, 2009 at 8:43 AM
    #6
    SilverSeven

    SilverSeven [OP] Rock Solid Toy

    Joined:
    Nov 18, 2008
    Member:
    #10849
    Messages:
    2,590
    Gender:
    Male
    First Name:
    Jordon
    South Jurzee
    Vehicle:
    6" 35s mud and scratched to shit
    i have flash cs3 professional on my computer right now, just dont know how to use it :/
     
  7. Feb 27, 2009 at 8:46 AM
    #7
    Chickenmunga

    Chickenmunga Nuggety

    Joined:
    Apr 10, 2008
    Member:
    #5877
    Messages:
    6,962
    Gender:
    Male
    First Name:
    Mike
    Hillsboro, Oregon
    Vehicle:
    08 TRD Offroad DC 4x4 (read the build)
    Only problem is if you want a hotlinked banner. Just thinking quick and dirty:

    1. each picture that gets put in the 'banner' folder is numbered sequentially, starting with '0.gif', then '1.gif', and so on (note that this structure will limit you to 10 pictures, if you want more think of 2 digit naming).
    2. have an accompanying text file, so '0.txt', '1.txt', so on. These text files have a single line of text that corresponds to the web address of the product
    3. As the code reads in the pictures, it associates the like-named txt file's contents, making a flash banner with clickable links. To update pictures and links, you simply toss in a new #.gif and #.txt file, and the code does the rest!
    There may be a more sophisticated way (I know nothing of flash).

    EDIT: Here's a javascript solution (see the picture at the bottom). I'd build a bit more sophistication (like how we talked about here), but that might prove the easiest way to do things.
     
  8. Feb 27, 2009 at 8:55 AM
    #8
    SilverSeven

    SilverSeven [OP] Rock Solid Toy

    Joined:
    Nov 18, 2008
    Member:
    #10849
    Messages:
    2,590
    Gender:
    Male
    First Name:
    Jordon
    South Jurzee
    Vehicle:
    6" 35s mud and scratched to shit
    so ive got flash cs3 opened up, started a new animation project, cant seem to import any images.. :/
     
  9. Feb 27, 2009 at 8:59 AM
    #9
    SilverSeven

    SilverSeven [OP] Rock Solid Toy

    Joined:
    Nov 18, 2008
    Member:
    #10849
    Messages:
    2,590
    Gender:
    Male
    First Name:
    Jordon
    South Jurzee
    Vehicle:
    6" 35s mud and scratched to shit

    pulled the code:





    not really understanding how to have each picture link.. the site doesnt have this feature set up
     
  10. Feb 27, 2009 at 9:14 AM
    #10
    Chickenmunga

    Chickenmunga Nuggety

    Joined:
    Apr 10, 2008
    Member:
    #5877
    Messages:
    6,962
    Gender:
    Male
    First Name:
    Mike
    Hillsboro, Oregon
    Vehicle:
    08 TRD Offroad DC 4x4 (read the build)
    Yeah I noticed, but I'm going to take the route of a college professor and say, "where's the fun if I gave you all the answers?"
    :help:
    I freaking hate it when people say that. "Fun for YOU, pain in the BUTT for me", right?



    Actually, it's because I don't know off the top of my head without diving in a bit, and I really need to get work done before my meeting today. :p
     
To Top