Hi guys, I've just recently started out using Flash Builder and have a question surrounding states. In fact I'm not entirely sure it is related to states but read on and I hope it will become clearer. I currently have a custom component that contains 3 comboboxes. This resides in a TabNavigator component. The TabNavigator consits of 5 pages (Tabs). The custom container holding the comboboxes should display the same selected data across all Tabs. ie. If I am in Tab1 and select an item from one of the comboboxes then click on Tab2 I need to mirror the combobox's selection in Tab2. Can anyone offer me suggestions on how to best tackle this? Di I need to set a global variable?
A:
Rather than using a TabNavigator and duplicates of your custom control, you should break the TabNavigator into a TabBar and a ViewStack and use a single instance of the custom control.
Something like this should do it:
<mx:TabBar dataProvider="{myViewStack}" />
<mx:VBox>
<local:MyComponent />
<mx:ViewStack id="myViewStack">
<mx:VBox label="Tab 1" />
<mx:VBox label="Tab 2" />
</mx:ViewStack>
</mx:VBox>
Dan Monego
2010-03-30 17:43:45
Thanks for the reply, I have a habit of over complicating matters :)
cammy
2010-03-31 14:23:12