PDA

View Full Version : Stage Error Handling


Fragarach 87
06-23-2008, 02:51 PM
I've been working on this large project for the last three months and I'd like to introduce some error handling. The application's front end is written entirely in Actionscript 3.0 and there is nothing on the stage in Flash CS3. Basicly I have one class that controls all of the main functions of the application with each section of the application being its own class that is called/created by the top level class. So I'd like to do all my error handling at this level the very top of the application. But for some reason the error handler is not called. I'm listening for IOErrorEvent.IO_ERROR in one instance with useCapture set to true.

stage.addEventListener(IOErrorEvent.IO_ERROR,error Handler,true);
stage.addEventListener(SecurityErrorEvent.SECURITY _ERROR,errorHandler,true);
stage.addEventListener(AsyncErrorEvent.ASYNC_ERROR ,errorHandler,true);
stage.addEventListener(ErrorEvent.ERROR,errorHandl er,true);

None of these events ever fire, anyone have any ideas? Oh and below is the method the event listeners are supposed to call, I plan to do something else once I get it to be called.

private function errorHandler(err:*):void {
trace('ERROR');
}