I’ve had the unfortunate experience of trying to share Flash FLA files in a source-controlled development environment. At times the artists and engineers have to fight over access to these “black-boxes” of binary content that can’t be merged. It’s like a frustrating game of “content ping-pong” – batting the file back and forth. Luckily Adobe introduced the deconstructed XFL format, which breaks every symbol into its own XML file. The guts are now exposed and separated for easier merging. Hurrah and hip-hip! All our problems are solved!
Well, no. Unfortunately as of CS 6.0, my best guess is that the XFL format is just a raw XML dump of the old FLA format. It was apparently not designed to work well with source control systems or multiple platforms. Every time someone saves the XFL it changes little bits here and there in places you never touched, particularly when passing files between developers working in Windows and those working on Macs. This can sometimes cause 100′s of apparently changes when in reality you only changed a handful of symbols.
Here’s a list of the major problems you’ll run into:
- Floating-point rounding differences across platforms and machines.
- Differences in how text is alphabetized in the XML output for different platforms.
- Shape edge-index arrays will change order, even though the resulting shape is exactly the same.
- Platform-specific data like what printer you set up or paths to where you last loaded bitmaps from.
- User-specific data like which library folders are expanded.
- Timestamps and values that seem to be of no consequence.
So, what can be done? Well, just this week, my colleague discovered a very creative work-around for this issue and I want to share it with you. I’m calling it “Eric’s Flash Fake-Out” technique. Here’s what you do:
- Close all open files in Flash Pro. Use this technique whenever you’re about to start making new changes.
- Grab the complete XFL folder from your source control system (we use SVN).
- Revert any changes so you have a completely clean copy.
- Open the XFL in Flash Pro.
- Make a benign change like expand a folder in the Library panel or move a shape and then undo.
- Save. When you do this Flash remembers (in memory) which files it saved already.
- If you refresh your source control view of the files you will likely notice a ton of files appear changed.
- Keep the XFL open in Flash, but revert all those changed files in your source control window.
- Now you’ve achieved nirvana: go back to Flash and start changing symbols and doing stuff to your hearts content.
- Save. Make changes. Save. Make changes. Save. Etc. Flash will only write out files for symbols you’ve changed!
- All done? Commit the changes to your team’s source control repository.
Notice that only DOMDocument.xml and the symbol XML files that you modified will be different according to your source control system. This is exactly what you needed. No more merging hell, because when your friends in the office or across the world sync to your changes, they can be sure to get only the necessary changed files, versus a bunch of crud that is sure to cause merge conflicts.
This won’t solve all your problems, however. You’ll still need to hand-merge conflicts in the DOMDocument.xml file. This can be a pain, especially for artists and other non-programmer types. Hopefully Adobe has improved things in Flash Pro CC and later.
I will now leave you to the delights of your work. Enjoy.