Login | Register
Object-Oriented Programming with ActionScript

Object-Oriented Programming with ActionScript

This book has been anticipated for a long time, but I was caught slightly off guard. If you are new to the concept of Object Oriented Programming and ActionScripting, this is not the book for you. If you are an intermediate to advanced ActionScripter, this is THE book to get.

Title: Object-Oriented Programming with ActionScript
Authors: Branden Hall, Samuel Wan
Pages: 402
Source files: Downloadable from wheelmaker.org
ISBN: 0-73571-183-6
Publisher: New Riders

The authors Branden Hall and Samuel Wan are both well known for their Flash-skills and they are frequently used as speakers at events such as FlashForward. Sam has just finished his education and has landed a job with the university he graduated from, while Branden left his long time employer Figleaf to go freelance. Both are avid supporters of Open Source and they love to share their code with others. The book also contains chapters contributed by Andreas Heim (Smashing Ideas) and Nigel Pegg (Macromedia).

The title of the book "Object-Oriented Programming with ActionScript" can easily lead you to think this would be a good book if you want to learn programming. It is not. For that, too much knowledge is required. You will not learn OOP from ground, but you will learn how OOP applies to ActionScript in so many ways.

From ActionScripts modest beginnings in Flash 4 to Flash MX, a lot has changed. The step up from Flash 5 to MX may seem small, but MX really is a new way of thinking. Flash 4 ActionScript did not look much like a programming language, but the program itself was quite "object" based due to how MovieClips worked. Flash 5 improved the object orientation by adding more possibilities and looked to the ECMA standard used by JavaScript for formatting and structure.

Still, many things were to be desired and many coders wrote code that improved on how Flash worked. Branden Hall was one of those coders. His XML-Nitro script increased the speed of XML parsing massively. Through the mailing list Branden started (FlashCoders), people discovered undocumented commands that made it possible to extend Flash 5 much further than Macromedia originally had planned. Using these newfound possibilities Banden and the list also found ways to add support for more system events that made really advanced scripting possible. Many of these events made it into Flash MX and Macromedia extended it even further so that we can now call ActionScript a "real" programming language.

The book is divided in three parts. The first chapters of the book explain how Flash relates to OOP and other languages and how the inner workings of Flash are built. The chapter explains all you wanted to know about prototypes and extending ActionScript. There is also an introduction to patterns in programming and how to structure your programming. This part isn't too structured but get the message across. Don't misunderstand me. The book is really good, but it's rather personal or should I say informal? All chapters start off with a side-story that somewhat relates to the chapters contents. I found this a bit annoying at first, but soon got used to it. The stories make you remember some important things about being structured and how to do and not do certain things both in Flash and life.

The second part of the book is a "hands on" look at building components from scratch and expains some rather advanced concepts for this. Nigel Pegg, component engineer at Macromedia, wrote two of these chapters. His chapters extend on Samuel Wans introduction to components and really show how to make professional quality components. This is a brilliant introduction before looking at the inner workings of the components made by Macromedia.

The content of the third part of the book is called High-Level ActionScript. It surely is so, but the chapter on debugging was maybe a bit basic for the intended audience? I think this must be the only chapter I didn't learn anything from, but then again - I do a lot of debugging daily... The rest of the chapters are so full of nifty tips and tricks that they would be worth the price alone. Extending text fields, creating a text editor from scratch, MovieClip buttons, server communications with XML, converting XML to data providers for components and use Flash Remoting, advanced data structures, using objects as dictionaries. The list goes on and the last chapter on “Useful Code and Handy Ideas” will save you loads of time with tips on recursion, physics, Math-tricks and more.

The book is not written in an I'm-on-top-looking-down perspective. The book rather suggests ways to solve problems and explains why. Having read some 20 books on Flash, I'm amazed at how much time it took me to read the whole book. Overall the language used is good and easy to read, so it's not that. It was rather the enormous wealth of information in the book that made me lose speed. From the principles I've learned from the book, I'm sure I've saved days of work already. I'll keep this book next to my desk for a long time and it's a good thing that New Riders sent me two copies of the book; cause the first one is really worn already.

Click here to order the book from Amazon now

 

Rate this article
 

 

Comments

No comments for this page.

Submit a comment

Only registered members can comment. Click the link at the top of this page to register.