Shop Forum More Submit  Join Login
About Deviant SasQMale/Poland Recent Activity
Deviant for 12 Years
Needs Core Membership
Statistics 5 Deviations 534 Comments 4,399 Pageviews

Newest Deviations

20% Cooler Easter Egg by SasQ 20% Cooler Easter Egg :iconsasq:SasQ 5 1 My Gentoo box by SasQ My Gentoo box :iconsasq:SasQ 1 6 Leon by SasQ Leon :iconsasq:SasQ 0 0 Hacker by SasQ Hacker :iconsasq:SasQ 0 1 Birthday present for Maya by SasQ Birthday present for Maya :iconsasq:SasQ 3 4


Out of the Ashes, a New Story To Be Told by Huussii Out of the Ashes, a New Story To Be Told :iconhuussii:Huussii 4,926 358 Color Sketch by Yakovlev-vad Color Sketch :iconyakovlev-vad:Yakovlev-vad 1,481 128 Lyra Heartstrings by Rodrigues404 Lyra Heartstrings :iconrodrigues404:Rodrigues404 660 25 Vector - Candy Flank by SketchMCreations Vector - Candy Flank :iconsketchmcreations:SketchMCreations 21 1 Golden Oak by Chritsel Golden Oak :iconchritsel:Chritsel 608 180 The Walls of Knowledge by Devinian The Walls of Knowledge :icondevinian:Devinian 2,509 179 Answering The Call by Rated-R-PonyStar Answering The Call :iconrated-r-ponystar:Rated-R-PonyStar 640 141 Twilight (c) by PeachesAndCreamated Twilight (c) :iconpeachesandcreamated:PeachesAndCreamated 147 11 Daring Do the Flash Game ver 0_81 alpha by alexmakovsky Daring Do the Flash Game ver 0_81 alpha :iconalexmakovsky:alexmakovsky 367 377 Knock Knock by Jadekettu Knock Knock :iconjadekettu:Jadekettu 436 156 Evariste Galois by Selunec Evariste Galois :iconselunec:Selunec 17 12 Chrysalis' turn by Evil-DeC0Y Chrysalis' turn :iconevil-dec0y:Evil-DeC0Y 1,634 245 Original: Find Yourself by EStories Original: Find Yourself :iconestories:EStories 662 106 Thanks for the Derpian Wallpaper! by ThySlyDeazel929 Thanks for the Derpian Wallpaper! :iconthyslydeazel929:ThySlyDeazel929 3 2 Commission: Piercing The Sky by Devinian Commission: Piercing The Sky :icondevinian:Devinian 3,261 196 The Real Villains of Season 5 Episode 1 by Beavernator The Real Villains of Season 5 Episode 1 :iconbeavernator:Beavernator 1,963 348



Always curious.

As some of you might have heard, I'm working on a tool to extract vector data from Adobe Flash's FLA files into some more convenient and open format, such as SVG, to be able to use them with some more free & convenient vector image editing tools, such as Inkscape and Synfig Studio.

Since some of my tool already works, I decided to show it to y'all.

So how does it work?
The trick is that since around CS5, .fla files are just compressed files with the directory structure of your whole project stored inside as plain text files in an XML-based proprietary format, XFL. Each symbol from the library is stored in a separate XFL file. I can extract these files and parse them to get the vector data out of them and convert these data to SVG shapes.

Where's the tool?
Take a look at my GitHub repository where I will maintain the sources of my program:

It is written in Ruby programming language, so you need Ruby interpreter (free) to run it, and the libxml gem, because I use this library in my script to parse XML.

So far, my script is already capable of extracting some shapes from these XFL files correctly. There are several sample XFL files in the TestData directory and a sample SVG image merged from the outputs of my program (some parts of the Twilight Sparkle's puppet from the "Double Rainboom" project). Or you can see that SVG sample here too. So you can see that it really works  :-)

You can also take a look at the documentation here:…

There is a text file documenting the structure of those XFL files and what elements you can find there. There's also a picture explaining how Flash stores the edges, because this is probably the most trickiest part of the whole problem: the edges are shared to save space (which is kinda stupid, since it is wasted elsewhere), by storing each edge between two filled regions separately. I had to figure out how to find all closed contours and join together in the correct order to be able to display them as SVG shapes.

Currently I'm working on parsing different fill styles and stroke styles (such as gradients etc.), and when I finish it, the next stage will be to automate the whole process to parse more XFL files at once and restore the symbols' correct positions (matrix transforms etc.). So, as you can see, the work is in progress ;-) Stay tuned.

I still don't know how should I deal with animations though :-/ For starters, I could perhaps export only the first frames for each animated symbol, but this won't work in the long run. I need to find some way to export animations too. I thought of exporting all frames as hidden layers maybe, or allowing the user to specify which frames he/she would like to turn on as visible (maybe in some simple config file). Maybe do you have some better idea?
  • Listening to: Noctemia - The Summer Cools Down
  • Reading: Obscure Unicorn History
  • Watching: P0N3
  • Eating: Muffins
  • Drinking: Colta Cola


Add a Comment:
MonkeyDZyrax Featured By Owner Jun 4, 2014
axis5 Featured By Owner Aug 14, 2006   Photographer
ślicznie dziękuję za watcha :glomp:
mokuru-chan Featured By Owner Jul 12, 2006
love you style keep up the good work!!^_^
CjFagundo Featured By Owner Jul 9, 2006  Professional Traditional Artist
thanks for the watch!!! :drunk:
Add a Comment: