AS3 data binding and component states

If you ever developed a complex data-driven application, you probably stumbled upon the data binding nightmare. Altough a great feature in Flex (a central one in my opinion), it lacks a bit of control. I needed a form with multiple states depending on the flavor of the edited object. This way, I could have common…

Read More

AIR Prerelease Tour

I attended a presentation on Flex and AIR yesterday. Mike Potter was unable to come and was replaced by LordAlex Leon. The presentation began with a long description of Adobe applications and their integration, but an hour later finally reached AIR. The part about AIR was quite short and did not teach me anything new…

Read More

FlexNativeMenu Tutorial & Issues

So you want to have cool menus when you right-click an object in your flex app. First, create the FlexNativeMenu: The popupMenuDataProvider refers to an Arraycollection:

The menu will be displayed within a listener such as rightClick on a component of your choice:

Now we need to handle the click in the menu:…

Read More

AS3 and Runtime Sharing

Runtime Sharing has been quite a puzzle for me for some time now. Here are a few problems that I solved: Exporting an imported asset When in AS3 you want to import an asset from a swf, you get it by its linkage name. What if this asset needs to be imported from another swf?…

Read More

Working with types in AS3

ActionScript 3 is strong-typed, which is great to detect possible errors at compile-time. Here are a few tips for working with types. Type wildcard

This is not recommended (can cause runtime errors) but is possible. I suggest using a common parent (DisplayObject, for example) whenever possible. Type checking

This is most useful. Example:…

Read More