In this post I explain how I managed to fix the corrupt file and get it to work again.
It is useless to say how I got "disappointed" by loosing days of work...
I am not the only one with this problem. Most people had it converting a file from CS4 to CS5, but to me it is a brand new shiny CS5 project...
What happens is that for some reason flash messes up things while saving xml descriptors of library items, and the result is a corrupt file.
So, here's a step by step solution to bring your file back to life...
I assume that you are in my same situation: all of a sudden a saved fla or xfl file cannot be opened anymore, and you get that "Flash can not parse this document." message.
- Make a backup copy of your file.
- If the file is in fla format, rename it from .fla to .zip, and unzip it (it will create a folder structure just as if saved in xfl format)
- Now, open the xfl file inside the unzipped folder, and you will get the same error.
- You will notice the LIBRARY folder. This is a hierarchical representation of your library. Go into it.
- In my case, and most cases, the error is in one of the library items which Flash doesn't like. So, what you have to do, is delete one by one, or in groups, some library items, and then try to open the xfl again.
- My library is paranoid ordered, so for me I had just to delete home folders going deeper and deeper, and it was easy to track the guilty library item. If you assets are all in the library root... it will take you a bit more time.
- Everytime you delete a group of items, you have to try to relaunch the xfl file. When the right item is deleted, the file will open!!! So just continue the hunt untill you find the item or items which are causing the problem.
- If those were unimportant items, then you can happily continue to work on your file which works again! And re-create those items.
- If the items you had to delete were important, then instead of deleting them, mess around with the item XML untill you manage to delete the nodes causing the problem (the XML is quite easy to read and self-explanatory, so you will mostly know what you are attempting to do)
- If you manage to remove or fix all problematic items: Et voila!!! The file is working again!
Reading around, it seems that after converting from CS4 to CS5, library items which contain empty frames can cause this problem (it wasn't my case). So, most likely you will have to check nodes looking like this:
<DOMFrame index="0" keyMode="9728">
In my file, it was a reference to a FLVPlayback component which caused the error. So I had to remove the complete <DOMCompiledClipInstance> node and all of its contents (no, changing parameters or deleting just bindings simply didn't work).
Love and light