使用 cc.loader.loadImg 下载网络图片导致程序停顿

大家好,我这有个问题。

每次使用 cc.loader.loadImg 下载网络图片,发送 http 请求时,程序就会停顿。

如果同时间使用,停顿时间会累积。

例子 :

for(int i=0; i<imageArray.length; i++)
{
cc.loader.loadImg(imageArray*, {isCrossOrigin : true}, callback);
}

如果说每使用一次 cc.loader.loadImg 会停顿 1秒,那这段会导致程序停顿5秒,不能反应。

请问有什么方法能解决此问题呢?

是否能让 cc.loader.loadImg 在背景处理,不阻碍主线程处理呢?

谢谢你的帮助!*

貌似可以在schedule中处理loading

尝试使用了 scheduleOnce

this.scheduleOnce(this.scheduleLoader, 0.5);

scheduleLoader : function()
{
   for(int i=0; i<imageArray.length; i++)
   {
      cc.loader.loadImg(imageArray, {isCrossOrigin : true}, callback);
   }
}

当 schedule 发动时,cc.loader.loadImg 还是会停顿。应该还是使用着主线程。

但至少转换页面时能显示页面后再加载网络图片。

Cocos2d-JS 支不支持 背景处理 与 多线程处理?