화면전환

|
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
 >
<mx:states>
  <mx:State name="w" >
   <mx:SetProperty target="{left}" name="width" value="400"/>
  </mx:State>
 </mx:states>
 
 <mx:transitions>
  <mx:Transition fromState="*" toState="*">
   <mx:Resize duration="100" target="{left}"/>
  </mx:Transition>
 </mx:transitions>
 
 <mx:Canvas width="100%" height="100%"
  backgroundColor="#eeeeee"
 >
  <mx:VBox width="40" height="100%" id="left" backgroundColor="#ffffff">
   
  </mx:VBox>
  <mx:Button x="{left.x+left.width}"
   click="{
    currentState = currentState==null ? 'w' : null;
    trace(currentState);
   }" />
 </mx:Canvas>
</mx:Application>
And