Adobe AIR 加载问题
在 AIR 1.5 中使用 Loader 类加载一系列资源时,我遇到了一个非常烦人的间歇性问题。
我正在创建我编写的幻灯片的四个实例,9/10 次它可以工作,但时不时地有一两个幻灯片会失败,我发现发生这种情况时它只是停止加载图像,可能会加载一半,即使我使用 try 和 catch,也没有报告运行时错误。
所有图像都是按顺序加载的,但幻灯片是并行的,我在想也许这就是问题所在?有人遇到过并行加载的问题吗?即使在 AIR 中,您也应该始终按顺序加载吗?
I have a really annoying intermittent issue when loading a series of assets using the Loader class in AIR 1.5.
I am creating four instances of a slideshow that I written, and 9/10 times it works but every now and then one or two of the slideshows fail and I found that it just stops loading images when that happens, maybe loads half of them, there are no runtime errors reported even though I use try and catch.
All the images are loaded sequentially but the slideshows are in parallel, I am thinking maybe this is the problem? Has anyone had issues with parallel loading? Should you always load sequentially even in AIR?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,一定要尽量避免并行加载,除非您可以控制可以运行的并发线程数。因此,请使用顺序加载管理器,并可能让它使用多个加载线程来完成该序列,但不要超过 2-3 个。
我认为它间歇性的原因是因为速度变化,如果速度足够快,你就可以加载所有内容,但是一旦速度慢一点,你就会加载失败。
Yes, definitely try to avoid parallel loading, unless you have control over how many concurrent threads can run. So use a sequential load manager and maybe let it use multiple loading threads to work through the sequence, but not more than 2-3.
I think the reason why it's intermittent is because of speed variation, if it's fast enough you get everything loaded, but as soon as something is a bit slower you get failed loads.