Question

I am developing a Flash game. It has a complex loading scheme which could go wrong at many different places.

When I am testing from Authoring Tool, either with "Test Movie" or "Debug Movie", it always succeeds and starts fine.

However, every time I test it by loading it in a browser, it always fails! I am not sure where to look.

The question is this : is there an easy way to direct all internal errors to a TextField on Stage where I can really check what went wrong? Alternatively, is there any other way to catch and show errors when testing on a browser?

Was it helpful?

Solution

Debug player is a must. It allows you use breakpoints and view your application state (like values of variables and so on) at runtime (if you are using an IDE with a debugger, like Flash Builder ofc). Viewing traces in console window is quite annoying, though, so you can use some external debug utility, for example Monster Debugger. It has some nice features, like highlighting MovieClips (and other DisplayObjects) at runtime.

OTHER TIPS

You can use UncaughtErrorEvent to intercept all internal uncaught errors of a swf through a method.

The best way is to install the debug flash player. There is no way that I know of to direct internal errors anywhere. Apparently there is, see other answer. It's still probably easier to install the debug player however.

You can get the debug player from http://www.adobe.com/support/flashplayer/downloads.html (scroll down a bit).

As for the error itself, there are two common reasons:

  1. If the files are hosted elsewhere, you need a crossdomain file set up
  2. The base url of the flash file is not where you think it is, and thus any relative paths fail to resolve correctly.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top