Doing it! - Attach to Path


Tools | Timeline | Library | Panels (5) | Panels & Properties (MX) | Graphics
Motion Tween | Shape Tween | Symbols | Mask | Attach to Path | Buttons | Action Script

Open the file: attach.fla (download file Macintosh - Windows)

It contains the background for this exercise. If you do not have access to the file. Open a new flash document and create a background similar to this:

Here the scenario is that there is a beautiful field of daisies that any child may pick.

However, lining the path leading to the field are monsters that are nothing but huge, ugly, green mouths filled with sharp yellow teeth.

They are only dangerous if you step off the path!

(No, you don't have to be that involved.)

The idea is to get from point A to point B easily when it isn't just a simple Motion Tween.

You could just create many points of reference, so that at every turn there was a new keyframe and a new "tween", but there is a better way.

First, so the background doesn't disappear, click in frame 60 and Insert a Keyframe.

Below the layer names you'll see Click on it to create a new layer. Name the layer "kid".

Drag the "kid" symbol from the Library and place it at the beginning of the path.

(If you don't have access to this file, you could just use a random shape...but do convert it to a symbol.)

Right next to the symbol you used for creating a layer is Click it to create a "guide" layer. You'll notice that it automatically uses the name from the layer that it will be guiding.

( Layer and Guide look different in MX.)

Click in frame 1 of the Guide layer, then go to the Tools Panel, choose a color (like white) that will show when you draw on the path. Click the pencil tool. Go to the stage and draw a line from the beginning of the path to the end, staying kind of in the center.

Change to the Arrow tool.

Click in frame 1 of the "kid" layer. Then drag the kid symbol to the beginning of the line, so that the + by his feet meets the beginning of the line. You'll know you've done it because a large O will show when the + and the beginning of the line meet.

Let go of the symbol.

Click in frame 60 of the kid layer. Move the kid symbol to the end of the line and again match the + to the end of the line. When you see the O, let go.

Select the kid layer and go to Insert, Create Motion Tween or hold you mouse down anywhere between 1 and 60 on the kid layer and select Create Motion Tween from the pop up menu.

In the Frame Panel are additional choices. In this particular case you would NOT want to check "orient to path" or the child would look totally weird. However it this were a butterfly or bee it might be appropriate, so that the body changed direction as it followed the path.

In the actual Flash movie, the guide line does not show. Go to File, Publish Preview, and choose Flash to see how it will actually look.

Bothered by the fact that the kid keeps starting over? Well, you'll have to learn about action scripts!


Tools | Timeline | Library | Panels (5) | Panels & Properties (MX) | Graphics
Motion Tween | Shape Tween | Symbols | Mask | Attach to Path | Buttons | Action Script

Janet Barnstable
updated January 1, 2003

 


powered by FreeFind

Please contact us if you need additional information.
Gail Crantz: D97 Public Information gcrantz@op97.org 708-524-3000
Janet Barnstable: Web Producer jbarnstable@op97.org 708-524-7837 
Care is taken to link to educationally sound material; however, District 97 is not responsible for content beyond its site. 
District 97 Copyright Information and Email Disclaimer, Crisis Planning & School Closing