Skip to main content
Participant
May 14, 2010
Answered

"Flash can not parse this document" - CS5 Issue

  • May 14, 2010
  • 28 replies
  • 143225 views

Help! I have an FLA which CS5 has apparently corrupted on a save... (When you load up the FLA in CS5, it now fails and sends "Flash can not parse this document" to the output window.

Unfortunately I only found the corrupted nature of this file AFTER I had conducted my regular routine of backing up my files - which means the backed up file is ALSO corrupt. I'm shooting in the dark here, but is there any way that the FLA can be recovered? Desperate as this is a project I have worked the last month on.

Any help would be greatly appreciated!

Cheers,

Ben.

    This topic has been closed for replies.
    Correct answer nrajbhan

    Hi,

    We discovered that the file becomes corrupted due to the empty frame in the following asset:

    1. Open the FLA in Flash CS4

    2. Open the Library panel.

    3. Browse to _movieclips & bitmaps/_gui/_menu wheel/Gui_Wheel_ButtonOverlay_On and open it for edit in symbol-mode.

    4. Insert a keyframe in Layer 2 of that movieclip.

    5. Save FLA

    Thanks for sending us your FLA so we could narrow down the problem.

    -Nivesh

    28 replies

    Participant
    September 24, 2010

    Hi All,

    The solution that I'm suggesting is for those who plan to save their work as CS5 but are not sure whether the FLA will be saved properly or not.

    I came up with this plan, since I too faced the same issue and had to find a solution, if I had to migrate loads of apps across to CS5.

    the main reason for this issue to crop up is due to a blank layer within the library, due to which the FLA when saved as CS5 on re-opening will throw the "Flash can not parse this document"  error in the output window.

    So before you save your FLA to CS5 just run the below JSFL code so the it checks and reports for any library elements with blank layers.

    // Find Layers with no frames in the library

    // @author chetan

    // --------------------------------------------------

    // clear the output panel

    fl.outputPanel.clear();

    var nonRepeatClassArray = new Array();

    // this function searches for a layers with 0 frame length

    function findLayerLength()

    {

    fl.trace("<<---The classes linked are--->>  ");

    for (var i=0;i<fl.getDocumentDOM().library.items.length;i++)

    {

    if(fl.getDocumentDOM().library.items.itemType == "movie clip")

    {

    var layers = fl.getDocumentDOM().library.items.timeline.layers;

    var layerLen = fl.getDocumentDOM().library.items.timeline.layers.length;

    for(var k=0;k<layerLen;k++)

    {

    if(layers.frames.length == 0)

    {

    fl.trace(fl.getDocumentDOM().library.items.name+"::"+ layers.name);

    fl.trace("frame length is ::"+ layers.frames.length);

    }

    }

    }

    }

    }

    findLayerLength();

    once you run the jsfl you will find the details of the movieclips with layers of 0 framelength, now find those layers in your FLA and delete it or just have a blank key frame.

    now you will be able to save your FLA in CS5 format without any issues.

    Cheers

    Chetan

    Participant
    September 28, 2010

    I've just experienced the same problem, but fortunately, becasue of you guys i had solved it and back up and running with my project!

    I am really grateful for all the altruistic people out there who have a minute to help others. *Cries from happiness*

    There is what I did:

    1. followed exactly what stephenhayden(#41) said (your corrupted file will most probably be in LIBRARY subdirectory of unzipped fla) except i didnt even have to redo a corrupted movieclip, because

    2. what naipemarcado said in #45 fixed my corrupted "someLibraryMovieClip.xml" file.

    What you do is open corrupted .xml file in any text editor or even Dreamweaver

    and look for stand-alone tags like <element/> or <frame/>

    Here is my corrupted code (2 layers without frames):

    ...

         <DOMLayer name="Layer 28" color="#FF4FFF">
             
    <frames/>
        </DOMLayer>
        <DOMLayer name="preview" color="#FFFF4F" autoNamed="false">
             
    <frames/>
        </DOMLayer>

    And here how it is supposed to be:

    ...

         <DOMLayer name="Layer 28" color="#FF4FFF">
             <frames>
                   <DOMFrame index="0" keyMode="9728">
                       <elements>
                       </elements>
                   </DOMFrame>
             </frames>
        </DOMLayer>
        <DOMLayer name="preview" color="#FFFF4F" autoNamed="false">
             <frames>
                   <DOMFrame index="0" keyMode="9728">
                       <elements>
                       </elements>
                  </DOMFrame>
              </frames>
        </DOMLayer>

    Voila! save and overwrite the corrupted file and finally move on with your project!

    P.S. chetana's JSFL code (post #46) is very useful too! Run it every time in the end of your worksession before saving.

    here is how:

    1. Create new JSFL project in Flash and insert the code provided by chetana

    2. Save under any name and in any location

    3. to run: before saving your project in Flash go to [ Commands > Run Command ... ] find the JSFL file you just saved

    4. if the Output window returns anything along the lines "frame length is :: 0" go to that movie clip and layer and add blank keyframe, as people said before. Repeat until JSFL Output is clean

    5. Finally save.....

    Yeah, this is pretty big messup on Adobe's part ... And its a shame that its so easy to fix... lol

    cheers,

    - Artem

    Participant
    September 28, 2010

    Hi All,

    This issue seems to have been fixed in the latest CS5 update 11.0.2.489

    Thanks,

    Chetan

    September 16, 2010

    Hi, my name is Pablo from Argentina. So i also encountered this error when trying to save my project in CS4 and then back to CS5 by mistake. I hope I can clear the doubts to the ones suffering from the hands of dreadful developers and testers. This is what i did to bring my project back to life. I assume we are using a test.fla file

    - Rename your file from test.fla to test.zip

    - Unzip it

    - Inside your unzipped folder you should have a similar structure to this:

    <bin>

    DOMDocument.xml

    test.xfl

    <LIBRARY>

    <META-INF>

    mimetype

    MobileSettings.xml

    PublishSettings.xml

    - Create a new fresh folder, maybe called Test2 and copy te contents of the unzipped folder.

    - Delete all the items from the Library Folder

    - Copy the xml files from the Test>Library to Test2>Library from 10 to 10, opening the test.xfl y test2 folder, every 10 files till the error comes up. So then you'll know the file getting the error is in that last 10 files you copied.

    - Then keep copying inside those 10 files, one by one, till Flash cannot open the file. So you will know which one is the file giving you the error.

    At this stage you'll probably be thinking that a company like Adobe couldn't miss this error in a mega development like CS5, but they did, until the update, so this brief tutorial is for the ones like me that missed the patch, or have a project damaged by the software.

    - When you narrowed the search and identified the file giving the error, open it.

    -  I discovered that the xml structure for the library item (represented in this xml file) would be something like this

    <timeline>

         <DOMTimeline>

                   <layers>

                             <DOMLayer>

                                       <frames>

                                              <DOMFrame>

                                                       // Here should be the content of the frame

                                                           <Actionscript>

                                                                         ///Actionscript Code

                                                           </Actionscript>

                                                           <elements>

                                                                              /// the objects in the stage

                                                           </elements>

                                              </DOMFrame

                                       </frames>

                             </DOMLayer>

                   </layers>

         </DOMTimeline>

    </timeline>

    - So, maybe this should be the approximate structure of the xml file, i don't know how exact is this, i didn't developed the application, the geniuses of Adobe did. I discovered that in my error xml file, this structure was truncated, yes truncated, there were things like this for example:

    <DOMFrame>

              <Actionscript>

                       ///some actionscript content

               </Actionscript>

                <elements/> (WTF??!! No opening tag, and a truncated closing tag)                

    </DOMFrame>

    - So after burning my head trying to identify this not opening, not closing tags, and deleting or correcting each one of them, i managed to recover my agonizing file, it's back again! At this stage i was tearing my hair off and swearing to all of the talented developers working against the clock to bring us a version that could have waited 2 more months to be shipped in a full version, not beta.

    There is also a couple of more errors other people encountered, i recommend keep searching for your exact error.

    Hope this helps

    Adiós amigos

    Participant
    September 27, 2010

    Me encanta como lo ataste con alambre como si fuera un renault 12!!

    Participant
    August 17, 2010

    Sorry but this thread is not 'answered' as it says at the top. I've just come across this problem with a file I was working on happily last night, and this morning it won't open - "cannot parse". I've tried all the suggestions above, to no avail... And I've tried the Adobe Flash update (http://www.adobe.com/support/flash/downloads.html) but that won't let me install it - I get another error message saying 'Error loading Updater worklflow'. Adobe - what are you doing about this problem?

    Participant
    August 11, 2010

    I was able to find out that there is actually an ETX character in that empty node that might be causing this issue, I did a write up on it complete with wbfreek26 as the source of the solution! http://www.sosuke.com/index.php/2010/08/11/flash-cannot-parse-this-document-adobe-flash-cs5/

    Participant
    August 7, 2010

    I came across this error today when I tried to open a .fla file that I had been working on. It has taken me about an hour to fix it but I think that I am happy enough now. Here is my solution so that maybe it can help others:

    • Make a copy of your .fla so that you can work on it and change the extension from .fla to .zip
    • Open it with winRAR, extract the contents to a folder somewhere and you will see all the various things that make up your project in this folder.
    • Now, open flash and make a completely new project (just a blank project) and go File> Save as.. and instead of saving this new project as a .fla save it as a Flash CS5 Uncompressed Document (*.xfl)

    What you need to do next is tedious BUT it might just save your bacon. One by one copy the various elements (XML, Library, bin etc) from the corrupt version to the blank folder (overwriting the new blank versions folders/files). Each time you move another piece into the folder open the .XFL and make sure that it works each time...(tedious but each time you open it you'll see the original project coming back to life) Keep doing this until it doesn't open and hey presto you've now found the corrupt file.

    What you do next is your guess. For me the corrupt file was an xml file and I'm sure your corrupt file will be an XML file too (it is a parsing error after all). I simply deleted this XML file because it wasn't anything major. It'll take me a minute to re-do this movieclip within flash. If you can do this too then that would be a small sacrifice to get the project up and running again. I'm sure Adobe will sort this out soon and I hope my solution helps someone else.

    -Stevo

    Participant
    August 7, 2010

    thank you so much ! i could get my fla back. In my case it worked that i created a new fla (.xfl) and copied everthing over. than i could open it and i saved it as a cs4 project.

    Once more, THANK YOU !

    August 6, 2010

    Hey all,

    I was dealing with this for awlile, and it looks like converting old cs4 projects to cs4 creates what im calling "null" nodes sometimes in xml. Go through your xml files that make up your flash project (either by saving as xfl uncompressed, or unzipping the fla).

    Do a search for <frames/>

    as in:

            <DOMLayer name="Layer 2" color="#9933CC">
              <frames/>
            </DOMLayer>

    I found about 4 of those cases in a large fla file. I deleted the whole DOMlayer node as listed above, and that cleaned up everything! In general though this version of flash seems really buggy, and there are some projects im still unable to compile due to TBD reasons . . .

    Participant
    August 6, 2010

    I have the same problem and honestly i am pretty mad. I invested another 1000bucks to end up with a software what ruins my projects.

    I had it with one file 2 weeks ago and completely rebuild it, because i thought it was my mistake.

    Two days ago it happened again and i cannot fix it. I tried to remove some empty frames but the .xfl file just does not want to open.

    I do not know what to do anymore! This is a really important project and i am stuck. I cannot redo this file!

    Hopefully someone con help me here!!!!

    sincerely !

    Participant
    August 5, 2010

    I've got the same problem. Flash can not parse the document.

    I've tried every single way that I found on the forums (convert it to .zip and try to fix the xml, open it on cs4, use the decompiler) and nothing works!

    I'm getting mad with this... can somebody help me?

    I'm close to the dead line. 2 files: both of them crashed!

    Please!!!!

    HELP!!!

    June 23, 2010

    I may be late to the game, but I'm still playing, unfortunately.  After multiple saves and no backup, "Flash can not [sic] parse this document."

    Flash CS5 also can not parse a con trac tion.

    Will someone at Adobe please get my file and fix it?

    June 23, 2010

    Looks like I'm also a bit late to the game, but here's another case that causes this error:

    Create a new ActionScript 3.0 project, and drag a TextArea to the stage.

    Set the text of the TextArea to the eight-character string
    you get by removing the spaces from "& # x 0 3 B 1 ;",
    that is, "\u0026\u0023\u0078\u0030\u0033\u0042\u0031\u003B".

    Save the project as amp.fla.  Close and reopen amp.fla.
    Notice that the contents of the text parameter have been encoded,
    seems like UTF-8, but I haven't taken the time to check.

    Now save the project as amp2.fla.  Close and reopen amp2.fla.
    You should get the message "Flash can not parse this document."

    I've run into this bug because I want to pass XML data, including
    numeric character entity references, into a parameter of a custom
    control.  Named entity references seem to survive the round trip,
    but numeric character entity references do not.

    June 17, 2010

    After working on a file for four hours this happened to me and so I thought the file was corrupted some way and so I started over making changes to the file.  Four hours later just when I was almost finished re-doing the changes....it happened again.  I am so mad.  Now I have two useless files and I am afraid to go make the fixes again because it will probably happen again.  I am afraid to waste my time on ANY file now in CS5 because I will end up with a corrupted file.  That doesn't bode well with someone that just put all her money into this software. 

    To make matters worse I have about 50 more files I need to make changes to and I am on a deadline.  So, I am sitting here.  Can't work because it will probably be a waste.

    I went in and looked in the library for empty frames but I probably have over 100 items in my library.  It will take me days to search them all.  So far I haven't found any missing frames.

    Could someone please contact me and help me before my head explodes.  I would be forever grateful!  (Pitiful smile with a begging face) 

    angela at acuteconsulting.com