Use PHP to dynamically create Flash animation. Flash animation software developed by Macromedia has become a very popular performance tool on web pages. website developers use it to attract the interest of viewers. However, unfortunately, the Flash animation software produced by Macromedia has become a very popular performance tool on web pages. website developers use it to attract the interest of viewers. However, unfortunately, it is very limited to create an animation using only ActionScript. Macromedia has announced its intention to abandon the Flash Generator product and switch to Cold Fusion that supports 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 various animations with different effects based on the data in the database.
Ming animation library first appeared in PHP4.05, replacing the LibSwf module of previous versions. The Ming library is written in C and supports multiple languages. let's take a look at how to use PHP to make animations. This library is simple to use 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. Using the 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 to use the 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, it does not need to be instantiated during use. If we run the Ming library as a PHP module, we must call the Ming library explicitly, just like using other modules, and then use the functions in the library. Since modules must be loaded before use, there is a slight reduction in performance compared to using Ming as an internal function compilation method.
The Ming library is free of charge. you can download it from the creator's website at http://www.opaque.net/ming/....php.net/ming.
Once we have correctly installed and configured the Ming library, 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 Flash functions, and several commands can be used to control the parameter settings during release. The following describes how to use it to create an animation.
Using Macromedia Flash to create an animation in SWF format, 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 behavior of these objects, that is, define the action and motion track, or define animation parameters, such as the size and background color. if necessary, you can save them. SWF file.
Use 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 positions and relationships of these objects in the animation scenario, define the actions of the objects in each frame, and finally define the animation itself. We can directly output SWF to the browser, or save it as a SWF file for future use. Flash has the advantage of graphical user interfaces. Using the Ming library can not only control objects more easily, but also have unlimited scalability and reuse.
Http://www.bkjia.com/PHPjc/631846.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/631846.htmlTechArticleMacromedia company produced Flash animation software has become a very popular tool on the web page, website developers use it to attract the interest of viewers. However, unfortunately, just make...