Go Back   CodingForums.com > :: Client side development > Flash & ActionScript

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-10-2009, 10:37 PM   PM User | #1
marilynn.fowler
Regular Coder

 
Join Date: Aug 2002
Location: San Francisco
Posts: 442
Thanks: 19
Thanked 15 Times in 15 Posts
marilynn.fowler is an unknown quantity at this point
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
marilynn.fowler is offline   Reply With Quote
Old 03-11-2009, 10:07 AM   PM User | #2
gnomeontherun
Senior Coder

 
gnomeontherun's Avatar
 
Join Date: Sep 2007
Location: Houston
Posts: 2,846
Thanks: 10
Thanked 238 Times in 229 Posts
gnomeontherun will become famous soon enoughgnomeontherun will become famous soon enough
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.
gnomeontherun is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 09:03 PM.


Advertisement
Log in to turn off these ads.