Yesterday, I was working with an Actionscript 3 class in Adobe Flash CC. I was frequently testing the movie to make sure everything was working properly as I added more code to the class. However, when I tested it for the umpteenth time, the movie window just appeared blank.
I looked back through the code to see what may have gone wrong, but couldn't find anything. So I saved the class, saved the fla file, and close Flash CC, then restarted my computer. I then tried opening the class again... to find that it was now completely blank. No package, no anything. All the code was completely gone.
I tried testing the movie again for the heck of it, and the same blank movie window appeared. But this time, a compiler error window popped up two, saying "Line 1, Column 6 1093: Syntax error." Yet, the class window was still blank with no code. I tried clicking "go to source", but doing so did nothing. It just continued to show the blank class window with nothing there/
I then tried opening the class up using Flash Builder, to see if I could recover the lost code from there. It was able to read part of the file, and displayed the first couple hundred lines of code. But everything past the first couple hundred is still gone, and won't show up anywhere.
Even using the raw text extractor in Microsoft Word won't recover any more than Flash Builder was able to.
Has the class been corrupted, if so how did it happen, and is there any way I can get all my lost code back?
Make sure you know where your class was stored in the first place.
I`m guessing that you use a setup like: Document.fla/Document.as (as Document class)
Per default the document class is stored in the same drectory as your fla but you should always separate your code from your document.
This can be easily done by using a folder structure.
For example if you create a folder in the folder wherre your fla sits that is called src, you would link the document class in the fla with src.Document (and the Document.as would sit in the src folder of your filesystem)
Now when your flash crashes and you want to reconnect with that document class and you click on the pencil in the Document-class icon, it will default back again and crfeate an empty class for you in the old folder.
So at first sight it would seem you lost your work (because its empty) while you only would have to manulall point flash to the right place (the src folder) where the class sits you used before the crash.
Hope that makes sense to you?
Other than that: I have never encountered the corruption of a class file (its only text, nothing there to be corrupted)