加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

[AS3]Flash AS3 Bulk Loader跨域加载(CrossDomain)

发布时间:2020-12-15 07:15:45 所属栏目:百科 来源:网络整理
导读:原文:http://www.markomedia.com.au/as3/load-files-from-amazon-s3-into-flash-using-as3-bulk-loader/ I had a go at loading some assets from Amazon S3 with AS3 bulk loader and ran into trouble. Generally I specify loader context when I load f
原文:http://www.markomedia.com.au/as3/load-files-from-amazon-s3-into-flash-using-as3-bulk-loader/
I had a go at loading some assets from Amazon S3 with AS3 bulk loader and ran into trouble. Generally I specify loader context when I load files from external source,but I thought Bulk Loader handled it all internally. ?After browsing the source code I found out that you can pass the LoaderContext into each loading item.

You can specify LoaderContext for each BulkLoader item like so:
var context:LoaderContext = new LoaderContext(true,ApplicationDomain.currentDomain,SecurityDomain.currentDomain);
var loader:BulkLoader = new BulkLoader("myBulkLoaderInstance");
loader.add( amazonS3Domain,{ context: context ?} );

Thanks to Trevor Hartman for this snippet.

Also “Using Amazon S3 with Adobe Flash and Microsoft Silverlight” article has some useful tips on this topic as well as crossdomain policy files.

I haven’t tried using this technique to load files from other APIs such as Facebook,so I’d imagine you’d have to follow the same approach.

Marko

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读