复制代码 代码如下:
<?xml version="1.0"?>
<!-- Simple example to demonstrate the ViewStack layout container. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" height="500" creationComplete="{ myViewStack.selectedIndex = 1 }">
<!-- Define the ViewStack and the three child containers and have it
resize up to the size of the container for the buttons. -->
<mx:ViewStack id="myViewStack" borderStyle="solid" width="100%" height="100%">
<mx:Canvas id="search" backgroundColor="#FFFFCC" label="Search" width="100%" height="100">
<mx:Label text="Search Screen" color="#000000" />
</mx:Canvas>
<mx:Canvas id="custInfo" backgroundColor="#CCFFFF" label="Customer Info" width="100%" height="200">
<mx:Label text="Customer Info" color="#000000" />
</mx:Canvas>
<mx:Canvas id="accountInfo" backgroundColor="#FFCCFF" label="Account Info" width="100%" height="300">
<mx:Label text="Account Info" color="#000000" />
</mx:Canvas>
</mx:ViewStack>
</mx:Application>