Home Backend Development PHP Tutorial Add support for dynamic flash file generation to php4_PHP Tutorial

Add support for dynamic flash file generation to php4_PHP Tutorial

Jul 20, 2016 am 11:03 AM
flash for join in dynamic exist imagine support document source generate of net

Source: wangzy
Have you ever imagined dynamically generating flash animation on a website? This article will let you step into the exciting era of php+flash.
php is such a good thing, I really can’t predict how she will change tomorrow. . . Okay, let’s get down to business, let’s
introduce how to implement this function.
1. Required software
SWF support library
http://reality.sgi.com/grafica/flash/dist.99.linux.tar.Z
This package contains documentation. You can use it with c, his example is.
This guy is great, but it would be better if he provided the source code.
Of course, php4 is obtained from http://www.php.net
2. 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 two image.swf and test.swf generated by the example c program file, you can put it in the browser to see the results.
If it comes out, you're halfway done.
You still need to do a few things
Add
SWFBINPATH=/usr/local/dist/bin to /etc/profile
export SWFBINPATH
SWFFONTPATH=/usr/local/dist/fonts
export SWFFONTPATH ​​
2. Compile php4
Compile and add
--with-swf=/usr/local/dist
The author found an error that swf.h could not be found when compiling. Use
#cp /usr/local/dist/swf.h /php/src/directory/ext/swf solve the problem
After installation, make the following script (example in the php document), please pay attention to the current directory The swf directory under the directory must be
writable, otherwise apache will error and you will not get anything.
After execution, use the browser to call the test.swf file. You will definitely be surprised by the power of php, haha
Experience the perfect feeling of programming and art design, but unfortunately I don’t have an artistic mind:-(
There are two programs in /usr/local/dist/bin, imgtofi is used to convert rgb, gif, jpg to libswf .a supports
graphic formats. pstoff converts ps fonts into fonts available in libswf.a. I have converted English fonts and they can be used in the program
, but I have not successfully converted Chinese fonts. I don’t know where. I succeeded, can you tell me?
For the php function description of swf, please go to php.net to find the latest manual.


http://www.bkjia.com/PHPjc/445249.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/445249.htmlTechArticleSource: wangzy Have you ever imagined dynamically generating flash animations on a website? This article will let you step into the world of php+flash Exciting times. php is such a good thing, I really can’t predict how she will change tomorrow...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Convert VirtualBox fixed disk to dynamic disk and vice versa Convert VirtualBox fixed disk to dynamic disk and vice versa Mar 25, 2024 am 09:36 AM

When creating a virtual machine, you will be asked to select a disk type, you can select fixed disk or dynamic disk. What if you choose fixed disks and later realize you need dynamic disks, or vice versa? Good! You can convert one to the other. In this post, we will see how to convert VirtualBox fixed disk to dynamic disk and vice versa. A dynamic disk is a virtual hard disk that initially has a small size and grows in size as you store data in the virtual machine. Dynamic disks are very efficient at saving storage space because they only take up as much host storage space as needed. However, as disk capacity expands, your computer's performance may be slightly affected. Fixed disks and dynamic disks are commonly used in virtual machines

What to do if the 0x80004005 error code appears. The editor will teach you how to solve the 0x80004005 error code. What to do if the 0x80004005 error code appears. The editor will teach you how to solve the 0x80004005 error code. Mar 21, 2024 pm 09:17 PM

When deleting or decompressing a folder on your computer, sometimes a prompt dialog box "Error 0x80004005: Unspecified Error" will pop up. How should you solve this situation? There are actually many reasons why the error code 0x80004005 is prompted, but most of them are caused by viruses. We can re-register the dll to solve the problem. Below, the editor will explain to you the experience of handling the 0x80004005 error code. Some users are prompted with error code 0X80004005 when using their computers. The 0x80004005 error is mainly caused by the computer not correctly registering certain dynamic link library files, or by a firewall that does not allow HTTPS connections between the computer and the Internet. So how about

How to transfer files from Quark Cloud Disk to Baidu Cloud Disk? How to transfer files from Quark Cloud Disk to Baidu Cloud Disk? Mar 14, 2024 pm 02:07 PM

Quark Netdisk and Baidu Netdisk are currently the most commonly used Netdisk software for storing files. If you want to save the files in Quark Netdisk to Baidu Netdisk, how do you do it? In this issue, the editor has compiled the tutorial steps for transferring files from Quark Network Disk computer to Baidu Network Disk. Let’s take a look at how to operate it. How to save Quark network disk files to Baidu network disk? To transfer files from Quark Network Disk to Baidu Network Disk, you first need to download the required files from Quark Network Disk, then select the target folder in the Baidu Network Disk client and open it. Then, drag and drop the files downloaded from Quark Cloud Disk into the folder opened by the Baidu Cloud Disk client, or use the upload function to add the files to Baidu Cloud Disk. Make sure to check whether the file was successfully transferred in Baidu Cloud Disk after the upload is completed. That's it

What is hiberfil.sys file? Can hiberfil.sys be deleted? What is hiberfil.sys file? Can hiberfil.sys be deleted? Mar 15, 2024 am 09:49 AM

Recently, many netizens have asked the editor, what is the file hiberfil.sys? Can hiberfil.sys take up a lot of C drive space and be deleted? The editor can tell you that the hiberfil.sys file can be deleted. Let’s take a look at the details below. hiberfil.sys is a hidden file in the Windows system and also a system hibernation file. It is usually stored in the root directory of the C drive, and its size is equivalent to the size of the system's installed memory. This file is used when the computer is hibernated and contains the memory data of the current system so that it can be quickly restored to the previous state during recovery. Since its size is equal to the memory capacity, it may take up a larger amount of hard drive space. hiber

Detailed explanation of log viewing command in Linux system! Detailed explanation of log viewing command in Linux system! Mar 06, 2024 pm 03:55 PM

In Linux systems, you can use the following command to view the contents of the log file: tail command: The tail command is used to display the content at the end of the log file. It is a common command to view the latest log information. tail [option] [file name] Commonly used options include: -n: Specify the number of lines to be displayed, the default is 10 lines. -f: Monitor the file content in real time and automatically display the new content when the file is updated. Example: tail-n20logfile.txt#Display the last 20 lines of the logfile.txt file tail-flogfile.txt#Monitor the updated content of the logfile.txt file in real time head command: The head command is used to display the beginning of the log file

Detailed explanation of the role of .ibd files in MySQL and related precautions Detailed explanation of the role of .ibd files in MySQL and related precautions Mar 15, 2024 am 08:00 AM

Detailed explanation of the role of .ibd files in MySQL and related precautions MySQL is a popular relational database management system, and the data in the database is stored in different files. Among them, the .ibd file is a data file in the InnoDB storage engine, used to store data and indexes in tables. This article will provide a detailed analysis of the role of the .ibd file in MySQL and provide relevant code examples to help readers better understand. 1. The role of .ibd files: storing data: .ibd files are InnoDB storage

Create and run Linux ".a" files Create and run Linux ".a" files Mar 20, 2024 pm 04:46 PM

Working with files in the Linux operating system requires the use of various commands and techniques that enable developers to efficiently create and execute files, code, programs, scripts, and other things. In the Linux environment, files with the extension ".a" have great importance as static libraries. These libraries play an important role in software development, allowing developers to efficiently manage and share common functionality across multiple programs. For effective software development in a Linux environment, it is crucial to understand how to create and run ".a" files. This article will introduce how to comprehensively install and configure the Linux ".a" file. Let's explore the definition, purpose, structure, and methods of creating and executing the Linux ".a" file. What is L

Best practices for file closing in Golang Best practices for file closing in Golang Feb 28, 2024 pm 09:09 PM

Best practices for file closing in Golang In Go language programming, handling file operations is a common requirement, and file closing operations are particularly important. Closing files correctly can effectively release resources and avoid resource leaks and system performance degradation. This article will introduce the best practices for file closing in Golang and provide specific code examples to demonstrate how to properly close files. Why is it important? In Golang, you need to close the file promptly after opening it to release file descriptors and other resources and avoid resource leaks. like

See all articles