Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
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 in Macromedia Flash: Squash and Stretch

by Chris Georgenes

Chris Georgenes
  • mudbubble.com

Created

6 December 2004

Page tools

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

Requirements

User level

Beginning

Tutorials and sample files

  • squash_stretch.zip (5 KB)

Squash and stretch is a traditional animation technique that animators commonly use to give animations more realism and weight. In the real world, when a moving object comes into contact with another object, it deforms upon impact unless it is completely rigid.

As you animate objects to show realistic impacts and collisions, one thing that is important to remember is that no matter how much an object squashes or stretches, it always maintains the same volume. The amount of squash and stretch depends on how much flexibility you give your object.

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.

Traditional animation usually contains very exaggerated amounts of squash and stretch. A good example of this is a bouncing ball. When it hits the ground it actually deforms and gets squashed. It will then stretch out again as it propels itself upwards. With a little motion tweening and frame-by-frame animation in the Macromedia Flash authoring tool, you can achieve convincing realism with relatively little effort.

Squashing and Stretching a Bouncing Ball

In this tutorial, you give a simple bouncing ball some squash and stretch. First, take a look at what the animation would look like without this effect:

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.

Pretty lame huh? It's dull, boring, lifeless, and has absolutely no personality or character. You can fix this by adding some "weight" to the animation.

  1. On Layer 1, draw a ball and convert it to a symbol. I usually start with the ball at its highest point in the bounce. I set the frame rate of the Flash file to 24 fps. Feel free to use a different frame rate. 24 fps is fast enough for relatively smooth animation without pushing the limits of most of today's computers.
Draw a ball on the Stage and convert it to a symbol.
Figure 1. Draw a ball on the Stage and convert it to a symbol.
  1. Create a second keyframe somewhere on the Timeline. It doesn't matter exactly which frame you choose—you can adjust this later.
  2. Create a second layer and add a simple horizontal line as your "landing" area for the ball. (You can see the line in Figure 2 below.)
  3. Select the ball symbol on the Stage, hold down the Shift key, and use the arrow keys to nudge the ball down to the bottom of the Stage. Place the ball slightly above its landing area as I have done in the example (Figure 2).
The ball positioned near the "landing" line at the bottom of the Stage
Figure 2. The ball positioned near the "landing" line at the bottom of the Stage
  1. Simply right-click anywhere over the frames between your two keyframes containing the ball and select Create Motion Tween.
Right-click to create a motion tween.
Figure 3. Right-click to create a motion tween.
  1. What goes up must come down, but not at a consistent rate of speed. Due to the gravitational pull on Earth, when you throw a ball up in the air, its speed will decrease as its altitude increases. When it begins to return down to the ground, it starts off slow and increases in speed. To simulate this, you can use the Flash Ease In/Out feature. Select Frame 1 and in the Property inspector adjust the Ease value to -100, which makes the ball ease in. This creates smaller increments between frames initially, and gradually increases towards the second keyframe, causing the ball to start off slowly and then gradually gain speed.
Set the Ease value to -100 to make the ball ease in.
Figure 4. Set the Ease value to -100 to make the ball ease in.
  1. Now it's time for you to actually squash something. Create a new keyframe after the second keyframe in your tween.
  2. Select the ball on the Stage and grab the Free Transform tool. Use the handles on the left and right sides to stretch the ball wider, then squash it from the top and bottom.
  3. Use the arrow keys to nudge the ball down so its bottom edge touches the landing surface. This is your first step in deforming the object.
Using the Free Transform tool
Figure 5. Using the Free Transform tool
  1. Repeat the same procedure by continuing to the right in the Timeline frame by frame, creating keyframes on each frame and increasing the amount of squash and stretch. I turned on the Onion Skin tool to show you what my animation looks like with three keyframes of squash and stretch (see Figure 6).
Three keyframes of squash and stretch revealed by the Onion Skin tool
Figure 6. Three keyframes of squash and stretch revealed by the Onion Skin tool
  1. After creating three keyframes of "squash," start creating the upward motion of the ball. I like to exaggerate this first frame after the tightest squash frame a little more than normal by making it very tall and thin. This exaggerates the "spring" effect of the ball launching back up from the ground.
The "spring" frame
Figure 7. The "spring" frame
  1. Now make the animation loop. Select Frame 1 and then select Edit > Copy Frames. Then select a frame a few frames after your last keyframe and select Edit > Paste frames. This gives the ball the exact shape and position in the last frame as it has in Frame 1, giving you a seamless, looping animation.
  2. All you need to do now is apply a motion tween between the final two keyframes. Once you do that, select the next to last keyframe and in the Property inspector apply an ease out, setting the Ease value all the way to 100.
Setting the Ease value to ease out the animation
Figure 8. Setting the Ease value to ease out the animation

This will make the ball start off quickly and gradually decrease speed as it reaches the top (opposite the behavior of your first tween).

The final FLA file
Figure 9. The final FLA file

You're done! Your bouncing ball animation should now look like the SWF below (okay, I already gave you a peek at it above), and your FLA should look like it does in Figure 9. Pretty slick huh? See how much more life and weight you have given your otherwise static image? It's got a little more personality to it, and it didn't take a whole lot of blood and sweat to achieve.

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.

More Like This

  • Creating a simple document in Flash CS4 Professional
  • Flash CS4 Missing Manual excerpts: Video, testing and debugging, optimization, and sound
  • Easy animation with the Motion Editor in Flash
  • Creating a simple animation in Flash
  • Advanced character animation in Flash
  • Exploring the new 3D features in Flash CS4 Professional
  • Combining animation and ActionScript using Flash Professional CS5 and Flash Builder 4
  • Designing and animating characters in Flash – Part 2: 2.5D animation
  • Lip-syncing automatically with SmartMouth in Flash Professional
  • Blitting and caching movie clips in Flash

Flash User Forum

More
04/23/2012 Auto-Save and Auto-Recovery
04/23/2012 Open hyperlinks in new window/tab/pop-up ?
04/21/2012 PNG transparencies glitched
04/01/2010 Workaround for JSFL shape selection bug?

Flash Cookbooks

More
02/13/2012 Randomize an array
02/11/2012 How to create a Facebook fan page with Flash
02/08/2012 Digital Clock
01/18/2012 Recording webcam video & audio in a flv file on local drive

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