Flex启动顺序

Flex启动顺序
<mx:Application>
  <mx:Canvas id="canvas" width="100%" height="100%">
      <mx:List id="list" width="500" height="300"/>
  </mx:Canvas> 
</mx:Application>

0  application: preinitialize
1  application: childAdd
2  application.canvas : add
3  application.canvas : preinitialize
4  application.canvas : childAdd
5  application.canvas.COMPONENT : add             //组件是先被添加,然后该组件才开始初始化
6  application.canvas.COMPONENT : preinitialize   //
7  application.canvas.COMPONENT : initialize
8  application.canvas : initialize
9  application: initialize
10 application.canvas.list : creationComplete
11 application.canvas : creationComplete
12 application: applicationComplete


事件说明:
add: 组件被添加到容器上(addChild, addChildAt)时发出
preinitialize: 预初始化时发出
initialize: 完成构造,所有属性都被设置完成后发出
creationComplete: 完成构造,属性,测量,布局,绘制后发出
applicationComplete: Dispatched after the Application has been initialized, processed by the LayoutManager, and

attached to the display list.


=======================其他==========================
uicomponent.updateComplete : Dispatched when an object has had its commitProperties(), measure(), and

updateDisplayList() methods called (if needed).
当commitProperties(), measure(), and updateDisplayList()被调用时派发

updateDisplayList:
updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Draws the object and/or sizes and positions its children.
绘制对象的子对象的大小,位置.
不可以直接调用该方法。 当该组件被通过addChild方法添加到容器上 或 组件的invalidateDisplayList()方法被调用时,
Flex会调用updateDisplayList()方法

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值