Dynamic has always wanted to write a flash tutorial to share with you, but always powerless, or is not the choice of people. Now finally the weather, the geographical location has, although people and-I am not very perfect. But finally have the courage to write out, but also please give a lot of advice. 1. Run Flash MX 2004 software, press CTRL + N to create a new blank document, select Flash document in the general panel, and press OK. 2. Press CTRL+J, open the document Properties panel, the wide, high size to 300*300 (px), the background color set to 0x000000 (black), frame frequency set to 20fps (also can be in the property panel directly set it to 20), other default can, click OK, enter the stage. 3. Draw a leaf-shaped shape on the stage, the stroke is set to none, the fill color is set to 0X00CC00, and the size of the width is not greater than 10px. Press O to select the Round drawing tool, draw a 4*4 circle on the top right of the stage, set the stroke to none, its color is set to 0XFFFF00. This is Figure 4 of the view in 200%. Double-click Layer one in the timeline to rename it to pic. (In fact, not to do this step, but when making complex animations, you have to distinguish different layers with different names, so that you can finish them in an orderly fashion. Click the first frame to select all the shapes on the stage, press F8, pop the Convert to Symbol dialog box, act as a movie clip, and click OK for other defaults. Double-click the movie symbol on the stage, enter the movie clip, press F8 to select "Graphics" in the pop-up "Convert to Symbol" dialog box, other defaults, press OK. 5. In the timeline layer "pic" 10,25,40 frame, press the F6 key separately to insert the keyframe. Select Frame 10th, click the graphical symbol on the stage, open the Drop-down list box in the Properties panel, select Advanced Options, click the Settings button on the right, pop the advanced effects panel, increase the red effect value to 255, and then click OK. The effect is as follows: Select Frame 25th, click the graphic symbol on the stage, press LEFT ARROW key, move the graphic symbol to the left 2px, and then press the down arrow to move the graphic symbol downward to 3px. Right-click at the 10,25,40 frame and select Create motion tween. Press Ctrl+e to return to the main scene, select the movie symbol on the stage, and name it MC in the Properties panel. 6. Create a new layer and rename it to "script." In "Pic"At the third frame of the layer, right-click to select Insert Frame (or press F7 key). Insert a blank keyframe by pressing three consecutive F6 keys at the second frame of the script layer. 7. Select the first frame of the script layer, press F9 to open the action-frame panel, enter the following code in the Panel:var i=0,n=0; select the second frame, enter the following code in the action-frame panel: mc._x = math.sin (n) *60+150;
mc._y = Math.Cos (n) *60+150;//positioning MC Position
Mc._rotation = i;//Set rotation angle for MC
Mc.duplicatemovieclip ("MC" +i, I);/Copy MC
if (i>2136) {
This["MC" +i]._alpha=0;//to hide the last replicated MCI
Stop ();
}
i + = 24;//rotation angle increase, also known as shape
n += 0.07;//the position angle increase quantity. It is also the position to select the third frame, in the action-frame panel enter the following code: gotoandplay (2); 8. Press Ctrl+enter, test the film, such a dynamic beautiful pattern will appear. In this animation, I decide the final shape, N determines the final shape position, but i,n also shape and position will affect the shape of the final shape. For example, change the i+=24 to i+=3, change if (i>2136) to if (i>1080), and press Ctrl+enter to test the movie, which is another beautiful graphic. One of the wonders of the guests you have to see their own experience. The animation effect is as follows: i+=24,if (i>2136) i+=3,if (i>1080) i+ =12,if (i>1044) to note that the different i+= value 1, this value 1 different, the required I range of measurement if (i> value 2), this number 2 also different, need to calculate or keep testing to determine. 9. In fact, such repeated frame animation has been inconsistent with as2.0 object-oriented programming syntax, which is an outdated practice. The animation described above is encapsulated in an animation that is readily available to meet the Object-oriented programming syntax. Press Ctrl+f8 to create a new empty movie clip symbol. Press Ctrl+e back to the main scene, press the "PIC" Layer first frame do not loosen the right mouse to the third frame, and then click the right mouse button to select a clipping frame, double-click the library panel movie clip symbol 3, after entering the first frame right-click, select Paste frame. In the same way, paste the script layer in the main scene into the order of the movie clip N and delete more than the frame. Press Ctrl+e back to main scene, deleteIn addition to a layer, and delete the remaining layer more than the frame, leaving only the first frame. Then, drag the movie clip symbol 3 from the library surface to the stage. This one can be dragged anywhere with encapsulated animation. Only the local and global locations are different, and local locations need to be converted to global locations. The method used is: Localtoglobal (). Drag the movie clip symbol 3 again to the stage and you can have two animations that are easy to make. Because the level is limited, is also the first time to write the tutorial, the omission and the improper place must not be exempted, hoped everybody prawns forgive me. The deficiencies must be corrected. Thanks for the bit.
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