Results 1 to 2 of 2

Thread: XML driven thumbnail menu

  1. #1
    Join Date
    Nov 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default XML driven thumbnail menu

    I'm working on a flash (v8) file that loads an xml file and generates x amount of image thumbnail buttons on the stage in a horizontal row. They get their own consecutive instance names and depth.

    Currently it's very easy to add/remove items via the xml file but when I add more than x objects (in this case it's 6) I want to to create a new row and spit out the next 6 and so on rather than just continuing on and going right off the stage.

    I was thinking of possibly nested IF statements within the while loop checking either current value of i or the thumbnails x position and then changing the x, y values accordingly but this by no means efficient code.

    I'm a programming noob. This is probably a simple, common programming solution but if anyone has any help it would be much appreciated.

    Cheers

  2. #2
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    The easy way would be to set up an array, and like you said, check the value of i. If i >=6 then move to array2, etc.

    Or you could set up "invisible" clip containers, and fill them based on the number of i.

    Depends on your look and feel and what you want.

    The array method will be more eye pleasing, the container method will be less coding.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

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
  •