Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > Adobe Flash

  • Print
  • + Share This
This chapter is from the book

Using layers

Layers act like a stack of transparent sheets. Layers are "stacked" on top of one another, and you can see their stacking order in the timeline. The layer on top is the highest in the stacking order, and the layer at the bottom is the lowest in the stacking order. Objects in the higher layer can obscure objects in the lower layer.

Layers are great for organizing content in your movie. You can name layers, hide their contents, and lock them so that they cannot be edited. Layers are also great for keeping shapes from segmenting each other.

You should still have zoo4.fla from the last exercise open.

1) Choose Modify > Layer. In the Layer Properties dialog box, type Background in the Name field, select the Lock option, and click OK.

When you choose Modify > Layer, the Layer Properties dialog box opens.

You have only one layer in your movie right now; it's currently called Layer 1. Because you have only one layer, the Layer Properties dialog box displays the properties of that layer.

Figure 23

After you type Background in the Name field, select the Lock option, and click OK. The Layer Properties dialog box should close. The name of the layer changes from Layer 1 to Background and a lock icon appears to the right of the layer name. This indicates that the layer is now locked. The Lock option lets you lock a layer, which is useful when you don't want to accidentally move items in a layer. When you lock a layer, you can no longer select anything in that layer, but you can still see its contents. You are also prevented from adding anything to the layer.

When the Show option in the Layer Properties dialog box is selected, as it is by default, the layer is visible. See what happens when you deselect this option and click OK—you'll see that the layer becomes invisible. Be aware that the layer is only invisible in authoring mode. If you test the movie you will see that the layer is still there.

The more complex your movie is, the more layers it might contain, and the harder it is to keep track of each layer. It's a good idea to name each layer. And you should try to give each layer a meaningful name to make it easier to find the layer you need.

2 ) Choose Insert > Layer to add another layer to the movie.

Figure 24

A new layer is added above the Background layer, which means that it sits at the top of the layer stacking order. Whenever you add a layer to your movie, it's added above the currently selected layer. In this case, you have only one layer, so it's selected by default and the new layer is added above it. Objects in a higher layer can obscure objects in the layers below it, so if you add anything to this new layer, it may obscure the contents of the Background layer.

There is no keyboard shortcut key for the Insert Layer command, but as you learned in Lesson 1, you can add one. In addition to the menu command for inserting a layer, you can also right-click (Windows) or Control+click (Macintosh) on the name of a layer and choosing Insert Layer. The Insert Layer command does have a button—it's at the bottom left of the timeline, just above the info bar.

Figure 25

If you ever need to remove a layer, just click its name, and click the Delete Layer button. You can also right-click (Windows) or Control+click (Macintosh) on the layer's name and choose Delete Layer.

3) Double-click on the name of Layer 2. When the name is highlighted, type Welcome Text to change the layer name.

The layer is now named Welcome Text. You could have renamed it using the Layer Properties dialog box, as you did in step 1, but this method is a little faster. If you double-click on the icon to the left of the name, the Layer Properties dialog box opens. You can use either method to rename a layer.

Figure 26

You now have two layers in your movie. Take a look at the timeline and see if you notice a few things. First, do you see a pencil icon to the right of the Welcome Text layer's name? That icon indicates that the Welcome Text layer is the active layer, which means that the layer is currently selected, and anything you add to the stage will be added to that layer. You should still see a lock icon at the far right of the name of the Background layer. You already know this icon indicates that the Background layer is locked so select the Background layer. Notice that the pencil icon appears to the right of the Background layer's name with a red line through it. The red line indicates that even though you have the Background layer selected, you can't add to it.

In addition to the lock and pencil icons, you should notice a few dots to the right of your layer names. Click on each of the dots to see what happens. If you click on a dot below the Show/Hide All layers control, you toggle the visibility of that layer. This is the same as selecting or de-selecting the Show option in the Layer Properties dialog box. If you click on a dot below the Lock/Unlock All layers control you will lock or unlock that layer.

Figure 27

4 ) Select the Welcome Text layer.

You can select the Welcome Text layer by clicking on its name. Don't double-click, as that will highlight the name so you can change the name. Remember that the pencil icon indicates that a layer is active.

5) Select the rectangle tool and set the fill color to no color, the stroke color to #FF9933, and the stroke style to hairline. Set the Corner Radius to 0 and draw a small rectangle on the stage.

The dimensions for this rectangle don't really matter right now—you're going to change them in just a bit. You should just make sure that when you draw the rectangle it appears with a thin orange outline, and no fill. The corners of the rectangle should also be sharp, since you set the Corner Radius to 0.

Figure 28


Did you forget how to change the Corner Radius? Simply click the Round Rectangle Radius button in the Options area of the toolbox, and change the settings.

The most important thing is to make sure you drew the rectangle in the right layer. If you checked to make sure the pencil icon indicated that the Welcome Text layer was active, you should be OK. You should be doubly-OK if the lock icon still appears to the right of the Background layer's name—you can't draw anything in a layer if it is locked. Check the timeline and you should see a black dot in the Welcome Text layer if you drew the rectangle in the right place. Otherwise you may see a hollow dot. You'll learn much more about the timeline in Lesson 4, including the name for those dots.

6) Select the arrow tool and double-click any segment of the stroke you just added to the stage. In the Property inspector set the width (W) to 225, height (H) to 115, x-coordinate (X) to 80, and y-coordinate (Y) to 205.


It's usually a good idea to press Enter or Return after typing a value in a panel. Otherwise the value will not take effect. You can also press Tab after entering a value—that will apply the value and take you to the next setting.

The Property inspector can do much more than change colors for you! You can use it to set the dimensions and coordinates of any shape that you select. That's often easier than attempting to draw shapes exactly where you want them, at exactly the dimensions you'll need.

Figure 29

If you would rather draw a shape on the stage and resize it "by eye" (so it looks right, instead of having exact dimensions) you can use the free transform tool. Just select the shape that you want to modify and then select the free transform tool from the toolbox. A set of rectangular handles and a bounding box appear around the selected element. You can drag the handles to scale the selected element horizontally, vertically, or both. Just drag one of the corner handles to scale the selected element proportionally, or drag one of the center handles to scale the element horizontally or vertically. You can also skew and rotate an element selected with the free transform tool. To skew the selected element, move the pointer over the bounding box between the handles and drag. To rotate the selected element, move the pointer just outside a corner handle and drag.

Figure 30

You can also use the free transform tool to distort shapes, but not anything else (for example, you can't distort groups or imported bitmaps). Just press the Control (Windows) or Command (Macintosh) key and drag a corner handle or a center handle to distort that corner. You can also Shift+Control+drag (Windows) or Shift+Command+drag (Macintosh) a corner handle to taper a shape, or move the selected corner and the adjoining corner equal distances from their origins.

Figure 31

7 ) Make sure you still have the rectangle in the Welcome Text layer selected.

Choose Edit > Duplicate to create a copy of the rectangle.

Figure 32

The duplicate command is a shortcut for Copy and Paste. It creates an exact copy of whatever you had selected and pastes it on the stage. The new copy should still be selected—if it's not, click on each of the line segments to select it. If you double-click on the new copy, Flash will select not only the new copy, but also the old copy.

8) Choose Window > Transform to open the Transform panel. Deselect the constrain option and set the height to 60%.

Figure 33

The Transform panel lets you scale, rotate, and skew an element. It's sort of like using the free transform tool, only more precise. If you deselect the constrain option, you can scale an elements height and width independently, otherwise you will find that as you type a value in one setting, the other setting will change to the same value.


If for some reason the height and width percentages are something other than 100% before you make this transformation, just delete the duplicated rectangle and click the Reset button in the bottom right corner of the Transform panel. Then duplicate the original rectangle and attempt this step again.

9) In the Property inspector set the x-coordinate (X) for the selected rectangle to 335 and the y-coordinate (Y) to 205. Save the file as zoo5.fla in the TFS folder on your hard disk.

Figure 34

The rectangle should now line up with the top of the other rectangle in the Welcome Text layer. You'll add to this file in just a bit, but you've done so much that now is a great time to save the file.

After you save, but before you move on to the next exercise, take a moment to play around with the layers. See what happens if you change the stacking order of the layers, which you can do by simply dragging a layer to the desired position. When the Welcome Text layer is beneath the Background layer, you can't see its contents because objects in a higher layer obscure those in a lower layer. You can see the contents of the Welcome Text layer when it's on top because there's nothing above it to obscure that layer. When you're finished playing, make sure you choose File > Revert to return to the previously saved version of the movie, and then continue to the next exercise.

  • + Share This
  • 🔖 Save To Your Account

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive:

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020