Ok this simple script that I made
try {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, loadedPicture);
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
loader.load(new URLRequest("http://msnbcmedia1.msn.com/j/msnbc/Components/Photo_StoryLevel/080429/080429-sadr-city-6a.hmedium.jpg"), new LoaderContext(true));
} catch(е) {
error_txt.appendText("ERROR! ");
}
function loadedPicture(info:Event):void {
error_txt.appendText("NOPE ");
addChild(info.target.content);
}
function errorHandler(info:IOErrorEvent):void {
error_txt.appendText(" IO proxy");
}
function securityErrorHandler(info:SecurityErrorEvent):void {
error_txt.appendText(" S proxy");
}
Like you see I’m trying to catch the SecurityError error, but I cannot catch it, it appears again:
SecurityError: Error #2123: Security sandbox violation: LoaderInfo.content: http://www.blablablabla.com/loading.swf cannot access MSN. No policy files granted access.
at flash.display::LoaderInfo/get content()
at loading_fla::MainTimeline/loadedPicture()
Is it not supposed to catch it with try…catch??? When I run only NOPE appears in error_txt. Any ideas how I catch this error?