Shop Mobile More Submit  Join Login
About Deviant SasQMale/Poland Recent Activity
Deviant for 11 Years
Needs Core Membership
Statistics 5 Deviations 492 Comments 3,500 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 2 4

Favourites

Vector - Candy Flank by SketchMCreations Vector - Candy Flank :iconsketchmcreations:SketchMCreations 19 1 Golden Oak by Chritsel Golden Oak :iconchritsel:Chritsel 596 180 The Walls of Knowledge by Devinian The Walls of Knowledge :icondevinian:Devinian 2,228 169 Answering The Call by Rated-R-PonyStar Answering The Call :iconrated-r-ponystar:Rated-R-PonyStar 600 128 Twilight (c) by PeachesAndCreamated Twilight (c) :iconpeachesandcreamated:PeachesAndCreamated 127 11 Daring Do the Flash Game ver 0_81 alpha by alexmakovsky Daring Do the Flash Game ver 0_81 alpha :iconalexmakovsky:alexmakovsky 367 376 Knock Knock by Jadekettu Knock Knock :iconjadekettu:Jadekettu 378 146 Evariste Galois by Selunec Evariste Galois :iconselunec:Selunec 17 12 Chrysalis' turn by Evil-DeC0Y Chrysalis' turn :iconevil-dec0y:Evil-DeC0Y 1,661 244 Original: Find Yourself by EStories Original: Find Yourself :iconestories:EStories 678 106 Thanks for the Derpian Wallpaper! by ThySlyDeazel929 Thanks for the Derpian Wallpaper! :iconthyslydeazel929:ThySlyDeazel929 2 2 Commission: Piercing The Sky by Devinian Commission: Piercing The Sky :icondevinian:Devinian 3,058 192 The Real Villains of Season 5 Episode 1 by Beavernator The Real Villains of Season 5 Episode 1 :iconbeavernator:Beavernator 1,963 344 Sketch by zaphiel-san Sketch :iconzaphiel-san:zaphiel-san 47 9 Rainbow Dash WIP by CreatorOfPony Rainbow Dash WIP :iconcreatorofpony:CreatorOfPony 322 85 Heartstrings ch4/p18 - They see me rockin' by TriteBristle Heartstrings ch4/p18 - They see me rockin' :icontritebristle:TriteBristle 523 306

Activity


deviantID

SasQ
SasQ
Poland
Always curious.
Interests

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:
github.com/SasQ/SavageFlask

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  :-)

Documentation
You can also take a look at the documentation here:
github.com/SasQ/SavageFlask/tr…

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

Comments


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