Thursday, April 29, 2010

This show is based on one of the 65+ demo applications that I wrote for Flex 4 Fun, a book about the graphics and animation side of Flex 4. You can see a book sitting next to me on the table at the start of the video. I had planned to show it in the video, but that segment got cut. I suppose the producer figured that since all I was showing was a copy of When I am King... with a printout of the Flex 4 Fun cover taped around it (since Flex 4 Fun isn't actually available in hardcover until this Summer), it really wasn't a crucial part of the show. Anyway, if you want to see more about the book, check out the book site, the page where you can purchase the PrePrint version, or the apps site where all of the demos are hosted.

This episode shows how to create a simple container in Flex 4 that holds both a BitmapImage and that image's reflection. The actual reflection we end up with, which is just a translucent/mirrored version of the original, could be improved upon... which is the point of the next show. (Oooh, I just love a good cliffhanger!)

Wednesday, April 7, 2010

This episode covers the use of the updateAfterEvent() function to get better rendering performance for time-sensitve operations like mouse-interaction visuals and animations.

By default, changes to the graphics that the Flash player displays happen at the frame rate of the player (by default, 24 frames per second). This frame rate, which updates the screen every ~42 milliseconds, is fine for most visual changes on the screen. But when you need motion to be smoother, like in some animations, or need the visuals to respond quickly to user interactions, like changes in component state based on mouse movement or presses, then 24 fps may not cut it. In this case, you need to know about the updateAfterEvent() function found on some event objects.

The book is content complete: all of the chapters are done, all of the demo applications compile and run, all of the text is correct as far as I know, and there are no known typos.The book could still benefit from one more review cycle, but rather than wait for that plus the printing delay until it would actually be available on bookshelves (usually 2-3 months after a book is completely complete), I wanted to push out this early version close to last month's Flex 4 release.

Flex 4 Fun is different than other Flex, or Flex 4, books I've seen; it focuses on the graphics and animation side of the SDK. I figured that's what I like to play with on Flex, it's what I know best about the platform, and it deserved a book that went deeper into these topics than the other Flex books. Sure, an overview book is good to have. Yes, you should understand how to connect Flex to a back end. Alright, you probably want to understand how to architect large Flex applications. But when you get around to creating better user experiences for that Flex client, you'll want to know more about graphics, states, skinning, and animation. And hopefully this book and its 65+ examples can help teach you how that stuff works.

Friday, April 2, 2010

As you might expect in a book by me, Flex 4 Fun dives into the graphical and animation side of Flex 4. Lots of applications (>65) that demonstrate the technologies and techniques are covered in depth in the book and will be available on the book's website in binary and source form. Plenty of stuff to play with for those wanting to learn more about the "fun" side of Flex.

The book should be coming out in PrePrint form any day now. Artima's PrePrint is like a beta release of the book. In this case, the book is complete and has gone through a thorough editing/revision cycle (for some chapters, two or three times). But it still needs a technical review and feedback from careful readers like you. And you. And you. But in the interest of getting it out in your hands and minds close to when Flex 4 was released, we're releasing this early version while I work on finalizing the content in parallel.

This espisode is the stunning conclusion to the previous nail-biting cliff-hanger episode, Creating a Reusable Animation Library, in which we saw how to use Flash Pro to create Flexy, a small and Flex-free version of the timing engine underlying Flex effects. In this episode, we see how to use Flash Pro to link against Flexy and use it to create a simple ActionScript-based animation, writing code that looks very close to what we would write in Flex 4 for doing the same animation.

Once again, my thanks go to Trevor McCauley for helping me figure this out. Trevor's on the Flash player team and is very helpful is figuring out all kinds of things about how Flash works, including this bit about Flash authoring. Check out his blog at senocular.com.

I should probably spend more time and words on the Flexy library itself, but that will have to be for another day and another blog entry. But check out the previous episode for more information, and use your vast knowledge about the Flex Animation class and the related classes that you've accumulated so far from my blog and videos. It all carries over to Flexy, because Flexy is basically a subset of what I've been talking about with Flex 4 effects. It's just the timing engine part of effects (the 'Tween' engine, in Flash parlance), plus a helper class to assist in setting the animated properties on the target objects.

Thursday, April 1, 2010

Romain Guy and I gave a presentation last year at Devoxx (an excellent developer conference in Antwerp, Belgium (a city with mildly miserable weather at that time of year)) called Animation Rules! A recording of this session was just posted on parleys.com. I've embedded it here for your viewing pleasure:

You could also check it out on the Parleys site directly; parleys is an excellent Flex application, and has a desktop AIR client for offline viewing of the various sessions.

The Devoxx conference posts the session recordings one by one throughout the year. But you can also subscribe to parleys to get all of the sessions immediately. There are many great sessions at the conference, and the fee is quite low (49 Euros for 6 months), so consider becoming a subscriber to get it all.

My Comedy Books

My Programming Books

About Me

I'm a software geek, working at Google, making Android graphics and animation more excellent. In previous lives I've worked at Sun on the JDK, at Adobe on Flex, and various other places in Silicon Valley, always working on graphics software.

In my copious spare time, I write. I write humor on my blog Enough About You... along with my G+ stream at google.com/+ChetHaase and on Twitter via @chethaase. I also occasionally post technical articles on CodeDependent. I co-wrote the book Filthy Rich Clients with Romain Guy, wrote another programming book Flex 4 Fun about Flex graphics and animation, and wrote humor books Round and Holy, When I am King.... and the long-anticipated sequel, When I am King... II. Like women and childbirth, I eventually forget the pain of the process of writing a book, and will probably make the mistake of writing another one eventually. As soon as the scars from the last one heal.

I also have developed a strange and disturbing attraction to the microphone. Any microphone. You may find me giving a technical talk at a developer conference or user group, or doing some standup or improv in a comedy show. I've also been seen in videos ("You may know me from such hits as DevBytes..."), either work-related or posted on my comedy blog and YouTube channel.

None of what I write in my blogs, on Google+, or anywhere else has anything to do with my employer; they're just my thoughts, my jokes, my mistakes.