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
SWF Functions
Table of Contents
- swf_actiongeturl — دریافت URL از فیلم Shockwave Flash
- swf_actiongotoframe — پخش فریم و توقف
- swf_actiongotolabel — نمایش فریم با برچسب مشخص
- swf_actionnextframe — رفتن یک فریم به جلو
- swf_actionplay — شروع پخش فیلم flash از فریم فعلی
- swf_actionprevframe — یک فریم به عقب برگشتن
- swf_actionsettarget — تعیین زمینه فعالیت
- swf_actionstop — توقف پخش فیلم flash در فریم فعلی
- swf_actiontogglequality — انتقال بین کیفیت پایین و بالا
- swf_actionwaitforframe — پرش فعالیت اگر فریم بارکذاری نشده بود
- swf_addbuttonrecord — کنترل محل نمایش و ناحیه فعال دکمه فعلی
- swf_addcolor — تعیین رنگ اضافه شده جهانی به مقدار rgba مشخص شده
- swf_closefile — بستن فایل Shockwave Flash
- swf_definebitmap — تعریف bitmap
- swf_definefont — تعریف فونت
- swf_defineline — تعریف حط
- swf_definepoly — تعریف چندضلعی
- swf_definerect — تعریف مستطیل
- swf_definetext — تعریف رشته متن
- swf_endbutton — پایان تعریف دکمه فعلی
- swf_enddoaction — پایان دادن فعالیت فعلی
- swf_endshape — کامل نمودن تعریف شکل فعلی
- swf_endsymbol — پایان تعریف سمبول
- swf_fontsize — تغییر اندازه فونت
- swf_fontslant — تعیین اریب بودن فونت
- swf_fonttracking — تعیین ردیابی فونت فعلی
- swf_getbitmapinfo — دریافت اطلاعات bitmap
- swf_getfontinfo — دریافت اطلاعات فونت
- swf_getframe — دریافت شماره فریم برای فریم فعلی
- swf_labelframe — برچسب فریم فعلی
- swf_lookat — Define a viewing transformation
- swf_modifyobject — تغییر شی
- swf_mulcolor — تعیین مضرب رنگ جهانی به مقدار rgba داده شده
- swf_nextid — بازگرداندن id شی آزاد بعدی
- swf_oncondition — توضیح دادن انتقال استفاده شده برای انجام یک سری از کارها
- swf_openfile — باز کردن فایل جدید Shockwave Flash
- swf_ortho2 — تعریف 2D تطبیق مختصات کاربر به محل نمایش فعلی
- swf_ortho — تعریف تطبیق مختصات کاربر به محل نمایش فعلی
- swf_perspective — تعریف تبدیل نمایش پرسپکتیو
- swf_placeobject — قرار دادن شی در صفحه
- swf_polarview — تعریف موقعیت بیننده با استفاده از مختصات قطبی
- swf_popmatrix — بازیابی ماتریس تبدیل قبلی
- swf_posround — فعالسازی/غیرفعالسازی گرد کردن ترجمه حرکت یا جایجایی شی
- swf_pushmatrix — وارد نمودن ماتریس تبدیل فعلی به پشته
- swf_removeobject — حذف شی
- swf_rotate — چرخش تبدیل فعلی
- swf_scale — مقیاس تبدیل فعلی
- swf_setfont — تغییر فونت فعلی
- swf_setframe — انتقال به فریم مشخص
- swf_shapearc — رسم منحنی دایره
- swf_shapecurveto3 — رسم منحنی بزیر مکبعی
- swf_shapecurveto — رسم منحنی بزیر مربعی بین دو نقطه
- swf_shapefillbitmapclip — تعیین حالت پر کردن bitmap برش داده شده
- swf_shapefillbitmaptile — تعیین حالت پر کردن فعلی در bitmap کاشیبندی شده
- swf_shapefilloff — خاموش کردن filling
- swf_shapefillsolid — تعیین استایل پر کردن فعلی به رنگ داده شده
- swf_shapelinesolid — تعیین استایل خط فعلی
- swf_shapelineto — رسم خط
- swf_shapemoveto — انتقال موقعیت فعلی
- swf_showframe — نمایش فریم فعلی
- swf_startbutton — شروع تعریف دکمه
- swf_startdoaction — شروع توضیح فهرست فعالیت برای فریم فعلی
- swf_startshape — شروع شکل پیچیده
- swf_startsymbol — تعریف سمبل
- swf_textwidth — دریافت پهنای رشته
- swf_translate — ترجمه تبدیلات فعلی
- swf_viewport — انتخاب منطقه برای رسم آتی
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")
