A client recently asked me if i could supply him with artwork from a game so that another team could produce a video. The video team, of course, couldn’t/wouldn’t do anything with the native .fla (Flash) files i had on hand. They wanted Illustrator files.
It took a lot of back and forth and futzing to finally convert the artwork properly, and when i finally found the solution, i realized i had known it all along and had merely forgotten it (because i don’t do this type of thing often). So i’m recording the solution here for posterity; the next time i have to do this, a Google search will turn up my own blog :) It actually wouldn’t be the first time that’s happened.
i’ll keep you on tenterhooks and take you through the frustrating conversion process, just so that you can swear along with me and nod your head and say “yep – that’s happened to me.”
These are the Flash vector characters the client needed me to convert.
The ability to export artwork to .ai format has actually been removed from Flash Professional as of version CS5, and has been replaced with the Adobe .fxg format, which works as expected. The .fxg format even converts gradients properly, which have been a longstanding asspain for the past 10 years. If you’re running CS5 or better, export to .fxg and you’re done. If you’re trapped in CS4 or below, here’s what you may have tried:
- File > Export > Export Image
- Choose Adobe Illustrator (*.ai) from the drop-down filetype list
- Punch in a filename, and click “Save”
- Open the file in Illustrator
The first roadblock you encounter may be this message:
Can’t open the illustration. The illustration contains an incomplete or garbed object description.
Offending operator: “”
Adobe_Illustrator_AI5 / initialize get exec
%%BeginEncoding: _pixelmic … feh. i can’t be arsed to look up the accented characters to type the rest.
i’ve ranted at length before about the error messages eggheads put into their software products. How on Earth is joe average user – and an artist, at that – supposed to react to and troubleshoot a message like this?
Obviously (?), all the egghead wanted the artist to do was this:
Select the single movieclip and press CTRL+B to break apart the object into separate objects. Now, when i go through the export process and bring the file into Illustrator, i get this:
Um … yuck? Who sucked all the color out?
The reason why the colors are desaturated and grey-looking apparently has to do with the Flash .ai export routine deciding to convert RGB artwork to CMYK artwork. i don’t know why it does this, but it’s not helpful. But at least the artwork is in Illustrator in vector format, right?
At this point, you could pick through every piece of vector art and tweak the color by hand … if you’re a sucker. Instead, let’s get on to the reason you’re here: the actual solution to this non-working nonsense.
The mighty (and seldom-understood) wmf
The secret is to export as a Windows Metafile. Mac people, i don’t know if you have this option. If not, i’m not sure how to help you … but once you counter-intuitively export as a .wmf file instead of an .ai file and bring THAT into Illustrator, voila: your artwork is beautifully preserved with its RGB colors intact.
As i mentioned, the one drawback is that gradients don’t survive the crossing. This character’s cell phone casts an alpha gradient glow across her face, which shows up as a flat white polygon in Illustrator:
.fxg format will fix that. If you’re not ready to upgrade your software, this might entail an ugly hand-conversion process of all your gradients … unless someone else has discovered the esoteric conversion secret to preserving gradients? Anyone?
Big thanks to Gavin Friesen, my Art Director back at Corus, for originally cluing me in to this solution.
For more Flash AS3 Tutorials and a pile of other useful stuff, check out our Flash and Actionscript 911 feature.