Flex: mxml vs ActionScript

This might look rather silly, but still had to give in to temptation :). Since I had worked on Swings as well, had to see if I could code a create a popup window with ActionScript. Well, of course you can, but I am rather new to Flex and most of the tutorial, for some unknown reason, choose not to mention this topic. So I decided to give it a shot.

Below is a popup window coded in mxml. Its called ItemSelectDialog.mxml.

This is how you invoke it from another mxml:

And this is how its ActionScript counterpart looks like. Its called ItemSelectionDialog.as.

You can use it just like its mxml counterpart, just make sure that you import the class.

This is how it looks like:
popup-actionscript

Leave a Reply

Your email address will not be published. Required fields are marked *