Create Flash animations dynamically with PHP

Source: Internet
Author: User
Tags ming php and php website
Macromedia Company's Flash Animation software has become a very popular performance tool on the Web page, the website developer uses it to arouse the interest of the visitor. Unfortunately, only using ActionScript to create animations is very limited, and Macromedia has announced plans to abandon the flash generator product and instead adopt cold Fusion, which supports Flash MX, where will our site go? Now, we can use the Ming PHP library to easily create Flash animations dynamically 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, tightly integrated with PHP, but the library is still in the experimental phase, the current version is 0.2a, online tutorials, examples, and help manuals can make it easy to learn, and the functions of Ming are organized and convenient for PHP and flash developers to find. The use of PHP and the Ming Library not only allows our site to have gorgeous decoration, but also reduce the cost of developing flash animation and complex labor.
There are two ways to use the Ming Library, we can embed it in PHP (for UNIX platforms), or we can run it as a PHP module, where functions support all platforms and need not be instantiated when used. If we were to run the Ming Library as a PHP module, we would have to explicitly call the Ming Library and use other modules, and then use the functions in that library. Because the module must be loaded before use, there is a drop in performance compared to how the Ming is compiled as an internal function.
The Ming Library is completely free, we can download to the creator's website, the address is: http://www.opaque.net/ming/, the website has the detailed use manual and the Help, before using, please look at installs and the configuration explanation, the address is: http:// Www.opaque.net/ming/install.html. In addition, the PHP website also has the use of manuals and detailed instructions, the address is: http://www.php.net/ming.
Once we have properly installed and configured the Ming Library, we can create a PHP object that invokes the functions of the Ming from PHP, and by calling functions and properties, we can define our animations. There are 13 objects in the PHP module that provide some of the features of Flash, and several commands to control the release parameters. Let's see how you can use it to create animations.
To create a SWF-formatted animation using Macromedia Flash, we first create some symbols that Flash has three types of symbols: graphics, animated clips, buttons. Once we have created these symbols, we can copy them into the scene, each copy being called an instance, and we can put any number of instances into our scene. You can then define the behavior of these objects, that is, define motion and motion trajectories, or define animation parameters, such as size and background color, which can be saved if needed. SWF file.

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.