在使用Flex编写AIR程序的时候
访问this.stage总是为null
后来查看了一下,其实
在Flex工程中,只有在
updateComplete() 和 applicationComplete()才会改变stage的值
所以,至少要在applicationComplete执行完后才可以访问
但是也可以通过
this.systemManager.stage来访问
具体顺序可见
http://www.wietseveenstra.nl/blog/2007/02/understanding-the-flex-application-startup-event-order/
访问this.stage总是为null
后来查看了一下,其实
在Flex工程中,只有在
updateComplete() 和 applicationComplete()才会改变stage的值
所以,至少要在applicationComplete执行完后才可以访问
但是也可以通过
this.systemManager.stage来访问
具体顺序可见
http://www.wietseveenstra.nl/blog/2007/02/understanding-the-flex-application-startup-event-order/
Flex中Stage访问技巧

本文介绍了在使用Flex编写AIR程序时遇到的Stage访问问题及解决方法。通常情况下,在applicationComplete事件之后才能正确访问到Stage。此外,还提供了一个替代方案:通过systemManager.stage访问Stage。
86

被折叠的 条评论
为什么被折叠?



