5005: Unknown error optimizing byte code

This is a really “interesting” error message that Flash throws in the Output panel and unfortunately there is no other explanation accompanying the message. At Jumpeye we’ve had to deal a few times with this error message which seems to be generated whenever working with large .fla files that make use of rather large amounts of code.

The solution would be to turn off the Optimizer and then recompile. You can turn the Optimizer off from the Publish Settings dialog box, select Settings for the “ActionScript 3.0″ option and in that dialog box disable the “Reduce file size and increase performance” option. You can do this whenever you are working on a very large project and get this error message. In the rest of the cases, you should leave this option checked.

Another solution I’ve found on the web (didn’t test it) is to delete the .aso files generated by Flash (Control -> Delete ASO Files) .