02-Layers

advertisement
LESSON 2
Flash 5
Layers and Symbols
Layers
What are Layers?
Layers appear as horizontal blocks on the Timeline and they are the key to working with
graphic objects and animations.
Why Use Layers?
Layers can help you organize elements and add depth to your Flash projects. By placing
related objects on a single layer, you can keep them organized and you can edit objects in one
layer without affecting objects on another layer. Layers also add depth, because they are
stacked in Flash. Items placed on the top layer appear in front of those placed on a bottom
layer.
Add layer
Add guide layer
Delete
Adding a Layer:
1. Click the layer that will appear below the new layer, in this case ‘Layer 1’.
2. Click . You may also click Insert from the pull-down menu and select ‘Layer’, or
right-click on the layer that will appear below the new layer and select ‘Insert Layer’.
(Note: Flash adds the same amount of frames to the new layer to match the layer with the
longest frame sequence)
3. Add another layer to the scene. You should now have a total of three layers. However, for
this activity we will only need two layers.
Deleting a Layer:
1. Click the layer you want to delete, in this case
being ‘Layer 3’.
2. Click
, or right-click on the layer that will be
deleted and select ‘Delete Layer’. You should
now have ‘Layer 1’ and ‘Layer 2’ displayed in
the window.
(Note: To delete many layers at once, press down Ctrl
when selecting the layers to be deleted)
DPCDSB
Computer Science
Page 1 of 7
LESSON 2
Flash 5
Layers and Symbols
Setting Layer Properties:
1. Click on ‘Layer 1’.
2. From the pull-down menu, select ‘Modify’ and click ‘Layer’. You may also right-click
on the layer and select ‘Properties’. The following window should appear:
Name of Layer
-Checking the Show box makes
the layer visible in the Timeline.
-Lock locks the layer and
prevents changes to the layer.
Layer types
Layer height; larger heights can be used for
viewing sound waveforms in the layer.
3. Change the name of the layer from ‘Layer 1’ to ‘Background’. As the name states, this
layer will contain the background of your movie.
4. Click on ‘Layer 2’ and open up the layer properties, as done in step 2.
5. Change the name of the layer from ‘Layer 2’ to ‘Ball Shot’.
6. Find a picture of people on a basketball court. Click on the first frame of the
‘Background’ layer and paste this picture onto the stage. If you can’t find such a picture,
you can draw a basketball net and two people to serve as your background.
7. Click on the first frame of the
‘Ball Shot’ layer and draw a
picture of a basketball as well as
you can. If you wish, you may
find and edit an existing picture
of a basketball and paste it onto
the stage.
DPCDSB
Computer Science
Page 2 of 7
LESSON 2
Flash 5
Layers and Symbols
8. Once the picture is drawn, make sure it is selected, then click on ‘Insert’ from the pulldown menu, and select ‘Convert to Symbol’.
9. Change the name of the symbol to ‘Ball’, and the behaviour of the symbol to ‘Graphic’.
Click OK.
10. Right-click on frame 50 (this will be the last frame of the movie) of the ‘Background’
layer and select ‘Insert Keyframe’.
11. Similarly, right-click on frame 50 of the ‘Ball shot’ layer and select ‘Insert Keyframe’.
DPCDSB
Computer Science
Page 3 of 7
LESSON 2
Flash 5
Layers and Symbols
Types of Layers:
 Normal Layer: holds various elements such as graphics, sounds, and movie clips.
All the objects on the layer will appear in the movie.
 Guide Layer: helps with the layout and positioning of objects on other layers. A motion
guide layer contains the path that objects will follow. It always appears directly above
the layer(s) to which it is linked.
 Guided Layer: a layer linked to a regular guide layer.
 Mask Layer: enables you to hide elements in underlying layers from view.
 Masked Layer: layer linked to a mask layer.
Layer name can
be changed by
double-clicking
it.
Indicates
selected
layer.
Indicates
if layer is
visible or
not.
Locks a
layer to
prevent
changes.
By clicking this, all objects on
this layer will appear only as
outlines (helps to identify which
objects belong to the layer).
Inserting a guide layer:
1. Right-click the layer that you want to appear below the new guide layer, in this case the
‘Ball Shot’ Layer.
2. Click ‘Add Motion Guide’.
3. Select the guide layer, ‘Guide: Ball Shot’.
4. Select the smooth pencil tool and draw a path that you want the ball to follow. You
should draw a path from the hand of a person in the background to the basket.
(see picture on next page)
DPCDSB
Computer Science
Page 4 of 7
LESSON 2
Flash 5
Layers and Symbols
5. Click on frame 1 of the
‘Ball Shot’ layer and
select the ball symbol.
Now drag the ball to the
beginning of your guided
path so that it ‘snaps’ in
place.
Drag ball to
starting point
6. Click on frame 50 of the
‘Ball Shot’ layer and
select the ball symbol.
Now drag the ball to the
end of your guided path
so that it ‘snaps’ in place.
Drag ball to
ending point
7. Right-click on any frame
between 1 and 49 of the
‘Ball Shot’ layer and
select ‘Create Motion
Tween’. The following
arrow should appear in
your ‘Ball Shot’ layer.
The ball will now follow
the path when the movie
is played.
8. To play the movie, click on ‘Control’ from the pull-down menu and select ‘Test Movie’.
DPCDSB
Computer Science
Page 5 of 7
LESSON 2
Flash 5
Layers and Symbols
Symbols and Instances
Symbol: any graphical, reusable element you can store in the Flash Library. Once placed in the
Library, it can be used repeatedly throughout the movie. A symbol can be a graphic object, a
movie clip, a graphic created in another program, a button, or a sound clip.
Instance: a copy of a symbol that is inserted into a project. The instance references the original
symbol so the file size is not greatly affected by how many times you reuse a symbol.
Using The Flash Library:
1. Click on the ‘Guide: Ball Shot’ layer.
2. Add a new layer and change the name to ‘Dribble’.
3. From the pull-down menu, select ‘Window’ and click on ‘Library’.
preview of selected item
library commands and tasks
wide library view
narrow library view
4. To insert the ball symbol, click on the first frame of the ‘Dribble’ layer and simply drag
the symbol from the preview box onto the stage.
5. Right-click on the ‘Dribble’ layer and select ‘Add Motion Guide’.
6. Select the guide layer, ‘Guide: Dribble’.
7. Select the smooth pencil tool and draw a path that you want the ball to follow. You
should draw a path from the hand of another person in the background to the ground,
back to the hand, repeating this motion 2-3 times.
DPCDSB
Computer Science
Page 6 of 7
LESSON 2
Flash 5
Layers and Symbols
8. Click on frame 1 of the
‘Dribble’ layer and select the
ball symbol. (You can make
all other layers not associated
with ‘Dribble’ invisible for
the time being to avoid
confusion.) Now drag the ball
to the beginning of your
guided path so that it ‘snaps’
in place.
9. Right-click on frame 50 of
the ‘Ball Shot’ layer and
click ‘Insert Keyframe’.
10. Select the ball symbol. Now
drag the ball to the end of
your guided path so that it
‘snaps’ in place.
11. Right-click on any frame
between 1 and 49 and select
‘Create Motion Tween’.
The ball will now follow the path when the movie is played.
Final Product:
To play the
movie, click on
‘Control’ from
the pull-down
menu and select
‘Test Movie’.
DPCDSB
Computer Science
Page 7 of 7
Download