A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Disable Error Popup

  1. #1
    a.k.a gltovar deadlock32's Avatar
    Join Date
    May 2001
    Location
    Naperville,IL
    Posts
    489

    Disable Error Popup

    Hey guys, Is there code to disable an 'an actionscript error has occured' popup window? Not for ever movie, but for specific movies?

  2. #2
    half as fun, double the price senocular's Avatar
    Join Date
    Feb 2002
    Location
    San Francisco, CA (USA)
    Posts
    4,361
    If you're talking about the runtime error messages, the SWF would have to be programmed to catch those errors before they reached the player, otherwise they're going to happen. You will only see them during playback if you're using the debug version of the Flash player. Installing the release version will not show those messages.

  3. #3
    a.k.a gltovar deadlock32's Avatar
    Join Date
    May 2001
    Location
    Naperville,IL
    Posts
    489
    thanks again = ]

  4. #4
    a.k.a gltovar deadlock32's Avatar
    Join Date
    May 2001
    Location
    Naperville,IL
    Posts
    489
    just updating this as well:
    yeah as I found out you are able to catch any error. As long as you catch it, (you dont have to do anything about it) it wont set off those annoying pop ups.

    example catching all 'Loader' object errors:
    PHP Code:
    package
    {
        
    import flash.display.Sprite;
        
    import flash.display.Loader;
        
        
    import flash.net.URLLoader;
        
    import flash.net.URLRequest;
        
    import flash.events.*;

        public class 
    Image extends Sprite {
            public var 
    loader:URLLoader;
            public var 
    request:URLRequest;
            public var 
    picloader:Loader;
            public var 
    requeststring:String;
            
            public function 
    Image(rqst:Stringx:Numbery:Number) {
                
    loader = new URLLoader();
                
    picloader = new Loader();
                
    addChild(picloader);
                
    picloader.x=x;
                
    picloader.y=y;
                
    configureListeners(picloader.contentLoaderInfo);
                
    requeststring rqst;
                
    request = new URLRequest();
                
    loadFromFileSystem();
            }
            
             private function 
    configureListeners(dispatcher:IEventDispatcher):void {
                
    //dispatcher.addEventListener(Event.COMPLETE, errorHandler);
               // dispatcher.addEventListener(HTTPStatusEvent.HTTP_STATUS, errorHandler);
               // dispatcher.addEventListener(Event.INIT, errorHandler);
                
    dispatcher.addEventListener(IOErrorEvent.IO_ERRORerrorHandler);
                
    //dispatcher.addEventListener(Event.OPEN, errorHandler);
                //dispatcher.addEventListener(ProgressEvent.PROGRESS, errorHandler);
               // dispatcher.addEventListener(Event.UNLOAD, errorHandler);
            
    }

            
            private function 
    loadFromFileSystem():void {
                
    request.url requeststring;
                
                
                
    picloader.load(request);
                
                
    //loader.load(request);
            
    }

            private function 
    loadFromNetwork():void {
                
    trace("damnit load default");
                
    request.url "http://www.foobar.com/icon_default.gif";
                
    picloader.load(request);

            }
            
            private function 
    errorHandler(event:ErrorEvent):void {
                
    trace("You Errored");
                
    loadFromNetwork();
            }
        }


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center