Ming - dynamic SWF generation

+++ under construction +++

This is my website about SWF-generation with Ming and Perl. Checkout the examples section. All examples come with Sourcecode and ready compiled SWF-movies. Some can be viewed even with Flash3-plugin (Shapes, simple Actions), some need Flash6-plugin (e.g. Actionscript Drawing API) to work. Depends on used features in the examples.

Some maybe useful tips for working with ming:

  • Writing $s->movePenTo(0,0); when starting shape painting is useless, because the pen is there by default.
  • Close your shapes if you use fills. An IMHO good working solution is, when you start drawing at (0,0) and then close your shape (without moving the "pen" while painting) with $s->drawLineTo(0,0);. I had some flashplayer-crashes with shapes that solved when I closed them. If you don't want closed shapes, don't set any setrightFill(); or setLeftFill(). By default there is no fill on shapes.
  • Learn to use MovieClips (for PHP-users: Sprites) and their instances. They make things easy for you if you understand how they work. (timeline, layers)
  • Always complete MovieClip/Movie with a $mc_i->nextFrame; / $movie->nextFrame; statement. If not, your added stuff of this last frame will not pop up. This is silly, but ming doesn't do it automatically for you. (should be solved in the ming-lib). Maybe newer Flashplayers are tolerant about the forgotten end-tag in the SWF, but the players I have ignore stuff in the last frame when there is no end-tag in the swf.
  • Reuse SWF-objects, not your functions that create SWF-objects. (when possible)

For Actionscript reference look at http://www.macromedia.com/support/flash/action_scripts/

| http://peter.liscovius.de/swf/ming/_index.phtml | printlayout |