Adobe AIR 加载问题

发布于 2024-10-25 20:36:02 字数 248 浏览 7 评论 0原文

在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不打扰别人 2024-11-01 20:36:02

是的,一定要尽量避免并行加载,除非您可以控制可以运行的并发线程数。因此,请使用顺序加载管理器,并可能让它使用多个加载线程来完成该序列,但不要超过 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文