Screenshot of SimpleAS3 Framework

Learning ActionScript 3.0 offers the best intro to Flash development

Very few Flash or Flex development books get me excited. They’re all generally pretty decent, but only the rare ones1 make me want to read cover to cover. A good programming book is one that I want to share with others before I’m finished reading it. Among those great gems, I’ve recently added Learning ActionScript 3.0 by Rich Shupe and Zevan Rosser. It certainly lives up to its title.

Learning ActionScript 3.0 differs greatly when compared to other books published by O’Reilly. The most obvious difference when you see this one on the shelf will be that there’s no iconic animal drawing on the front cover. When you pick it up, and start looking through its pages, you’ll soon discover an even more surprising difference. Every page in Learning ActionScript 3.0 is printed in full color. All the code is formatted to match Flash CS3’s ActionScript editor. All the screenshots are, you guessed it, fully colorized. Unlike many other developers, we of the Flash community tend to work on projects that are highly visual. Screenshots in previous Flash and Flex books I’ve read have been greyscale and sometimes very difficult to see. Learning ActionScript 3.0 sets a new standard. The books I read in the future will lose points immediately for crappy black and white screenshots.

The visual treatment isn’t all that stands out. The authors have experience teaching “thousands of students at universities, training facilities, and conferences”. In the preface, they explain that they’ve been told time and again that no ActionScript book for beginners is truly all that good for the intended audience. They set out to try to fix that problem. In my opinion, they’ve done an excellent job crafting a book that slowly eases someone into programming ActionScript without being too overwhelming. They wait six chapters before introducing Object-Oriented Programming, and I think it works very well. The first three chapters offer the bare minimum of programming concepts and then the reader is taken into sections about how to use the Display List and the Timeline. Only then, after the reader has built a couple things, and hopefully gained some confidence, do the authors begin to introduce the complete concepts behind objects and classes. It’s a very gentle introduction with enough hands-on learning that it doesn’t get boring.

In later chapters, the authors touch a bit on text, sound, video, animation, drawing, and loading external assets like images and XML. With each topic separated into its own chapter, I get the feeling that this book will be an excellent resource for someone who might want to skip certain bits of functionality and reference it later as needed, or for a beginner that needs a refresher every once in a while. I noticed on several occasions, as I was reading, that these sections cover many of the most common questions I see in online Flash forums.

The book ends with a chapter on “Programming Design and Resources”. This chapter introduces various software development models, such as waterfall, spiral, and several agile methods. I like that this section was included because most Flash books don’t really mention larger project-scale processes that developers might want to consider following. It’s refreshing and forward thinking. After that, the reader gets a very short introduction to design patterns. Though I was impressed that they were included, I felt this section could have been bigger or omitted. With such a slow introduction to OOP earlier in the book, the sudden appearance of what many consider a very advanced topic felt out of place. Still, I think it will probably help inspire some especially-talented new developers to discover how to move to the next level, so perhaps it fits. Finally, the chapter ends with several large lists of online resources for Flash developers, including many popular blogs (sadly, not mine. haha), open source libraries, books, forums, conferences, and more. For someone new to Flash development, this section alone offers hundreds of ways to go beyond what’s in the book.

While targeted more at beginners, Learning ActionScript 3.0 serves as an excellent reference to some of the most common tasks ActionScript developers encounter daily. The transition from the very basics of Flash programming to more advanced topics is gentle, but engaging. The full color pages throughout this book separate it from everything else on the shelf, and O’Reilly couldn’t have chosen a better topic than Flash to enhance with this wonderful addition. I’m not the only person excited about this book either; Lee Brimelow, Platform Evangelist at Adobe, called it “the best ActionScript book ever written.”

1For reference, the last Flash book that got me excited was Object-Oriented ActionScript for Flash 8, which I read back in 2006 (there’s an updated version, Object Oriented ActionScript 3, if you’re interested).

by Josh Tynjala | 7 comments

Bugs and Feature Requests for JSFL

JSFL makes me bang my head on the desk sometimes. Don’t get me wrong, JSFL is useful. I’ve been using it for some time now to partially automate builds for Flash CS3 FLA-based components. I can create component shims, live preview SWFs, and many things of that nature which normally take a long time to do manually. Unfortunately, I can’t get everything working perfectly for a fully automated build. Here are a few problems with JSFL that have been making me extra angry:

Hopefully, some of these things can be cleared up in Flash CS4 (or maybe a CS3 hotfix for that crash bug, please?). In theory, it will be possible to modify and create files using the upcoming XML/ZIP FLA file format called XFL completely outside the Flash authoring environment. It doesn’t help me now, but I rest just a little bit easier knowing that I’ll have an easy job creating builds in the future when XFL becomes available and I may no longer need most of my JSFL scripts. Adobe, want to make things just a tiny bit easier? I’d love for Flash CS4 to include a native command-line compiler to build FLA files. I already run Flash from the command line now, but I’d rather not have the whole IDE open when I don’t need any visual tools.

by Josh Tynjala | 3 comments

ActionScript Game Programming University: Fun and Educational

Games inspired me to become a developer. I remember having fun playing a myriad of games on consoles and my computer and thinking, “someday, I could make cool stuff like this too!” Fastforward to today, and I’m building chart and treemap visualizations, but that’s a different story…. Still a kid at heart, I was excited to take a look at Gary Rosenzweig’s ActionScript 3.0 Game Programming University. Though I took my time reading it, I found the each chapter very interesting as they each laid out very simple source code that I think even a new developer wouldn’t have trouble following.

The back of the book entices the potential reader with promises of sixteen complete games. In fact, the author’s attention to detail shines through as he lays out games from start to finish. Considering all the Flash and ActionScript books I’ve read over the years, I think I’d recommend this one just for the fact that Mr. Rosenzweig encourages proper cleanup of objects clearly and often. Ultimately, the sixteen games are very simple, and anyone hoping to have something finished by the end of the chapter can only be called naive. The fact is, a real game someone would want to release online needs a lot of content, and that’s certainly outside the scope of this book. Don’t take that as a negative, but a warning in case you think game development will be as easy as it feels while reading this book.

General programming tasks pepper the pages of each chapter without feeling dry and boring. Learning to load XML seems to happen naturally when a game needs some external data. A little E4X gets thrown in for good measure. Again, I noticed over and over, the author encourages good practices by placing common tasks (such as moving objects using physics) or pointing out that he coded something one way to account for features that could be added later (playing sounds in a single function because you might want to add volume changing and mute functionality).

The order of example games works pretty well overall. The first couple of chapters with “complete game” examples feature matching games that are a bit boring, but the interestingness quickly progresses into a shooting game, an Arkarnoid clone, an Asteroids clone, and several others. It ends up being a good mix between graphical games and more traditional quiz and word games. The final two chapters feature a 2D side-scrolling platformer and two top-view driving games.

Like I said, part of me still wants to feel cool by making a fun game that people truly enjoy. Gary Rosenzweig’s approach to teaching game development encouraged that feeling, and if I were still younger and had hours to kill on the computer, I know I’d love to play around with this book and build little games to proudly show my parents. Part of me predicts I’ll eventually sit down one lazy weekend and come up with something to proudly show my girlfriend, but she’ll probably just roll her eyes. Anyway, if you’re keen to try a little game development, whatever your age, I definitely recommend ActionScript 3.0 Game Programming University. With very clear explanations, anyone should be able to explore its examples without much effort, and like me, more experienced developers can have fun too.

by Josh Tynjala | 3 comments

360Flex Item Renderers Session Slides and Code

As promised, I’m making my slides and the code samples from my 360Flex Atlanta session available for download. The session was officially titled Building Components That Use Item Renderers and it covers the use of custom item renderers for existing components (like List, Tree, DataGrid) and the creation of new components that can display item renderers.

Screenshot of 360Flex Atlanta Item Renderers Slides

The following examples of MXML List item renderers were shown during the session. These examples display their source code next to the components.

Font List Item Renderer Example

Color List Item Renderer Example

To access the source code for the CheckBoxList ActionScript item renderer, head over to my blog post, Open Source Flex Components: AdvancedList and CheckBoxList. The source code for the TabBar component for Flash CS3 is available in the Yahoo! Astra Library for Flash CS3. It’s not a Flex component, but it is a good example of recycling renderers for reuse.

You can download the source code for the TreeMap component at its Google Code project. The current stable release is available on the Downloads page. For the latest “unstable” revision (which is what I showed during the session) you can go to the Source page and follow the instructions to access the source code with your favorite Subversion client.

To all who attended such an early session after a night of partying, I appreciate it. Also, if you stopped me in the halls between sessions to say you liked it, thanks a lot. I’m excited for the next 360Flex. I heard rumors that Tom and John want to head back to the Bay Area, or at least the west coast, next time.

Download Slides (PDF file)

by Josh Tynjala | 4 comments

Pages: Prev 1 2 3 4 5 6 7 8 ...42 43 Next