as3 - 预加载 XML 图片库
我有一个图像库类,可以循环加载缩略图和完整图像。然后我将其推入一个数组并使用每个位图创建一个影片剪辑。运作良好。
在这个过程的一部分中,我可以在显示整个图库之前预加载所有图像?
谢谢!
I have an image gallery class that loads thumbnails and full images one-by-one in a loop. Then I push then into an array and create one movie clip with each bitmap. It's working good.
In witch part of this process I can preload all images, before display the entire gallery?
Thanx!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
就我个人而言,我非常喜欢这个令人敬畏的 BulkLoader 库:
或者,如果您想推出自己的解决方案,请在循环时将事件侦听器添加到
notification. In the handler for this event increment a counter; once this counter equals the number of elements you've loaded all your assets.
伪代码:
Personally I'm a huge fan of the awesome BulkLoader library:
Alternatively, if you want to roll your own solution, as you loop through, add an event listener to the
notification. In the handler for this event increment a counter; once this counter equals the number of elements you've loaded all your assets.
Pseudo-code: