Saturday, June 19, 2010

You cannot debug this SWF because it does not contain ActionScript

Upgrading from Flash CS4 to CS5 ran into great wall of china again 8O .. really man.. I know web is full of posts from people running into this problem then why the hell can't Adobe just make the error message a little less misleading :roll: ... most common reason for this is the code behind is so big that the compiler is running out of memory while compiling the movie.


In case of CS4, the solution can be found here while for CS5, it is slightly different.

WIN:

1. Quit Flash
2. In a text editor, open the jvm.ini file from the following location:

2.1. Windows XP: System Hard Disk\Documents and Settings\<user>\Local Settings\Application Data\Adobe\Flash CS5\<language>\Configuration\ActionScript 3.0\jvm.ini
2.2. Windows Vista or Windows7: System Hard Disk\Users\<user>\AppData\Local\Adobe\Flash CS5\<language>\Configuration\ActionScript 3.0\jvm.ini


(You might need to turn on "show hidden files")
3. Change -Xmx128m to -Xmx256m and save the file.  This line specifies the amount of heap space the core ActionScript 3.0 compiler should allocate for compiling.
4. Relaunch Flash and compile
5. If that doesn't work, try changing the value to 512m

MAC:
1. Quit Flash
2. In a text editor, open the jvm.ini file from the following location:
/Users/<user>/Library/Application Support/Adobe/Flash CS5/<language>/Configuration/ActionScript 3.0/jvm.ini
3. Change -Xmx128m to -Xmx256m and save the file.  This line specifies the amount of heap space the core ActionScript 3.0 compiler should allocate for compiling.
4. Relaunch Flash and compile
5. If that doesn't work, try changing the value to 512m

Of course, you may encounter this same error due to some other reason as well like not including a UI component in the library which us being used in the project.

2 comments:

  1. Here's a workaround that worked for me:

    Place your document class in the directory as the FLA and the FLA seems to compile fine. I've contacted Adobe Support about this problem I'll keep you posted.

    ReplyDelete
  2. So what's the cause of this "error" in CS5? I had this occur with a small project with about 15 classes, most of which were only about 30 lines of code. I highly doubt that the compiler was exhausting memory for this project, I've compiled massive projects in the past with CS4 with no issues at all.

    Any ideas? Thanks for the info by the way.

    ReplyDelete