Some of the new components in Macromedia Flex 2

Flex 2 public-alpha release is an alpha quality release. Which means there could be many issues in different areas, however, I would love to hear from you for your suggestions, queries and bug-reports on following components. I have been involved more on these components:

  • ApplicationControlBar
  • ButtonBar
  • ToggleButtonBar
  • VideoDisplay

You can contact me directly on
If you have suggestions, queries and bug reports for any other area of this public-alpha, please feel free to contact me or post message in Flexcoders list.
BTW! Give a try to RichTextEditor, it is complete text editor. I know, many of you have been requesting for it for sometime.

<mx:RichTextEditor />

Yes, that’s what you need to do to have complete text-editor in your application.

  • Bryan Ledford

    Hi Abdul,
    I’m having difficulty determining which button was clicked when using the ButtonBar. I think I should be able to get the index of the clicked button using the selectedIndex property, as in the ToggleButtonBar even though it isn’t really selected. The selectedIndex property, however is always -1. Is there another property I should be looking at?

  • Hi Bryan,
    ButtonBar doesn’t contain toggle-buttons. So none of the buttons in ButtonBar gets selected after being clicked. That’s why selectedIndex is always -1.
    But ButtonBar has a ‘click’ event. Event-object contains the ‘index’ property, which holds the index of clicked button.
    Following code demonstrates the usage:
    <mx:Application xmlns:mx=””>
    import mx.controls.Alert;
    function handleButtonBarEvent(event)
    var index = ItemClickEvent(event).index;‘Index of Button clicked: ‘ + index);
    <mx:ButtonBar click=”handleButtonBarEvent(event);”>
    <mx:String>Button 1</mx:String>
    <mx:String>Button 2</mx:String>
    <mx:String>Button 3</mx:String>
    Hope it helps…

  • Bryan Ledford

    Thanks Abdul,
    It could also be done like this, correct?
    import mx.controls.Alert;
    function handleButtonBarEvent(event:ItemClickEvent)
    var index = event.index;‘Index of Button clicked: ‘ + index);