ActionScript 3.0 Bible
eBook - ePub

ActionScript 3.0 Bible

  1. English
  2. ePUB (mobile friendly)
  3. Available on iOS & Android
eBook - ePub

ActionScript 3.0 Bible

About this book

The updated edition on all the latest features and capabilities of ActionScript 3.0 and Flash Player 10.

ActionScript is a popular programming language used primarily for the development of Web sites and software. This update to the successful previous version introduces you to all the exciting new capabilities of ActionScript 3.0. You'll see how ActionScript 3.0 goes beyond its primary use of scripting Flash animations and is now an object-oriented evolution that runs ten times faster than previous versions and can be used in Adobe's new platforms, including Flex and AIR.

Hands-on instruction and step-by-step tutorials enhance your learning process as you discover everything you need to know in order to harness the power of ActionScript 3.0. You'll learn the nitty gritty of building Rich Internet Applications (RIA) and the ins and outs of putting the new features of ActionScript 3.0 to work for you.

  • ActionScript 3.0 goes beyond its original role as a scripting language and has added development features, incredible speed, and the ability to work with Flex and AIR
  • Shows you how to apply advanced graphic effects using Pixel Blender
  • Demonstrates the all-new text and typography capabilities
  • Addresses your new enhanced control over dynamic sound
  • Explains templated types and new vector data structures

ActionScript 3.0 Bible offers you a soup-to-nuts guide on all things ActionScript 3.0 so you can get started working with it immediately.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access ActionScript 3.0 Bible by Roger Braunstein in PDF and/or ePUB format, as well as other popular books in Design & Web Design. We have over one million books available in our catalogue for you to explore.

Information

Publisher
Wiley
Year
2011
Print ISBN
9780470525234
eBook ISBN
9781118081396
Edition
2
Topic
Design
Subtopic
Web Design
Part I
THE DISPLAY LIST
Chapter 1 Introducing ActionScript 3.0
Chapter 2 ActionScript 3.0 Language Basics
Chapter 3 Functions and Methods
Chapter 4 Object-Oriented Programming
Chapter 5 Validating Your Program
Chapter 1
Introducing ActionScript 3.0
In this chapter you'll look at what ActionScript is, where you can use it, and what you can do with it. You'll learn where ActionScript fits in the grand scheme of the Flash Platform, and you'll take a complete tour of the tools and technologies involved therein.
What Is ActionScript 3.0?
You may well already know the answer to this question, because you had enough interest in it to buy this book! ActionScript 3.0 is the language used to program interactive Flash content. Where this content goes and how you can build it is the subject of the following section.
ActionScript 3.0 is a well-organized, mature language that shares much of its syntax and methodologies with other object oriented, strongly typed languages, so an experienced programmer can readily pick it up. Don't fear, though, for this book introduces ActionScript from the bottom up and starts gently.
If you've used Flash before but never ActionScript, you might know that you can build content for Flash Player without ActionScript—but without ActionScript, Flash is just an animation tool (though, admittedly, a good one). ActionScript is necessary when you want to create Flash content that is highly dynamic, responsive, reusable, and customizable. Here's just a short list of the many things you can accomplish using ActionScript:
  • Loading images
  • Playing audio and video
  • Drawing programmatically
  • Loading data such as XML files
  • Responding to user events such as mouse clicks
To get the most out of the Flash Platform, you're gonna need ActionScript 3.0. And as you learn what it can do, you'll be amazed at its power. But let's look at how ActionScript fits into the Flash universe.
Exploring the Flash Platform
The wild world of Flash is by no means small, and wrapping your head around ActionScript and all the technologies related to it is challenging. Even if you don't know all the latest technologies in the peripheries, it's essential that you know major parts of the Flash Platform and how they work together. Defining that term and what it encompasses will be the goal of this section.
You'll examine the different parts of the Flash Platform from the perspectives of you building content and the user getting and running content. I'll define and discuss the tools, languages, platforms, and runtimes involved in the process. Figure 1.1 shows a bird's-eye view of the Flash Platform.
Figure 1.1 A high-level overview of the Flash Platform
1.1
You, the programmer, write in a computer programming language, ActionScript 3.0. You use tools, like Flash Builder, and specifically a compiler, to convert your code into an executable, in this case a SWF. The SWF is delivered to the end user on her platform and executes inside a runtime, usually Flash Player, of which there are many versions. Let's break this down.
A Programmer's Perspective
For all the ways that the Flash Platform is unique, it shares the same basic steps as most programming environments. You write code in a language using some kind of editor, tool, or integrated development environment, and you use a compiler to convert that code into a file that can be run on the target environment.
Language
A computer programming language defines the grammar and lexicon that you'll be working in to create beautiful code. ActionScript 3.0, Python, Java, Lua, and C# are different languages. They all look different and have different rules for what you type where, what words are reserved, how to loop and how to write comments, and even where you can and can't put spaces. ActionScript 3.0 is not the same language as ActionScript 2.0, and neither is ActionScript 1.0.
ActionScript 3.0 has some features in common with modern JavaScript, because both are designed to adhere to specifications of a family of languages called ECMAScript. At the time of writing, this fact is little more than a curiosity, because most JavaScript in use is written to a baseline standard far behind the kind of JavaScript that starts to look like ActionScript 3.0. Furthermore, adherence to ECMAScript standards has provided little visible benefit, and progress marches on. In general, ActionScript 3.0 looks most like Java or C#. Coming to ActionScript 3.0 from either of these languages, or ActionScript 2.0, should be a fairly smooth ride. In this second edition, I've removed any emphasis put on transitioning from ActionScript 2.0 to ActionScript 3.0.
I'll describe some features of the language here. This might help some of you who have several languages under your belts already and can benefit from a description of ActionScript 3.0. If you don't understand any of these terms, please don't fret! The rest of this Part exists to investigate these qualities of the language in depth.
ActionScript 3.0 can use both dynamic and strong typing, but the compiler, the language, this book, and most of the world want you to use it with strong typing. If you want to live in a dynamic world, you can do so by turning off strict mode in your compiler or development environment. ActionScript 3.0 is an object oriented language that makes heavy use of namespaces. It has facilities for reflection. It embodies some elements of functional programming.
Maybe it goes without saying, but ActionScript 3.0 is the primary language used in the Flash universe. However, it's not the only one.
Depending on the platform and runtime you're targeting—that is to say, where, on what device, and on what software you want your content to run—you might use another language that this book is not about. I'll get into this more once you look at the platforms and runtimes that exist in the Flash universe. But rest assured that ActionScript 3.0 is the way to go for the Flash Platform right now. Most other options are for older technology.
There's another language that's a big part of the Flash Platform, and that's MXML. MXML is a declarative XML language used to program Flex. The interesting thing is that MXML compiles into ActionScript 3.0 during building. It's also used interchangeably with ActionScript 3.0. I won't discuss MXML or Flex in this book, but because Flex is a superset of Flash, this book provides an excellent, maybe prerequisite, background for any Flex developer.
Mixed into ActionScript 3.0 are several microlanguages, tailor-made for solving specific kinds of problems more efficiently than the grammar of ActionScript 3.0 would allow. Technically, the...

Table of contents

  1. Cover
  2. Title Page
  3. Copyright
  4. About the Author
  5. Credits
  6. Acknowledgments
  7. Diagram of Classes
  8. Introduction
  9. Part I: ActionScript 3.0 Language Basics
  10. Part II: Core ActionScript 3.0 Data Types
  11. Part III: The Display List
  12. Part IV: Event-Driven Programming
  13. Part V: Error Handling
  14. Part VI: External Data
  15. Part VII: Sound and Video
  16. Part VIII: Graphics Programming and Animation
  17. Part IX: Flash in Context
  18. Index
  19. Advertisement