Reputation: 583
private function openAllNodes(event:TimerEvent):void {
//Alert.show(event.target.currentCount);
var index:int =event.target.currentCount - 1;
myTree.openItems = treeData..node[index] ;
}
public function start_timer():void
{
timer.start();
}
private function closeAllNodes():void {
myTree.openItems = [];
}
public var timer:Timer = new Timer(1000,19);
public function init():void
{
timer.addEventListener(TimerEvent.TIMER, openAllNodes);
}
In my project I want to show the video like growing flex tree. So I tried flex timer based to expand node one by one. But if I open the first node then automatically close second time. If there is any other way to expand nodes one by one then let me know.
Upvotes: 0
Views: 715
Reputation: 3907
If you could post your dataProvider it will be easier to determine the best approach for your problem. Of the top of my head I think you could use the method expandItem() and pass in the the item using for example (@id==index).
Upvotes: 2