Flex 3 中的动画 GIF
不管你相信与否,我需要一种在 Flex 3 中显示动画 gif 的方法。这个家伙有一个组件出售,但它仅限于 Flex 2:http://dougmccune.com/blog/2007/01/19/how-to-load-animated- gifs-using-adobe-flex-20/。
我已经实现了这个例子: http://www.bytearray.org/?p=95< /a>,但对于较大的 gif,它会非常占用 CPU 资源并导致 UI 挂起。
有谁知道任何替代解决方案? 如果做不到这一点,我可能不得不考虑重构第二个示例以使用伪线程。 呃。
Believe it or not I need a way of displaying animated gifs in Flex 3. This guy has a component for sale but it's Flex 2 only: http://dougmccune.com/blog/2007/01/19/how-to-load-animated-gifs-using-adobe-flex-20/.
And I’ve implemented this example: http://www.bytearray.org/?p=95, but for larger gifs it’s very CPU intensive and causes the UI to hang.
Does anyone know of any alternative solutions? Failing that, I may have to look at re-factoring the second example to use pseudo-threading. Eugh.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我购买并使用了 mccune 产品,但现在已更改为 Flex 3。我通过搜索与您相同的答案找到了您的问题,并且刚刚遇到了这个
http://flexology.wordpress.com/2008/09/30/loadinganimated_gif_in_flex/
i bought and used the mccune product but have now changed to flex 3. i found your question by searching for the same answer as you and have just come across this
http://flexology.wordpress.com/2008/09/30/loadinganimated_gif_in_flex/
感谢您的回复。 该链接中的 Google 代码项目 (http://code.google.com/p/as3gif/< /a>) 与 bytearray 上的相同 (http://www.bytearray.org/ ?p=95) 我实现了。
我使用这段代码创建了一个快速的伪线程示例,但它太慢了。
看来我需要即时对 GIF 进行 SWF 转换...
Thanks for the response. The google code project in that link (http://code.google.com/p/as3gif/) is the same as the one on bytearray (http://www.bytearray.org/?p=95) which I implemented.
I knocked up a quick pseudo-threading example using this code and it's far too slow.
Looks like I will need to SWF the GIFs on the fly...
这有帮助吗?
编辑:我不知道该建议在较大的 GIF 上效果如何,但如果您仍然遇到问题,则可能值得将 GIF 导入 Flash 并将其转换为自己的 SWF。
Flex 应该能够毫无问题地玩这个游戏。
Does this help?
Edit: I've no idea how well that suggestion works on a larger GIF, but if you're still having issues, it might be worth importing the GIF into Flash and turning it into its own SWF.
Flex should be more than able to play that without any issues.
查看 swfmill 来创建 swf。 我相信他们支持动画 gif 的
http://swfmill.org/
Check out swfmill for going for creating swf's. I believe they support animated gif's
http://swfmill.org/