Example teaching Flash mouse follow the tutorial: Making Chanzui Rabbit

Source: Internet
Author: User

Core Tip: This example teaches friends to use Flash to make mouse following effect. Drag the carrot with the mouse, the rabbit eyes always stare at the radish, very cute oh ...

This example teaches a friend to use Flash to make mouse follow effect. Drag the carrot with the mouse, the rabbit eyes always stare at the radish, very cute oh ...

Production method:

One, do three components

1, insert new components, behavior film clips, named Rabbit. Draw the shape of the rabbit, you can also draw other animals, but the eyes do not draw. If you want the rabbit ears, mouth, manual, you want to layer by frame to change the shape. As shown in the figure:

2, insert new components, behavior movie clips, named Eyes, OK, into the Eye editing window. In the first frame, draw a circle of the size of the rabbit's orbit, no fill color (here is 30*30), and let it all centered, put the circle on the right side of the line and then draw a red eye without lines, and then the orbital edge of the transparency set to 0.

Create a new layer, select the first frame, open the actions-frames panel, and enter the following code:

this.onmousemove=function () {; eyex=_root._xmouse-this._x; eyey=_root._ymouse-this._y; Ang=Math.atan2 (EyeY,eye X) *180/math.pi; This._rotation=ang}

As shown in the figure:

3, insert a new component, behavior movie clips, named Radish. Draw the radish, select the radish and let it be centered. As shown in the figure:

1 2 Next page > full text reading tips: Try "←→" button, turn the page more convenient Oh!

[1] [2] Next page







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.