ActionScript book for an experienced programmer?
March 30, 2007 4:19 PM   Subscribe

Can someone recommend a good ActionScript book for an experienced programmer?

I'm designing an ActionScript API that my work will provide to various Flash authors (generally our creative departments or external agencies) to help them integrate their movies into our web sites, and I'd like to get a book on ActionScript that's aimed at experienced programmers.

I did see this earlier AskMe recommendation for a book for non-coders, but I'd like something a little more technical than that. I've done lots of programming in a variety of languages, and I do already know the basics of ActionScript and Flash.

I guess what I'd like is something that'll give me an idea of some "best practices" type things - how to organize my code, weird traps to look out for in ActionScript, vagaries of the various player versions, etc.

What I don't want is something that will spend a lot of time talking about how a for loop works, foundational OOP, etc, or something that mostly focuses on the authoring side of Flash (animation, sound, graphic design, etc).

Oh, for what it's worth, this will be an ActionScript 2.0 API, since we need to support down to Flash 6. And if anyone has some particularly good websites that deal with these kinds of things, I'd welcome those, too (I've had a lot of trouble sorting the wheat from the chaff when it comes to sites about Flash).
posted by whir to Computers & Internet (8 answers total) 3 users marked this as a favorite
 
Best answer: Colin Moock's books from O'Reilly are gospel. If you think you'll be using newer Actionscript 3 check out his new book (he's released the first 10 paragraphs of each chapter on his blog)

If you aren't using Flex or the soon-to-be-released Adobe Flash CS3 (i.e. you are using Flash 8 or Flash MX 2k4 as your authoring environment) get Essential Actionscript 2.0. It's great.
posted by drinkspiller at 4:48 PM on March 30, 2007


You may also wish to check out the table of contents of Actionscript for Flash MX to see if that may be more in line with your needs. Honestly, if you have both, you'll have everything you'll need.
posted by drinkspiller at 4:50 PM on March 30, 2007


Best answer: I'd second the recommendation of Moock's books. Essential Actionscript 2.0 is the book you want, if you're aiming at Flash 6. It does have some basic intro to OOP stuff, but that's really unavoidable with ActionScript books, and it's at least easy to skip over in this one.

The built-in help is also surprisingly adequate, though the interface isn't great.

A few online resources worth looking at:
* OSFlash is a wiki for open source Flash projects--there are some great tools on there, and it links to other good things.
* Flashcoders is a mailing list about ActionScript programming--it's smarter than most of the webforums about Flash, and spends less time on basic programming questions.
* The Adobe Labs weblog is a good source for interesting new stuff coming from Adobe, some of it Flash related. (Though it's more Flex than Flash these days).
* Full As A Goog aggregates posts from a bunch of RIA-related blogs, and has a Flash section.
posted by moss at 6:01 PM on March 30, 2007


Yes, definitely Moock. In addition, I recommend "Object-Oriented Programming with ActionScript" and "Object-Oriented ActionScript For Flash 8."

If you start using AS 3.0, you'll love "Advanced ActionScript 3 with Design Patterns", and you may even want to get it now and translate some of it back into 2.0.

I can't vouch for "ActionScript 3.0 Design Patterns: Object Oriented Programming Techniques", because it's not out yet, but I'm looking forward to it.

If you're animating with actionscript, the bible is "Making Things Move," which is available in a 2.0 and (any day now) a 3.0 edition.

I write actionscript from 9- 5 every day. Drop me a line if you want.
posted by grumblebee at 6:44 AM on March 31, 2007


I've done lots of coding and bought Moock's "essential actionscript 2.0" because I wanted to get deeper into flash and actionscript.

Big disappointment. It seemed to be geared to old AS coders who had been using flash forever and wanted to learn about the new OO stuff. Check out the table of contents. All the practical advice is about OO (design patterns, inheritance, etc. etc.) And little about animation, sound, best practices, UI, accessibility, etc.
posted by kamelhoecker at 9:56 AM on March 31, 2007


I love the Foundation series - Foundation ActionScript for Flash 8 is the most readable book on programming I have ever encountered.
posted by ljshapiro at 11:05 AM on March 31, 2007


Yes, Foundation is a great book, but it's not for whir. It's a beginner's book, and it goes all the way back to "what is a loop..."

All the practical advice is about OO (design patterns, inheritance, etc. etc.) And little about ... best practices


In the AS community, OOP and design patterns ARE best practices. OOP is controversial, and I'm not arguing that it's always optimal, but that is the general feeling, and AS 2.0 (and 3.0) were designed with this in mind.

===

whir, I work with many programmers like you. Most of them have tons more experience than me, yet they're having trouble getting Flash. This is due to Flash's wacky DOM. It's totally counter-intuitive and extremely messy. There are parts of it that aren't even accessible via scripting.

I have no idea what how much general Flash knowledge you have, but you won't be able code successfully, no matter how well you know AS, without understanding Flash architecture.

So, if this is a weakness of yours, get some of friendsofed.com's Foundation books (including the non-coding ones). Pay special attention to MovieClips. They are complex and odd objects, and you'll have to wrestle with them all the time. Make sure you understand all the ins and outs of embedding movieclips inside movieclips and loading swfs and jpegs into movieclips.

Make sure you understand timelines. Timelines can -- and often do -- contain code (stored on a frame). It matters which frame you place your code on. Flash continually redraws the screen, many times a second. You can set the number of times (fps) in the authoring tool, via the UI, but -- in AS 2.0, anyway -- not via code. (Though you can, via code, force the screen to redraw at an arbitrary time.)

I just bring up MovieClips and timelines as examples of the types of things that can trip you up. There are many many more things like this (e.g. Fonts can't be used unless they are saved in the Library, and you can't do this via code). So learn this stuff!

Someone needs to write a book for programmers -- not animators -- about the Flash DOM. What You Need To Know About Flash To Program It. I'd suggest it to my publisher, but I know he's say there isn't a big enough market for it.
posted by grumblebee at 11:58 AM on March 31, 2007 [1 favorite]


Response by poster: Hi all... sorry for the late response on this. Thanks for the suggestions. I did wind up buying Moock's Essential ActionScript 2.0 and it has so far covered most of the lingering areas I felt like I needed to know more about (although the first half of the book didn't cover all that much that I wasn't aware of, at a skim). The stuff on how to package code into a library / component / swf was especially helpful for me.

grumblebee, I agree completely that a book aimed more at programmers than "authors" is needed, and I'd certainly buy one. I'm a little frustrated partly because I've already hit on a lot of the pain points you describe with MovieClips and fonts, but I still don't know if there are sort of industry-standard ways to do things. (Fonts! Good gravy, just shoot me in the face next time instead of making me deal with fonts in Flash.) It sounds like that sort of info is still the sort of thing you just develop from the school of hard knocks, which I'm sure is cool from an ActionScript salary POV, but doesn't seem that cool from someone in my place.
posted by whir at 9:40 PM on April 15, 2007


« Older How do I calm irrational pregnancy fears?   |   Seat backs with no spine! Why? Newer »
This thread is closed to new comments.