Sample code for OOP + Timeline InsideRIA Article

english mobile

Several people asked me for code samples for my Combining the Timeline with OOP As3 in Flash that appeared on InsideRIA on April 7. So I've put together two examples, which produce a file that looks like this:



The example files do the same thing, just through different methods. One listens for the added event on the root document to start tweening the smiley faces as they are added, 10 frames apart. The other overrides the setter of the smiley face instance variables to start the tweening.


Download the source code here.

Debugging Responder Result Functions

english mobile

Lots of times when we use AsyncTokens with Responders, something will go wrong between when the call is made and when it returns. Usually if there is a problem, the fault handler will fire. Because of this, it's fairly straightforward to get information on what has happened in the fault responder function by looking at the FaultEvent's properties, such as the fault property.
But what about when there's an error and the Result handler is the one that fires? This does happen. For example, the infamous Access "Operation must use updateable query" error message in access triggers the result handler.

One of the first things I try to do when there is an error with a database call is to reconstruct the exact call that was made, so I can make the same call directly from a browser. It's not exactly intuitive where to find this information in the ResultEvent that is the parameter in the result handler, but, with a little digging, I found it.

It turns out that AsyncToken has a property called "Message," which is actually a HTTPRequestMessage. HTTPRequestMessage has a "body" property that is described this way: The body of a message contains the specific data that needs to be delivered to the remote destination. This, apparently, is a circuitous way of saying that this is the actual request object that was sent in the HTTPRequest.send() method that returned this token.

Hope this helps someone!

RIAdventure Inspiration

english mobile

So we're just back from the RIAdventure cruise/conference, and I have to say it was just what the doctor ordered for me. The speakers and attendees were all top notch, and I felt like a little sponge, soaking up ideas from them.



One set of ideas I'd just started reading about before going to the conference was blitting. In my roles as eLearning or Application developer, this wasn't something that I'd been exposed to much. And it seemed like a lot to get my head around until I saw Sam Rivello's Las Viditas presentation. He made this stuff look so easy, I thought maybe it wasn't so hard after all.



Couple that with the fact that I was inspired by Greg Burch's presentation to try an iPhone teaching app for children that needs to have performant animation (when the iPhone api is available), and suddenly this looked like something I needed to learn.



But since the main animation I was concerned with was rotating an object about a central point, the whole idea of repeatedly copying the pixels from different parts of an image seemed to be silly to me. So I came up with the idea of using a Flash Display object and rotating it once, programmatically, taking a snapshot at each rotation increment. Then each snapshot could be used in sequence.



Here's my first prototype of that concept:





Download the source code.

I'll probably write in detail about this code on InsideRIA in the near future, but the code is commented pretty thoroughly.

Flex Template Component

english mobile

This week on InsideRIA, I blogged about Flex Template components. My mandate for that blog is to talk more about ideas than showing code, but I had a feeling that someone would ask to see code on this one, so I put together an example of code that is similar to the component I show a screen shot of in that post for the curious.

The example linked to below has View Source enabled:



RIA Adventure Conference/cruise

english mobile

I'm really excited to be signed up for the RIAAdventure Cruise. Not only do I get to meet or renew acquaintance with such familiar names as Doug McCune, Ted Patrick, or Ryan Steward, but I get to do it on a cruise ship making its way from port to port in Mexico!

This is going to be so much fun!

Where I've Been

english mobile

You've probably noticed that I haven't posted much lately. This is because in January, I was hired to do contract work in ASP Classic and SQL Server for a company called voip.com. While working for them, I've done a couple of Flash projects, but no Flex so far. They also keep me hopping pretty well, so I haven't had as much time for blogging as I'd like.

I also recently signed up to do a weekly blog for InsideRIA, which isn't so specifically focused on Flex as this blog is, so it will allow me to talk about the work that I am doing. Check out my first post, Demystifying Web Services.

New Adobe User Group

english mobile

A little known fact is that I met my husband, Steve Howard on the old macromedia user forums. At one point, he and I were both members of Team Macromedia, then we made the transition together to being Adobe Community Experts. Adobe and I had some "differences of opinion," so I am no longer a Community Expert. However, we both still have a close and friendly relationship with Adobe.

He applied late last year for a Gulf Coast Adobe User Group, and this was approved. The user group site is now up and running. So, if you're using Adobe products on the central Gulf Coast, please join the group. We already have a full boxed copy of Flex for a giveaway at the first meeting, and we may collect even more swag in the meantime. So, y'all come by. We'd love to see