xin's blog

Just have a little faith.
  首页  :: 管理

Flex在Main类中stage为空

Posted on 2010-10-31 00:34  greatxin  阅读(1122)  评论(0)    收藏  举报

解决办法:

  1侦听addToStage事件, 在Application标签中有addToStage, 不要再createComplete中侦听, 因为addToStage事件先于createComplete会导致侦听不起作用。在addToStage事件处理器中可以直接通过this.stage获取到舞台对象。

  2直接通过this.systemManager.stage获取舞台对象