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 /

Using the Adobe Flash Sprite Sheet Generator

by Chris Georgenes

Chris Georgenes
  • mudbubble.com

Content

  • Creating the animation
  • Generating the sprite sheet
  • Where to go from here

Created

7 May 2012

Page tools

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

Requirements

Prerequisite knowledge

A basic understanding of the Flash authoring interface, working with symbols and creating simple timeline animations is recommended.

User level

Intermediate

Required products

  • Flash Professional (Download trial)

Adobe Flash Professional CS6 introduces a new tool called the Sprite Sheet Generator. This feature lets you generate a sprite sheet from any symbol or image on the Stage or in the document Library. Sprite sheets are an efficient way to add looping animations to games because they can be rendered using the GPU.

This article examines how to convert a looping animation into a sprite sheet using the Flash Sprite Sheet Generator.

Flash is one of the best tools for creating interactive content—a groovy crossroad where animation and interactivity purposely collide with beautiful results. If there's one thing I've noticed in the past year, it's been the undeniable shift in web technology. We've all been hearing the term "HTML5" being tossed around and less talk about "Flash". I've even heard people say that HTML5 is going to be the true Flash killer. As an animator, I've enjoyed using Flash for well over a decade; but am I worried that the future of Flash is in question? Not at all. No technology lasts forever, but Flash is here to stay, at least for a little while longer; and it's clear Adobe thinks so, too.

Creating the animation

Before creating the sprite sheet, you need an animation. I've chosen to animate a character I designed for the Starling Framework (see Figure 1).

Figure 1. The Starling Framework character
Figure 1. The Starling Framework character

The bird avatar for the Starling Framework was conceived using the Adobe Photoshop Touch App, uploaded to the Adobe Creative Cloud, and then imported and redrawn in Adobe Flash Professional CS6. As I drew the bird using Flash's vector tools, I broke down each part into separate assets and converted them to symbols (see Figure 2).

Figure 2. The character broken into symbols
Figure 2. The character broken into symbols

The next step was to create the wing animation. I double-clicked the wing symbol and animated it using a method known as frame-by-frame animation, where each key frame is a new drawing (see Figure 3).

Figure 3. Creating animation frames for the wings
Figure 3. Creating animation frames for the wings

I copied the instance of the symbol containing the wing animation and pasted it to a new layer below the body of the bird. I then flipped it horizontally and positioned it for the bird's left wing. To add a slight sense of depth, I selected the instance of this symbol and applied a subtle color effect. The idea here is to darken it slightly to push it back from the rest of the body parts (see Figure 4).

Figure 4. Adding the animation for the left wing
Figure 4. Adding the animation for the left wing

I also animated the entire bird floating up and down in sync with the direction the wings are flapping (see Figure 5).

Generating the sprite sheet

Now that the animation is complete, Flash can generate the sprite sheet. With the symbol instance containing the animation on the Stage, right-click over it and select Generate Sprite Sheet from the pop-up menu (see Figure 6).

Figure 6. Selecting the Generate Sprite Sheet command
Figure 6. Selecting the Generate Sprite Sheet command

The alternative way to create a sprite sheet is to right-click over the symbol listed in the Library panel and select Generate Sprite Sheet from the pop-up menu (see Figure 7).

Figure 7. Accessing the Generate Sprite Sheet command from the Library panel
Figure 7. Accessing the Generate Sprite Sheet command from the Library panel

The Generate Sprite Sheet will open in its own panel (see Figure 8).

Figure 8. Opening the Generate Sprite Sheet panel
Figure 8. Opening the Generate Sprite Sheet panel

Select image dimensions appropriate to your animation (see Figure 9):

Figure 9. Selecting image dimensions for the sprites
Figure 9. Selecting image dimensions for the sprites

Sprite sheet settings

From the Image Format drop-down menu, select between PNG 8 bit, PNG 24 bit, PNG 32 bit and JPEG formats. If optimization is a concern, you can choose PNG 8 bit format with transparency to bring the file size down considerably (see Figure 10).

Figure 10. Selecting the image format
Figure 10. Selecting the image format

You can also set a custom background color for your sprite sheet by clicking the Background color swatch and selecting a new color from the palette, or mix your own by clicking the small mixer icon in the upper right corner of the color palette panel (see Figure 11).

Figure 11. Selecting the background color
Figure 11. Selecting the background color

The Generate Sprite Sheet panel is then updated to reflect the new background color change (see Figure 12).

Figure 12. The updated Generate Sprite Sheet panel
Figure 12. The updated Generate Sprite Sheet panel

The Algorithm setting provides for Basic or MaxRects.

  • Basic: The Basic setting is best for simple animations. Sprites are arranged uniformly in rows.
  • MaxRects: The MaxRects setting is used to pack the frames more tightly together. (see Figure 13).
Figure 13. Selecting the algorithm
Figure 13. Selecting the algorithm

Incorporating the sprite sheet dynamically in a game

To prepare the sprite sheet for incorporation in a game, select the appropriate data format (see Figure 14). The data format describes the x, y, width, height and other info for each frame of animation in the sprite sheet. The developer uses this data to produce an animation from the sprite sheet for whatever framework they are using. You can even create your own data format using JSFL if you don't see one here that you need.

Figure 14. Selecting the data format
Figure 14. Selecting the data format

You can preview the sprite animation at any time by clicking the Preview tab above the sprite window (see Figure 15).

Figure 15. Previewing the sprite animation
Figure 15. Previewing the sprite animation

Where to go from here

If you wish, you can also visit the Animation Learning Guide for Flash, which explains how to use all of these animation types in Flash Professional CS6.

Integrating your sprite sheet into The Starling Framework: if you haven't already, download the Starling package. For more information about the Starling Framework, and specifically, how to incorporate a sprite sheet into a game engine, read Thibault Imbert's Adobe Developer Connection article Introducing the Starling 2D framework.

For more information on creating and exporting Sprite Sheets, see Create a Sprite Sheet Help topic.

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.

More Like This

  • Animation in Macromedia Flash: Squash and Stretch
  • Creating a simple document in Flash CS4 Professional
  • Advanced character animation in Flash
  • Augmented reality with animated avatars using the 3D drawing API
  • Flash glossary: Roving keyframe
  • Flash glossary: Shape tween
  • Creating a simple animation in Flash
  • Creating self-voicing puzzles in Flash
  • Preventing animation problems in Flash
  • Building Preloaders and Progress Bars in Macromedia 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