Advanced Search
Start Your Free Trial

Overview

Top Sellers in this Category

In September 2003, Macromedia released Flash MX 2004, and with it, ActionScript 2.0, a dramatically improved version of Flash's programming language. ActionScript 2.0 introduces a formal object-oriented programming syntax and methodology for creating Flash applications. From a developer's perspective, the new OOP-based techniques in ActionScript 2.0 make applications more natural to plan and conceptualize, more stable, more reusable across projects, easier to maintain, change, and expand upon, and much more. In short, they enhance the entire development process. In Essential ActionScript 2.0, bestselling author Colin Moock--one of the most universally respected developers in the Flash community--covers everything you'll need to know about the new ActionScript language and its methodologies for producing movies, animation, and applications on the web. Moock guides readers through this important new territory with his trademark easy-to-understand style and expertise. Moock's goal throughout the book is not just to get you to use object-oriented programming in your daily Flash work: he wants you to reap the benefits of OOP; he wants you to understand ActionScript 2.0 completely. And without question, Moock is the author who can make this happen. Essential ActionScript 2.0 begins with a tour of the language, including the fundamentals of object-oriented concepts, syntax, and usage. Those who are new to OOP will learn the basics and how to apply their understanding. Those who are familiar with OOP will leverage their prior experience to learn about Flash-based OOP. The next part of the book shows how to structure entire applications with ActionScript 2.0, teaching you best practices and techniques to build scalable, extensible, stable apps. Next, you'll explore a variety of approaches to various programming situations by applying object-oriented programming strategies, known as design patterns, to Flash. Experienced Flash developers and programmers coming from other languages will enjoy the sheer depth of Moocks's coverage and expertise in Essential ActionScript 2.0. Novice programmers will appreciate the frequent, low-jargon explanations that are often glossed over by advanced programming books. As usual, Moock guarantees quality and accuracy by working closely with Macromedia Flash engineers, including Rebecca Sun, lead developer of ActionScript 2.0. Whether you're ready to make the move to ActionScript 2.0 now or simply assessing it for the future, you'll find everything you need to know within this book. Essential ActionScript 2.0 is the one book every ActionScript coder must own.

Amazon.com® Reader Reviews (Ranked by Helpfulness)

Average Amazon.com® Rating: 4.5 out of 5 rating Based on 42 Ratings

Great tutorial on ActionScript and object orientation - 2006-10-30
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
ActionScript 3.0 is now released, but the author is yet to update his classic book on the subject of ActionScript for this new version. Thus, I still highly recommend this book, since it covers ground not found in other books on the subject and I find it to be an outstanding tutorial on object-oriented programming as well as a precise tutorial on ActionScript. Keep in mind, though, that the author's version of this book for ActionScript 3.0 is due out in June 2007. So, if you don't need to know this material before next summer, you might want to wait on your purchase. I review this book in the context of its table of contents.

Part I: The ActionScript Language
Chapter 1. ActionScript 2.0 Overview
Starts with a quick summary of ActionScript 2.0's core features and Flash Player 7's new capabilities. If you have an ActionScript 1.0 background, the summary will give you a general sense of what's changed in the language. If, on the other hand, you're completely new to Flash or to ActionScript, you may want to skip directly to Chapter 2.

Chapter 2. Object-Oriented ActionScript
Ironically, Flash users who are new to object-oriented programming (OOP) are often familiar with many object-oriented concepts without knowing their formal names. This chapter demystifies some of the terminology and brings newer programmers up to speed on key OOP concepts. It also serves as a high-level overview of OOP in ActionScript for experienced programmers who are making their first foray into Flash development.

Chapter 3. Datatypes and Type Checking
ActionScript 2.0 defines a wide variety of datatypes. Some datatypes are native to the language itself (e.g., String, Number, and Boolean). Others are included in the Flash Player and are available throughout all Flash movies (e.g., Color, Date, and TextField). Still other datatypes are defined by components that can be added individually to Flash movies (e.g., List, RadioButton, and ScrollPane). This chapter covers all of that.

Chapter 4. Classes
This chapter covers the syntax and theory behind classes in ActionScript 2.0 and assumes a prior basic understanding of the concepts discussed in Chapter 2. Classes are the foundational structure of all object-oriented programs, making them arguably the most important aspect of OOP. As such, classes are predictably intricate. This chapter is correspondingly lengthy and detailed but, even so, newer programmers can use it to learn the basics of creating and using classes.

Chapter 5. Authoring an ActionScript 2.0 Class
Chapter 4 covered the general anatomy of ActionScript 2.0 classes. In this chapter that theory is put into practice by authoring a real-world ActionScript 2.0 class named ImageViewer. The ImageViewer class creates an on-screen rectangular region for displaying a loaded JPEG image. The chapter covers designing and coding the class itself, as well as using it in a Flash document.

Chapter 6. Inheritance
In OOP, inheritance is a formal relationship between two or more classes, wherein one class borrows (or inherits) the property and method definitions of another class. In the practical, technical sense, inheritance simply lets one class make use of the code in another class. This chapter covers the theory of inheritance as practiced in ActionScript.

Chapter 7. Authoring an ActionScript 2.0 Subclass
In the preceding chapter, the principles of inheritance in ActionScript 2.0 were covered. In this chapter, an applied inheritance example, ImageViewerDeluxe, is introduced. The ImageViewerDeluxe class is a subclass of the ImageViewer class that was created in Chapter 5.

Chapter 8. Interfaces
An interface is an ActionScript 2.0 language construct used to define a new datatype, much as a class defines a datatype. However, whereas a class both defines a datatype and provides the implementation for it, an interface defines a datatype in abstract terms only; an interface provides no implementation for the datatype.

Chapter 9. Packages
A package is a unique place to put a group of classes, much as a directory on your hard drive is a unique place to put a group of files.

Chapter 10. Exceptions
This chapter covers ActionScript's implementation of handling "when bad things happen". In a regular programming language, this might be when a mathematical calculation results in division by zero.

Part II: Application Development
Chapter 11. An OOP Application Framework
Flash is notoriously open-ended. If there are several of ways to skin a cat, there are even more ways to build a Flash application. Flash's flexibility can cause confusion for developers, especially when they're building their first application. This chapter's goal is to overcome that confusion by providing one explicit example of how to structure an OOP Flash application. By no means is the example presented here the only way to create a Flash application, but it is certainly a legitimate, reusable approach that makes a good foundation for any OOP project. The example is considered in the abstract sense first, not in reference to any particular application. The framework could be applied to anything from an email application to a video game. In the next chapter, you'll see how to apply this generic framework to a real-world situation--a currency conversion application.

Chapter 12. Using Components with ActionScript 2.0
In Chapter 11, you were shown how to structure a basic OOP application in ActionScript 2.0. In this chapter, you see how to create a GUI application based on that structure.

Chapter 13. MovieClip Subclasses

Chapter 14. Distributing Class Libraries
This chapter discusses various techniques for sharing a group of classes (i.e., a class library) among multiple projects and possibly multiple developers. Flash MX 2004's class distribution features are not particularly refined; by far the easiest way to share classes is to simply distribute the source code. The book covers this easiest case first, before it discusses how to share classes without distributing source code, as you may want to do when selling a professional class library.

Part III: Design Pattern Examples in ActionScript 2.0
Chapter 15. Introduction to Design Patterns
A design pattern is a widely accepted description, with a recommended solution, of a design or architectural problem in object-oriented programming. Given a specific requirement, a design pattern describes, in general terms, how to structure interacting classes to meet that requirement. In other words, the pattern provides a general blueprint to follow when implementing some aspect of a program. This chapter is a general discussion of this idea.

Chapter 16. The Observer Design Pattern
Effectively, the Observer pattern is an all-purpose event-broadcasting mechanism. It lets a class broadcast generic updates to registered listeners, much as you could ask your local movie retailer to call you when a DVD you're interested in arrives. It could be used in anything from a mail application (when a new email is received) to a video game (when an enemy dies).

Chapter 17. The Singleton Design Pattern
Sometimes an application needs only a single instance of a particular class and should not create more than that one instance. For example, an order form might need one FormProcessor. A game might need one LevelManager. A text editor might need one GUIBuilder. Or a chat might need one SocketManager. In each of those applications, creating more than one instance of the FormProcessor, LevelManager, GUIBuilder, or SocketManager classes could cause problems. For example, having multiple SocketManagers might lead to multiple open socket connections, which would waste resources and potentially disrupt communications. To prevent an application from creating more than one instance of a class and to give various parts of the application access to that one instance you should use the Singleton pattern.

Chapter 18. The Model-View-Controller Design Pattern
In the MVC paradigm the user input, the modeling of the external world, and the visual feedback to the user are explicitly separated and handled by three types of object, each specialized for its task. The MVC pattern can be applied to a single user interface element (like a button), to a group of user interface elements (like a control panel), or to an entire application. This chapter uses MVC to create a clock that combines three user interface elements: a digital display, an analog display, and a toolbar for starting, stopping, and resetting the clock.

Chapter 19. The Delegation Event Model
In the delegation event model, an event is propagated from a "Source" object to a "Listener" object by invoking a method on the listener and passing in the instance of the event subclass which defines the event type generated. In this chapter, the concepts of the Observer pattern are applied to a more specific situation: implementing events for a class. The event implementation will follow Java's delegation event model, a general design for event broadcasting.

Part IV: Appendixes
Appendix A. ActionScript 2.0 Language Quick Reference
Appendix B. Differences from ECMAScript Edition 4

hard to understand for beginners - 2007-03-08
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
I am a beginner, I should understand that. But i wanted to buy it still thinking it would have been good. Its probably great for advance people but i found it personaly very difficult to understand as i am just a low beginner.

Wasn't bad... - 2008-03-28
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
This one felt more like work >.> And halfway through the book my copy had an extra duplicate chapter and that confused me for a little bit. This was a necessity for me though because I had to learn the syntax differences between how AS2 does it compared to what I'm familiar with (C++, etc.). I really didn't enjoy reading this book though as it felt more like work than any of the other Flash/AS books I've read so far.

I'd recommend it only if you HAVE to learn about AS2 classes syntax ;-) Or want to punish yourself.

Top-Tier Computer Science Course in a Book - 2007-05-13
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
I took a Java course at the University of Texas @ Austin, which has a well regarded CS program, and I walked out of it knowing what classes, subclasses, and instances were, but no idea how to practically use them. After reading Moock's book, I not only better understand the theory behind object-oriented programming, but how to use it following best practices. I wish I hadn't taken the Java course, because in 500 pages Moock takes you through 3 semesters worth of material.

Of course, Essential ActionScript 3.0 is coming out soon, so you might want to wait for it, but make sure you buy at least one of them.

Excellent Action Script Book - 2007-03-14
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
My purchase of this book really helps mne a lot. It added up more knowledge and technique on my present expertise with Flash. Highly recommended for all Flash Action Scripters.

Browse Similar Topics

Top Level Categories:
Multimedia
Programming

Sub-Categories:
Multimedia > Macromedia
Programming > ActionScripting

Some information on this page was provided using data from Amazon.com®. View at Amazon >


About Safari Books Online • Terms of Service • Privacy Policy • Contact Us • Corporate Licenses • Help • Accessibility | See us on FacebookSee us on Linked InSee us on TwitterRSS

Copyright 2010 Safari Books Online. All rights reserved.