My flash file wasn't so big (FLA file - 2Mb and the exported SWF file - 193kb).
I was using some Jumpeye components, so I was thinking they may be adding some extra code.
Jumpeye have posted very useful article about this problem:
"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."
This posting describes different solutions. It took me some time to figure out which one works and which one doesn't. To help save your time, I decided to summarize both - the solutions and the results.
1. Uncheck “Reduce file size and increase performance” in Publish Settings/ Actionscript3 settings - unfortunately it is only in CS3 but not in CS4.
2. Control / “Delete ASO Files” - Didn’t work
3. File / “Save and Compact” - Didn’t work
4. “Increase java VM heap memory size” - WORKED!!!
To do that in Windows: right click on my computer -> properties -> advanced -> environment variables -> make a new variable:
and add this value:
Then log out or restart.
There was an issue when I opened Flash CS4 after the restart. I got the message:
“Error initializing Java Runtime Environment. You may need to reinstall Flash.”
I had to change the value from -Xmx1024M to -Xmx256M (or -Xmx128M). A value of -Xmx512M and higher causes every time the error “Error initializing JRE. You may need to reinstall Flash”.
After I set up the variable "JAVA_TOOL_OPTIONS" with value "-Xmx256M" everything started working fine.