Thread: xml and flash
View Single Post
  #1 (permalink)  
Old June 9th, 2007, 10:06 AM
ekosoft ekosoft is offline
Registered User
Join Date: Jun 2007
Location: Plantersville, TX, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default xml and flash

ok, i have this part of a code, its pulling the xml and putting it into text boxes.

      var minorsnodes:Array = newxml.firstChild.firstChild.nextSibling.childNodes;
      for (var i:Number = 0; i < minorsnodes.length; i++) {
         // for each mode node:
         var minornode:XMLNode = minorsnodes[i];
         //2d array
         //xslt html

this is the xml being used

<?xml version="1.0" encoding="UTF-8"?>
<scorelist version="0">
   <game name="Harmonic Convergence Deluxe">
     <major_mode name="Race">
       <minor_mode display_mode="time" name="Asteroid">
         <score value="35" login="Sciandu"/>
       <minor_mode display_mode="time" name="Breach">
         <score value="65" login="Sciandu"/>
       <minor_mode display_mode="time" name="Radioactive Rose">
         <score value="24" login="Sciandu"/>
       <minor_mode display_mode="time" name="Art">
         <score value="42" login="Sciandu"/>
         <score value="54" login="Mehh"/>
         <score value="54" login="tmp1"/>
         <score value="91" login="User1"/>
         <score value="99" login="Sciandu"/>
     <major_mode name="Challenge">
       <minor_mode display_mode="number" name="-">
         <score value="14" login="Sciandu"/>
     <major_mode name="Frenzy">
       <minor_mode display_mode="number" name="Camp Fire">
         <score value="79" login="Sciandu"/>
       <minor_mode display_mode="number" name="Art">
         <score value="54" login="Sciandu"/>
       <minor_mode display_mode="number" name="Ritual">
         <score value="59" login="tmp1"/>
         <score value="53" login="Sciandu"/>
         <score value="2" login="Mehh"/>
what i need to do is be able to index the minor modes into one text box instead of each one having their own and index them into one, and i need to be able to index each score for each minor mode accordingly. The problem is it wont let me index if i use childNodes[i] here
im guessing its because its already in an index, but i dont know, can anyone help me?