Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Aug 2002
    Location
    San Francisco
    Posts
    455
    Thanks
    19
    Thanked 15 Times in 15 Posts

    showing xml thumbs in subcategories

    Before, my thumbnails were all just in "gallery" and I was able to refer my thumbnails using the following actionscript 3 line:

    Code:
    xmlList = xml.children();
    Now that I've divided my xml thumbnails into categories (see below), my actionscript 3 won't pull up any of the thumbnails. How do I modify the line of code so that it pulls them all up?

    Code:
    <gallery>
         <aliens>
              <image source="Gort.jpg" thumb="Gort_t.jpg>
              <image source="ET.jpg" thumb="ET_t.jpg">
         </aliens>
    
         <fish>
              <image source="barracuda.jpg" thumb="baracuda_t.jpg">
              <image source="starfish.jpg" thumb="starfish_t.jpg">
         </fish>
    </gallery>
    In my
    Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read. Groucho Marx

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    You will have to build different lists based on categories and then get their children. Something like this

    Code:
    xmlList = xml.firstChild.childNodes; // should get you the category nodes 
    aliens = xmlList.firstChild.children(); // should get you the aliens children 
    fish = xmlList.secondChild.children(); // should get you the fish children
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.


  •  

    Posting Permissions

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