Flickr changes its cross domain policy and allows Flash applications to load images from Flickr server and to modify bitmap data of the images. The new cross domain ploicy file(http://static.flickr.com/crossdomain.xml) lets Flash applications on any servers to access Flickr images.
Before the change, you can load images from Flickr server. But, you can not access the bitmap data of the images and can not make bitmap data using BitmapData.draw() method. Now, it is possible.
To access the bitmap data, you have to set LoaderContext.checkPolicyFile to true.
플리커가 플래시 어플리케이션에서 플리커의 이미지를 로드하는 것은 물론 비트맵데이터도 제어가 가능하도록 크로스 도메인 정책을 오픈하였습니다. 새로운 크로스 도메인 정책 파일(http://static.flickr.com/crossdomain.xml)은 모든 서버의 플래시 어플리케이션에서 접근이 가능하도록 바뀌었습니다.
이전에는 이미지를 로드하더라도, 비트맵데이터를 가공하거나 BitmapData.draw() 메소드를 이용하여 이미지를 비트맵데이터로 변환할 수 없었지만, 이제 가능하게 되었습니다.
그러나 다른 서버로 부터 로드된 이미지를 가공하려면, 다음과 같이 AS3에서 LoaderContext.checkPolicyFile 설정을 해주어야 합니다.
Flickrはクロスドメイン政策を変更して、フラッシュアプリケ―ションがFlickrサ―バ―のイメージをダウンロードしてBitmapDataを改めることができました。新たなクロスドメイン政策ファイル(http://static.flickr.com/crossdomain.xml)はあらゆるサーバーからのアクセスを許します。
以前には、Flickrサーバーからイメージをロードしても、BitmapDataを修正することとBitmapData.draw()メソッドを使ってBitmapDataを作ることはできなかった。今なら出来ます。
BitmapDataにアクセスするためには、LoaderContext.checkPolicyFile設定をしなければならないんです。
1
2
3
4
| public var context:LoaderContext;
context = new LoaderContext();
context.checkPolicyFile = true;
loader.load(loaderUR, context); |
via Flickr: Now Even More Flash-friendly