vijayakumar flex
vijayakumar flex

Reputation: 583

is it possible to expand all nodes in flex tree using timer?

    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

Answers (1)

Mattias
Mattias

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

Related Questions