Flash follow the mouse circle animation

Source: Internet
Author: User

This example introduces the use of Flash to create a simple aperture animation effect, mainly to explain the production of mouse follow effect, suitable for novice friends to learn. Effect Demo:

Just start to learn friends do not think this is difficult oh, this is the most simple effect of a kind of the use of button components to do, do not need a lot of code, well ~ See the tutorial, Practice ~

Create a new blank Flash document, press CTRL F8 to create a new button symbol

Draw a large, borderless rectangle in the component scene, but not too big, moderate on the line, this will be put into the scene, the scene to put a number of, their appropriate to draw a line, to have the fill color, then, the transparency adjustment to 0 (here to pay special attention, not to draw a color box, is to have a color, and then in the color mixer to adjust alpha to 0, so transparent, as shown

Draw the first frame of the transparent four square, the following frames are the same, you do not need to insert keyframes, directly in the fourth frame right click Insert Frame, or press F5 on the line ~

The button is done, and the next most important step is to create a new movie clip symbol called Circle

Press CTRL L open the Library panel, pull the button symbol into the movie clip's scene, preferably in the scene center

Click Layer 1 First frame, press F9 to open the action panel, the Code Stop ();

Click on the button components in the scene, and then press F9 to open the action panel and write the code

On (rollover) {

Play ();

}

It means to play the animation when the mouse passes

Friendly tip: Click on the Frame and button is not the same, add the stop code is in the frame, add play is on the button oh, to pay attention to ~

Well, halfway through, here's the Circle animation.

Insert a new Layer 2, insert a keyframe in frame 2nd, draw a small circle with no fill, and remember, the position of the picture is in the position of the button.

Insert the key frame in 15 frame, enlarge the circle, when enlarging the circle, you can hold down ALT shift and then use the tool to enlarge, so the center position will not change, enlarge also by equal proportion enlarge ~ ~ The circle enlarge, can change the color, then the transparent value to 0

Finally, create a shape tween animation, such a small to large color gradient transparent circle to do it ~

Select all of the Layer 2 frame 2 to frame 15th, right click the copy frame

Then create a new layer, 2 frames right click Paste frame, if the last paste after the end of the extra frame, remember to delete ha ~

In this way, a circle is copied, and you can point to the last frame after the first frame of the gradient, change the color, of course, don't forget the last frame to change the color to transparent oh ~ Press This, more copies of several layers, I have a total of five gradient layer, each layer of color is not the same, we random ~

All right, all set, let's go back to the scene and start putting the components.

Open the library, drag the components of the circle to the scene, and you have to fill the scene. Do not fill the line, in short, a component of the mouse will perform the round effect, so different placement will have different effects oh, you can try ha ~ I here is full ~ So a mouse to follow the effect of ~^0^

All right, wrap it up, test it.

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.