10 资源分离部署

有时间项目过大,swf20M+,怎么把资源分开部署到2个服务器上。

请先 登录 后评论

最佳答案 2018-08-14 16:54

annie.loadScene

 

(
  •  
  • sceneName  
  • progressFun  
  • completeFun  
  • domain 
)     domain就是设置CDN路径的。你可以分开多个加载,domain就可以设置不同路径,  api:http://api.annie2x.com/api2x/classes/annie.html#method_annie.loadScene
请先 登录 后评论

其它 3 个回答

烈鸟 - 前端开发/越野跑爱好者/弹吉他

可以指定跨域获取资源,如:

                Flash2x.loadScene("load",function(per){

                    //加载进度

                },function(result){

                    if(result.sceneId==result.sceneTotal) {

                        loadPage = new load.Load();

                        stage.addChild(loadPage);

                        App.loadScene();

                    }

                }, "http://www.xxxx.cn/xxxx");

请先 登录 后评论
皮卡丘先生 - 交互动画课件制作
请先 登录 后评论
风之伤 - 程序员

通过设置domain加载时要设置的url前缀,默认则不更改加载路径

annie.loadScene

sceneName ,

progressFun ,completeFun ,domain ) 

如下:

annie.loadScene("A1",function(){},function(){},"url1")
annie.loadScene("A2",function(){},function(){},"url2")

请先 登录 后评论
  • 4 关注
  • 0 收藏,1384 浏览
  • 彭飞 提出于 2018-08-14 16:51

相似问题