2002-04-15 00:12:54 +00:00
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
2002-04-15 18:56:49 +00:00
|
|
|
<!-- $Revision: 1.2 $ -->
|
2002-04-15 00:12:54 +00:00
|
|
|
<reference id="ref.ming">
|
|
|
|
<title>Ming functions for Flash</title>
|
|
|
|
<titleabbrev>Ming (flash)</titleabbrev>
|
|
|
|
|
|
|
|
<partintro>
|
|
|
|
&warn.experimental;
|
|
|
|
<section id="ming.intro">
|
|
|
|
<title>Introduction</title>
|
|
|
|
<simpara>
|
|
|
|
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.
|
|
|
|
</simpara>
|
|
|
|
<simpara>
|
|
|
|
Ming is not an acronym.
|
|
|
|
</simpara>
|
|
|
|
<simpara>
|
|
|
|
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.
|
|
|
|
</simpara>
|
|
|
|
<simpara>
|
|
|
|
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 <ulink url="mailto:&email.ming;">&email.ming;</ulink>.
|
|
|
|
</simpara>
|
|
|
|
<simpara>
|
|
|
|
Ming was added in PHP 4.0.5.
|
|
|
|
</simpara>
|
|
|
|
</section>
|
|
|
|
|
|
|
|
<section id="ming.install">
|
|
|
|
<title>Installation</title>
|
|
|
|
<para>
|
|
|
|
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 : <ulink url="&url.ming;">&url.ming;</ulink>
|
|
|
|
along with examples, a small tutorial, and the latest news.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
Download the ming archive. Unpack the archive. Go in the
|
|
|
|
Ming directory. make. make install.
|
|
|
|
</para>
|
|
|
|
<para>
|
|
|
|
This will build <filename>libming.so</filename> and install it
|
|
|
|
into <filename>/usr/lib/</filename>, and copy
|
|
|
|
<filename>ming.h</filename> into <filename>/usr/include/</filename>.
|
|
|
|
Edit the <literal>PREFIX=</literal> line in the
|
|
|
|
<filename>Makefile</filename> to change the installation directory.
|
|
|
|
</para>
|
|
|
|
<section id="ming.install.php.unix">
|
|
|
|
<title>built into php (unix)</title>
|
|
|
|
<para>
|
|
|
|
<informalexample>
|
|
|
|
<literallayout>
|
|
|
|
<![CDATA[
|
|
|
|
mkdir <phpdir>/ext/ming
|
|
|
|
cp php_ext/* <phpdir>/ext/ming
|
|
|
|
cd <phpdir>
|
|
|
|
./buildconf
|
|
|
|
./configure --with-ming <other config options>
|
|
|
|
]]>
|
|
|
|
</literallayout>
|
|
|
|
</informalexample>
|
|
|
|
Build and install php as usual,
|
|
|
|
Restart web server if necessary
|
|
|
|
</para>
|
|
|
|
</section>
|
|
|
|
<section id="ming.install.php-module.unix">
|
|
|
|
<title>built into php (unix)</title>
|
|
|
|
<para>
|
|
|
|
download <filename>php_ming.so.gz</filename>.
|
|
|
|
uncompress it and copy it to your php modules directory.
|
|
|
|
(you can find your php module directory by running
|
|
|
|
<command>php-config --extension-dir</command>).
|
|
|
|
Now either just add <literal>extension=php_ming.so</literal>
|
|
|
|
to your &php.ini; file, or put
|
|
|
|
<literal>dl('php_ming.so');</literal> at the head of all of your
|
|
|
|
Ming scripts.
|
|
|
|
</para>
|
|
|
|
</section>
|
|
|
|
</section>
|
|
|
|
<section id="ming.use">
|
|
|
|
<title>How to use Ming</title>
|
|
|
|
<simpara>
|
|
|
|
Ming introduces 13 new objects in PHP, all with matching methods and
|
|
|
|
attributes. To use them, you need to know about
|
|
|
|
<link linkend="language.oop">objects</link>.
|
|
|
|
</simpara>
|
|
|
|
<itemizedlist>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
<function>swfmovie</function>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
<function>swfshape</function>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
<function>swfdisplayitem</function>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
<function>swfgradient</function>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
<function>swfbitmap</function>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
<function>swffill</function>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
<function>swfmorph</function>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
<function>swftext</function>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
<function>swffont</function>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
<function>swftextfield</function>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
<function>swfsprite</function>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
<function>swfbutton</function>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
<listitem>
|
|
|
|
<simpara>
|
|
|
|
<function>swfaction</function>.
|
|
|
|
</simpara>
|
|
|
|
</listitem>
|
|
|
|
</itemizedlist>
|
|
|
|
</section>
|
|
|
|
</partintro>
|
|
|
|
|
|
|
|
&reference.ming.functions;
|
|
|
|
|
|
|
|
</reference>
|
|
|
|
<!-- Keep this comment at the end of the file
|
|
|
|
Local variables:
|
|
|
|
mode: sgml
|
|
|
|
sgml-omittag:t
|
|
|
|
sgml-shorttag:t
|
|
|
|
sgml-minimize-attributes:nil
|
|
|
|
sgml-always-quote-attributes:t
|
|
|
|
sgml-indent-step:1
|
|
|
|
sgml-indent-data:t
|
|
|
|
indent-tabs-mode:nil
|
|
|
|
sgml-parent-document:nil
|
|
|
|
sgml-default-dtd-file:"../../../manual.ced"
|
|
|
|
sgml-exposed-tags:nil
|
|
|
|
sgml-local-catalogs:nil
|
|
|
|
sgml-local-ecat-files:nil
|
|
|
|
End:
|
|
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
|
|
vim: et tw=78 syn=sgml
|
|
|
|
vi: ts=1 sw=1
|
|
|
|
-->
|
|
|
|
|