|
A motion guide, in Flash, enables you to make an object follow a path
that you specify. The path that you specify will be located on a
separate layer known as a guide layer. Most people have this notion
that a motion guide is only a squiggly line. In this tutorial, I am
going to explain how to create a motion guide that is not a squiggly
line!The
following instructions will help you to create a motion guide:
- Create a
new movie in Flash. You will see Layer 1 displayed in the
timeline. Right click on the layer marked Layer 1 and select Add
Motion Guide. Your timeline should look like the following image:
-
Ensure Layer 1 is selected, and draw a
square in your working/drawing area.
- Select
the Guide layer and draw the outline of a circle. You can draw an
outline of a circle by removing the fill color and only leaving
the border visible. To only display the border of a circle:
- Select the Oval tool from the Toolbox.
- Click the Fill Color tool and the color menu will
drop-down. Select the empty box (top-right of menu) with a red stripe going
diagonally to remove the fill color.
- Draw your circle now. You will only see the outline
of the circle:
-
Select the center of the square and drag it toward
the circle outline you just drew. When you drag the center of the
square toward the outline, you will see the center of the square
snap to the outline as displayed in the following image:
-
Insert a keyframe in Frame 20 in both the guide and Layer 1
layers. Lock the guide layer by pressing the center dot to
the right of the Guide: Layer 1 label. Once the keyframe has been
inserted and the guide layer has been locked, select Layer 1 of
Frame 20 and drag the center of the square to the opposite end of
the circle's outline. The square will again snap to the outline as
shown in the following image::
-
Let's animate the square! Select all the Frames between 1 - 20.
Right click on the selected frames and select Create Motion Tween.
Now, preview the animation by pressing Ctrl + Enter.
When you
previewed the animation, the square rotated half-way around the
circle to reach its final destination on the other side of the
circle outline. That's all there is to
making an object follow a guide path. Of course, in classic kirupa.com
tradition, the source code has been provided so you can see compare
your FLA to that of mine. Click
Here to Download the Source Code.
I hope the information helped.
If you have any questions or comments, please don't hesitate to post them on the
kirupa.com Forums. Just post your question and I, or our friendly
forum helpers, will help answer it.
The following is a list of related tutorial and help resources that you may find
useful:
|
[pages/rightinfo.htm] |