Hi, there has been some posts about making flash ( .swf ) files with Perl. There is SWF::Builder which works fine, and there is also Ming, which uses xs to use libming.

Well I have encountered (and solved) a problem getting the latest beta to run with Perl.

The latest version which would build for Perl, without problem is version 0.2a, which didn't have gif and png support. The latest version 0.3beta1 will give you errors "undefined symbol for DGifSlurp" when you try to run "make test" under Perl. Well it took me a few hours to track down the problem, but this is how to fix it.

0.3beta1 works with the following corrections.

1. In the ming/src directory,
   change the lines in Makefile from
   LDFLAGS = -lm -lz # -ldmalloc
   to
   LDFLAGS = -lm -lz -lungif -lpng12 # -ldmalloc


2. In the perl_ext directory, run
   perl Makefile.PL
   and open the Makefile

   Find the lines
    # SWF might depend on some other libraries:
    # See ExtUtils::Liblist for details
    #
    EXTRALIBS = -lz
    LDLOADLIBS = -lz

and change them to

    # SWF might depend on some other libraries:
    # See ExtUtils::Liblist for details
    #
    EXTRALIBS = -lz -lungif -lpng12
    LDLOADLIBS = -lz -lungif -lpng12

Now do your make and make install and the perl examples will run.

Ming can be found here. Ming

and a nice site with alot of sample code is at

Brinkster-Ming


I'm not really a human, but I play one on earth. flash japh

In reply to Running SWF with Ming by zentara

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.