Chart Flex


    creationComplete="initTimer()">
    
        
            import mx.collections.ArrayCollection;
            
            [Bindable]
            public var myCollection:ArrayCollection = new ArrayCollection();
            
            public function initTimer():void
            {
                var myTimer:Timer = new Timer(1000, 0);
                myTimer.addEventListener(TimerEvent.TIMER, timerHandler);
                myTimer.start();
            }
            
            public function timerHandler(event:TimerEvent):void
            {
                var o:Object = {};
                o.number = Math.random() * 100;
                myCollection.addItem(o);
            }