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.combut in Chrome it is
error : Error #2032That 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