Joey Lott, Darron Schall, and Keith Peters provide one of the first published overviews of Flash 9 and AS3 in the ActionScript 3 Cookbook. I had never picked up one of O’Reilly’s “cookbooks” before, but I quickly discovered that this format might be perfect for my picky reading habits. The book comes in at over 500 pages, and it’s the first release from the new O’Reilly/Adobe partnership known as the Adobe Developer Library.
Like most programming language books, each chapter in the AS3 Cookbook focuses on a specific aspect of the language. One chapter focuses on the Display List, another on Arrays, and so on into Bitmaps, Math, and others. What sets this style of book apart is that each chapter contains a series of short “recipes” that focus on the chapter’s main subject. For instance, the Regular Expression chapter includes solutions for simple problems like replacing text and validating user input, but an additional discussion section provides a few extra insights that more comprehensive language books might miss.
I found myself immersed in chapters on core language features, like the one on Arrays, even though I felt I knew these subjects pretty darn well already. With so many short and sweet sections, I discovered a dozen different tricks that I know I can use in my everyday development. For example, did you know that you can easily copy a single-dimensional Array by calling the
concat() method with no arguments?
var myCopy:Array = myArray.concat()
Somehow, that had slipped under my radar.
I didn’t have too many issues with this book. Mostly, I found myself wanting to count the number of typos I discovered. You can expect to see a second printing, if only to fix the spelling mistakes and missing letters here and there. They’re not overly distracting, though. I had too much fun with the subject matter to let it bother me. I also noticed that there are several references to Flash Player 8.5. In some cases, it seemed to work, but in others I wondered if it would just be better to say Flash Player 9. Since it was released as an alpha player, it probably shouldn’t be considered an official release. SWFs made with the alpha version of the Flex 2 compiler won’t run in the official Flash 9 player these days. I’m guessing we won’t see it in the archives either.
All in all, the ActionScript 3.0 Cookbook kept me pretty entertained. I enjoyed that its recipes fit into a page or two each because I could easily sit down and read a couple when I had a few extra minutes. The next time I picked it up, I’d be jumping into fresh material that generally didn’t depend on previous sections. If you’re looking for a definitive language overview, this book isn’t what you want. You’ll probably want to pick up Essential ActionScript 3.0 when it comes out next year. Keep the AS3 Cookbook close to your desk as a quick reference for useful tricks or to give you a crash-course on a particular feature that you haven’t used yet.