BulkLoaderを使用して、画像、SWF、XMLなどをゲームにロードしています。
ローカルで作業する場合、アセットのタイプに応じて、content上のプロパティは常に良好です。画像の場合、SWFの場合などです。LoadingItemBitmapMovieClip
同じswfをテストするとき、ローカルホストまたはオンラインで、contentプロパティは常にLoaderオブジェクトです。
これは正常ですか?パラメータなどが不足していますか?
BulkLoaderを使用して、画像、SWF、XMLなどをゲームにロードしています。
ローカルで作業する場合、アセットのタイプに応じて、content上のプロパティは常に良好です。画像の場合、SWFの場合などです。LoadingItemBitmapMovieClip
同じswfをテストするとき、ローカルホストまたはオンラインで、contentプロパティは常にLoaderオブジェクトです。
これは正常ですか?パラメータなどが不足していますか?
OK、同じ問題を抱えている人のために-ImageLoader、57行目:
override public function onCompleteHandler(evt : Event) : void {
try{
// of no crossdomain has allowed this operation, this might
// raise a security error
_content = loader.content;
super.onCompleteHandler(evt);
}catch(e : SecurityError){
// we can still use the Loader object (no dice for accessing it as data
// though. Oh boy:
_content = loader;
super.onCompleteHandler(evt);
// I am really unsure whether I should throw this event
// it would be nice, but simply delegating the error handling to user's code
// seems cleaner (and it also mimics the Standar API behaviour on this respect)
//onSecurityErrorHandler(e);
}
};
基本的に何が起こっていたのかというと、SecurityError(静かにではありますが)aが発生していて、contentプロパティがLoaderではなく、に設定されていましたLoader.content。
Security.loadPolicyFile()ロードする前に追加することで修正されました。