Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1556194
  • 博文数量: 347
  • 博客积分: 9328
  • 博客等级: 中将
  • 技术积分: 2680
  • 用 户 组: 普通用户
  • 注册时间: 2010-07-29 23:45
文章分类

全部博文(347)

文章存档

2016年(1)

2013年(4)

2012年(207)

2011年(85)

2010年(50)

分类: Delphi

2012-04-18 21:25:39

原文:
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
阅读(1947) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~