R.I.P. .fla

Just before Adobe announced that there was to be no Flash CS5 Public Beta, Lee Brimelow, a Flash Platform Evangelist at Adobe, released a Sneak Peek of Flash CS5 on his site gotoandlearn.com. In the overview Lee spends some time talking about the fact that the .fla format is about to become extinct and replaced with a new one named “XFL”. What you may not know is that this format had already found its way into the CS4 studio.

In this article, I’m going to give you a chance to see what all the chatter is about and to prepare yourselves for the slow disappearance of the .fla format.

Note: I have included all the files for this example. If you don’t have After Effects don’t dial out. You can still work along because I have also included the XFL file created by After Effects CS4.

Introduction

Richard Galvan, the Flash Products Manager, and I have a most interesting relationship. We both highly respect what the other is doing but to call us great friends would be stretching the term. What Richard does know is that he can bounce ideas off of me and that they will go no further until the idea comes to life. For me, this is great because I can start thinking of ways to let you know what’s up when it happens.

In the case of the XFL format, I first heard about it, prior to the CS4 release, on a rainy street corner in Toronto when Richard and I were in a line waiting for entry into an FITC event. “What would you say,Tom”, asked Richard, “if I were to tell you we are thinking of getting rid of the .fla format?”

This one caught me by surprise but, as Richard walked me through the reasoning behind their thinking it became rather clear that this was a great idea.

In fact it wasn’t ,for me, a complete surprise. The rise of XML over the past few years has given Flash developers the luxury of working with Flash content that is external to the .swf. At the same time using XML with Flash had moved into the realm of “easy to accomplish” from the nightmare it had been. All of this is good but there was a major issue: Flash stored documents in a binary source file, the .fla, which was a proprietary specification. XFL is Adobe’s response to this issue.

Creating an XFL Document

Contrary to what you may have heard Flash can’t create an XFL document. It can only read them. At the moment there are in fact only two applications in the Adobe lineup that can create these docs: After Effects CS4 and InDesign CS4. Here’s how an XFL document is created in After Effects:

Step 1: AET.aep

Open the AET.aep file in After Effects CS4. It is a simple animation of the letters in the Activetuts+ name Raining In and Raining out.

I have used this effect in a couple of XFL demos I have done, not because I am lazy but because the focus here is technique not design. In this case notice the two layers named active tuts + In and active tuts + Out. The other feature to be aware of is that the Comp i’s dimensions are 400 X 100 and the frame rate is 24 frames per second.

Step2: Export

Select File>Export> Adobe Flash Professional (XFL)… which will open the XFL Settings dialog box.

Step 3: Format

Select PNG Sequence from the Format drop down menu.

Your two choices in the Dialog Box section may seem a bit odd. Here’s what they do:

  • Rasterize to: You need to decided whether the output will be rasterized to a series of PNG images or an FLV. The PNG choice may strike many of you as being one to be avoided at all costs. Exporting a series of images and then sticking them in the Flash movie is, to say the least, a tad heretical. Not quite. If you select this option, frames that are identical and adjacent to each other are rasterized only once to a single PNG. That PNG is then referenced several times in the XFL document. Use the FLV option if a layer contains video. Clicking the Format Options button launches the FLV/F4V export settings.
  • Ignore: Select this to tell After Effects to ignore layers containing unsupported features such as blending modes other than Normal. Choose this and those layers won’t be added to the XFL document.

Step 4: OK

Click OK to close the dialog box and get the process underway.

You will be prompted to choose a location for the XFL file and to give it a name (I used AETuts). When you click the Save button the dialog box disappears. You can quit After Effects and open the folder where you placed the XFL document. Inside you will see the .aep file and the XFL file as well as a report of the process. Create a new folder and place a copy of the XFL file into it. We’ll be using the copy in a moment.

Step 5: Open the XFL File

Launch Flash and, when it opens, use File>Open to navigate to the XFL file. Open it. A progress bar will appear.

Step 6: Examine the Flash File

When the file opens notice how the layers order is preserved, the animations are placed on Motion layers and that the file opens as an Untitled Flash file. Another very subtle change is that the Scene 1 link has been renamed Comp 1. This is the name of the item in After Effects.

Why does the XFL document open as an Untitled Flash document? The reason is because this document is contstructed from the information contained in the XFL document and new documents in Flash always open as Untitled.

So what does all this “information” I have been chattering about look like? Let’s find out.

Step 7: Change the Extension

Quit Flash, navigate to the folder holding the copy of the XFL file and change the XFL file extension to .zip. The icon will change to a .zip file icon. The key aspect of the XFL format, if you pay close attention to what Adobe is saying, is that it is a container format. In fact they are very clear that you should regard an XFL file as a zip file.

Step 8: Uncompress the .zip File

Using the application you use to open .zip files (I use BetterZip on my Mac) open the .zip file. When it opens you will see that your XFL file contains a lot more than you expected. Move the Library folder and the DOMDocument files to your open folder.

Step 9: Open the Library Folder.

The structure of this folder is how the Flash Library is created. The only difference between the two is that the contents of the folders are placed into movieclips when the file is constructed.

Step 10: Open the DOMDocument.xml File

I am not going to get deep into this document but you can see that each element that makes up the animations from the folders is between the <media> </media> tags and how the movieclips with animation are constructed as well.

Conclusion:

The implication of the new format is quite staggering when you really think about it. For example, nothing says you can’t edit one of the images in the Library folder in Photoshop or Fireworks and not have any effect whatsoever on on the Flash timeline. Another is, once this format takes hold, it won’t be odd to see Flash movies authored using XML and Flash being used primarily for the final .swf export.

I am going to leave the final word on this to the master, Colin Moock. When he learned about this change in CS4 he wrote in his blog:

The natural next step in the evolution of XFL authoring would be to take the Flash authoring tool out of the equation altogether. If Adobe were to offer a command-line XFL-to-SWF compiler along with XFL, nearly any decent programmer would be able to create a .swf-authoring tool, even in ActionScript. The Flash developer community itself would finally be able to create its own custom Flash-authoring tools. I wonder who would be the first to nostalgically make Flash 4 for AIR in ActionScript?

Wouldn’t that be neat?

  • Mark Sinkinson

    Very interesting article. Does the DOM document make the resultant Flash application more accessible to search engines and those who are disabled?

    • Tom Green

      Download the source and check for yourself.

    • André

      The DOM Document is readed by flash authoring, it has no effect in compiled .swf, so it wont make any difference for search engines, but some search engines are already reading .swf contents, but at the first steps they could not read external contents, like loaded text for example, but now they are improving better this, google for example can index some external contents, but not everything… if you want some better pratice with SEO and FLASH, you can search about SWFAddress and SEO in FLASH, there are some tutorials that show´s you the best pratices

    • Bruno

      Check this google proposal for indexing and crawling ajax and swf pages:

      http://searchengineland.com/googles-proposal-for-crawling-ajax-may-be-live-34411

      nice tut Tom :)

  • Peter Sagge

    “prepare yourselves for the slow disappearance of the .fla format”

    joking eh?

    • Tom Green

      I am dead serious. Watch Lee’s vid. Fla is closed and xfl is open. Which option do you think the “codies” will flock to? It will take a couple of years for this to catch on but I suspect we will be seeing more .xfl docs than .fla when it does “catch”.

  • http://www.uproarmultimedia.com Gregory Gunther

    While this all makes sense from a ‘developers’ perspective, it’s just another example of Adode/Flash’s undying need to move away from being a tool for designers and animators.

    “The natural next step in the evolution of XFL authoring would be to
    take the Flash authoring tool out of the equation altogether.”

    That’s a great idea.

    • Tom Green

      Don’t see that happening, Greg. Designers could, as lee points out, “rejig” the assets in the Library folder without the need of reopening the Flash file. It will be interesting, though, to see how this all rolls out.

  • Chris

    This is excellent news!

  • http://www.ear-fung.us/ Mark

    It’s nice to see such a forward-thinking article.

    I, for one, am all about open standards and as a Flash developer it frustrates me sometimes that the FLA format is so proprietary.

    I really wish Adobe would do something that could be easily checked into source control systems like Apple did by changing .nib file to .xib. The way it looks , with these files basically being zip files, that source control won’t work very well on them without some sort of scripting beforehand to extract everything before checking it into revision control.

  • http://labs.dariux.com Dario Gutierrez

    Excellent article, it seems this new standard will works fine.

  • André

    Hey Tom, it´s an excelent article with tutorial, i´ve seen the lee´s video at gotoandlearn.com some days ago, it´s nice to see that Flash CS5 can save “open” .xfl files, i dont know yet but it seems that you can open an image directly in photoshop and edit it, for example, and dont need to update that image in flash… it will be nice, also would be nice an open file for .swf too, but it seems that it´s not time yet.

    Ah nice work with this integration about AE and Flash by a .xfl file, but i still prefer exporting from AE in .mov with alpha channel, and converting to .flv using adobe media encoder, the file is lighter tham exporting in png sequence or exporting directly from AE to .flv with alpha channel, also lighter tham using the integration with .xfl file

  • Anne

    Interesting article! Small thing – The spelling of “extension” is incorrect here: “Step 7: Change the Extention”

    Thanks!

    • http://snaptin.com Ian Yates
      Staff

      Thanks – my fault :P

  • Pingback: R.I.P. .fla | Activetuts+ at Flash Designers

  • http://www.neilrpearce.co.uk neil pearce

    Changing the subject slightly, i wanted to ask peeps what they think the future of flash is?

    I mean there seems to be a shift change regarding flash due to the emergence of javascript libraries, flash catalyst and now this!

    I have been studying flash for over a year now so i can start a career as a flash developer/designer and will be sitting my ACE exam end of march.

    Don’t know if i am doing the right thing as i can’t help thinking flash is a dying breed?????

  • http://www.Davi-T.com Davi-T

    Now I haven’t watched Lee’s video completely yet and I’m assuming that you’re talking about taking out the authoring environment completely. Sounds like you’re moving the app away from designers/animators and leaning the app more or entirely towards developers. I’ve always thought of Flash as a great tool for both designer and developer. Why not keep the authoring environment and find other solutions/compromises that work for both the designer and developer. I know you mentioned ‘rejigging’ the assets (which I’m assuming means editing individual assets externally) but naturally, designers work with a ‘canvas’ and animators work with a preview of what they’re animating. You’ll be taking away or at least handicapping a precious tool for creativity.

    I think allowing the community to create their own authoring environments wouldn’t work out either. You’d have multiple apps trying to do the same thing. Remember Adobe Live Motion versus Macromedia Flash?

    • http://www.andy-hayes.com Andy Hayes

      “’ve always thought of Flash as a great tool for both designer and developer. Why not keep the authoring environment and find other solutions/compromises that work for both the designer and developer.”

      presumably designers know how to use photoshop, or should.

      I can’t wait for the FLA to die wooot!

    • http://www.andy-hayes.com Andy Hayes

      “I’ve always thought of Flash as a great tool for both designer and developer. Why not keep the authoring environment and find other solutions/compromises that work for both the designer and developer.”

      Presumably designers know how to use photoshop, or should.

      I can’t wait for the FLA to die wooot!

  • http://roqstar.net Sean Wichert, Sr.

    +1 on this being an undesirable change since I just bought Flash CS4 recently!

    Also, How does this affect Active Den?

  • http://www.milowerx.com Mike Milo

    Well this sounds like potentially terrible news for us animators and artists who use Flash for making films and not code or games. Many animated TV shows are done in Flash. Do you think this means that Flash will still more or less behave the same way when you open it IE, timeline, keyframes, symbols, vectors, drawing tools etc. and that the export format will just change to XFL format instead of FLA? Or do you think this spells the death-knell for the program itself?

  • http://www.GamesFun.co.il Ian Lockhear

    I doubt that the flash authoring tool will just be deleted.
    no reason to do so, it makes no sense.


    The natural next step in the evolution of XFL authoring would be to take the Flash authoring tool out of the equation altogether. If Adobe were to offer a command-line XFL-to-SWF compiler along with XFL, nearly any decent programmer would be able to create a .swf-authoring tool, even in ActionScript. The Flash developer community itself would finally be able to create its own custom Flash-authoring tools. I wonder who would be the first to nostalgically make Flash 4 for AIR in ActionScript?

    Simply no point I can see. Sure, it opens another door to a room developers could explore, but no use can come out of it.

    The idea itself is contrary to what flash was made for.

  • dexterous

    This is great

    However, I have just two questions

    1 – Will the new version of flash support opening of .fla files and converting them to XFL files ?

    2 – When Adobe already have a different application (Flex or Flash Builder) which is using the open file format (MXML) and which is programmer friendly, why similar changes are being made into Flash authoring? Is it the portability from one to another (and changing the workflow to include Catalyst and PhotoShop inbetween) being considered here?

  • Pingback: Adobe chooses already-cursed XFL to replace it FLA’s! « CartoonSmart.com Blog

  • Tom Green

    This discussion is quite interesting but there seems to be a bit of confusion. Let me try to clarify:

    The fla format will not disappear. Think of it as the “closed binary” it is. This means you will still be able to use Flash as a “Design Tool”.

    The XFL format simply exposes the assets in the Library and leaves them available for subsequent changes without changing the fla. For example, it is conceivable that you will be able top open one of the images in the Library folder using Pshop. Make a change to the image, save it and the fla is instantly updated to reflect that change. In fact it would not surprise me to see this being able to be done while the fla is open in Flash.

    To answer Davi-T’s observation: Flash is not becoming a developer tool. In fact this format as I pointed out in the previous point could allow for live asset editing while in Flash. Remember, the Library folder contains the assets in the Flash library.

    To answer dextrous: You have the option of exporting either an fla or an XFL so conversion from within Flash CS5 looks doable. The xml files are Developer territory and I really don’t have a clue what the “code jockeys” will do with them. Only time will tell but it should be fascinating to watch.

    To answer André : Exporting XFL out of After effects is rather sweet for very short pieces – one or two seconds- destined for Flash. I use it to create motion graphics like the example here, which are rather difficult to do on the timeline or require Expert knowledge of AS 3.

  • http://www.gdmworldwide.com Joel Nealy

    #1

    I think people want Flash to die because they never learned the magic of symbols and the timeline. In my lifetime as a Flash Developer I constantly improved and learned how to “streamline” my approach to flash projects.

    Upon learning xml I learned the value of parsing data and saving on loading time while still being able to “design” my vision from conception to completion.

    The death of the .fla started with Actionscript 3…

    this is the defining moment when the language became incoherent and redundant…yes it has more potential but it was a detriment to all the coders and designers who learned the very logical and diverse language of Actionscript 2.0

    3.0 was an improvement for code junkies who desired to make moe advanced games applications and the designer who used flash to create presentations and gorgeous websites has suffered. This is true to so many and yet never really talked about. You could have easily improved Actionscript without making the language roundabout and clunky. Thats why the .fla died…noone ENJOYS writing actionscript anymore. 3.0 is a total abomination.

    I cannot describe the actual bliss i got from tying together logical statements in 2.0 to enjoy the fruition of a complex application. Now in 3.0 i have to import libraries that should already exist all the while writing 2 lines of code that could have been done in a few words in the former version. Bleghk!

    #2

    Removing the authoring environment of flash is so negative and careless…the timeline is necessarry and forcing me to use aftereffects is another redundant roundabout tactic seeing as Flash provides you with the tools to create the very same effects.

    Its hard to watch people who code all day talk about the future of Flash as if they ever had any stake in it. They just served to ruin the greatest animation program of all time. Some of us love the canvas…some of us liked typing script to animaet our canvas…how can you remove the canvas?

    I will never stop designing in Flash it is a genius application that was years ahead of its time since its conception. Adobe heed this. Clean up the script..improve the engine. Keep Flash alive.

  • http://www.gdmworldwide.com Joel Nealy

    #1

    I think people want Flash to die because they never learned the magic of symbols and the timeline. In my lifetime as a Flash Developer I constantly improved and learned how to “streamline” my approach to flash projects.

    Upon learning xml I learned the value of parsing data and saving on loading time while still being able to “design” my vision from conception to completion.

    The death of the .fla started with Actionscript 3…

    this is the defining moment when the language became incoherent and redundant…yes it has more potential but it was a detriment to all the coders and designers who learned the very logical and diverse language of Actionscript 2.0

    3.0 was an improvement for code junkies who desired to make moe advanced games applications and the designer who used flash to create presentations and gorgeous websites has suffered. This is true to so many and yet never really talked about. You could have easily improved Actionscript without making the language roundabout and clunky. Thats why the .fla died…noone ENJOYS writing actionscript anymore. 3.0 is a total abomination.

    I cannot describe the actual bliss i got from tying together logical statements in 2.0 to enjoy the fruition of a complex application. Now in 3.0 i have to import libraries that should already exist all the while writing 2 lines of code that could have been done in a few words in the former version. Bleghk!

    #2

    Removing the authoring environment of flash is so negative and careless…the timeline is necessary and forcing me to use aftereffects is another redundant roundabout tactic seeing as Flash provides you with the tools to create the very same effects.

    Its hard to watch people who code all day talk about the future of Flash as if they ever had any stake in it. They just served to ruin the greatest animation program of all time. Some of us love the canvas…some of us liked typing script to animate our canvas…how can you remove the canvas?

    I will never stop designing in Flash it is a genius application that was years ahead of its time since its conception. Adobe heed this. Clean up the script…improve the engine. Keep Flash alive.

    • Karl Macklin

      I really have to disagree with your comparison of AS2 vs. AS3.

      I started out by learning AS3 together with some basic Java (not javascript). It really makes sense and is quite easy to work with.
      Then I was forced to learn AS2 due to a lot of banner work. It was horrible!
      AS2 is so random and is in my opinion harder to learn than AS3.

      You say noone enjoys writing AS3.
      I enjoy writing AS3, and I dread the moments where I’m forced to work with AS2.

      • Brian M

        I gotta agree with you Karl, AS3 is a proper language and AS2 is the abomination. This statement comes from experience.

        Not understanding proper OOP makes AS2 people dislike AS3, that’s all. Please don’t take my comments personally. I was there and felt your pain until I learned how everything I was doing in AS2 was wrong. Yeah, it gets the job done, but it will allow you to compile code that is error prone to the core. ESPECIALLY if the code is splattered all over the place or OOP principles are ignored.

        The way I see it, if you want to do timeline animation the IDE is great. If you want to write proper code, use class files and your editor of choice. I use the flash IDE for both aspects despite the better code completion etc that other editors offer. Why can’t the IDE do both and be left alone. I enjoy working with both aspects, which is why I gravitated to Flash anyway.

  • http://www.conwaycorp.net MCHammer

    Well said Joel- I have no worries, as long as geeky coders keep churning out crappy looking sites using whatever the latest developer trendy code of the month– my client base will keep coming back for more award-winning, unique projects that just happen to be designed and built using Flash. They can’t be duplicated using any other method, and provide complete control over just about every aspect of design and multimedia- audio, video, animation, content, SEO, design, browser integrity, etc. Show me a better all around multimedia design/developing tool, and I would consider using it- until then, Flash is the way to go… LONG LIVE FLASH

    • Reevine

      hmmm the only problem i see with using entirely flash to design a website is the fact that you must keep in mind the fact that it can take longer to load in some instances and is not as widely supported on mobile devices. a true designer of web sites takes the user’s interface into account. though i do enjoy using flash for sections of my site i have often used jQuery alternatives to Flash and this greatly increased site traffic. sorry to rant off on that subject. i do agree with you that Flash wont die off. its versatility is too great to simply be squandered as mentioned in the article. i would have to say they would simply make another program for developers so that command line editing for XFL will be separated from the Flash interface. the only other option i can think of is that they would include an option to switch over to XFL editing within Flash itself. like in CS4 there is a short drop down menu to select different setups and organizations like “Web” and a few others. perhaps this would be a good option to put in.

  • Pingback: Quick Tip: CS5 Features for Flash Users - GFX Me

  • Mohamed

    Wawo, Really very useful .. Big thanks ;)

  • Pingback: Quick Tip: CS5 Features for Flash Users | Flash Video Training Source