nytyme
08-30-2004, 08:49 PM
Greetings, I've been searching for information on the forums and on google for something that can explain and clarify what's going on.
I have a tree that I'm trying to use addTreeNodeAt() on, but it only works when it feels like it.
Assume this is my opened tree (toTree):
Catalog
--CD
----CD Title
----CD Band
----CD Genre
--Catalog Title
if i use .addTreeNodeAt() i can ONLY add for "Catalog" and "CD", but not the way I expect or is described. If I add a Node, it should be a child of the selected branch.
on(click){
var tix = _root.toTree.selectedIndex;
var node = _root.toTree.getNodeDisplayedAt(tix);
trace("The Selected Index is " + node.attributes.label + "\nYou should have a new tree node (but more than likely you won't");
_root.toTree.setIsBranch(_root.toTree.getTreeNodeA t(tix),true);
_root.toTree.setIsOpen(_root.toTree.getTreeNodeAt( tix),true);
_root.toTree.addTreeNodeAt(tix,"hello");
}
I've included the xml and fla i'm using, hopefully you can see how I've screwed up.
Thanks.
P.S. I keep seeing mention of "FTree" as part of Flash MX, but I can't find it.
I have a tree that I'm trying to use addTreeNodeAt() on, but it only works when it feels like it.
Assume this is my opened tree (toTree):
Catalog
--CD
----CD Title
----CD Band
----CD Genre
--Catalog Title
if i use .addTreeNodeAt() i can ONLY add for "Catalog" and "CD", but not the way I expect or is described. If I add a Node, it should be a child of the selected branch.
on(click){
var tix = _root.toTree.selectedIndex;
var node = _root.toTree.getNodeDisplayedAt(tix);
trace("The Selected Index is " + node.attributes.label + "\nYou should have a new tree node (but more than likely you won't");
_root.toTree.setIsBranch(_root.toTree.getTreeNodeA t(tix),true);
_root.toTree.setIsOpen(_root.toTree.getTreeNodeAt( tix),true);
_root.toTree.addTreeNodeAt(tix,"hello");
}
I've included the xml and fla i'm using, hopefully you can see how I've screwed up.
Thanks.
P.S. I keep seeing mention of "FTree" as part of Flash MX, but I can't find it.