Mega Code Archive

 
Categories / Flex / Effects
 

Change view state

<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="400">   <mx:states>     <mx:State name="One">       <mx:SetProperty target="{p1}" name="x" value="110" />       <mx:SetProperty target="{p1}" name="y" value="0" />       <mx:SetProperty target="{p1}" name="width" value="200" />       <mx:SetProperty target="{p1}" name="height" value="210" />     </mx:State>   </mx:states>   <mx:Canvas id="pm" width="100%" height="100%">     <mx:Panel id="p1" title="One" x="0" y="0" width="100" height="100" click="currentState='One'">       <mx:Label fontSize="24" text="One" />     </mx:Panel>     <mx:Panel id="p3" title="Three" x="110" y="0" width="200" height="210" click="currentState=''">       <mx:Label fontSize="24" text="Three" />     </mx:Panel>   </mx:Canvas> </mx:Application>