<?xml version="1.0" encoding="UTF-8"?><rss version="2.0">
<channel>
<title>layers</title>
<link>http://www.computersight.com/tags/layers</link>
<description>New posts about layers</description>
<item>
<title>Flash Tutorial 6: Layers</title>
<link>http://www.computersight.com/Software/Flash/Flash-Tutorial-6-Layers.39800</link>
<description>
<![CDATA[<p>In this tutorial, I will be talking about layers and their advantages. Yes I know these tutorials are boring but in the near future we will be making cool stuff, but first we need to know the basics.</p>
 
 
<h3>LAYERS:</h3>

 
 <p><ol>
  <li> Open up a new flash document.</li>
  <li> You will see on the time line "Layer 1":  

 
 <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_0.jpg" /></li>


  <li> A flash document is made up of layers whether it is 1 layer or 100 layers.</li>
  <li> Draw a square on the stage in layer 1.</li>
  <li> Rename layer 1 by double clicking on it in the timeline, rename it "BOX":  
 
 <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_1.jpg" /></li>
 
 
  <li> Create a new layer by clicking on this button:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_2.jpg" /></li>
 

  <li> A new layer will appear above the layer that you are currently on. By default, it should be "Layer 2". Drag that layer and place it underneath BOX layer and rename it "CIRCLE".</li>
  <li> As the name suggests, draw a red circle in the CIRCLE layer so that it is joined together with the box like this:  
 <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_3.jpg" /></li>


  <li> As you can see, the circle is underneath the box. Layers that are on top will be displayed over the layers underneath it. Now, move the circle away from the box.</li>

  <li> You will see that the circle hasn't been cut off by the box as it would if they were in the same layer, content on layers don't disrupt other content on other layers.</li>

  <li> Make a new layer named TRIANGLE and place it underneath the circle layer.</li>
  <li> Go to the tools panel and click and HOLD the rectangle tool, another hidden tool will show up:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_4.jpg" /></li>

  <li> Select the PolyStar tool.</li>
  <li> Down at the properties panel, select "Options":  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_5.jpg" /></li>
  <li> Another window will come up, edit it so it looks like this:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_6.jpg" /></li>
  <li> Press OK and change the fill color to green.</li>
  <li> In the triangle layer, draw a triangle which is partially covered by the circle like this:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_7.jpg" /></li>
  <li> Now, make key frames on all layers in frame 10:  
 <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_8.jpg" /></li>
  <li> In the first key frame of each layer, move the shape within it so the end product looks like this:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_9.jpg" /></li>
  <li> Now, make motion tweens with the 1st and 2nd key frame of each layer:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_10.jpg" /></li>
  <li> Now, test your movie.</li>
  <li> You will see that all 3 shapes enter the stage and stop. That is another advantage of layers; it would be a real hassle trying to animate all 3 shapes in just one layer.</li>
  <li> You might be wondering what the buttons under the layers are:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_11.jpg" /></li>


  <li> Obviously the first button is creating a new layer, the 2nd is making a layer guide (I won't bother explaining this to you until we need to), and the third is a button for creating a layer folder. Layer folders are for keeping layers together (like all the layers with shapes go in this folder and all layers with words in another etc). The rubbish bin on the other is for deleting layers that you don't want. To delete a layer, simply drag the layer from the time line and place it over the rubbish bin.  </li>
 </ol></p>
 
 
 
 
<h3>LAYERS IN MOVIE CLIPS:</h3>

 
 <p>I will be explaining layers in movie clips now; in this example we are going to make a stick figure walk (or look like it's walking).</p>
 
 <p><ol>
  <li> Open up a new flash document.</li>
  <li> Create a new symbol by going to "Insert" and then "New symbol":  
 
 <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_12.jpg" /></li>
  <li> Name the movie clip "Walking person" and press OK:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_13.jpg" /></li>
  <li> Movie clips and buttons can have layers as well, I will show you buttons in the next tutorial.</li>
  <li> Name the current layer in the movie clip "Body".</li>
  <li> Draw a vertical line anywhere on the stage, doesn't matter:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_14.jpg" /></li>
  <li> Select that line and look down at the properties panel:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_15.jpg" /></li>
  <li> Here, you can edit the width, height and position of the selected object(s).</li>
  <li> Change it so it looks like this:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_16.jpg" /></li>
  <li> If the middle of the line aligns with the + then that's great. Otherwise, don't worry we are going to fix that.  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_17.jpg" /></li>
  <li> Go to the “align &amp; info &amp; transformation” panel. If you don't have it, open it by pressing CONTROL + I:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_18.jpg" /></li>
  <li> Click on the "Info" tab in the panel if you haven't already and select the line using the selection tool. The panel should look a bit like this:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_19.jpg" /></li>
  <li> Now, this part of the panel: <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_20.jpg" /> Is the symbol alignment, right now it is top left corner so at 0, 0 the top left corner of the symbol will align with the +.</li>
  <li> Change the alignment by clicking on it, to the centre so it looks like this:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_21.jpg" /></li>
  <li> Now, change the Y coordinates to 0.</li>
  <li> The line will now line up in the center.</li>
  <li> Make a new layer named "Head" and draw a circle for a head in the head layer.</li>
  <li> Move the circle so it connects with the body like this:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_22.jpg" /></li>
  <li> Make a new layer named “Arms” and draw arms for your stick figure as shown:  
 
 <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_23.jpg" /></li>
  <li> Create another layer for legs named “leg” but don't draw in the legs.</li>
  <li> So far we made different body pieces in different layers, although they are on different layers, you can still select multiple objects on multiple layers using the selection tool but the don't interfere with other content's layers.</li>
  <li> Back to making the stick figure. Create a new symbol by pressing CONTROL + F8.</li>
  <li> Name it leg.</li>
  <li> Draw a line with these properties and align the centre of the line with the + as I showed before:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_24.jpg" /></li>
  <li> Now, return to the stage and go back into the "Walking person" movie clip via the library.</li>
  <li> Drag the legs movie clip that you just made from the library and place it in the legs layer and align it up with the body. You can have a movie clip inside another movie clip, but you cannot have a movie clip inside the same movie clip.  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_25.jpg" /></li>
  <li> Select the transformation tool (Hotkey Q) and use it on the leg movie clip:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_26.jpg" /></li>
  <li> Now you see that white circle in the middle of the leg? Well click and drag it up to the top of the leg, this changes the center of rotation.<img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_27.jpg" /></li>
  <li> Now, go to the lower part of the leg (The 2nd back square dot) and the mouse should change into a rotating symbol, it looks a bit like this: (excuse my bad drawing)  </li>
 
  <li> Rotate it so it ends up like this: <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_28.jpg" /></li>
  <li> Make another layer named “leg2” and place it underneath the “leg” layer. Your time line should look a bit like this:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_29.jpg" /></li>
  <li> Repeat steps 27-30 for the 2nd leg but rotate it the other way so the stick figure ends up like this:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_30.jpg" /></li>
  <li> Create a key frame in frame 5 for both of the leg layers and another key frame in frame 10.</li>
  <li> Note that now you can only see the legs, we don't want that so add frames in all layers apart from the leg layers so the time line looks like this:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_31.jpg" /></li>
  <li> In the "Leg" layer in the 2nd key frame, rotate the leg so that it is in the position (or close to it) of the leg in the "leg2" layer:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_32.jpg" /></li>
  <li> Hide the "leg" layer by pressing the hide dot:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_33.jpg" /></li>
  <li> Now, in the "leg2" layer, rotate the leg so it was where the first leg originally was or close to it:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_34.jpg" /></li>
  <li> Show the "leg" layer by pressing the hide dot again. Now make motion tweens as I have shown here:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_35.jpg" /></li>
  <li> Now return to the stage.</li>
  <li> In that one layer you have, click and drag the "Walking person" movie clip onto that layer in the top left corner of the stage and resize him using the transformation tool to make him smaller:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_36.jpg" /></li>
  <li> In frame 20 create a key frame.</li>
  <li> In the key frame that you just made, move the stick figure so he's at the bottom right of the stage:  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_37.jpg" /></li>
  <li> Create a motion tween between these 2 key frames.</li>
  <li> Test your movie by pressing CONTROL + ENTER/RETURN.</li>
  <li> Now, you have your own walking stick figure, but it looks a bit weird, so we are going to make it a bit better.</li>
  <li> Close the testing screen and go into the "leg" movie clip.</li>
  <li> Add a line to the end of the movie clip so it looks like an "L":  <img  alt="" src="http://images.stanzapub.com/readers/computersight/2007/08/14/39400_38.jpg" /></li>
  <li> Now test your movie, it looks way better now.  </li></OL></P>
 
  <P> Congratulations, you have just gained knowledge in layers and made a walking stick figure!  </P><a href="http://www.pheedo.com/click.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FSoftware%2FFlash%2FFlash-Tutorial-6-Layers.39800"><img src="http://www.pheedo.com/img.phdo?x=&u=http%3A%2F%2Fwww.computersight.com%2FSoftware%2FFlash%2FFlash-Tutorial-6-Layers.39800" border="0"/></a>]]></description>
<pubDate>Mon, 02 Jul 2007 04:27:30 PST</pubDate></item>
</channel>
</rss>
