-
a.k.a gltovar
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?
-
half as fun, double the price
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.
-
a.k.a gltovar
-
a.k.a gltovar
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:String, x:Number, y: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_ERROR, errorHandler);
//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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|