Use PHP to dynamically create Flash animation

Source: Internet
Author: User
Flash animation software developed by Macromedia has become a very popular performance tool on web pages. website developers use it to attract viewers. However, unfortunately, the creation of animations by using only ActionScript has been severely restricted. The Flash animation software developed by Macrome Macromedia has become a very popular performance tool on web pages, website developers use it to attract the interests of viewers. However, unfortunately, the creation of animations by using only ActionScript is severely restricted. Macromedia has been released and intends to abandon the Flash Generator product and use the Cold Fusion supporting Flash MX, where will our website go? Now, we can use the Ming PHP library to easily and dynamically create Flash animations and integrate them seamlessly with our code. We can create animations with different consequences based on the data in the database.
The Ming animation library was originally presented in PHP4.05 and replaced with the LibSwf module of the previous version. The Ming library is written in C to support multiple languages. let's take a look at how to use PHP to make animations. The application of this library is simple and closely integrated with PHP. However, this library is still in the experimental stage. The current version is 0.2a, online tutorials, examples, and help manuals allow us to learn more conveniently. Functions in Ming are organized to facilitate search by PHP and Flash developers. The application of PHP and Ming libraries not only gives our website a gorgeous decoration, but also reduces the cost and complexity of developing Flash animations.
There are two methods for the application Ming library. we can embed it into PHP (for Unix platforms) or run it as a PHP module. the functions in the library support all platforms, you do not need to instantiate the application. If we run the Ming library as a PHP module, we must clearly call the Ming library, just like other modules, and then apply the functions in the library. The module must be loaded before the application. compared with the internal function compilation method, Ming has a little performance.
The Ming library is free of charge. you can download it from the creator's website. In addition, there are application manuals and specific instructions on the PHP website. The address is http://www.php.net/ming.
Once we install and configure the Ming library accurately, we can create a PHP object, call the Ming function from PHP, and define our animation by calling functions and attributes. There are 13 objects in the PHP module, which provide some functions of Flash. There are also several commands to control the parameter settings during the release. The following describes how to use it to create an animation.
Using Macromedia Flash to create an animation with a SWF pattern, we first create some symbols. Flash has three types of symbols: graphics, animation editing, and buttons. Once we have created these symbols, we can copy them to the scenario. Each copy is called an instance, and we can let many instances into our scenario. Next, you can define the actions of these objects, that is, define the action and motion track, or define the animation parameters, such as the size and background color. if necessary, you can retain them. SWF file.
Using the PHP Ming library to create Flash animation, like Macromedia Flash, you must first create some symbols, which are examples of PHP Objects, then define the position and relationship of these objects in the animation scene, then define the action of the object in each frame, and finally define the animation itself. We can directly output SWF to the browser, or keep it as a SWF pattern file for future use. Flash's strength is the graphical user interface, the use of the Ming library can not only be more simple control object, but also has unlimited expansion and reuse.

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.