Mega Code Archive

 
Categories / Flex / Effects
 

Define a filter of effect

<?xml version="1.0" ?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="700">   <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="500" />       <mx:SetProperty target="{p1}" name="height" value="210" />       <mx:SetProperty target="{p2}" name="x" value="0" />       <mx:SetProperty target="{p2}" name="y" value="0" />       <mx:SetProperty target="{p2}" name="width" value="100" />       <mx:SetProperty target="{p2}" name="height" value="100" />     </mx:State>   </mx:states>   <mx:transitions>     <mx:Transition fromState="*" toState="*">       <mx:Sequence id="t1" targets="{[p1,p2]}">         <mx:Blur id="myBlur" duration="100" blurXFrom="0.0" blurXTo="10.0" blurYFrom="0.0" blurYTo="10.0">         </mx:Blur>         <mx:Parallel>           <mx:Move duration="400" />           <mx:Resize duration="400" />         </mx:Parallel>         <mx:Blur id="myUnBlur" duration="100" blurXFrom="10.0" blurXTo="0.0" blurYFrom="10.0" blurYTo="0.0">           <mx:customFilter>             <mx:EffectTargetFilter filterProperties="['width','x']" />           </mx:customFilter>         </mx:Blur>       </mx:Sequence>     </mx:Transition>   </mx:transitions>   <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="p2" title="Two" x="0" y="110" width="100" height="100" click="currentState='Two'">       <mx:Label fontSize="24" text="Two"/>     </mx:Panel>   </mx:Canvas> </mx:Application>