We first take a look at the results of the case, the scene has six small balls, respectively, representing the head, waist, hands, feet, if you drag the mouse with any part of the body, the rest of the body will make corresponding movements, the whole body of the changes in the position between the parts is very coordinated.
The implementation is actually very simple, let's take a step-by-step to make this instance effect.
1, open Flash, create a new scene, press Ctrl + F8 to create a new clip, name "Symbol 5", type "button", use the Ellipse tool to draw a circle in this clip scene, and fill a gradient color with the Fill tool, as shown in the figure.
2. Press Ctrl + F8 to create a new Clip named "Symbol 1", type "Movie Clip", drag "symbol 5" made in the previous step into this Clip scene, and in "Symbol 5" The Clip Action panel adds the following statement:
On (Press) {
This.startdrag (); When the mouse clicks, drag clip
}
On (release, releaseoutside) {//When the mouse is released, stop dragging clip
This.stopdrag ();
}
3, press "Ctrl + F8" to create a new Clip, named "Symbol 4", type "Movie Clip", with the line tool in this Clip scene to draw a short line.
4, press "Ctrl + F8" to create a new Clip, named "Symbol 1 copy", type "Movie Clip", drag "symbol 5" in the first step to this Clip scene, and in "Symbol 5" The Clip Action panel adds the following statement:
On (Press) {
This.startdrag ();
drag = 1;
}
On (release, releaseoutside) {
This.stopdrag ();
drag = 0;
}
5, in "Symbol 1 copy" clip, right-click the layer above the timeline, choose Insert a new layer, drag "symbol 4" from step three into the newly inserted layer scene, select "Symbol 4" in the scene, and set the instance on the property panel to be named " Link ".
6. In the Symbol 1 copy clip, right-click the layer above the timeline, and then select Insert a new layer, insert the following statement above the action panel on the first frame of the layer: