반응형
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Panel width="250" height="320" layout="absolute" horizontalCenter="-150" verticalCenter="0" title="Accordion">
<mx:Accordion width="200" height="250" id="accordion" horizontalCenter="0" verticalCenter="0">
<mx:Canvas label="first" width="100%" height="100%" backgroundColor="#FF5B82">
<mx:Button label="go second" horizontalCenter="0" verticalCenter="0" click="accordion.selectedIndex=1;"/>
</mx:Canvas>
<mx:Canvas width="100%" height="100%" label="second" backgroundColor="#FFFE88">
<mx:Button label="go third" horizontalCenter="0" verticalCenter="0" click="accordion.selectedIndex=2;"/>
</mx:Canvas>
<mx:Canvas label="third" width="100%" height="100%" backgroundColor="#99EDFF">
<mx:Button label="go first" horizontalCenter="0" verticalCenter="0" click="accordion.selectedIndex=0;"/>
</mx:Canvas>
</mx:Accordion>
</mx:Panel>
<mx:Panel width="250" height="320" layout="absolute" verticalCenter="0" horizontalCenter="150" title="ViewStack, ButtonBar, LinkBar">
<mx:ViewStack x="15" y="10" id="viewstack1" width="200" height="200">
<mx:Canvas label="first" width="100%" height="100%" themeColor="#009DFF" backgroundColor="#FF5B82">
<mx:Button label="go second" horizontalCenter="50" verticalCenter="80" click="viewstack1.selectedIndex=1;"/>
<mx:Label text="First View" horizontalCenter="0" verticalCenter="0" fontWeight="bold" fontSize="24"/>
</mx:Canvas>
<mx:Canvas label="second" width="100%" height="100%" backgroundColor="#FFFE88">
<mx:Button label="go third" horizontalCenter="50" verticalCenter="80" click="viewstack1.selectedIndex=2;"/>
<mx:Label text="Second View" horizontalCenter="0" verticalCenter="0" fontWeight="bold" fontSize="24"/>
</mx:Canvas>
<mx:Canvas label="third" width="100%" height="100%" backgroundColor="#99EDFF">
<mx:Button label="go first" verticalCenter="80" horizontalCenter="50" click="viewstack1.selectedIndex=0;"/>
<mx:Label text="Third View" fontWeight="bold" fontSize="24" horizontalCenter="0" verticalCenter="0"/>
</mx:Canvas>
</mx:ViewStack>
<mx:ButtonBar dataProvider="viewstack1" horizontalCenter="0" verticalCenter="120">
</mx:ButtonBar>
<mx:LinkBar dataProvider="viewstack1" horizontalCenter="0" verticalCenter="90">
</mx:LinkBar>
</mx:Panel>
</mx:Application>
반응형