"Simple Loading Production" Rookie Ultimate Tutorial (I don't understand it)

xiaoxiao2021-03-06  96

The first official write tutorial, I hope everyone supports and encourages. It is also some experience in the process of learning, I am very happy to share with everyone. The crowd of this tutorial is the rookie who just started to learn Flash, so I called him a rookie tutorial (this is not a waste?), Of course, the old bird is free, I can live a few eyes. Start talking, today we do is a simple loading, as for the Loading sent, I don't want me to say more (I really don't know what to say to me). The entire loading is divided into two parts: "Screen Production" and "Program Design". First, the picture is made. First, you can draw an east movement in the home scene, select F8 to create a new MC (named loadbar). Ok, now we are in the editorial window of the MC, delete it just now. Draw a fill square on the first frame (the options "is" not "). Set the width of 200 pixels. Next, select this green strip, F8 builds an MC. Then insert a keyframe. Back to the first frame, fill in 1 in the width. Then, the "action" is set in the attribute of the timeline (the interface is as follows, right?) Ok, the production of the animation is basically completed. At this time, we will return to the main scene, and the MC (LoadBar) Drag the stage from the library window. Second, the programming can all know that AS may be placed on the timeline, press New, MC's instance. Today, the AS we have to write on the MC (LoadBar) instance dragged into the stage, saying is some, is to control the animation among the MC, when he completed the "longest" status, our whole The animation is also downloaded. Of course, this is not enough, we have to show the percentage of animation downloads. Create a layer of layering. Drag out a dynamic text box below the MC, write percent in the variable box, now we will select the MC again, open the action panel, write the following statement. ONCLIPEVENT (LOAD) {// MC loads, keep the Location of the MC. STOP ();} OnClipevent (Enterframe) {// MC looped in the following statement byteloaded = _root.getbytesLoaded (); // Get the number of downloaded bytes bytetotal = _root.getbytestotal (); // Get the total byte number loaded = INT (byteloaded / bytetotal * 100); // calculate the percentage of current download _root.percent = loaded "%"; // Make the text box in the main scene display download proportion gotoistStop (Loaded); / / According to the download scale Go to the corresponding frame number IF of the progress bar (byteloaded == bytetotal) {// If fully downloaded _Root.Play (2); // start playing the second frame}} OK, big success, next we are in the second frame You can let you do the real Dongdong pull you. Thank you for reading it! 88!

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

New Post(0)