Skip to main content

Posts

Showing posts with the label actionscript

Video: Flex 3 Easing with Flex 4 Effects

Flex 3 Easing with Flex 4 Effects , the next episode in the gripping and suspenseful series CodeDependent , is now available from Adobe TV . This show is basically a recap of an earlier blog article I wrote, Penner for your Thoughts (named for the author of the Flex 3 easing functions, Robert Penner ), except this time it's in video form (for the reading-impaired). The topic is about using the old easing functions in Flex 3 through the new IEaser interface that the Flex 4 effects require. See the article for more details about the whys and hows of this rather neat hack. Meanwhile, here's the video: Here is the demo application: And here is the source code . Be sure to check out the blog article for more details on how the code works. Finally, here's where you can find the CodeDependent videos on iTunes . Enjoy.

Scoping Strategies

I just fixed a lurking bug in my code today that was related to ActionScript's scoping rules. The bug wasn't obvious to me when I first wrote it, and took some head-scratching when I fixed it. So I thought I'd post in in case this behavior isn't obvious to anyone else eading this (say, coming from a Java background like I do, where this behavior doesn't exist). I'll boil it down to a simpler 'puzzler' question: What do you think this prints out? var i:int; for (i = 0; i < 2; ++i) { var blah:Object; trace("blah = " + blah); blah = i; } Or how about this? for (i = 0; i < 2; ++i) { var blarg:Object = null; trace("blarg = " + blarg); blarg = i; } (I'll put the answer at the end of this post, so that I don't blow the surprise for anyone wanting to figure it ou...

Video: Easing Does It

Easing Does It , the next episode in the gripping and suspenseful series CodeDependent , is now available from Adobe TV . This show is a continuation of the episode A Moving Comparison , in which we saw how to create simple animations in Flex 3 and Flex 4. This time, we'll see how to add 'easing' behavior to our Flex 3 animation to create non-linear motion. Here's the video: Here is the demo application: And here is the source code . Enjoy.