Friday, May 18, 2007

Migrating State Picker drop-down list to AS3

I was hoping to be able to post regularly and at the same time have some meat in the content. An early goal was to narrate my experiences converting my 2 custom drop-down lists to ActionScript 3 (AS3). I knew it would be a challenge. To be perfectly honest, I almost gave up back when I was trying to build them with ActionScript 2 (AS2).

I built a State Picker and a Date Picker control with Flash MX2004 and later updated them with Flash 8. The controls are built from scratch using only TextFields and MovieClips. The State Picker is shown below and the AS2 Rich Internet Application (RIA) demo the controls were written for is linked below also. The Date Picker can be seen from the demo as well (click on “Shipping Info” in the RIA’s menu).

State Picker in RIA Demo in Shipping Info Form

My RIA Demo

I have played around with Flex 2’s MXML but up until a few days ago I really haven’t done anything serious with AS3. The bottom line is that it has taken me longer to figure out how to do this with AS3 and thus a larger gap in my posting than I had hoped. I was hoping to post the source code early in the narrative but I know now that this won’t happen. I do have a rough version running and I will try to post the .swf file shortly.