Nov 232010

I just ran into good ol’ Flash Error #2136. Here’s the entirety of the error message you get, not at compile time, but at runtime:

Error #2136: The SWF file contains invalid data.

What data exactly is invalid? LOL, as if!

I tried googling the error, and it gives a whole bunch of advice on how to disable a document class, or how you shouldn’t export SWCs with wacky options, or all sorts of other nonsense that doesn’t apply to me. Most seems to have been written years ago. Which kinda tipped me off…

Here’s what worked for me:

  • Flash: File > New > Flash AS3.0 File
  • Copy the entire “library” from your old FLA
  • Paste the entire “library” to the new FLA

That should resolve all your problems. I spent a good 4 hours on it. All the settings between the two files for the same; the only thing different was the original file used to be a CS3 file and the new file is natively CS4.

I hope this helps save someone else some time.

  8 Responses to “Flash Error #2136: Oh joy”

Comments (8)
  1. So, not so much as conquered as bypassed? Did you ever figure out the root cause of the error? Maybe some malformed data describing the file when it’s made in CS3? Or is there some kind of deprecated data in there causing future versions of Flash to choke?

  2. My last sponsor barely believed me when I encountered a phantom bug that just shouldn’t have been happening. (Buttons stopped working while using correct code. The solution was to change them to movie clips, even though for all intents and purposes there should have been no need.) Flash sucks sometimes!

  3. That is one of my favorites.
    This still happens in CS5 too.
    But why? Why does it happen!?

  4. @Akoi & @Rob: I really wish I knew what caused the problem. In true Adobe form, there was no explanation of the Error, and all their internal resources say it has something to do with AS2 (even though there’s no AS2 involved in my project…)

  5. Hey Andy,

    Have you tried the FlashDevelop instead of Flash? I mean, as a coder myself I found the FD’s code editor more friendly, compared to the CS4′s one. I haven’t seen the CS5 editor, though, so it might have got better.

  6. I do use FlashDevelop :)

    I still have to touch the occasional FLA for the art assets, but all my code is done in FD.

  7. I ran into a similar problem using the CS3 compiler. It would result in a VerifyError (#1021) and basically dump the stack (not in a stack trace) to the output window, see similar here: (my comment is last on the thread).

    The only thing I could figure was that the compiler itself was generating invalid bytecode. What the hell is up with that?

  8. To fix this error I added .as after the class name in the property panel of the .fla file.

Sorry, the comment form is closed at this time.