It's probably something stupid, but my Google-foo that's failing me:
Working with a flash.display.Loader and intentionally passing in a url
that's invalid so I can trap 404's. I'm working in Firefox, chrome and IE6,
and FF and IE recover from the 404 (FF doing console traces that bear out
what's happening). However, Chrome is displaying a browser-generated error
in the console, and stops all execution in the flash player. Here's the
slightly-made-up code:
private function init_overlay( )
{
_overlay = new Loader( ) ;
this.addChild( _overlay ) ;
this._overlay.contentLoaderInfo.addEventListener( Event.INIT ,
onOverlayLoaded ) ;
this._overlay.contentLoaderInfo.addEventListener( IOErrorEvent.IO_ERROR,
onOverlayError ) ;
this._overlay.contentLoaderInfo.addEventListener(
HTTPStatusEvent.HTTP_STATUS, onOverlayHTTPStatus ) ;
this._overlay.contentLoaderInfo.addEventListener(
SecurityErrorEvent.SECURITY_ERROR, onOverlaySecurityError ) ;
try{
this._overlay.load( new URLRequest( Configuration.overlay ) ) ;
} catch(e:Error){
js.Log("TRY-CATCH")
}
}
private function onOverlayLoaded( event:Event )
{
js.Log( "Status is OK" ) ;
}
private function onOverlayError( event:Event )
{
js.Log("IOError" ) ;
}
private function onOverlayHTTPStatus( event:HTTPStatusEvent )
{
js.Log("Status is " + event.status) ;
}
private function onOverlaySecurityError( event:SecurityErrorEvent )
{
js.Log("Security Error") ;
}
Firefox traces "IOError" as you'd expect, IE doesn't trace, but the real
code in onOverlayError recovers from the error and continues. Chrome traces
"Failed to load resource: the server responded with a status of 404 (Not
Found)" and stops dead. Anyone see what I'm missing, or is this a known
issue?
Jer
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders