reviewed by: Peter deHaan
Version: ActionScript 2.0 (Flash MX 2004)
Publisher: O'Reilly
What can be said about Colin Moock's Essential ActionScript 2.0 that hasn't already been said before. Colin's latest book was released in June of 2004 and is 443 pages (not including appedices -- 479 with). So readers should expect a book the same size as Colin's other books, ActionScript: The Definitive Guide.
The book is broken down into three parts: The ActionScript 2.0 Language, Application Development and Design Pattern Examples in ActionScript 2.0. And there are also all the prerequisite prefaces, introductions, forewards, appendices and indexes.
Before I get too deep into a review, I'll give you a bit of background. I began reading Essential ActionScript 2.0 I had already read through New Rider's Object-Oriented Programming with ActionScript 2.0, so I was familiar with the general concepts of Object Oriented Programming (OOP). I was also fairly familiar with the Flash interface and writing ActionScript (AS).
Perhaps it is best to start off with a brief quote from the book.:
You should not read this book if you are a Flash designer/animator with little or no programming experience...
There, that pretty much sums it all up. Basically if this is your maiden voyage into the world of ActionScript, now is probably a good time to flee and run screaming like you're on fire. This book walks you through ActionScript 2.0 and OOP concepts. It isn't meant to be a gentle introduction to ActionScript or coding in general. The author recommends picking up Flash MX: The Definitive Guide and starting with that instead (not surprising because he also wrote that book). For people newer to Flash or ActionScript, I'd probably recommend skipping this book and finding something a bit more "introductory". Now, as for who this book is FOR, the author says (and I'll summarize): intermediate AS 1.0 or JavaScript programmer, advanced AS 1.0 or AS 2.0 programmer, Flash designer who dabbles in programming and finally any experienced programmer in another language (such as Java, C++, Perl, JavaScript or ASP). Note: If you're a mere ColdFusion or PHP programmer, fret not, I'm sure you'll be able to follow along as well, or if not you can enjoy the “pretty pictures”™. But more about the photos later on...
Part one of the book pretty much walks through the basics of OOP as well as defining the terminology that will be used throughout the remainder of the book. Colin also covers new features of Flash Player 7 as well as new features in ActionScript 2.0. There is also a really good chart outlining which components are new to Flash MX 2004, which were previously available in MX or Developer Resource Kits (DRKs) and which are only available in Flash MX Professional 2004. People that are newer to Flash MX 2004 will also find the section on "Changes to ActionScript 1.0 in Flash Player 7" pretty useful as it can help you debug why your older files may not be working as expected with the newest version of Flash Player.
The book can feel a little bit overwhelming to people unfamiliar to OOP at certain points. Topics such as Encapsulation, Datatypes, Inheritance, Packages and Compilation are introduced relatively quickly in the book, although they are explained in greater detail later in the book. Still, sometimes it is nicer to have a somewhat longer introduction earlier in the book (although this is a fairly nit-picky issue).
The thing I like about this book is that there is lots of code to look through. Some of the code snippets show both the right and wrong way of doing things which helps easily see what does and doesn't work in ActionScript. Another nice thing is that there are parts where the author compares ActionScript 1.0 and ActionScript 2.0 code side by side, which again is useful for teaching how concepts are different between the two versions of ActionScript. A good example of this is in Chapter 4 (Classes) where he displays a custom Box class written in AS 2.0 and immediately follows it with the next example that shows the old AS 1.0 way (using prototype) to do the exact same thing. I also like that there were plenty of notes, tips and warnings sprinked throughout the chapters.
One of my favorite chapters in this book was Chapter 10 (Exceptions) which covers handling errors within your ActionScript and using ActionScript 2.0's new try/catch/finally statements, as well as looking at creating your own custom error classes to better handle errors. Another chapter that I found very useful was Chapter 12 (Using Components with ActionScript 2.0 -- [view PDF courtesy of Macromedia.com]) which covers building a currency converter application using custom classes. It also shows how to attach components from your library onto the Stage at runtime which is very useful (hint: use createClassObject).
For those of you that want to browse through the code before purchasing the book (or downloading it from O'Reilly's Safari site) you can check out the official book companion sub-site at Moock.org, although trolling through the code without the help of the book can be somewhat daunting at times.
Now, I hear you saying, "what does he *really* think of the book?". Well, honestly, I like it. It isn't perfect, but I don't think any book can ever really achieve that. It suffers from what I dislike most about most tech books, and a lot of O'Reilly books seem to do. Sometimes the code is overwhelming. I'm not just talking about complex code, I mean sometimes there is just a LOT of it. For example, in chapter 16 there are some places where there are nearly 5 (FIVE!) full pages of code. I never know what to do with that much code, and usually end up rocking back and forth in my chair in a cold sweat. Does somebody seriously expect you to type that much code in by yourself? No, that is why [good] authors provide companion sites or CDs with everything typed out for you. Am I supposed to read all four pages and say "yeah, that looks right" and move on? Should I see some divine point somebody is trying to make that took four or five full pages to beat it sufficiently into my head? These are all questions that I cannot answer. Again, not a deal breaker for this (or any other) book, just a personal pet peeve of mine.
What else don't I like about the book? Well, again this isn't exclusively a hack against this book but more of a O'Reilly specific (and tech book as well to a lesser point) but why do authors have an adversion to putting in a screenshot once and awhile? Sure, I see flow charts, which are decent as far as a flow chart goes, but sometimes I like to see what I'm building. After a quick flip through the book I spotted one actual screenshot (flow charts don't count, they're usually as boring as dinner with your family). This one screenshot in particular is a clock, which consists of a few circles, a line, a single dynamic text field and three Button components. After searching the online PDF for Chapter 12 [Macromedia.com] I spotted two more figures. The first figure (12-1) shows a few components on the Stage with a few arrows and dandy labels and the other figure (12-2) shows the Timeline with keyframes, labels and whatnot. Maybe it is just me, but I like to look at pictures and see that something is taking shape. Granted, this code is so heavily ActionScript weighted that screenshots don't make sense in many places, but the books just feel barren and a bit too "textbook" at times.
The only thing I'd be somewhat cautious about is that the latest Flash updater (Flash 7.2 - codenamed Ellipsis) was released on July 26th, whereas Essential ActionScript 2.0 was initially released on June 16th 2004 (so says Amazon). So I'm a little unsure how many tips and workarounds for the Flash bugs that are outlined in Colin's book remain after the release of Ellipsis. But such is authoring, software can and usually does tend to change frequently with updaters and bug fixes.
But now to answer the $64,000 question that is on everybodies mind... The cover art.
The animal on the cover of Essential ActionScript 2.0 is the coral snake (Micrurus fulvius tenere). This highly dangerous snake is found in the southeastern states of North America and can also be found in Mexico. It likes wet, humid, and thick foliage-lottered forests, but can be found in any environment.
The coral snake is recognized by its vibrant red, yellow and black bands. These colors ward off would-be attackers...
So there you have it, you've been warned. If you see a coral snake it either means “highly dangerous” or else possibly a note about ActionScript 1.0.
You can see a condensed version of the table of contents below along with their respective starting pages. This gives you a pretty good estimate of how heavily the book is weighted on each chapter/section. For a complete table of contents breakdown you can check out O'Reilly's site at: Essential ActionScript 2.0.
Table of Contents
Part I. The ActionScript 2.0 Language (page 1)
-
- ActionScript 2.0 Overview (page 3)
- Object-Oriented ActionScript (page 13) [Read - PDF]
- Datatypes and Type Checking (page 24)
- Classes (page 59)
- Authoring an ActionScript 2.0 Class (page 124)
- Inheritance (page 158)
- Authoring an ActionScript 2.0 Subclass (page 215)
- Interfaces (page 224)
- Packages (page 238)
- Exceptions (page 249)
Part II. Application Development (page 281)
-
- An OOP Application Framework (page 283)
- Using Components with ActionScript 2.0 (page 291) [Read - PDF]
- MovieClip Subclasses (page 316)
- Distributing Class Libraries (page 332)
Part III. Design Pattern Examples in ActionScript 2.0 (page 347)
-
- Introduction to Design Patterns (page 349)
- The Observer Design Pattern (page 352)
- The Singleton Design Pattern (page 381)
- The Model-View-Controller Design Pattern (page 386)
- The Delegation Event Model (page 423)
Part IV. Appendixes (page 445)
-
- ActionScript 2.0 Language Quick Reference (page 447)
- Differences from ECMAScript Edition 4 (page 478)
Index (p481)
Rating:
(4/5).
|