StartUp event Order
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" preinitialize="applicationPreInitHandler(event)" initialize="applicationInitHandler(event)" childAdd="applicationChildAddHandler(event)" applicationComplete="applicationCompleteHandler(event)" layout="absolute"> <mx:Script> private var counter:Number = 0; [Bindable] private var eventLogArray:Array; private function applicationPreInitHandler(event:Event):void { eventLogArray = new Array(); var eventString:String = counter++ +" application ("+ event.target +"): "+ event.type; eventLogArray.push(eventString); } private function applicationInitHandler(event:Event):void { var eventString:String = counter++ +" application ("+ event.target +"): "+ event.type; eventLogArray.push(eventString); } private function applicationChildAddHandler(event:Event):void { var eventString:String = counter++ +" application ("+ event.target +"): "+ event.type; eventLogArray.push(eventString); } private function applicationCompleteHandler(event:Event):void { var eventString:String = counter++ +" application ("+ event.target +"): "+ event.type; eventLogArray.push(eventString); myList.dataProvider = eventLogArray; } private function eventHandler(event:Event):void { var eventString:String = counter++ +" "+ event.target +" : "+ event.type; eventLogArray.push(eventString); } </mx:Script> <mx:Canvas id="myCanvas" width="100%" height="100%" preinitialize="eventHandler(event)" initialize="eventHandler(event)" creationComplete="eventHandler(event)" childAdd="eventHandler(event)" add="eventHandler(event)" > <mx:List id="myList" width="500" height="300" preinitialize="eventHandler(event)" initialize="eventHandler(event)" creationComplete="eventHandler(event)" add="eventHandler(event)" /> </mx:Canvas> </mx:Application>