You are getting the display index and then trying to get a node based on that index. That won't work like you expect.
The display index refers to the nodes position VISUALLY in the tree. This may have nothing to do with the nodes' position in the XML. If you have this in a tree: Folder 1 (open branch) - Item 1 (leaf) - Item 2 (leaf) Folder 2 (closed branch) Folder 3 (open branch) - Item 1 (leaf) - Item 2 (leaf) The display index of the Folder 3 > Item 1 node is 5. Yet if you tried to get the node at 5 (i.e. tree.getTreeNodeAt(5)) it would return undefined, since there is no node at index 5 of the tree. When you say tree.getTreeNodeAt(index), the index refers to the childNodes array of the tree. Does that help? Derek Vadneau ----- Original Message ----- From: "Tien Nguyen" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Monday, January 23, 2006 3:19 PM Subject: SPAM-LOW: [Flashcoders] Flash8 Tree Gurus Hi All, I've been working with Flash8 Tree and have the following situation: var treeIndex:Number = layoutTree.getDisplayIndex( layoutTree.selectedNode); trace("SelectedTreeIndex = " + treeIndex); trace("TreeChanged = " + layoutTree.selectedNode ); trace("TreeNode = " + layoutTree.getTreeNodeAt(treeIndex)); The problem is that the TreeNode value from the trace is "Undefined". Oddity: When the treeIndex value is 0, then the TreeNode value is the correct XML of the entire tree. I am working with ARP architecture. What would the problem be in this case. Sincerely Tim _______________________________________________ Flashcoders mailing list [email protected] http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

