Introducción
First of all: Ming is not an acronym_ Ming is an open_source (LGPL)
library which allows you to create SWF ("Flash") format movies_ Ming
supports almost all of Flash 4's features, including: shapes, gradients,
bitmaps (pngs and jpegs), morphs ("shape tweens"), text, buttons,
actions, sprites ("movie clips"), streaming mp3, and color transforms
__the only thing that's missing is sound events_
Note that all values specifying length, distance, size, etc_ are in "twips",
twenty units per pixel_ That's pretty much arbitrary, though, since the player
scales the movie to whatever pixel size is specified in the embed/object tag,
or the entire frame if not embedded_
Ming offers a number of advantages over the existing
PHP/libswf module_
You can use Ming anywhere you can compile the code, whereas libswf is
closed_source and only available for a few platforms, Windows not one of
them_ Ming provides some insulation from the mundane details of the SWF
file format, wrapping the movie elements in PHP objects_ Also, Ming is
still being maintained; if there's a feature that you want to see, just
let us know ming@opaque_net_
Ming was added in PHP 4_0_5_
Requerimientos
To use Ming with PHP, you first need to build and install the Ming
library_ Source code and installation instructions are available at the
Ming home page: http://ming_sourceforge_net/
along with examples, a small tutorial, and the latest news_
Download the ming archive_ Unpack the archive_ Go in the
Ming directory_ make_ make install_
This will build libming_so and install it
into /usr/lib/, and copy
ming_h into /usr/include/_
Edit the PREFIX= line in the
Makefile to change the installation directory_
Instalación
Ejemplo 1_ built into php (unix)
mkdir <phpdir>/ext/ming
cp php_ext/* <phpdir>/ext/ming
cd <phpdir>
_/buildconf
_/configure __with_ming <other config options>
|
Build and install php as usual,
restart web server if necessary_
Now either just add extension=php_ming_so
to your php_ini file, or put
dl('php_ming_so'); at the head of all of your
Ming scripts_
Clases predefinidas
Estas clases están
definidas por esta extensión y estarán disponibles
cuando la extensión haya sido compilada dentro de PHP o cargada
dinámicamente en tiempo de ejecución
Ming introduces 13 new objects in PHP, all with matching methods and
attributes_ To use them, you need to know about
objects_
- swfshape
- swffill
- swfgradient
- swfbitmap
- swftext
- swftextfield
- swffont
- swfdisplayitem
- swfmovie
- swfbutton
- swfaction
- swfmorph
- swfsprite