I am using ActiveSWF toolkit to produce dynamic Flash movies from XML. I like it, because only I need to produce new dynamic movie is new XML. PHP code is the same. Additionally, it has quite good documentation. See http://www.activeswf.com
Funciones de SWF
Tabla de contenidos
- swf_actiongeturl — Obtiene una dirección URL de una película de Shockwave Flash
- swf_actiongotoframe — Va a un fotograma y a continuación se detiene
- swf_actiongotolabel — Mostrará un cuadro con la etiqueta especificada
- swf_actionnextframe — Avanza al siguiente fotograma
- swf_actionplay — Inicia la reproducción de la película flash en el fotograma actual
- swf_actionprevframe — Va hacia atrás un fotograma
- swf_actionsettarget — Establecer el contenido para las acciones
- swf_actionstop — Detener la película flash en el fotograma actual
- swf_actiontogglequality — Alternar entre alta y baja calidad
- swf_actionwaitforframe — Saltar las acciones en caso de que un fotograma no haya sido cargado
- swf_addbuttonrecord — Controlar la ubicación, el aspecto y el área activa del botón actual
- swf_addcolor — Establecer la global añadir color al valor rgba especificado
- swf_closefile — Cerrar el archivo actual Shockwave de Flash
- swf_definebitmap — Definir un mapa de bits
- swf_definefont — Definir una fuente
- swf_defineline — Definir una línea
- swf_definepoly — Definir un polígono
- swf_definerect — Definir un rectángulo
- swf_definetext — Definir una cadena de texto
- swf_endbutton — Finalizar la definición del botón actual
- swf_enddoaction — Finalizar la acción actual
- swf_endshape — Completa la definición de la figura actual
- swf_endsymbol — Finalizar la definición de un símbolo
- swf_fontsize — Cambiar el tamaño de fuente
- swf_fontslant — Ajustar la inclinación de fuente
- swf_fonttracking — Establecer el tracking de la fuente actual
- swf_getbitmapinfo — Obtener información sobre un bitmap
- swf_getfontinfo — Obtener información de fuentes
- swf_getframe — Obtener el número del fotograma actual
- swf_labelframe — Poner una etiqueta al fotograma actual
- swf_lookat — Definir una transformación de la vista de imagen
- swf_modifyobject — Modificar un objeto
- swf_mulcolor — Establecer la global multiplicar color al valor rgba especificado
- swf_nextid — Devolver la siguiente id del siguiente objeto libre
- swf_oncondition — Describir una transición que sirve para desencadenar una lista de acciones
- swf_openfile — Abrir un nuevo archivo de Shockwave Flash
- swf_ortho2 — Definir un mapeo de dos dimensiones ortográfica de coordenadas de usuario en la ventana gráfica actual
- swf_ortho — Definir un mapeo ortográfico de coordenadas de usuario en la ventana gráfica actual
- swf_perspective — Definir una transformación de proyección perspectiva
- swf_placeobject — Colocar un objeto en la pantalla
- swf_polarview — Definir la posición del espectador con coordenadas polares
- swf_popmatrix — Restaurar el estado anterior de una matriz de transformación
- swf_posround — Activar o desactivar el redondeo del traslado cuando los objetos se colocan o se mueven
- swf_pushmatrix — Salvar la actual transformación de la matriz en la pila
- swf_removeobject — Eliminar un objeto
- swf_rotate — Girar la actual transformación
- swf_scale — Escalar la actual transformación
- swf_setfont — Cambiar la fuente actual
- swf_setframe — Cambiar a un fotograma especificado
- swf_shapearc — Dibujar un arco circular
- swf_shapecurveto3 — Dibujar una curva bézier cúbica
- swf_shapecurveto — Dibujar una curva cuadrática de bézier entre dos puntos
- swf_shapefillbitmapclip — Establecer el modo de relleno a bitmap clipeado
- swf_shapefillbitmaptile — Establecer el modo de relleno actual a bitmap tileado
- swf_shapefilloff — Desactivar el relleno
- swf_shapefillsolid — Establecer el estilo de relleno actual al color especificado
- swf_shapelinesolid — Establecer el estilo de línea actual
- swf_shapelineto — Trazar una línea
- swf_shapemoveto — Mover la posición actual
- swf_showframe — Mostrar el fotograma actual
- swf_startbutton — Iniciar la definición de un botón
- swf_startdoaction — Iniciar una descripción de una lista de acciones para el fotograma actual
- swf_startshape — Iniciar una figura compleja
- swf_startsymbol — Definir un símbolo
- swf_textwidth — Obtener el ancho de una cadena
- swf_translate — Trasladar la transformación actual
- swf_viewport — Seleccionar un área para futuros dibujos
vivid at bwteam dot org ¶
8 years ago
Mark Dijkman The Netherlands ¶
9 years ago
Let's not forget to mention there IS another alternative to Swf-lib and Ming. It's called FreeMovie and is created by Jacek Artymiak from O'Reilly. This piece of art is made out of PHP-files only wich makes it suitable for many platforms. The project is also available via SourceForge as freemovie-php.
Thumbs up for that one!
manuel DOT leiner AT gmx DOT de ¶
10 years ago
Just to mention for users of SuSE 8.0. libswf is included with the distro with no fonts. Therefore you must "patch" libswf support. As I didn't find the solution here before and I found a solution I am posting this fix:
Download the libswf package and uncompress to a directory (e.g. /usr/share/php/swf). Then include
"
SWFFONTPATH=/path/to/fonts
export SWFFONTPATH
"
Then log out and in again and restart apache. Then you should be able to use flash text functions within PHP.
daemorhedron ¶
11 years ago
For those having problems with libswf fonts you can add a system wide variable to point to the fonts dir in your shell.
In linux open up /etc/profile and add the lines :
SWFFONTPATH=/path/to/fonts
export SWFFONTPATH
Please not all of that is case sensitive, so copy it carefully. Logout and log back in to see changes (should affect all users). Test it from the command line with echo $SWFFONTPATH
For windows users you should be able to add
SET SWFFONTPATH=/path/to/fonts
in your autoexec.bat or autoexec.nt. Test it with echo %SWFFONTPATH%
HTH! =)
isu at tozsdeforum dot hu ¶
12 years ago
This works also! Write into the script:
putenv ("SWFFONTPATH=/path_to_swf/fonts");
Maybe you can do the job with apache somehow, but it did't work for me. (With getenv it looked ok, but the swf failed to find the font)
isu
ghisha at inwind dot it ¶
12 years ago
Writing on directory is not required. You can generate a run-time movie .. by replacing swf_openfile("<filename>", .... ) with swf_openfile("php://stdout", ....) and add before that an
Header("Content-type: application/x-shockwave-flash")
