<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:ViewStack x="0" y="0" id="viewstack1" width="619" height="700">
<mx:Canvas id="View1" width="100%" height="100%">
<mx:Button label="View2 " click="viewstack1.selectedChild=View2" x="322" y="322"/>
</mx:Canvas>
<mx:Canvas id="View2" width="100%" height="100%" color="#3FCFE9">
<mx:Label id="greet" text="哈哈" fontSize="16" color="#FF0000" x="308" y="229">
</mx:Label>
</mx:Canvas>
</mx:ViewStack>
</mx:Application>