Mubasher, Hi, I'm doing the same thing you are. You can see some code that makes it happen at http://tech.groups.yahoo.com/group/flexcoders/message/86441
However, you'll run into the same problem I am : ( H --- In [email protected], "mubasherhaneef" <[EMAIL PROTECTED]> wrote: > > I have a question regarding opening of tree branch node; > > In a tree, a branch node can contain multiple child nodes, and, by > default, appears as a folder icon with a disclosure triangle that > lets users open and close the folder but I was trying to open child > node/folder, when user will click either on triangle or on folder > icon. > > I tried the below mentioned code but that expands all the nodes > children of tree instead of expanding one node children; > > Any help, suggestions or code example should be appreciated. > > Regards, > > Mubasher > > > > <mx:Script> > <![CDATA[ > > public function treeChanged(event:Event):void { > selectedNode=Tree(event.target).selectedItem as XML; > > if([EMAIL PROTECTED] == "My node"){ > //myTree.expandItem(treeData,true); > myTree.expandChildrenOf(myTree.dataProvider[0],true); > } > > ]]> > </mx:Script> > > > <mx:XML id="treeData"> > <node label="root Node"> > <node label="My node"> > <node label="myNode1" data="myNode1"/> > <node label="myNode2" data="myNode2"/> > <node label="myNode3" data="myNode3"/> > </node> > <node label="My Profile"> > <node label="Change Password" data="password"/> > <node label="Personal" data="personal"/> > <node label="Contact Info" data="contact"/> > </node> > </node> > </mx:XML> > > <mx:Tree id="myTree" width="100%" height="100%" labelField="@label" > backgroundColor="#BEC7CC" showRoot="true" useHandCursor="true" > dataProvider="{treeData}" change="treeChanged(event)"/> >

