[英]Referencing problem when adding callbacks to Exernal Interface in Flash/ActionScript3
[英]In actionscript3, is it safe to stop my flash application when UncaughtErrorEvent occured?
当发生意外的异常时,我想删除所有DisplayObject并显示错误消息以告诉用户程序已崩溃。
使用UncaughtErrorEvent这样做安全吗?
即使我使用UncaughtErrorEvent来停止应用程序也可以停止它吗?
当然可以。
root.loaderInfo.uncaughtErrorEvents.addEventListener(UncaughtErrorEvent.UNCAUGHT_ERROR, onUncaughtError);
private function onUncaughtError(e:UncaughtErrorEvent):void
{
// Do something with your error.
}
但是请注意,我相信这是Flash Player 10.1及更高版本的功能。 这应该不是大问题,因为通常每当发布新的Flash Player版本时,人们就会被迫进行更新。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.