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 /

Adding 3D to Flash projects using After Effects

by Rafiq R. Elmansy

Rafiq R. Elmansy
  • pixelconsultations.com
  • graphicmania.net

Content

Modified

19 June 2006

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
3D After Effects animation Flash Professional 8 workflow

Requirements

Prerequisite Knowledge

You should have a basic knowledge of the Macromedia Flash and Adobe After Effects workspaces and an understanding of animation concepts.

User level

Beginning

Required products

  • Flash Professional (Download trial)
  • After Effects (Download trial)

Sample files

  • 3d_in_flash.zip (828 KB)

When I started learning Adobe After Effects, I realized that it includes a number of features and effects that can not only give more capabilities to my Macromedia Flash projects but save me time because of how the two applications are integrated.

After Effects gives you a variety of ways to create video with alpha, animate your graphic in 2D or 3D space, and then export your animation with a transparent background, as well as apply a variety of effects and presets that differentiate your Flash work.

This article will help you understand how After Effects integrates with Flash. You'll learn how to benefit from these features in your Flash projects by using the 3D layer feature in After Effects to give a 2D Flash graphic some 3D properties. You will export a Flash graphic to After Effects, convert it to a 3D layer in order to give it 3D properties, and then animate it before finally bringing it back into Flash.

Exporting your work from Flash

Let's start out by first creating a simple 2D star in Flash:

  1. Launch Flash Professional 8, create a blank document, and name it star_graphic.fla.
  2. Click and hold the Rectangle tool and choose PolyStar Tool from the pop-up menu.
  3. Click the Option button in the Properties panel, set the properties of the PolyStar tool to Star, and the number of sides to 5. Set the Star Point Size property to 0.5.
  4. Draw a star in the workspace (see Figure 1).
Drawing a 2D star in Flash
Figure 1. Drawing a 2D star in Flash

You can export your graphic from Flash in a variety of formats that After Effects will recognize, such as AI, EPS, and PNG. For this example, export the Flash graphic as a PNG image:

  1. Select File > Export > Export Image.
  2. In the Export Image dialog box, select PNG from the Save as Type pop-up menu.
  3. Name the image star.png and click Save to save the image.

Importing your work into After Effects

After Effects saves links to the project resources as footage items in the Project panel. Footage items are then used as layers in a composition.

To import your graphic to After Effects:

  1. Launch After Effects 7.0. By default a new project is open. You can also choose File > New Project.
  2. To create a new composition, select Composition > New Composition.
  3. The Composition Settings dialog box appears. Set the composition settings as following:
    • Insert Star Composition as the name of your composition in the Composition Name text box.
    • Choose Custom from the Preset pop-up menu.
    • Set the width to 640 and the height to 480 pixels.
    • Choose Square Pixels from the Pixel Aspect Ratio pop-up menu (Frame Aspect Ratio: 4:3).
    • Set the Frame rate to 30 frames per second.
    • Set the Resolution to Full.
    • Set the Start Timecode to 0;00;00;00.
    • Set the Duration to 0;00;01;00.
  4. Click OK to accept these settings (see Figure 2).
Composition settings in After Effects
Figure 2. Composition settings in After Effects
  1. To import the graphic, choose File > Import > File.
  2. Choose star.png and click Open.
  3. Drag the star footage item from the Project panel to your Composition panel. By default, After Effects inserts it on a new layer in the Timeline panel.
  4. Expand the layer properties by clicking the right arrow next to the layer name and examine the Transform properties (see Figure 3).
Examining the 2D properties of the star layer
Figure 3. Examining the 2D properties of the star layer

Converting a 2D layer into a 3D layer

After Effects uses two dimensions (x, y) to display the 2D layer. When you convert the layer to a 3D layer, After Effects adds a z-axis, which controls the position of your graphic in 3D space. After Effects adds the following layer properties to the 3D layer (see also Figure 4):

  • Anchor Point (z)
  • Position (z)
  • Orientation (z)
  • X Rotation
  • Y Rotation
  • Z Rotation
3D layer added to the Timeline panel
Figure 4. 3D layer added to the Timeline panel

Note: To help simulate three dimensions, the Material Options properties that are also added determine how the layer interacts with an arbitrary "light source" that you specify.

To convert the 2D layer to a 3D layer, click the 3D Layer switch in the Timeline panel or choose 3D Layer from the Layer menu.

Animating the 3D layer

To give you a greater understanding of the 3D layer option, give your star some dimensionality by animating it in 3D space. Animation in After Effects is similar to animation in Flash; it depends on keyframes. To animate a layer with keyframes, you must first activate the stopwatch beside the layer property that you intend to change. By activating the stopwatch, you set the initial keyframe of the animation. The Keyframe Navigator icon appears next to the layer property.

Before you start animating your star along the z-axis, give it a 3D dimensional look by rotating it around the x-axis:

  1. To rotate the star along the x-axis, set the value of the x rotation to -72.0 degrees.
  2. Make sure that the current-time indicator is at the first frame of the Timeline.
  3. Click the stopwatch next to the Z Rotation property to enable animation for that property and set the first keyframe.
  4. Go to the last frame of the Timeline and rotate the star 360 degrees around the z-axis. You can either set the degree value of the z rotation to 360 or set the revolutions value to 1.
  5. Drag the current-time indicator at the top of the Timeline panel to see how the star rotates in 3D space (see Figure 5).
Star animation in the Composition panel
Figure 5. Star animation in the Composition panel

You can apply the above 3D properties and animation in the 3D space to other objects like text, shapes, images, or compositions

Exporting your animation

After Effects provides a variety of options for integrating an animation with Flash, such as video output, Flash video, and image sequences. You can also export a SWF file from After Effects. However, the 3D layers are not supported in the current SWF files exported from After Effects.

In this part you will export your 3D animation from After Effects as a PNG image sequence to preserve the transparency to Flash:

  1. Choose File > Export > Image Sequence.
  2. In the Export Image Sequence dialog box, set the exporting format to PNG.
  3. Enter 30 as the Frames per Second value.
  4. Click the Options button and choose Millions of Colors+ from the PNG Options dialog box so you can export the image sequence with an alpha channel (see Figure 6).
Exporting the star animation as a PNG sequence
Figure 6. Exporting the star animation as a PNG sequence
  1. Name your image sequence Comp 1 and click OK to save your changes.

Getting back into Flash

Now you are ready to bring your 3D star animation back into Flash. You will want to import it as an image sequence:

  1. Create a new Flash file called star_animation.fla and create a new movie clip by choosing Insert > New Symbol.
  2. In the Create New Symbol dialog box, set the Type to Movie Clip and name it StarAnimation. Click OK to close the dialog box.
  3. Choose File > Import > Import to Stage.
  4. Select the first PNG file in the sequence you just exported. It should be named Comp 1 01.png. Flash will detect that the image is part of a sequence. Click Yes to import the images as a sequence in the Timeline.
  5. Drag your movie clip to the Stage (see Figure 7).
Animation sequence imported into Flash
Figure 7. Animation sequence imported into Flash
  1. To give it even more of 3D look, apply Drop Shadow filter by clicking the plus icon in the Filters panel.
  2. Set the Blur x and Blur y of the star movie clip to 30.
  3. Set the color of the shadow to black with 35% alpha value.
  4. Set the angle of the shadow to 90 and its distance to 50.

Have fun with this. For example, you could create two other star animations with different size and filter effect settings, and resize the document file to accommodate all three stars (see Figure 8).

Three animated stars in Flash
Figure 8. Three animated stars in Flash

The star_animation.swf demo file contained in the sample ZIP linked to at the beginning of the article shows the final animation of the star with the 3D properties applied.

Where to go from here

After Effects includes many features that you can use to enhance your Flash projects. All you need to do is know more about those features and what you can do with them. Start by taking your Flash graphics into After Effects and applying these features to them. Then get them back into Flash and see how those visual effects enhance your work.

You can also use objects originally created in Adobe Illustrator or exported from Flash as AI files because After Effects will constantly update the quality of the Illustrator or vector objects as you scale them. By contrast, PNG is a raster format that loses quality quickly as you scale objects larger than their original size.

To learn more about integrating Flash with After Effects, check out Flash and After Effects: Combining vector precision with rich bitmap motion by Chris Georgenes.

More Like This

  • Animation in Macromedia Flash: Squash and Stretch
  • Modeling User Workflows for Rich Internet Applications
  • 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: Y axis
  • Flash glossary: Shape tween
  • Creating a simple animation in Flash
  • Approaching ActionScript from a designer's perspective

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