O'Reilly logo

Essential ActionScript 3.0 by Colin Moock

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required


We imagine a world where every digital interaction—whether in the classroom, the office, the living room, the airport, or the car—is a powerful, simple, efficient, and engaging experience. Flash Player is widely used to deliver these experiences and has evolved into a sophisticated platform across browsers, operating systems, and devices.

One of the main forces driving Adobe's innovation and the development of the Flash Player is seeing where developers are pushing the edge of what's possible to implement, and then enabling more developers to accomplish that kind of work.

Taking the way-back machine to 2001, you would see the web being widely used and the early signs of web sites containing not only pages but also interactive applications. These applications were primarily using HTML forms and relying on web servers for processing the form information. A handful of leading edge developers were working to implement a more responsive interaction by taking advantage of client-side processing with ActionScript in Flash. One of the earliest examples of successful interactive applications was the hotel reservation system for the Broadmoor Hotel, which moved from a multi-page HTML form to a one-screen, highly interactive reservation interface that increased their online reservations by 89%.

Clearly, responsiveness matters. It creates a much more effective, engaging experience. However, in 2001, there was a lot to be desired in terms of performance, power of the scripting language, ease of debugging, and design constraints within browsers (which were created to view pages rather than host applications).

We did a lot of brainstorming and talked extensively to developers and decided to embark on a mission to enable this trend, naming the category "Rich Internet Applications" (RIAs). To better support RIAs, we aimed to create:

  • A tremendously faster virtual machine in Flash Player for ActionScript 3.0.

  • A development framework called Flex, making it radically easier to build RIAs.

  • An environment specifically to deliver rich Internet applications to their full potential, known now as the Adobe Integrated Runtime (AIR). During the dot-com bust, we held onto the vision of enabling this future world of rich Internet applications.

We continued to invest in building a range of technologies and prepared for the day that innovation on the web would ignite again. The days of innovation have now returned in full force, and I am delighted to see rich Internet applications coming into their own with Web 2.0. Developers are creating applications with a range of technologies and frameworks that tap into the distributed creativity of the Internet, take advantage of HTML, Flash, Flex, Ajax; and balance logic between the client and server.

The new virtual machine has been delivered now in Flash Player 9, enabling ActionScript 3.0 to run an order of magnitude faster and implement the most recent work on the ECMA standard for the language (JavaScript follows this same standard). This modern implementation has also now been released as open source with the Mozilla Foundation as the Tamarin project, enabling the Flash Player team to work with Mozilla engineers and others in the open source community to continue optimizing the virtual machine and keeping up with the most recent standards work. This core scripting engine will be incorporated over time in Firefox, bringing consistency across scripting in HTML and Flash.

The development framework has also been delivered today as Flex, enabling rapid development through common patterns for interaction and data management, with the whole framework built in ActionScript 3.0. The Flex framework is available for free, and the framework source code is included so you can see exactly how it works. You can use any editor to write code using Flex, and a specific IDE is also available, called Adobe Flex Builder.

As we saw innovation on the web returning and were pursuing this vision, we decided to unite efforts across Adobe and Macromedia. While Macromedia was driving RIAs with Flash, Adobe was innovating in delivery of electronic documents, among other areas. We saw over time that Macromedia would be adding electronic document capability to RIAs and that Adobe would add RIA capability around electronic documents. Rather than pursue those paths separately and duplicate efforts, we joined forces to deliver our vision for the next generation of documents and RIAs, bringing together the world's best technology for electronic documents and the world's best, most pervasive technology for RIAs. It's an incredibly powerful combination.

After we announced the merger, we created a "clean room" team to plan for our next generation of software, drawing on everything we've learned to date as well as from the potential of bringing Flash, PDF, and HTML together in the new Adobe AIR environment for RIAs.

The AIR project is actually our third attempt at creating this new environment. The first two attempts were part of an experimental project called Central which was code named Mercury and then Gemini after the United States space program, and with AIR code named Apollo. We learned a lot from those first two projects, and as I like to remind the team, Apollo is the one that actually went to the moon.

With AIR, you can leverage your existing web development skills (Flash, Flex, HTML, JavaScript, Ajax) to build and deploy RIAs to the desktop. Just like web publishing allowed anyone with basic HTML skills to create a web site, AIR will enable anyone with basic web development skills to create a desktop application.

As a developer, you can now create a closer connection to your users. With the browser, you have a fleeting, somewhat tenuous, connection to users. They browse to a page, and then they're gone. AIR enables you to create an experience that can keep you continuously connected to your customers. Just like a desktop application, AIR applications have an icon on the desktop, in the Windows start menu, or in the OS X dock. Also, when you're running a web application today, it's a separate world from your computer. You can't easily integrate local data with your web application. For example, you can't just drag and drop your Outlook contacts onto a web-based mapping application to get directions to your friend's house. Yet with AIR applications you can, as it bridges the chasm between your computer and the Internet.

I believe AIR represents the beginning of a new medium. And these applications are fun to build. If you start early, you'll be able to deliver capabilities in your applications that others won't have yet—especially in terms of increasing the presence of your application on the computer and bridging the web and the desktop.

The core of these RIAs is the ActionScript language, whether they run in the Flash Player in a browser, as a desktop application through AIR, or on mobile devices. Each generation of the ActionScript language has been comprehensively described by Colin Moock in this series of O'Reilly books, becoming the reference book you'll find on most Flash developer's desks. With ActionScript 3.0, you have unprecedented power in building engaging applications and with this reference you have tremendous insight to use that power effectively.

I look forward to seeing what you create and to the next generation of applications ahead. Keep pushing the boundaries of what's possible on the Internet to make the experience more engaging and effective for people around the world, and we will do our best to continue bringing more expressiveness and power to help you in your efforts.

—Kevin Lynch

Chief Software Architect, Adobe

San Francisco, 2007

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required