Support for PHP4 add dynamic Flash file generation

Source: Internet
Author: User
Have you ever imagined a dynamic flash animation on a Web site, and this article allows you to step into Php+flash's exciting times.

PHP is really a good thing, it is impossible to predict how she will change tomorrow ... All right, here we are.

Describes how to implement this function.

One, the required software

SWF's support library

Http://reality.sgi.com/grafica/flash/dist.99.linux.tar.Z

There are documents in this bag, you can use it in C, and his example is.

That's a great guy, but it would be better if he provided the source code.

And of course it's php4 from Http://www.php.net.

Second, the installation

1, LIBSWF.A Installation

#cp dist.99.linux.tar.z/usr/local

#tar Xvzf Dist.99.linux.tar.z

#cd Dist

#make

You will see the example C program generated by the image.swf and test.swf two files that you can put into the browser to see the results.

If you come out, you'll be halfway through.

There's something else you need to do.

Join in the/etc/profile

Swfbinpath=/usr/local/dist/bin

Export Swfbinpath

Swffontpath=/usr/local/dist/fonts

Export Swffontpath

2, compile PhP4

Compile to join

--with-swf=/usr/local/dist

The author found in the compile time swf.h error, with

#cp/usr/local/dist/swf.h/php/src/directory/ext/swf Solve the problem

After installation, do the following script (examples of PHP documentation), please note that the current directory of the SWF directory to be

Write, or Apache will go wrong, you're not going to get anything.

After the execution of the browser to call the test.swf file, you will be very surprised by the power of PHP, hehe

Experience the perfect feeling of program design and art design, but I have no artistic mind:-(

There are two programs in the/usr/local/dist/bin that Imgtofi used to convert rgb,gif,jpg to LIBSWF.A supported

Graphic format, pstoff to convert PS font to LIBSWF.A available font, I converted the English font, can be in the program

Use, but did not translate into the merits of Chinese fonts, do not know which prawn success, can sue.

About the SWF php function description, please go to Php.net to find the latest manual.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.