PHP and Ming

Jan 17, 2009 Author: Developer

What is Ming? Ming is a library that allows you to create your own dynamic SWF

Flash movies. That’s right; you can create on-the-fly Flash movies. Imagine the endless applications you could use this for. Dynamic tickers, an online chat application using a
PHP engine, creating random challenge games; the list goes on and on. Up to this point,
all of your games have been turn-based with minimal user interaction with the page itself.
With PHP combined with Flash you could add some really cool interactions to your game.
Besides adding interaction you can create some real animations. You can even add Flash
elements into your game.

Now you are probably chomping at the bit to install Ming. Before I get to that I just want
to say that this is not a complete “all you can do with Ming” chapter. This is simply a look
at what you can do to build your PHP skills. Now, with that said, you install Ming like any
other extension. Open up the php.ini file and uncomment the following line:

extension=php_ming.dll

If you are the type that would rather load the extension dynamically, you can always use
the following code to do just that:
<?php
if(!extension_loaded(‘ming’))
{
if(strtoupper(substr(PHP_OS, 0, 3)) == ‘WIN’)
{
dl(‘php_ming.dll’);
}
else
{
dl(‘php_ming.so’);
}
}
?>

Now that you have officially enabled Ming you can start creating dynamic Flash pieces.
Ming comes with 13 classes that allow you to perform various tasks in Flash. Take a look
pieces.

Classes

style="white-space:nowrap;">SWFMovie
SWFShape
SWFFill
SWFGradient
SWFBitmap
SWFFont
SWFText
SWFTextField
SWFDisplayItem
SWFSprite
SWFMorph
SWFButton
SWFAction


Your Ad Here
tags: php ming

views 4432
  1. Add New Comment