Pergunta

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

Foi útil?

Solução

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:--->");

        }

Outras dicas

User a Timer to dispatcher your event every 5 seconds.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top