5. A Little About Layers

The name says it all. The one thing Flash has in common with Ogres (and onions!) This allows you to have more than one thing in a frame in a specific order. For example, you might have the background in one layer and the action in another. To create a layer just press the button indicated above. You can change the order of layers by clicking and dragging. THESE ARE VERY IMPORTANT. WHEN YOU ARE MAKING THINGS MOVE, EACH OBJECT THAT IS MOVING NEEDS ITS OWN LAYER, OTHERWISE FLASH GETS CONFUSED.

This box contains just about every type of layer in every possible situation. Take just a few seconds to have a look. There are three main types of layer:

  • Ordinary Layers - These are the standard layers you use all the time. Everything drawn in these layers is exactly what will appear on the screen.
  • Motion Guide Layers - These have one set purpose - to move an object along a given path - we'll look at these later.
  • Mask Layers - These act like a window - you cannot see the actual object in the layer, though anything in a masked layer that is not covered by the object is also invisible. (You'll see what a mean in a minute - don't panic!

To perform more than one tween at once, you need to have the objects in separate layers.

a) Using Layers


Project Idea

Just remember - this bit is not easy! Have a quick go at a short animation - use the instructions below - and put what you have just learnt into practice! Just to get a hang of layers - they are critical!

Take the tween we just made...

I want to make another circle change to a square across this one. I need a new layer.

This is the button! This will make a new layer above called "Layer 2".

There we are! Now just create a new tween in the same way just like we just did (have another look if you need to.)

 

That's it! You should now have two shapes moving across each other.

Congratulations! You've done it! (Ctrl + Enter to test!)

This is a really important part of using Flash that you must learn to use.

Now then - masking...

 

 

 

 

 

 

 

B) Masking

Now, normally you can't see what's behind a mask. People put them on to hide their ugly faces. But in Flash, they are completely the opposite. You can only see what's behind the mask. Confused? Read on...


Project Idea

Look at the instructions below - make a mask! You can mask anything. Just use the example below, and then do a couple more of your own!

Let's take our favourite friend - the blue circle!

blue circle

Let's mask him!

1. Create a new layer (remember the button? Take a peek if you don't)

 

2. In your new layer (Select it first!) draw a long thin rectangle on top of the circle.

 

 

 

Now the ever so slightly more complicated bit.

3. Right-click on the layer with the rectangle in (probably "Layer 2") and select "Mask".

You'll then notice something very odd happens.

The areas not covered by the rectangle disappear, giving you something like this:

 

 

 

Strange, eh! This is really useful when doing various effects. Anything you do in the masked layer, whether a tween or anything else, can only be seen if it is behind the mask.

Now you get what I mean!

This is now becoming rather boring. Let's have a short break. How about we examine some Flash work...

 

 

 

<<< Previous