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 / ActionScript Technology Center /

ActionScript 3.0 Quick Reference Guide excerpts: Copy motion, display list, events, and migration

by David Stiller, Rich Shupe, Jen deHaan, Darren Richardson

David Stiller, Rich Shupe, Jen deHaan, Darren Richardson

Created

22 December 2008

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
ActionScript display list events Flash Professional migration OOP

If you're ready to give your development projects a considerable performance boost, learning ActionScript 3.0 is a must. Written by Flash insiders with extensive knowledge of the technology, ActionScript 3.0 Quick Reference Guide for Developers and Designers Using Flash CS4 Professional is designed specifically to help Flash designers and developers make the leap from ActionScript 2.0 to the object-oriented ActionScript 3.0 quickly and painlessly.

When ActionScript 3.0 hit the streets, the reaction from the Flash crowd was enormous, and not without a tremor of intimidation. Certain questions have emerged—on the forums, in classrooms, user groups, and at conferences—more often than others. This book answers the questions we most often encounter, questions that seem to pose the biggest stumbling blocks for longtime users.

ActionScript 3.0 is a huge upgrade to the programming language of Flash—and this guide helps you upgrade your skills to match it. You'll learn key differences between the two language versions, allowing you to more easily leverage ActionScript 3.0 using Flash CS4 Professional and other technologies like Adobe Flex and Adobe AIR.

The first half of the book is something like a fireside chat, providing fairly broad coverage of Flash CS4 Professional, and select overviews of ActionScript 3.0. The second half presents many focused examples of ActionScript 3.0 syntax in small, digestible chunks. Both halves are chock-full of hands-on demonstrations.

Formatted so you can find any topic easily, ActionScript 3.0 Quick Reference Guide explains:

  • Object-oriented programming (OOP) concepts, such as packages and classes
  • ActionScript 3.0 features and player enhancements that improve performance
  • Workflow differences between ActionScript 2.0 and ActionScript 3.0 including tools, code editing, component sets, and image and font rendering

Included is a "Where did it go?" guide to help you find familiar features in ActionScript 3.0—such as global functions, operators, properties, and statements—and step-by-step "How do I?" solutions for performing tasks with ActionScript 3.0, including input, sound, video, display, events, text, and more.

The printed book is available through most major online and retail bookstores worldwide, and can be read online at Safari Books Online. For more information visit the O'Reilly store.

ActionScript 3.0 Quick Reference Guide for Developers and Designers Using Flash CS4 Professional © 2009 David Stiller and Rich Shupe. Reproduced by permission of O'Reilly Media Inc. All rights reserved.

Copying motion as ActionScript 3.0

Chapter 8 discusses an interesting tool in Flash CS4 Professional that helps bridge the gap between programmed and timeline-based animation. Available from the Timeline panel, the Copy Motion as ActionScript 3.0 feature facilitates collaboration between designers and developers by converting timeline tweens and keyframe settings into ActionScript 3.0 code, and sometimes a flexible XML-based format used by the new Animator class.

Because the ActionScript involved is generated automatically, this feature lets a designer use traditional animation techniques, complete with motion guides and easing, to provide sophisticated motion templates that a developer can harness to program animation for any number of additional objects, even in separate FLA files. Topics addressed include copying motion and applying motion to other objects.

Download the complete chapter:

Chapter 8: Copying Motion as ActionScript 3.0 (PDF, 580K)

Working with the display list

Chapter 13 covers one of the two biggest ActionScript changes in version 3.0: the new display architecture. Topics addressed include choosing which type of display object to use, creating a new display object, adding a display object to the display list, specifying the depth of a display object, finding a display object and removing it from the display list, and more.

Download the complete chapter:

Chapter 13: How Do I Work with the Display List? (PDF, 270K)

Working with events

Chapter 14 covers the second biggest change in ActionScript 3.0: the new event model. Gone are the event handlers of prior versions, such as onRelease or the more antiquated on(release) handler applied directly to symbol instances. The new model makes use exclusively of event listeners.

In simple terms, event listeners are established to monitor for the occurrence of a particular event, and then execute a function when that event is received. Since listeners are required for all event processing, this chapter both explains and uses them extensively. Even if you have experience with event listeners from prior versions of ActionScript (perhaps from use with components or objects for capturing key events), the event flow is quite different in ActionScript 3.0. Events can cascade down through the display list and bubble back up to the root of the file, allowing for advanced event handling. In line with the focus of this quick answer guide, this chapter covers the basic essentials of event processing, but provides an adequate overview to get you started.

Download the complete chapter:

Chapter 14: How Do I Work with Events? (PDF, 330K)

Sample migration from ActionScript 2.0 to 3.0

Chapter 18 walks you through a small-scale, manufactured example of a migration from ActionScript 2.0 to ActionScript 3.0. Instead of demonstrating real-world best practices at work, this example is significantly constrained and attempts to insert as many migration issues as possible into its tiny footprint. Throughout the simple particle system example, what may appear to be odd choices, poorly optimized code, or even mistakes have been intentionally injected into the code to either set up a migration task or bring the two versions into a parallel structure.

Download the complete chapter:

Chapter 18: A Sample Migration (PDF, 300K)

More Like This

  • Creating a preloader in Flash
  • Understanding the changes in the display API in ActionScript 3.0
  • ActionScript 3 Cookbook excerpts: From custom classes to the rendering model
  • ActionScript 3 Design Patterns excerpt: Factory method and MVC
  • Tips for learning ActionScript 3.0
  • Developers and designers talk about migrating to ActionScript 3
  • Introduction to event handling in ActionScript 3.0
  • Learning ActionScript 3 excerpts: OOP overview, display list, and programmatic motion
  • Adobe Flash Platform ActionScript reference for RIA development
  • Colin Moock ActionScript 3 videos

Tutorials & Samples

Tutorials

  • Flash iOS Apps Cookbook excerpt: ActionScript optimization
  • Introduction to Robotlegs – Part 3
  • Introduction to Robotlegs – Part 2
  • Introduction to Robotlegs – Part 1

Samples

  • ActionScript 3 samples for Flash Professional CS5

ActionScript Blog

More
06/09/2012 New Flash Tools: Flash Optimizer 2.3
06/09/2012 Flash Optimizer 2.3
05/27/2012 How to add an image to android gallery (CameraRoll) using adobe air
04/22/2012 ActionScript 3.0 BitmapData, Clone, and ColorTransform

ActionScript Cookbook

More
03/20/2012 PDF Portfolio Navigational TOC
02/29/2012 Embed Stage3D content inside Flex application components
02/13/2012 Randomize an array
02/09/2012 Using Camera with a MediaContainer instead of VideoDisplay

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