Search code examples
flashactionscript-3actionscriptflash-cs5urlloader

Catching Flash URLLoader errors


I'm trying to bullet proof a URLLoader and wondering where I need to capture things like 404s and more importantly, mid-session timeouts and connectivity failures.

The app will be run in places where the connectivity is spotty and it is very possible that a connection will initiate correctly, but will die somewhere in the middle. I'm unable to recreate these scenarios in testing and am hoping someone can point me to a comprehensive list of error handling, so that I can anticipate most of the common network failures and handle them.

TIA.


Solution

  • You only need to handle the ioError and securityError events - that will catch all the errors. Timeouts will just eventually produce an ioError.

    You might also want to listen to the httpStatus event to get the HTTP code.