Components Flex


    
    xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:s="library://ns.adobe.com/flex/spark"
    initialize="init()" height="700">
    
        
    

     
        [Bindable] 
        public var dp:Array = [ 
            {food:"apple", type:"fruit", color:"red"}, 
            {food:"potato", type:"vegetable", color:"brown"}, 
            {food:"pear", type:"fruit", color:"green"}, 
            {food:"orange", type:"fruit", color:"orange"}, 
            {food:"spinach", type:"vegetable", color:"green"}, 
            {food:"beet", type:"vegetable", color:"red"} 
            ]; 
        public var sTime:Number; 
        public var eTime:Number; 
        public var pTime:Number; 
        private function init():void { 
            f1.addEventListener("preinitialize", logPreInitTime, true); 
            f1.addEventListener("creationComplete", logCreationCompTime, true); 
        } 
        private var isFirst:Boolean = true; 
        private function logPreInitTime(e:Event):void { 
            // Get the time when the preinitialize event is dispatched. 
            sTime = getTimer(); 
            trace("Preinitialize time for " + e.target + ": " + sTime.toString()); 
        } 
        private function logCreationCompTime(e:Event):void { 
            // Get the time when the creationComplete event is dispatched. 
            eTime = getTimer(); 
            /* Use target rather than currentTarget because these events are 
            triggered by each child of the Form control during the capture 
            phase. */ 
            trace("CreationComplete time for " + e.target + ": " + eTime.toString()); 
        }