swfloader 的 SecurityError: Error #2122: Security sandbox violation

来源:互联网 发布:罗升阳 知乎 编辑:程序博客网 时间:2024/06/10 11:59

Main Thread (Suspended: SecurityError: Error #2122: Security sandbox violation: Loader.content: http://localhost/Diplomski/bin/smile_on.swf cannot access http://www.sabljic-apartment.com/Smil/Shared/copyright.gif. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded.)
flash.display::Loader/get content [no source]
mx.controls::SWFLoader/get content
mx.controls::SWFLoader/notifyStyleChangeInChildren
mx.core::UIComponent/notifyStyleChangeInChildren
mx.core::UIComponent/notifyStyleChangeInChildren

当用swfloader来访问加载进来的content的时候,一直会报完全错误.在网上查了一下.说是一个bug ,然后说是可以:

package{
class SWFLoaderBugFix extends SWFLoader{
public override function notifyStyleChangeInChildren ():void{}
public override function regenerateStyleCache ():void{}
}
}

但好象我试了一下还是不行.最后只能用loader , 通过调用loader.contentLoaderInfo.width 来访问.