Here is a simple example of an URLLoader
.
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest("http://example.com/doesntexist.txt");
loader.addEventListener(IOErrorEvent.IO_ERROR, function(e:IOErrorEvent){
textbox.text = e.toString(); // Text box on stage
});
loader.load(request);
This behaves weirdly.
When running from Flash or debugging from Flash, the error looks like this.
[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032: Stream Error. URL: http://example.com/doesntexist.txt"]
But, when running as a .swf
or an .exe
projector, it looks like this.
[IOErrorEvent type="ioError" bubbles=false cancelable=false eventPhase=2 text="Error #2032"]
Why is this so? Is there a way to get the first result when standalone?
EDIT: I need to get it working as a projector.