Getting the nodevalue in XML

Hi,

I had posted this post earlier but I guess i forgot to give it a title, anyway there’s some progress in my quest with XML.

The story so far:

I have created an XML list that feeds a TreeView component, with AS2 I am able to get to this point:

This is my XML statement :


<menulist>
    <node label="Products">
    <node label="Tryout">
            <node label="Segment2" isBranch="true" data="segment2.swf" />
      </node>
      </node>
</menulist>

and this is the AS2 code that gets the displayindex :



trace(myTree.getDisplayIndex(evt.target.selectedNode));


At this point I when I run the movie I get the index which is basically a number, but I want the label associated with that number.

In the XML file, there’s an attribute called data, I want the segment2.swf to load when the user selects the option. I have a loader component also on stage, I just want the user selection to be as input to the content path of the loader.

Can you please help ?