Mega Code Archive

 
Categories / Flex / Container
 

Control a ViewStack via a LinkBar

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">     <mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="800" height="600">         <mx:LinkBar dataProvider="{viewStack}" direction="horizontal" labelField="name"/>         <mx:ViewStack id="viewStack" y="60">             <mx:Panel width="150" height="150" name="first" label="First Panel" title="First Panel">                 <mx:Label text="First label"/>             </mx:Panel>             <mx:Panel width="150" height="150" name="second" label="Second Panel" title="Second Panel">                 <mx:Label text="Second label"/>             </mx:Panel>             <mx:Panel width="150" height="150" name="third" label="Third Panel" title="Third Panel">                 <mx:Label text="Third label"/>             </mx:Panel>         </mx:ViewStack>     </mx:Canvas> </mx:Application>