Throwing an error in ActionScript and catching it with JavaScript
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.
精彩评论