Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Are there any modules or any way anyone is aware of to read text from swf files (any text whether they are labels, links, or whatever)?

I tried SWF::Search but didn't get anything back when I tried its methods.

Replies are listed 'Best First'.
Re: Read text from swf file
by kvale (Monsignor) on Mar 16, 2004 at 00:01 UTC
    The module SWF::Parser can also read SWF files. It is more heavyweight than SWF::Search, requiring you to create some callback functions, but you may have more success with it. If you still cannot extract the text elements, the SWF file may be non-compliant or corrupt. SWF::Parser can still be useful in this case, allowing you to pinpoint the problem area in the file by detecting the point at which the parser starts giving you garbage.

    -Mark

Re: Read text from swf file
by eXile (Priest) on Mar 16, 2004 at 02:06 UTC
    Not a Perl solution: but the Ming-library might be usefull here. From their FAQ:
    * Can you manipulate existing SWF files with Ming?
    No. Ming is most useful, I believe, in conjunction with the Flash loadMovie command- any dynamic content you need can be loaded into a parent movie..
    The Ming source package includes a utility called swf2php which tries to convert an SWF movie into a PHP script which creates the same movie, but it's a bit out of date and incomplete.
    But the good news is they have Perl-wrappers too.