Friday, March 27, 2009

myTree appears just fine but why can't I access the node attributes

Question :myTree appears just fine but why can't I access the node attributes?
Answer :Select a node in your myTree. In ActionScript, you can reference this node by using the following
code: myTree.selectedNode;
To access the attributes of the node, use the tree DataProvider API. These methods will work for
any format dataProvider item, which might be an object, array, or XML node.
The following example might work: myTree.selectedNode.attributes.myAttribute
But the following example is far more reliable:
myTree.selectedNode.getProperty("myAttribute");

No comments: