Ming functions for Flash
Questo modulo è SPERIMENTALE. Ovvero, il comportamento di queste funzioni, i nomi di queste funzioni, in definitiva tutto ciò che è documentato qui può cambiare nei futuri rilasci del PHP senza preavviso. Siete avvisati, l'uso di questo modulo è a vostro rischio.
Introduzione
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 at » https://ming.sourceforge.net/.
Ming was added in PHP 4.0.5.
Requisiti
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: » https://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.
Installazione
Example#1 built into PHP (Unix)
mkdir <phpdir>/ext/ming cp php_ext/* <phpdir>/ext/ming cd <phpdir> ./buildconf ./configure --with-ming <other config options>
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.
Configurazione di Runtime
Questa estensione non definisce alcuna direttiva di configurazione in php.ini
Tipi di risorse
Costanti predefinite
Queste costanti sono definite da questa estensione e sono disponibili solo se l'estensione è stata compilata nel PHP o se è stata caricata dinamicamente a runtime.
- MING_NEW (integer)
- MING_ZLIB (integer)
- SWFBUTTON_HIT (integer)
- SWFBUTTON_DOWN (integer)
- SWFBUTTON_OVER (integer)
- SWFBUTTON_UP (integer)
- SWFBUTTON_MOUSEUPOUTSIDE (integer)
- SWFBUTTON_DRAGOVER (integer)
- SWFBUTTON_DRAGOUT (integer)
- SWFBUTTON_MOUSEUP (integer)
- SWFBUTTON_MOUSEDOWN (integer)
- SWFBUTTON_MOUSEOUT (integer)
- SWFBUTTON_MOUSEOVER (integer)
- SWFFILL_RADIAL_GRADIENT (integer)
- SWFFILL_LINEAR_GRADIENT (integer)
- SWFFILL_TILED_BITMAP (integer)
- SWFFILL_CLIPPED_BITMAP (integer)
- SWFTEXTFIELD_HASLENGTH (integer)
- SWFTEXTFIELD_NOEDIT (integer)
- SWFTEXTFIELD_PASSWORD (integer)
- SWFTEXTFIELD_MULTILINE (integer)
- SWFTEXTFIELD_WORDWRAP (integer)
- SWFTEXTFIELD_DRAWBOX (integer)
- SWFTEXTFIELD_NOSELECT (integer)
- SWFTEXTFIELD_HTML (integer)
- SWFTEXTFIELD_ALIGN_LEFT (integer)
- SWFTEXTFIELD_ALIGN_RIGHT (integer)
- SWFTEXTFIELD_ALIGN_CENTER (integer)
- SWFTEXTFIELD_ALIGN_JUSTIFY (integer)
- SWFACTION_ONLOAD (integer)
- SWFACTION_ENTERFRAME (integer)
- SWFACTION_UNLOAD (integer)
- SWFACTION_MOUSEMOVE (integer)
- SWFACTION_MOUSEDOWN (integer)
- SWFACTION_MOUSEUP (integer)
- SWFACTION_KEYDOWN (integer)
- SWFACTION_KEYUP (integer)
- SWFACTION_DATA (integer)
Classi predefinite
Queste classi sono definite da questa estensione, e sono disponibili solo quando l'estensione è stata compilata nel PHP o caricata come modulo dinamico al runtime.
Indice dei contenuti
- SWFAction — SWFAction Class
- SWFAction->__construct() — Creates a new SWFAction
- SWFBitmap — SWFBitmap Class
- SWFBitmap->__construct() — Loads Bitmap object
- SWFBitmap->getHeight() — Returns the bitmap's height
- SWFBitmap->getWidth() — Returns the bitmap's width
- SWFButton — SWFButton Class
- SWFButton->__construct() — Creates a new Button
- SWFButton->addAction() — Adds an action
- SWFButton->addASound() — Associates a sound with a button transition
- SWFButton->addShape() — Adds a shape to a button
- SWFButton->setAction() — Sets the action
- SWFButton->setDown() — Alias for addShape(shape, SWFBUTTON_DOWN)
- SWFButton->setHit() — Alias for addShape(shape, SWFBUTTON_HIT)
- SWFButton->setMenu() — enable track as menu button behaviour
- SWFButton->setOver() — Alias for addShape(shape, SWFBUTTON_OVER)
- SWFButton->setUp() — Alias for addShape(shape, SWFBUTTON_UP)
- SWFDisplayItem — SWFDisplayItem Class
- SWFDisplayItem->addAction() — Adds this SWFAction to the given SWFSprite instance
- SWFDisplayItem->addColor() — Adds the given color to this item's color transform
- SWFDisplayItem->endMask() — Another way of defining a MASK layer
- SWFDisplayItem->getRot() — Descrizione
- SWFDisplayItem->getX() — Descrizione
- SWFDisplayItem->getXScale() — Descrizione
- SWFDisplayItem->getXSkew() — Descrizione
- SWFDisplayItem->getY() — Descrizione
- SWFDisplayItem->getYScale() — Descrizione
- SWFDisplayItem->getYSkew() — Descrizione
- SWFDisplayItem->move() — Moves object in relative coordinates
- SWFDisplayItem->moveTo() — Moves object in global coordinates
- SWFDisplayItem->multColor() — Multiplies the item's color transform
- SWFDisplayItem->remove() — Removes the object from the movie
- SWFDisplayItem->rotate() — Rotates in relative coordinates
- SWFDisplayItem->rotateTo() — Rotates the object in global coordinates
- SWFDisplayItem->scale() — Scales the object in relative coordinates
- SWFDisplayItem->scaleTo() — Scales the object in global coordinates
- SWFDisplayItem->setDepth() — Sets z-order
- SWFDisplayItem->setMaskLevel() — Defines a MASK layer at level
- SWFDisplayItem->setMatrix() — Sets the item's transform matrix
- SWFDisplayItem->setName() — Sets the object's name
- SWFDisplayItem->setRatio() — Sets the object's ratio
- SWFDisplayItem->skewX() — Sets the X-skew
- SWFDisplayItem->skewXTo() — Sets the X-skew
- SWFDisplayItem->skewY() — Sets the Y-skew
- SWFDisplayItem->skewYTo() — Sets the Y-skew
- SWFFill — SWFFill Class
- SWF