Questions about AS2 Tree Component (Flash CS3)
I have Flash application with a Tree component on the Stage. I'm using an XML file to create the structure of the Tree component.
Each entry on my XML has the attributes id, label, heading, desc, and icon.
My problem is that I can't seem to be able to set the Tree to default with the first node open.
My code is:
var xmlTreeData:XML = new XML();
xmlTreeData.onLoad = function() {
mTree.dataProvider = this.firstChild;
};
xmlTreeData.ignoreWhite = true;
xmlTreeData.load("xml/treeValues1.xml");
mTree.setStyle("fontSize","11");
mTree.setStyle("selectionColor","0xE0E0E0");
mTree.setStyle("useRollOver",false);
mTree.setIsOpen(mTree.getTreeNodeAt(0), true);
My tree populates fine, and the handler I retrieve whatever item is clicked works great. However, the tree refuses to default to having that first node open.
I'm also interested in placing custom icons into certain nodes via the icon attribute I've set in the XML, but that will have to come later I guess.
