Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Creative tools for business
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Flash Developer Center / Animation Learning Guide /

Animation Learning Guide for Flash: Shape tweens

by Jen deHaan

Jen deHaan
  • flashthusiast.com

by John Mayhew

John Mayhew

Content

  • Creating shape tweens
  • Using shape hints with shape tweens
  • Where to go from here

Modified

15 August 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
animation Flash Professional

Requirements

Prerequisite knowledge

A basic knowledge of the Flash Professional workspace.

User level

Beginning

Required products

  • Flash Professional (Download trial)

Sample files

  • motion-is-awesomer.zip

By tweening shapes in Adobe Flash Professional CS5 you can create an effect similar to morphing—making one shape appear to change into another shape over time—or animate color and gradient changes. Flash can also tween the location, size, color, and opacity of shapes. For example, you would use shape tweens to make a circle turn into a square, or make a line wiggle.

Note: Shape tweens do not share the concept of property keyframes or object-based tweening. A shape tween creates an animation by interpolating between two separate shapes that are each on keyframes.

Creating shape tweens

Tweening one shape at a time usually yields the best results. If you tween multiple shapes at one time, and want them to morph together, all the shapes must be on the same layer. Otherwise, for some effects, you should shape-tween each shape on separate layers (if you do not want them to affect one another). In Figure 62, each rectangle—the curtain effect in the background and the rectangle on top—tweens on its own separate layer (see shape-tween.fla in the source files).

Each shape tween is on its own layer, so the shapes animate separately.
Figure 62. Each shape tween is on its own layer, so the shapes animate separately.

To apply shape tweening to groups, instances, or bitmap images, you must first break these elements apart (Modify > Break Apart). To apply shape tweening to text, you must break the text apart twice to convert the text to objects.

Note: To control more complex or improbable shape changes, you use shape hints, which control how parts of the original shape move into the new shape. For more information, see the next section.

To tween a shape:

  1. Create a new file and name it shapetween.fla.
  2. Select Frame 1 of Layer 1. This is where the animation will start.
  3. Create a graphic with the Pen, Oval, Rectangle, Pencil, or Brush tool. For best results when you're starting out, the frame should contain only one drawing (such as a single oval shape).
  4. Select Frame 10 of Layer 1 and create a second keyframe (F6).
  5. Select the artwork on the Stage at Frame 10 and do one of the following:
    • Modify the shape, color, opacity, or position of the artwork
    • Delete the artwork and place new artwork in the second keyframe (it should be a raw graphic drawing as well)
  6. Right-click any frame in the Timeline between frames 1 and 10 and select Create Shape Tween from the context menu.
  7. Select an option for Blend from the Property inspector (Window > Properties):
    • Distributive creates an animation in which the intermediate shapes are smoother and more irregular
    • Angular creates an animation that preserves apparent corners and straight lines in the intermediate shapes

Note: Angular is appropriate only for blending shapes with sharp corners and straight lines. If the shapes you select do not have corners, Flash Professionl reverts to distributive shape tweening.

Using shape hints with shape tweens

To control more complex or improbable shape changes, you can use shape hints. These identify points that should correspond in starting and ending shapes. For example, if you are tweening the letter M into the letter N, you can use a shape hint to mark corner of the letter's shape. Then, instead of the letters becoming a jumble of lines while the shape change takes place, each letter remains recognizable and changes separately during the transition.

Tip: Sometimes shape hints can produce unexpected results, or you might not be able to achieve the effect you want even with shape hints. You might want to try using inverse kinematics (IK) inside a shape instead and then use the bone structure to animate your object. To learn how to do this, read the "Animating with the Bone tool" section of Creating animation in ActionScript 3. See also the IK section of the Graphic Effects Learning Guide for Flash.

To use shape hints:

  1. Create a shape tween (see the previous section).
  2. Select Frame 1 of the layer with the animation on the Timeline.
  3. Select Modify > Shape > Add Shape Hint.
  4. Move the shape hint to an edge or corner that you want to mark.
  5. Select the next keyframe in the tweening sequence.
  6. Move the shape hint to the edge or corner in the ending shape that should correspond to the first location you marked.

Repeat this process to add additional shape hints. New hints appear with the letters that follow (b, c, and so on).

The SWF files in Figure 63 animate the letter M into the letter N. The top SWF file does not use shape hints to morph the two letters, while the bottom SWF file uses shape hints to improve the morphing. See Figure 64 (and shape-hints.fla in the source files) to see where each shape hint was placed.

This content requires Flash To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player. To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
This content requires Flash To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player. To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.

Figure 63. The top SWF file displays the default shape tween between two letters. The bottom SWF file displays an animation that uses shape hints to control how the letters morph.

Shape hints were added to control the morph between two letters. You can see the animation in Figure 63.
Figure 64. Shape hints were added to control the morph between two letters. You can see the animation in Figure 63.

Shape hints contain letters (a through z) for identifying which points correspond in the starting and ending shape. You can use up to 26 shape hints. Shape hints are yellow in a starting keyframe, green in an ending keyframe, and red when within a fill area or outside the shape (Flash ignores red shape hints).

For best results when tweening shapes, follow these guidelines:

  • In complex shape tweening, create intermediate shapes and tween them instead of just defining a starting and ending shape.
  • Make sure that shape hints are logical. For example, if you're using three shape hints for a triangle, they must be in the same order on the original triangle and on the triangle to be tweened. The order cannot be abc in the first keyframe and acb in the second.
  • Shape hints work best if you place them in counterclockwise order beginning at the top left corner of the shape.

Where to go from here

For more information on using shape hints and shape tweens, see the Shape tweening section of the Flash Professional online help. For information on using IK for shape animations, read the "Animating with the Bone tool" section of Creating animation in ActionScript 3 and also Character animation with the Bone tool by Chris Georgenes.

Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License+Adobe Commercial Rights

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

More Like This

  • Animation Learning Guide for Flash: Motion Editor
  • Animation Learning Guide for Flash: Motion presets
  • Animation Learning Guide for Flash: Motion tween manipulations
  • Animation Learning Guide for Flash: Motion tweens
  • Animation Learning Guide for Flash: Using JavaScript APIs
  • Animation Learning Guide for Flash: Motion paths
  • Animation Learning Guide for Flash: Preset and custom eases
  • Animation Learning Guide for Flash: Frame rates
  • Animation Learning Guide for Flash: Frame-by-frame animation
  • Animation Learning Guide for Flash: Overview

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement