Aloran
30.04.2010, 10:27
Гружу по нижеприведенному коду картинку, при этом специально убираю файл политики. Но все равно вылазит окно с ошибкой, несмотря на то что я подписался на данный вид события.
Так должно быть? Как сделать так что бы это окно не вылазило?
package {
import flash.display.Sprite;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.SecurityErrorEvent;
public class SecurityErrorEventExample extends Sprite {
public function SecurityErrorEventExample() {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
var request:URLRequest = new URLRequest("http://www.myDomain.com/my.jpg");
loader.load(request);
}
private function securityErrorHandler(event:SecurityErrorEvent):void {
trace("securityErrorHandler: " + event);
}
}
}
Так должно быть? Как сделать так что бы это окно не вылазило?
package {
import flash.display.Sprite;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.SecurityErrorEvent;
public class SecurityErrorEventExample extends Sprite {
public function SecurityErrorEventExample() {
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_ERROR, securityErrorHandler);
var request:URLRequest = new URLRequest("http://www.myDomain.com/my.jpg");
loader.load(request);
}
private function securityErrorHandler(event:SecurityErrorEvent):void {
trace("securityErrorHandler: " + event);
}
}
}