I am new to programming and Flex. I have Panel in my application that I want to populate with controls based on the specific radio button that is clicked. What is a good way to do this based on the code below:
#######Begin code####### <?xml version="1.0" encoding="utf-8"?> <!-- http://blog.flexexamples.com/2008/06/21/detecting-when-a-radiobutton-has-been-clicked-in-a-radiobuttongroup-in-flex/ --> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" backgroundColor="white" viewSourceURL="srcview/index.html"> <mx:Script> <![CDATA[ import mx.events.ItemClickEvent; private function radioGroup_itemClick(evt:ItemClickEvent):void { //Code that will populate panel with specific controls } ]]> </mx:Script> <mx:RadioButtonGroup id="radioGroup" itemClick="radioGroup_itemClick(event);" /> <mx:VBox> <mx:RadioButton id="radioButton1" label="Type1" group="{radioGroup}" /> <mx:RadioButton id="Type2" label="Orange" group="{radioGroup}" /> </mx:VBox> <mx:Panel id= "TypeControls" x="282" y="24" width="504" height="373" layout="absolute" title="Trunk Settings"> </mx:Panel> </mx:Application>

