July 25th 2002 | John Dalziel
The Flash architecture of timelines within timelines has always been "Object-Oriented". The biggest irony with Actionscript was that when it was introduced in version 4, it wasn't OO. With the launch of version 5 it moved to the ECMA262 model and with MX has matured into a light but versatile application programming language.
PUBLISHER: Apress
ISBN: 1-59059-014-7
PAGES: 482 b&w
CD: No
AUTHOR: William Drol
Get it from Amazon.com
A year or two ago there was a big flurry of activity on the community sites as all the possibilities of .prototype were tested to excess. An understanding of how it works has led a lot of developers into exploring the intricacies of object oriented programming (OOP). The purpose of this book is to teach those skills using the new Flash MX Actionscript.
The author, William "Bill" Drol, has a clear and readable style which lends itself well to teaching these kinds of abstract concepts. Throughout the book he builds a series of related applications, and covers each step in methodical detail. There is no CD but the full source is printed in the book and can be downloaded from his site.
Although the book is intended as an introduction, it doesn't shy away from using the correct terminology. Even by the end of the second chapter you'll understand the meanings of polymorphism, encapsulation and inheritance. There's even a thoughtful chapter on 'programming slang' for all those designers who thought programmers just spoke voodoo all day long!
Throughout the book there is a focus on good planning, documentation and clean coding. Important practices such as commenting, variable naming and code presentation are all covered early. The points are well made and if there are several of you working on a large project then you'll begin to appreciate the importance of proper programming etiquette.
Before we launch into programming there is an important chapter on planning. As with database design, if an application is properly planned in advance it can save days or even weeks of needless bug hunting. Next it's time to get subtle with an exploration of the differences between the Java style Class model and the Actionscript style prototype model. Like Bill says, "you can still write Classes in Actionscript... they just look funny". Before you know it you've blazed through constructors and prototype inheritance without even stopping for tea.
In part three you put all of this new knowledge to work as over each chapter you slowly build a framework of code and services to support dynamic content in Flash MX. With these utilities built you move on to use them to build a very common and useful widget, a dynamic menu. With each chapter your menu class improves and by the end it is fully dynamic and being drawn from an easily configured XML file.
XML is covered in detail in the last five chapters. Learning how to parse XML can be a bit of mindf**k the first time you encounter it but these chapters are particularly well written. By the time you get to it, even recursion sounds straight forward. During this section you also write a few very useful XML Class extensions.
A set of four appendices round out the book. These include a new features overview, an introduction to IIS, MovieClip events and full source and documentation for the code you've developed along the way.
Next review:
Flash Enabled: Flash Design & Development for devices
Previous review:
Flash Enabled: Flash Design & Development for devices
Everyone to their bases - Flash is under attack!
Flash on the beach 2009 - Day 1
Stay current on what's happening in Flash business. Sign up now for the Flashzine newsletter.