Easy to create a Flash frame rate tester

xiaoxiao2021-03-06  112

Source: http://wwdown.com/wz_body_html/wwdown.com_1655.html


Author: willow hair Source: 5D multimedia Joined 2003-08-28 05:59:26: Reading: 315 flash works preset frame rate is just ideal, but the reality is, flash, or rendering an image processing program When you need to consume a certain amount of time, the frame rate of each frame is basically different when the animation is run. Placing excessive symbols in one frame, the frame rate of the frame is much lower than the preset frame rate, resulting in a case where the screen is not smooth, or the frame is dropped. If you use a frame rate tester to detect your animation, you can find the above problem. Because the frame rate tester works, the current average frame rate is displayed. In short, whether it is designing game or making large animations, slow speed, unstable works will not be attractive, no one can endure an animation with only 4 frames / sec. Effect Preview:

Figure 1 Design key points: First, the tester is as simple as possible, otherwise it will affect the test effect. The tester is mainly a dynamic text and a reset button for outputting the test results. The use of the reset button is to get a frame rate that is accurately calculated, and its mode of operation is to refresh the tester. When the tester test itself, the frame rate displayed should be the same as the preset value. Design steps: 1. Open Flash MX, set the scene size of 350px × 100px, background color is "# 0e6a99" (in fact, the setting of the scene is irrelevant). Press shortcut key "Ctrl F8" to create a movie clip symbol called "FPS". 2. In the scene of the symbol "FPS", click the text tool in the Tools panel, then create a static text, enter a "frame rate:" several words, as shown in Figure 1. Then create a dynamic text box again, click this dynamic text box, and make the settings shown in Figure 2 in its property panel. The most critical setting is to define the variable "OUT".

转载请注明原文地址:https://www.9cbs.com/read-125351.html

New Post(0)