taskinoor
taskinoor

Reputation: 46037

Chrome AS3 URLLoader different behavior on network error

In Chrome upon network error, the event object in error handler is behaving differently than IE and flash player (i.e. directly running the swf, not from the browser). Consider the following test code :

private function loadData():void {
    var loader:URLLoader = new URLLoader();
    loader.addEventListener(IOErrorEvent.IO_ERROR, onError);
    loader.addEventListener(Event.COMPLETE, onColmplete);
    loader.load(new URLRequest("http://www.jsfbjdsssde.com"));
    debugField.text = "loading";    // this is a TextField
}

private function onColmplete(evt:Event):void {
    debugField.text = "complete";
}

private function onError(evt:IOErrorEvent):void {
    debugField.text = "error : " + evt.text;
}

In IE and flash player, debugField shows

error : Error #2032: Stream Error. URL: http://www.jsfbjdsssde.com
but in Chrome it is
error : Error #2032
That is URL is stripped from the text. Why this is different? Anyone can suggest any way to get the URL in error handler? Or is this a bug of Chrome itself?


My Chrome version is 5.0.375.86

Upvotes: 0

Views: 1364

Answers (1)

Juan Pablo Califano
Juan Pablo Califano

Reputation: 12333

I have not checked this, but it's quite likely that you have the release version of the flash plugin installed in Chrome (instead of the debug version). Debugging output is less verbose in the release player.

Upvotes: 3

Related Questions