Question

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

Was it helpful?

Solution

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

        }

OTHER TIPS

User a Timer to dispatcher your event every 5 seconds.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top