开发者

Throwing an error in ActionScript and catching it with JavaScript

开发者 https://www.devze.com 2023-01-01 18:36 出处:网络
I am using th开发者_如何学Ce ExternalInterface to communicate between Flash and JavaScript using callbacks and the call method. I would like to throw an exception in ActionScript 3.0 and catch it in J

I am using th开发者_如何学Ce ExternalInterface to communicate between Flash and JavaScript using callbacks and the call method. I would like to throw an exception in ActionScript 3.0 and catch it in JavaScript and I was please wondering if there was anyway to do that?

Thank you very much, Rudy


Should be something like:

try {
     // statements
} catch (error:Error) {
     ExternalInterface.call(functionsName, error.message);
}

Where functionsName is the function that will get the error as a parameter.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号