Macromedia Company's Flash animation software has become a very popular web page Performance tool, Web site developers use it to arouse the interest of the visitors. Unfortunately, however, there is a big limit to creating animations using ActionScript, and Macromedia has announced that it intends to abandon the flash generator product and switch to cold Fusion, which supports Flash MX, where will our website go? Now we can easily dynamically create flash animations using the Ming PHP library, and seamlessly integrate with our code. We can create animations of various effects based on the data in the database.
The Ming animation library originally appeared in the PHP4.05 version, replacing the previous version of the libswf module. The Ming library is written in C and supports multiple languages, so let's take a look at how to make animations using PHP. The library is simple to use and tightly integrated with PHP, however, the library is still in the experimental phase, the current version is 0.2a, online tutorials, examples, and help manuals can be easily learned, Ming functions organized in a very organized way, convenient for PHP and flash developers to find. Using PHP and the Ming Library not only gives our website a gorgeous decoration, but also reduces the cost of developing flash animations and complicated labor.
There are two ways to use the Ming library, which we can embed in PHP (for UNIX platforms), or as a PHP module that supports all platforms and does not need to be instantiated when used. If we were to run the Ming Library as a PHP module, we had to explicitly call the Ming library, just like the other modules, and then use the functions in that library. Since the module must be loaded before use, there is a bit of performance degradation compared to the way Ming is compiled as an internal function.
Ming Library is completely free, we can download to the creator's website, the address is: http://www.opaque.net/ming/, the website ... php.net/ming.
Once we have properly installed and configured the Ming Library, we can create a PHP object, call the Ming function from PHP, and define our animations by invoking functions and properties. There are 13 objects in the PHP module that provide some of the features of Flash, as well as several commands to control the parameter setting at the time of release. Here's a look at how to use it to create animations.
Using Macromedia Flash to create the SWF format animation, we first create some symbols, Flash has three types of symbols: graphics, animation clips, buttons. Once we have created these symbols, we can copy them into the scene, each of which is called an instance, and can put any number of instances into our scene. You can then define the behavior of these objects, that is, define the motion and motion trajectory, or you can define the parameters of the animation, such as size and background color, which can be saved if needed. SWF file.
Using PHP's Ming library to create Flash animations, like Macromedia Flash, you must first create some symbols that are examples of PHP objects, then define the positions and interrelationships of those objects in the animated scene, and then define the actions of the objects in each frame, Finally define the animation itself. We can directly export the SWF directly to the browser, or we can save it in SWF format for future use. The advantage of Flash is the graphical user interface, the use of Ming Library can not only more simple control objects, but also has unlimited scalability and reuse.
http://www.bkjia.com/PHPjc/631846.html www.bkjia.com true http://www.bkjia.com/PHPjc/631846.html techarticle Macromedia Company's Flash animation software has become a very popular web page Performance tool, Web site developers use it to arouse the interest of the visitors. Unfortunately, however, just make ...