The XFL File Format Explained

One of the most underrated features of Flash CS5 is the new XFL file format. But there is some confusion out there about what it is and how to use it. This quick post will hopefully clear some of these things up.

The XFL format
The XFL file format is a way to represent a Flash Professional document as an XML-based, open folder of files. See the image below for an example of the XFL folder structure. You will notice that there is a file called DOMDocument.xml. This file is the heart of your project. Inside it you will see all of the information for your document including timelines, actions, motion paths, etc. You can edit this information and your changes will automatically take effect when you launch the file. One handy use for this is doing a search and replace across a large number of Flash documents to change strings or colors without having to go into each one and making the changes.

The new FLA format
As I mentioned before, you can still create an FLA file in Flash CS5 rather than the open XFL folder structure. But this new FLA is simply a zipped up version of that open folder structure. If you change the extension to .zip and then unzip it, you will find the same open structure. The new FLA is not an impenetrable binary black box like its predecessor. If you really want the old FLA, you need to save it as a Flash CS4 FLA.

Saving AS source files
One thing that has been tripping people up is where to put source files in relation to XFL folder structure. It might seem to make the most sense to put your external ActionScript files inside the project folder that is created. So let’s say that I create a new Flash document and save it to the desktop as foo.xfl. Flash will actually then create a folder called foo on the desktop. Inside of that folder is the XFL project file and the other folders that make up the project. But you CANNOT place ActionScript source files inside of this folder. You need to instead save them alongside the top-level folder of your project. So in this example I would save my ActionScript source files onto the desktop next to the foo folder.

Save and Compact?
You may notice that there is no longer an option to save and compact your FLA files. This is because the new FLA format is simply a zipped version of the open XFL structure so the binary compacting is no longer an option.

Update: we do plan on releasing the XML schema for the XFL format to allow others to create and edit the project format themselves. I will look into a time estimate for this.

Lee

Show Comments

Hide Comments

Comments are closed.