« February 2006 | Main | April 2006 »

March 22, 2006

Google Finance launched with Flash charting + AJAX

Didn't I just post about how Flex/Flash AND Ajax should be combined to make a great online experience?? Well, Google is apparently thinking about the possibilites. Check out the freshly launched Google Finance (Beta) which uses Flash for charting and a very cool scrollbar/slider widget. Ajax is used on the right to automatically scroll the news items for the dates corresponding to your date selections from the Flash widget.

March 16, 2006

Binding custom objects to Tilelist with itemRenderer

[The following was created as of Flex 2, Beta 2]

It's not uncommon to want to bind a class to one of the List based components (i.e. List, TileList, DataGrid, etc). But if you're using an itemRenderer you may run into an issue where the itemRenderers do not get unique id's. When this happens, focus and selection cannot function properly. Usually, just one of the items in the list will get highlighted no matter which item your cursor is over.

So the way to get around this, is to simply have your class implement IUID which will automatically assign a unique id to each item renderer.

Here's a sample:

View the source here

Dynamically adding children to a tree

[The following was created as of Flex 2, Beta 2]

In working on my Flickr app, I needed a Tree that had a couple requirements:

1) The data for the tree was not simply storable in one data-provider without a lot of work. Plus, it seemed pointless to load all that data (potentially hundreds of leaf noded under the branch nodes) to start with considering the chances of it all getting looked at were quite slim.

2) So, because of the decision made in #1, I needed to dynamically add children to the Tree as the user started opening up tree branches.

So, here's a simplified version of what I came up with:

View the source here

Flex + AJAX > Flex vs. AJAX

Forget the comparisons between Flex vs. AJAX. It's about Flex AND AJAX. Ely has written a bridge between the Flex Framework and AJAX which allows communication from AJAX to Flex and vice versa. It's as simple as adding one or two lines of code to make allow the communication. This is a huge step for web developers.. and now you can use AJAX when and where it seems more appropriate or Flex when and where it seems more appropriate. All in one page! It's called FABridge, and you can read about it on Elys blog.

AS3 Spec released!

Here it is!

New (and already used) AS3 API Libraries

As you may know, there were a handful of AS3 API libraries put on the Labs site. I've spent the past couple of weeks messing around with the Flickr API's. So far so good. I went ahead and make a couple classes bindable, but that's about all I had to do. I hope to post the app up here once I get to a good stopping point.