2010年5月5日 星期三

Lift Cycle , 元件生命週期與應用程式週期


§元件生命週期與應用程式週期
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009
  xmlns:s="library://ns.adobe.com/flex/spark
  xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
  preinitialize="application1_preinitializeHandler(event)"
  initialize="application1_initializeHandler(event)"
  creationComplete="application1_creationCompleteHandler(event)"
  applicationComplete="application1_applicationCompleteHandler(event)"
  >
<s:layout>
<s:BasicLayout/>
</s:layout>
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
import mx.managers.SystemManager;
override protected function createChildren():void
{
 //用來將子物件貼附置容器中
 super.createChildren();
 trace("//---------------------------------------------------");
 trace("//createChildren");
 trace("//---------------------------------------------------");
 trace("");
}