문제

I have a live chart. I need to refresh the chart with 5 seconds time interval.

For displaying the live chart i disptach the event (myEvent) extends cairngormevent.

And after 5 seconds , the same event has to dispatch again adn get the data to display thelie cart.

And how the event dispatch after 5 seconds with out any manula call..?

Please anyone knows, update me asap. It is very urg for me.

Thanks, ravi

도움이 되었습니까?

해결책

It is working now. This is the way i dispatch the event with time interval.

         private var timer:Timer; 

            private function getChart():void
        {
    var chartEvent:ChartEvent=new ChartEvent();

                chartEvent.dispatch();

        }


         private function setTimer():void {
            timer = new Timer(5000);

            timer.addEventListener(TimerEvent.TIMER, onTimer);
            timer.start();
             CursorManager.showCursor();

         }

        private function onTimer(evt:TimerEvent):void {
            Alert.show("in");

            getChart();

            Alert.show("Dispatching Event:--->");

        }

다른 팁

User a Timer to dispatcher your event every 5 seconds.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top