Flex 4 中的自定义预加载器?
有人在 Flex 4 中成功实现了自定义预加载器吗? 根据我的经验,当我在应用程序标记中使用 preloader="com.foo.MyPreloader" 指定自定义预加载器时,预加载器在 SWF 下载完成之前不会显示,这违背了预加载器的目的! 也许这是仍处于测试阶段的 Flex 4 框架中的一个错误?
Has anyone successfully implemented a custom preloader in Flex 4? In my experience, when I specify a custom preloader using the preloader="com.foo.MyPreloader" in the Application tag, the preloader does not display until the SWF is completely downloaded, defeating the purpose of the preloader! Perhaps this is a bug in the still-beta Flex 4 framework?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我已经在许多 Flex3 项目中使用了这个示例。 它仍然可以与 Flex4 sdk 一起使用:
我记得我从哪里得到它的。 当你说这个脚本不引用任何东西很重要时,你是对的......
CustomPreloader
LoadScreen
I've been using this example in many Flex3 projects. It's still working with Flex4 sdk:
I can remember where I get it from. And you are right when you say it's important that this script is NOT referencing anything...
CustomPreloader
LoadScreen
我觉得很愚蠢......我从预加载器中引用了我的主要应用程序类之一,从而导致我的所有类都被编译到预加载器中,这意味着在加载所有内容之前它无法显示预加载器。
供将来参考:仔细检查预加载器中的每个参考,确保仅使用绝对必要的内容
I feel dumb...I was referencing one of my main application classes from within the preloader, thus causing all of my classes to be compiled into the preloader, meaning it cannot display the preloader until everything is loaded.
For future reference: Double-check every reference in your preloader, make sure you use nothing more than what is absolutely necessary
这里有一个 Flex 4 自定义预加载器代码示例 http:// www.leavethatthingalone.com/blog/index.cfm/2009/11/11/Flex4CustomPreloader
There is a Flex 4 Custom Preloader code sample here http://www.leavethatthingalone.com/blog/index.cfm/2009/11/11/Flex4CustomPreloader