Asked By
toles hitz
10 points
N/A
Posted on - 02/26/2013
Can someone here teach me how I can make a menu tree with list as3? I'm having trouble in receiving the flex expand/collapse. I need the ListChange Event to defer any action at least for a second. I'm using ActionScript 3.0. Thanks.
Need help in menu tree with list as3
Hello, Toles
Hope you are fine. Don’t worry. I think I can give you a solution.Lets try it
import TreeCustom;
Â
var mytree:TreeCustom = new TreeCustom();
Â
mytree.setSize(500,200);
this.addChild(mytree);
mytree.init();
If they do not work please try it
mytree.addCustomItem(
"This is example 1 of an item in the list",
"ThisIsASymbolInTheLibrary",
["this is sub node 1","this is sub node 2"],
"this is text on the end");
//this creates a closed parent node or branch node that
//encapsulates any subsequent nodes added under this node.
mytree.group("click to open group");
//this adds a leaf node or a node with leafs
mytree.addCustomItem(
"This is example 2 of an item in the list",
"",
["this is sub node 1","this is sub node 2"]);
//this close up the node "click to open group" and any subsequent
 //additions are added at the same level as the parent node "click to open group"
mytree.groupEnd();
mytree.addCustomItem(
"This is example 3 of an item in the list",
 "",
["this is sub node 1","this is sub node 2"]);
mytree.addLeaf("new item","");
Hope you will get your answer.
Â