简体   繁体   English

Adobe AIR加载问题

[英]Adobe AIR loading problem

I have a really annoying intermittent issue when loading a series of assets using the Loader class in AIR 1.5. 使用AIR 1.5中的Loader类加载一系列资产时,我遇到了一个非常烦人的间歇性问题。

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. 我正在创建我编写的幻灯片的四个实例,并且可以正常运行9/10次,但是有时一两个幻灯片会失败,我发现它只会在这种情况下停止加载图像,也许会加载其中一半,即使使用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? 即使在AIR中,是否也应该始终按顺序加载?

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. 因此,请使用顺序加载管理器,也许让它使用多个加载线程来完成整个序列,但不要超过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. 我认为它之所以断断续续是因为速度变化,如果速度足够快,您就可以加载所有内容,但是一旦速度变慢一点,您就会失败。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM