logo

 

     
 
Home
Site Map
Search
 
:: Bitwise Courses ::
 
Bitwise Dusty Archives
 
 
 

rss

 
 

ruby in steel

learn aikido in north devon

Learn Aikido in North Devon

 


Section :: books

- Format For Printing...

Foundation ActionScript 3.0

Book Review
Friday 9 October 2009.
 

Foundation ActionScript 3.0 for Flash and Flex - $39.99
by Darren Richardson with Paul Milbourne
ISBN-10: 1-4302-1918-1
ISBN-13: 978-1-4302-1918-7
450 Pages
http://friendsofed.com/book.html?isbn=1430219181

A great many books devoted to ActionScript programming have little or nothing to say about programming Adobe’s Flex framework for ActionScript. This omission is all very well if all your ActionScript coding will be devoted to animating graphics using the Flash programming libraries within the Flash IDE. But if you plan to develop general-purpose applications to run in a web browser or on the desktop, then you really need to know about Flex. ‘Foundation ActionScript 3.0’ not only describes the ActionScript language but also explains how to use it both for traditional Flash development and with the more extensive tools and libraries of the Flex framework.

While covering Flash and Flex all in one book may sound like a great idea, there is a potential disadvantage. Even though Flex is a superset of Flash, programming with the Flash IDE is fundamentally a different process from programming Flex. The Flash IDE is predominantly geared towards computer artists and animators who may need to do relatively little coding. It works on the assumption that you will be doing a lot of animation along a sequential ‘timeline’ made up of frames and, if you want to add programming logic, you can do so using simple editing and debugging tools. By contrast, Flex is for programmers. It works on the assumption that you will want to create user interfaces with buttons and text fields and so forth and may need to manipulate data, XML and so on. In short, Flash developers do animation with optional bits of ActionScript code attached; Flex developers program applications with lots of code and (quite possibly) no animations.

If that description of Flash versus Flex makes it sound as though they are mutually incompatible, let me clarify: that is not the case. Flex is a superset of Flash. It contains all the Flash programming libraries and then adds on a whole lot more; and it can also target the Flash player – the thing that displays the graphics or applications in the browser or (using Adobe’s AIR runtime) on the desktop. Which means that while the development process and code libraries may differ, the fundamental features of ActionScript itself are the same.

This book comes with a downloadable source archive which provides most of the code in a form which can be used by both Flash and Flex developers. It does this by providing the bulk of the code in standalone ActionScript files which are either structured in Flex-style folders or are referenced by a project (.fla) file for the Flash IDE. The vast majority of these projects are not, strictly speaking, ‘Flex applications’ as they don’t use the Flex class library - they are ActionScript applications which are compatible with a Flex development environment.

This book assumes no previous programming knowledge and Chapter Two starts right at the very basics as in “what is a variable?”. While this chapter does a pretty decent job of explaining programming very briefly, I suspect that relatively few completely new programmers are going to choose this book as their introductory text. Probably Chapter Three is where many people will start. This is where ActionScript 3.0’s object orientation is explained. This is essential reading both for programmers moving to ActionScript 3.0 from some other language, such as Java or C#, and also for ActionScript 2.0 programmers who may never previously have had to grapple with all this object orientation malarkey! It also covers some of the things that may be confusing even to experienced coders such as the inner nature of the ‘Object’ object and the confusing difference between the ‘for’ and ‘for each’ loop.

Later chapters deal with more specialist areas such as using ActionScript with vector graphics, video and audio. Even though most of this is applicable to both Flash and Flex, it seems to me that most of the time the assumption is that you’ll be using the Flash IDE. The section specific to Flex begins late in the book (page 485) and covers just two chapters. The author admits that this coverage is far from complete: “I have a confession to make,” (he writes), “There isn’t enough space in this book to teach you everything there is to know about Flex.” This, I would say, is quite an understatement. However, he says that he aims to “show you enough Flex to give you a comfortable grounding and get you started.”

In summary, this is a pretty good book for newcomers to ActionScript 3.0. It covers a lot of ground and it generally does a good job of explaining the fundamental features of programming with the ActionScript language. Its coverage of the specifics of Flex is, however, too brief to provide anything beyond a quick ‘taster’ which is something you should bear in mind if Flex development is your main interest.


Huw Collingbourne is Director of Technology with SapphireSteel Software, makers of the Amethyst IDE for ActionScript and Flex development and he is the lead developer of the Amethyst Designer, a visual design environment for Flex development.

AddThis Social Bookmark Button


Home