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

Frames

Frames are at the core of any animation, dictating each segment of time and movement. The total number of frames in your movie, and the speed at which they're played back, together determine your movie's overall length.

Frame Types

Not all frames are created equal; different frame types are designed for different animation tasks. Let's take a look at the various frame types that can exist on the timeline.

Placeholder frames

Placeholder frames are not really frames, but rather rectangular boxes where frames can be placed. They are indicated by the grid on the timeline. Devoid of content, these frames, generated automatically by Flash, make up the majority of the timeline when you begin your Flash project. Although you cannot manually create placeholder frames, they will remain present until you convert them to actual frames. Because your movie needs real frames on at least one layer of the timeline in order to play, it will cease playing once it reaches a point where all layers contain only placeholder frames (Figure 10.14).

Figure 10.14Figure 10.14 This scene will not play past Frame 20, because Frame 21 and beyond contain only placeholder frames.


Keyframes

Any time your wish your animation to undergo a visual change or you want an action to occur, you must use a keyframe at that point on the timeline (Figure 10.15). Obviously, frame-by-frame animations require numerous keyframes because you must edit each frame individually. A tweened animation, on the other hand, requires only two keyframes—one to begin the tween and one to end it. Changes that occur between the beginning and ending keyframes are mapped by Flash and thus do not require additional keyframes.

Figure 10.15Figure 10.15 Keyframes, identified by a vertical line on the left edge of the frame and a small dot, define where changes occur on the timeline.


Although most keyframes contain content that is visible on the stage, they can also be blank—usually the result of removing a movie element from an animation. Every new project you begin in Flash starts with a blank keyframe on Frame 1 of Layer 1. A keyframe with content visible on the stage is identified by a solid black dot; a blank keyframe is identified by a hollow dot; and a keyframe with an attached action is identified with a small a.

Regular frames

Regular frames always follow keyframes and contain the same content as the last keyframe on the same layer. Confused? Let us explain.

A keyframe on the timeline denotes a change; the regular frames that follow a keyframe determine the duration of that change. Let's say you have a movie element that you want to appear in the middle of the stage at the beginning of your movie: You would need to place that element on a keyframe at Frame 1. If you also want it to remain in the middle of the stage until it jumps to the top-left corner at Frame 11, you would make Frames 2 through 10 regular frames (since the element does not move or change as these frames play), and then add a keyframe at Frame 11 to specify a change in the element's position on the stage (Figure 10.16).

Figure 10.16Figure 10.16 Regular frames always follow keyframes, and contain the same content as the last keyframe on the same layer.


A keyframe and the span of regular frames that follow it are known as a keyframe sequence. The timeline can contain any number of keyframe sequences. If the keyframe in a sequence contains graphical content that is visible on the stage, the regular frames that follow it will appear gray. If the keyframe in a sequence contains no graphical content, the regular frames that follow it appear white (Figure 10.17).

Figure 10.17Figure 10.17 If the keyframe in a sequence contains content visible on the stage, the regular frames that follow in the sequence are shaded gray. If the keyframe contains no content visible on the stage, the regular frames that follow are white.


Tweened frames

Tweened frames are always part of a tween sequence consisting of two keyframes and any number of frames in between. The frames between the two keyframes represent computer-calculated graphics.

You can perform two types of tweening with Flash: motion tweening and shape tweening. You use motion tweening to alter the size, position, rotation, and other aspects of symbols, groups, or text blocks in your animation. You use shape tweening to morph one simple shape into another—for example, smoothly transforming a red circle into a blue square or the letter T into the letter I (Figure 10.18). Shape tweening only works with simple shapes such as lines and vector shapes, not with symbols or groups. If text is to be used in a shape tween, you must first break it apart, then place each letter you plan to tween on a separate layer.

Figure 10.18Figure 10.18 Motion tweening controls an element's size, position, rotation, and so on. Shape tweening morphs one simple shape into another.


If you plan to simultaneously tween multiple elements in a scene, each tween must be placed on its own layer. In other words, you can't tween separate movie elements on the same layer at the same time.

A motion-tweened sequence is identified by two keyframes separated by intermediate frames with a black arrow and light-blue background. A shape-tweened sequence is identified by two keyframes separated by intermediate frames with a black arrow and light-green background. A problem in a tween sequence—for example, a tween that lacks a starting or ending keyframe—is indicated by a dashed line (Figure 10.19).

Figure 10.19Figure 10.19 A motion tween (top layer), a shape tween (middle), and a problem tween (bottom).


Working with Frames

Now that you're familiar with the various frame types and how to use them in creating animations, let's look at the ways you can work with them on the timeline. For more information about using frames, see "Creating Animation" later in this chapter.

Selecting frames

Before you can move, duplicate, or change a frame, you must first select it. When a frame is selected, the playhead automatically moves to that frame and the contents of its layers appear on the stage.

To select an individual frame:

  • Click a frame once to select it.

The frame will appear highlighted. The selected frame becomes the current frame, and any commands you enter pertaining to frames will affect it.

To select a range of frames:

  • Click the first frame you want to be part of the range, drag to the last frame you want included, and then release.

    All selected frames will appear highlighted. You can now move, delete, and duplicate them as a whole.

To select a keyframe or tween sequence:

  • Double-click once on any frame that is part of the sequence.

    The sequence will appear highlighted (Figure 10.20). You can now move, delete, and duplicate the sequence.

    Figure 10.20Figure 10.20 A frame sequence is highlighted to indicate that it is currently selected.


Moving and duplicating frames

By moving frames, you can edit the points where changes occur along the timeline, such as the starting and ending points of frame sequences or when frame actions occur. By duplicating frames, you can use their content elsewhere on the timeline without having to re-create that content.

To move or duplicate frames:

  1. Select a frame, range of frames, or frame sequence.

  2. Click and drag the selected frames to a new location on the timeline, then release (Figure 10.21).

    Figure 10.21Figure 10.21 Drag selected frames to their new location, and release.


  3. To duplicate the frame or range of frames at a new location, hold down the Alt key (Windows) or the Option key (Macintosh) while you drag. As you drag, a plus sign (+) will appear next to the cursor indicating that you are in the process of duplicating the selected frames.

Extending or shortening a frame sequence

Selecting while holding down the Ctrl key (Windows) or the Command key (Windows), then moving the beginning or end frame of a keyframe sequence, alters the length of the sequence on the timeline and thus the duration of its content in the overall animation. As you drag, a double-headed arrow will appear next to the cursor indicating that you are in the process of shortening or lengthening a frame sequence. Selecting, then moving the beginning or end frame of a tween sequence, determines not only its length on the timeline and its duration in the overall animation, but also how many regular frames the tweening process generates between the beginning and ending keyframes.

Adding and inserting regular frames

Adding or inserting frames at any point along a layer changes the timeline position of all frames on that layer located to the right of the added or inserted frame(s).

To add regular frames to the timeline:

  1. Select a placeholder frame on the timeline.

  2. Choose Insert > Frame.

    Regular frames are added until the selected placeholder frame is reached.

To insert regular frames within an existing range of frames:

  1. Select a single frame, range of frames, or frame sequence within an existing range of frames.

  2. Choose Insert > Frame.

    The same number of frames you selected will be inserted onto the timeline; the previously selected frames will be moved to the right of the newly inserted ones.

Adding keyframes

As mentioned earlier, you use keyframes on the timeline to define when changes occur in your animation. Thus, your animation is likely to contain numerous keyframes. When you add a keyframe to a layer, you have the choice of adding a normal or blank keyframe. When adding a normal keyframe, any graphical content (instances of symbols, text elements, and so on) included in the last keyframe on the same layer is automatically duplicated in the new keyframe. Adding a blank keyframe places a point on the timeline where that layer's contents are no longer visible Normal keyframes are used to signify a change in an animation while keeping the content of the animation visible. With a blank keyframe, the change is the actual removal of content (Figure 10.22).

Figure 10.22Figure 10.22 The difference between adding a normal keyframe and a blank keyframe.


To add a keyframe to the timeline:

  1. Select a placeholder or regular frame on the timeline.

  2. Choose Insert > Keyframe or Insert > Blank Keyframe to add a keyframe. If the frame you selected is a placeholder frame, regular frames will be added up to the point of the newly created keyframe. If the selected frame is a regular frame, Flash simply converts it to a regular or blank keyframe—as you specify.

To add a range of keyframes to the timeline:

  1. Select a range of frames or a frame sequence.

  2. Choose Modify > Frames > Convert to Keyframes or Convert to Blank Keyframes.

    A range of keyframes will be added.

Removing frames

Removing frames at any point on a layer changes the timeline position of all frames on that layer located to the right of the frame(s) you remove.

To remove frames:

  1. Select a single frame, range of frames, or frame sequence.

  2. Choose Insert > Remove Frame.

Reversing frames

Reversing frames will invert the timeline order of a selected span of frames, causing the graphical content of the selected frames to play in reverse.

To reverse frames:

  1. Select a sequence of at least two frames.

  2. Choose Modify > Frames > Reverse.

Adding frame actions

Frame actions enable your movie to perform a specified action when the timeline reaches a particular frame during playback. For more information, see Chapter 12, "Getting Started with ActionScript."

To add a frame action:

  1. Right-click (Windows) or Control-click (Macintosh) on the keyframe to which you would like to add an action, and select Actions from the menu that appears.

    The Actions panel will appear next.

  2. Click the Add Action button to add any actions to this frame, then close the Action panel.

    The keyframe display now includes a small a to indicate that an action has been assigned to it.

Labels and comments

You use frame labels in Flash to identify a particular keyframe in your movie. This is especially useful when assigning frame or button actions to certain frames in your movie (see Chapter 12, "Getting Started with ActionScript").

Say you've set up your movie so that several buttons, when clicked, begin playing your movie at Frame 35. However, you later decide that you want to delete five frames from the beginning of your movie. Unfortunately, this means that the content which once began at Frame 35 will now begin at Frame 30—but the buttons you set up earlier will still go to Frame 35 when the viewer clicks them—not the result you were looking for. Using frame labels allows you to get around this problem.

By assigning a label—for example, MyLabel—to Frame 35 and setting all of those button-clicks to begin playing your movie from that label, you can add and delete frames as needed: Regardless of how many scenes are in your movie, those button clicks will always point to MyLabel.

Frame comments allow you to write notes, or comments, in frames of your movie—a good way to remind yourself of the thought process that informed some portion of your movie's timeline.

Because frame labels are exported with your final movie, they can affect its overall file size (albeit minimally). For this reason, you should use short, descriptive labels. Frame comments, in contrast, are not exported, so you can include as much information in them as you want.

Wherever display room on the timeline permits, frame labels are identified by a small red flag followed by the label name, and frame comments are identified by two green forward slashes followed by the comment text (Figure 10.23). Where room on the timeline does not permit, only icons appear, with no accompanying text.

Figure 10.23Figure 10.23 A frame label and a frame comment.


To add a label or comment to a keyframe:

  1. Click the keyframe once to select it.

  2. Choose Window > Properties. The Property inspector will appear.

  3. In the Frame Label box (Figure 10.24), enter the text you would like to use as a label for this keyframe. Entering two forward slashes (//) prior to entering any text creates a frame comment instead.

  4. Press Return/Enter.

    Figure 10.24Figure 10.24 The Frame Label box on the Property inspector.


    The label or comment will appear on the timeline.

    TIP

    If you pause your cursor over a frame on the timeline, a "tooltip" appears with a description of the frame type. If the frame you pause the cursor over contains a label or comment, the label name or comment text is displayed.

Named Anchors

By identifying a keyframe on the main timeline as a named anchor (in essence, an enhanced frame label), you make it possible for Web browsers to recognize those points as regular HTML pages. This means that viewers can navigate Flash movies using the Back/Forward buttons of their Web browsers—just as they would a typical Web page. As the viewer interacts with your movie, Flash records his or her navigation path—so that the user can then employ the browser's Back/Forward buttons to move backward or forward in the movie.

In addition, named anchors make it possible to bookmark keyframes—which means users can quickly return to a given point in a Flash movie simply by clicking that bookmark (again, just like a typical HTML page). Both of these capabilities address issues that had caused some companies to limit the use of Flash on their sites.

NOTE

Due to issues beyond Macromedia's control, Named anchors do not work on Macintosh-based browsers.

As you'll soon see, once you've assigned a frame label to a keyframe, it's easy to create a named anchor.

To create a named anchor:

  1. Assign a label to a keyframe, as described in the previous section.

    This will cause the Named Anchor checkbox underneath the frame label box to become selectable.

  2. Check this box to create an anchor (Figure 10.25).

    Figure 10.25Figure 10.25 The Named Anchor checkbox only becomes selectable if a keyframe has been given a frame label.


    The frame label icon on the keyframe changes to a neat little anchor icon, indicating the existence of a named anchor.

  3. Choose File > Publish Settings to open the Publish Settings dialog box.

    Select the HTML tab and choose the Flash with Named Anchors template (Figure 10.26).

    Figure 10.26Figure 10.26 The Flash with Named Anchors template must be used for named anchors to work in your published movie.


    Although your movie doesn't need to be published (exported) immediately, when it is, it must be published using this template in order for named anchors within your movie to function. For more information about publishing a movie, see Chapter 20, "Publishing."

    NOTE

    When a user navigates to a keyframe containing an anchor, the name of that frame label/anchor will appear in the address bar of the viewer's browser—so choose your frame label names wisely.

    TIP

    Since many developers use scenes to separate content within a movie, you can enable Flash to automatically insert a named anchor at the beginning of each new scene. To do this, open the Preferences dialog box (Edit > Preferences...), select the General tab, and then check the Named Anchor on Scene option.

Onion-Skinning

If you've ever watched a pencil-and-paper animator, you've probably noticed that he or she customarily works with a pencil in one hand and a couple of pages, or eventual frames, of the animation in the other. While drawing on the current frame, the animator will flip among frames that precede and follow it to get an idea how the drawing sequence will emulate movement when it's eventually played. Flash provides similar functionality in the form of onion-skinning, which allows you to view and edit multiple frames simultaneously.

To view multiple frames using onion-skinning:

  • Click the Onion Skin button (Figure 10.27).

    Figure 10.27Figure 10.27 The Onion Skin buttons.


    This brings up a set of onion-skinning markers, which appear next to the playhead on the timeline (for more information about onion-skinning markers see "Onion-Skinning Markers" a little later in the chapter). The content of the frames between these two markers now appears on the stage, some before the current frame and some after (Figure 10.28). The current frame is the one over which the playhead is positioned—and in this mode, it is the only one whose contents are editable. Content on uneditable frames appears dimmed in color. Dragging the playhead allows you to apply onion-skinning to other frames.

    Figure 10.28Figure 10.28 When onion-skinning is turned on, the stage reflects the content of multiple frames, with the current frame's content the most boldly defined.


    TIP

    You will not be able to see content on currently locked or hidden layers when using onion-skinning. Thus, you can lock or hide layers to specify which content is visible and editable when onion-skinning.

To view onion-skinned frames as outlines:

  • Click the Onion Skin Outlines button.

    This option works much like the Onion Skin button, except that content on all but the current frame appears as outlines. You can assign a different outline color to each frame to help identify which layer's content needs to be edited.

Editing multiple frames

Normally, you can only edit content on the current frame when using onion-skinning; however, by making multiple frames editable during onion-skinning, you can select, move, rotate, resize, and otherwise alter the content of multiple frames simultaneously. This is a great feature for moving entire sections of content on the stage (Figure 10.29). For example, if you wanted to move a layer's content by 50 pixels, you could manually place the playhead at a frame, move the layer's contents, move the playhead forward a frame, move the layer's contents, and so forth. However, this is a tedious process as well as a waste of time. By editing multiple frames simultaneously, you can move everything on the layer across multiple frames simultaneously.

Figure 10.29Figure 10.29 The Edit Multiple Frames feature lets you edit the content of multiple frames simultaneously—for example, moving the content on several at once, as shown here.


To make multiple frames editable:

  1. Unlock and make visible all layers whose content you wish to move.

  2. Click the Edit Multiple Frames button.

    All content on unlocked and visible frames between the onion-skinning markers becomes editable, meaning you can move, rotate, and otherwise edit it as a whole.

Onion-skinning markers

You use the onion-skinning markers to determine the range of frames that are onion-skinned. Usually, the markers maintain their positions relative to the playhead; however, you can also anchor them while the playhead moves. You can adjust onion-skinning markers manually or via the Modify Onion Markers pop-up menu.

To move the onion-skinning markers manually:

  • Click a marker and drag it to its new position, then release. You can't move either marker past the position of the playhead.

To modify the onion-skinning markers:

  • Click the Modify Onion Markers button.

    This brings up the Modify Onion Markers pop-up menu, which includes the following options:

    Always Show Markers. Normally, onion-skinning markers only appear when onion-skinning is turned on. This option causes them to be displayed even when it's not.

    Anchor Onion. This option anchors, or locks, the onion-skinning markers to their current position—that is, they remain stationary rather than retain their positions relative to the playhead.

    Onion 2. This option lets you quickly set onion-skinning markers two frames before and two frames after the current frame (playhead position).

    Onion 5. This option lets you quickly set onion-skinning markers five frames before and five frames after the current frame.

    Onion All. This option onion-skins all the frames in the current scene. Obviously, this works best if you're viewing a limited number of layers; lock or hide certain layers to make them invisible.

  • + 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.

Overview


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.

Surveys

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.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

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.

Security


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

Children


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

Marketing


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 customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


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: www.peachpit.com/u.aspx.

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 NevadaDesignatedRequest@pearson.com.

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.

Links


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