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