Jump to content

Error #1006 (outra vez): behavior is not a function.


Damon4hire

Recommended Posts

The TypeError was recognized in the catch(error:TypeError) block, caught, and the script was able to continue normally, but not before finally runs, of course. Though a catch(error:Error) was used here, it was not used because a catch(error:TypeError) was included that correctly matched the error thrown. If the TypeError catch was not there, the Error catch would have been used instead. What about what happens if only the unrelated IOErrorEvent is used?


try {
    var value:* = new Array();
    trace(value.getChildAt(0));
   
} catch(error:IOErrorEvent) {
    trace("IOErrorEvent catch: " + error);
   
} finally {
    trace("Finally!");
}

trace("Continuing with script...");

fonte: http://www.kirupa.com/forum/showthread.php?p=1957523

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.