Mega Code Archive

 
Categories / Flex / Container
 

Resize TitleWindow with Transition

<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">     <mx:states>         <mx:State name="A">             <mx:SetProperty target="{windowA}" name="width" value="500"/>             <mx:SetProperty target="{windowA}" name="height" value="300"/>             <mx:SetProperty target="{windowC}" name="width" value="150"/>             <mx:SetProperty target="{windowC}" name="height" value="150"/>             <mx:SetProperty target="{windowC}" name="y" value="333"/>             <mx:SetProperty target="{windowD}" name="x" value="373"/>             <mx:SetProperty target="{windowD}" name="width" value="150"/>             <mx:SetProperty target="{windowD}" name="height" value="150"/>             <mx:SetProperty target="{windowD}" name="y" value="333"/>             <mx:SetProperty target="{windowB}" name="x" value="23"/>             <mx:SetProperty target="{windowB}" name="y" value="333"/>             <mx:SetProperty target="{windowB}" name="width" value="150"/>             <mx:SetProperty target="{windowB}" name="height" value="150"/>             <mx:SetProperty target="{windowC}" name="x" value="200"/>         </mx:State>     </mx:states>     <mx:transitions>         <mx:Transition fromState="*" toState="*">             <mx:Parallel targets="{[windowA, windowB, windowC, windowD]}">                 <mx:Move />                 <mx:Resize />             </mx:Parallel>         </mx:Transition>     </mx:transitions>     <mx:TitleWindow x="23" y="19" width="250" height="200" layout="absolute" title="A" id="windowA" click="currentState='A'" />     <mx:TitleWindow x="309" y="19" width="250" height="200" layout="absolute" title="B" id="windowB" click="currentState=''" />     <mx:TitleWindow x="23" y="260" width="250" height="200" layout="absolute" title="C" id="windowC" click="currentState='A'" />     <mx:TitleWindow x="309" y="260" width="250" height="200" layout="absolute" title="D" id="windowD" click="currentState=''" /> </mx:Application>