How to export text from Flash?
December 17, 2008 1:02 PM   Subscribe

Is there any way to export all of the text in a FLA file?

I'm writing on a well-known net artist, who works primarily in text and music in flash. When you find the net art works via Google, Google somehow is able to read a portion the text into its 'summary' field. I'd like to do this for the entire piece, as I'd like to quote from the piece, but I'm having trouble doing so.

So far, I've decompiled the original SWF file into a FLA file, but I can't find a way to export all of the text. Any ideas?

(As for the ethics on doing this -- I'm not stealing or reappropriating the artist's work, and ultimately my end-goal is to examine the artist's work closely, so I don't think I should feel bad about this.)
posted by suedehead to Technology (11 answers total) 3 users marked this as a favorite
 
Usually, the best tool to use in this case is Strings (windows?). I don't know if it'll work with an FLA file however.
posted by These Premises Are Alarmed at 1:13 PM on December 17, 2008


I don't think adobe has shared the software for this with the world, just with google and yahoo, there's a release about it here. Just searching the binary for text fragments like strings does is a quick and easy solution, though you'll need to go over it manually to remove stuff that isn't really content but programming related, and you may miss some other parts that consist of short text fragments or compressed text.
posted by fvw at 1:49 PM on December 17, 2008


I don't think adobe has shared the software for this with the world, just with google and yahoo, there's a release about it here.

No, actually, there is (or was) a link to this somewhere on adobe.com; I've downloaded it in the past.
posted by me & my monkey at 1:54 PM on December 17, 2008


Response by poster: TPAA: strings doesn't work, just tried. Good idea, though.

fvw and m&mm: any idea where the software is? I've been looking around and for some reason can't find it right now..
posted by suedehead at 2:20 PM on December 17, 2008


Nope, can't find it either, or any mention of it being public. Perhaps they've backpedalled on that? You could mail them and ask perhaps?
posted by fvw at 2:26 PM on December 17, 2008


Looking at a random flash file on the site you linked, I wouldn't be surprised if it was actually not text in the flash file, but a vector image of the letters. Which kind of leaves you screwed.
Have a TA transcribe them all for minimum wage...
posted by fvw at 2:30 PM on December 17, 2008


SWFTools' swfstrings might work
posted by dnial at 2:35 PM on December 17, 2008


It's normal for an SWF file to contain the stroke-description of all the characters it uses, because that means it can be run on a system which doesn't have the required font installed. That's how font objects are encoded, but font objects are different than text objects.

Sometimes text is encoded as shapes directly, and in that case you'd be screwed. But the one I downloaded and looked at ("BETTY NKOMO") is using normal text objects.

Those can be exported using "Flash Decompiler", which is a commercial product. One output format choice is HTML, and it creates a separate HTML file for each text object. But they're encoded properly and will display correctly in a browser, even if they're something strange like Kanji. (I learned about this while trying to extract text from Japanese SWF files.)

You can tag as many as you want and export them as a batch process, so that part is pretty convenient.
posted by Class Goat at 4:37 PM on December 17, 2008


Response by poster: Class Goat, I've already decompiled the files. But you mention this: "You can tag as many as you want and export them as a batch process, so that part is pretty convenient."

I'm new to Flash -- how do I do this? It seems that the text is simply text..
posted by suedehead at 6:58 PM on December 17, 2008


Best answer: You don't do it in Flash. You do it in Flash Decompiler, the commercial program that I linked to.

After you've loaded the SWF into Flash Decompiler, you open it on the right column. One of the subsections there is "Texts". You either click it (to select every text object) or open it and select the ones you're interested in.

Then on the top you choose "Extract" mode. Click "Formats" and under the text objects choice, make sure to select HTML. Then you switch back to Extract, put in the path where you want the files created, and click "Extract Now".

It maintains the original text color, but makes the background white. If the text was originally white, then it won't seem as if there's anything there if you load the HTML file into a browser. In that case, hit "Control-A" or mouse-sweep in order to select it, so you can see the text.

As far as I know, there's no easy way to do this from within Flash itself.
posted by Class Goat at 10:14 PM on December 17, 2008


Response by poster: YEEAH! Thanks Class Goat -- I completely missed the 'Extract' option in the program. After that, and a series of piped shell commands, I have successfully extracted the text. Thanks a whole bunch!
posted by suedehead at 12:46 AM on December 18, 2008


« Older Comcast, from the gates of hell I spit at thee!   |   How might I obtain a copy of an obscure movie from... Newer »
This thread is closed to new comments.