Book description
"No matter what your background, the pages that follow will provide you with some excellent knowledge, insight, and even a little bit of wisdom in the realm of Flash and ActionScript. Happy learning!"-- Branden Hall, from the Foreword
Written by Flash insiders with extensive knowledge of the technology, this guide is designed specifically to help Flash designers and developers make the leap from ActionScript 2.0 to the new object-oriented ActionScript 3.0 quickly and painlessly. 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
- Where did it go? A guide to help you find familiar features in ActionScript 3.0, such as global functions, operators, properties, and statements
- How do I? Step-by-step solutions for performing tasks with ActionScript 3.0, including input, sound, video, display, events, text, and more
Also included are overviews of Flash and ActionScript features and workflows. ActionScript 3.0 is a huge upgrade to Flash's programming language -- and this guide helps you upgrade your skills to match it.
Table of contents
- Dedication
- A Note Regarding Supplemental Files
- Foreword
- Preface
-
I. ActionScript 3.0 Introduced
- 1. Introducing ActionScript 3.0
- 2. Discovering What You Need to Work with ActionScript 3.0
- 3. Looking at the Changes in ActionScript 3.0
- 4. Exploring the Benefits of Using ActionScript 3.0
-
II. ActionScript and the Flash CS4 Authoring Tool
- 5. Creating and Working with Code
- 6. Creating a Document Class
- 7. Working with Library and Linkage Changes
- 8. Copying Motion as ActionScript 3.0
- 9. Using ActionScript 3.0 Components
- 10. Making Up for a Reduced Component Set
-
11. Debugging and Troubleshooting
- Debugging Is a Good Thing
- Testing Your ActionScript 3.0 Code
- Reviewing Improvements in Debugging Over ActionScript 2.0
-
Exploring the Compiler Errors Panel
- Using the Compile Errors Panel to Open Code
- Interpreting and Understanding Errors
-
Identifying Common Errors and What They Mean
- Be careful where you type your code
- Remember to omit property underscores
- Referencing movie clip’s parent requires explicit conversion (casting)
- Variables can be declared only once per timeline or class
- Undeclared timeline variables cannot be referenced
- Properties and methods cannot be referenced from a null reference
- Troubleshooting
- Using the Enhanced Debugging Workspace
-
III. How Do I?
-
12. How Do I Draw with Code?
- 12.0 Introduction
- 12.1 Creating a Display Object Dynamically
- 12.2 Referencing an Object’s Graphics Property
- 12.3 Defining a Line Style
- 12.4 Drawing a Line
- 12.5 Drawing a Curve
- 12.6 Defining a Fill Style
- 12.7 Drawing a Rectangle
- 12.8 Drawing a Rectangle with Rounded Corners
- 12.9 Drawing a Circle
- 12.10 Creating a Gradient Fill
- 12.11 Using a Drawn Shape as a Dynamic Mask
- 12.12 Caching Vector as Bitmap
- 12.13 Applying a Simple Bitmap Filter
-
13. How Do I Work with the Display List?
- 13.0 Introduction
- 13.1 Choosing Which Type of Display Object to Use
- 13.2 Creating a New Display Object
- 13.3 Adding a Display Object to the Display List
- 13.4 Specifying the Depth of a Display Object
- 13.5 Finding a Display Object
- 13.6 Removing a Display Object from the Display List
- 13.7 Working with Children of a Display Object Container
- 13.8 Working with Parents of a Display Object
- 13.9 Casting a Display Object from One Type to Another
- 13.10 Changing the Parent of a Display Object
- 13.11 Referencing the Stage Through a Display Object
-
14. How Do I Work with Events?
- 14.0 Introduction
- 14.1 Understanding Event Listeners
- 14.2 Capturing Mouse Events
- 14.3 Understanding Event Flow
- 14.4 Using Event Bubbling
- 14.5 Using the target and currentTarget Event Properties
- 14.6 Simulating a Mouse Up Outside Event
- 14.7 Capturing Frame Events
- 14.8 Improving Performance by Removing Event Listeners
- 14.9 Capturing Keyboard Events
- 14.10 Capturing Stage Events
- 14.11 Using a Timer to Dispatch Events
- 14.12 Dispatching Your Own Events
- 14.13 Manually Calling Event Listener Functions
- 14.14 Capturing an Event Before It Reaches Its Target
- 14.15 Setting the Execution Order of Events
- 14.16 Using Weak Listeners
-
15. How Do I Work with Text?
- 15.0 Introduction
- 15.1 Creating a Text Field
- 15.2 Styling a Text Field
- 15.3 Creating a Password Field
- 15.4 Focusing a Text Field
- 15.5 Populating a Text Field
- 15.6 Automatically Sizing a Text Field
- 15.7 Scrolling a Text Field
- 15.8 Using Embedded Fonts
- 15.9 Formatting Text Using TextFormat
- 15.10 Formatting Text Using HTML
- 15.11 Formatting Text Using CSS
- 15.12 Adding Hyperlinks to Text
- 15.13 Triggering ActionScript from HTML Links
- 15.14 Selecting Text
-
16. How Do I Work with XML?
- 16.0 Introduction
- 16.1 Creating an XML Object
- 16.2 Loading XML
- 16.3 Reading an Element Node
- 16.4 Reading a Text Node
- 16.5 Working with Multiple Nodes of the Same Name
- 16.6 Reading an Attribute
- 16.7 Finding Content Using Shorthand
- 16.8 Finding Content Using Conditionals
- 16.9 Reading HTML or Entities in XML Nodes
- 16.10 Deleting XML
- 16.11 Writing XML
- 16.12 Writing XML with Variables
- 16.13 Sending and Loading XML
-
17. How Do I Work with External Assets?
- 17.0 Introduction
- 17.1 Loading and Applying a Cascading Style Sheet
- 17.2 Loading and Displaying an Image or SWF File
- 17.3 Communicating with an ActionScript 3.0 Loaded SWF
- 17.4 Communicating with an ActionScript 2.0 Loaded SWF
- 17.5 Unloading an Image or SWF File
- 17.6 Loading and Playing a Sound
- 17.7 Setting the Volume and Pan of a Sound
- 17.8 Visualizing the Amplitude of a Sound
- 17.9 Unloading a Sound
- 17.10 Loading and Playing a Video
- 17.11 Unloading a Video
-
12. How Do I Draw with Code?
-
IV. Migration
- 18. A Sample Migration
-
19. Where Did It Go?
- Introduction
-
Code Comparisons
- Language Fundamentals
-
Display
- Accessing the Stage
- Accessing a parent
- Creating an empty movie clip
- Adding a library movie clip to the stage
- Duplicating a movie clip
- Creating a bitmap
- Adding a library bitmap to the stage
- Checking the level of a display object
- Getting the highest unused depth
- Swapping display object depths
- Accessing a display object by name
- Removing a display object
- Using the drawing API
- Checking for display object collisions
- Assigning a mask to movie clip
- Events
- Text
-
Sound
- Loading and playing an external sound
- Playing an internal sound from the library
- Stopping a sound
- Getting or setting a sound’s volume or pan
- Getting a sound’s duration
- Getting a sound’s current time
- Getting a loaded sound’s bytes loaded or total bytes
- Stopping all sounds
- Setting the buffer time of loaded sounds
- Network
- Miscellaneous
- Index
- About the Authors
- Colophon
- Copyright
Product information
- Title: The ActionScript 3.0 Quick Reference Guide
- Author(s):
- Release date: October 2008
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596517359
You might also like
book
Fundamentals of ActionScript 3.0: Develop and Design
Adobe Flash Professional is the most popular software available for creating animations for the Web. Most …
book
ActionScript 3.0 Bible
The updated edition on all the latest features and capabilities of ActionScript 3.0 and Flash Player …
book
CS5.5 Update: Actionscript 3.0 For Adobe Flash Professional CS5 Classroom In A Book
This update includes coverage of the latest features in Actionscript 3.0 for Adobe Flash Professional CS5.5.
book
Essential ActionScript 3.0
ActionScript 3.0 is a huge upgrade to Flash's programming language. The enhancements to ActionScript's performance, feature …