Filter out the effect : Filter Effect « Effects « Flex






Filter out the effect

Filter out the effect
   

<?xml version="1.0" ?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                creationComplete="initFilter(event);" width="700">
    <mx:Script>
    
    import mx.effects.EffectTargetFilter;
    import flash.events.Event;
    public function filterFunc(propChanges:Array,instanceTarget:Object):Boolean {
       return false;
    }
    
    private var myBlurFilter:EffectTargetFilter;
    
    private function initFilter(event:Event):void {
        myBlurFilter = new EffectTargetFilter();
        myBlurFilter.filterFunction=filterFunc;
        myBlur.customFilter=myBlurFilter;
        myUnBlur.customFilter=myBlurFilter;
    }
  
    </mx:Script>
    <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:State>
    </mx:states>
    <mx:transitions>
        <mx:Transition fromState="*" toState="*">
        <mx:Sequence id="t1" targets="{[p1]}">
            <mx:Blur id="myBlur" duration="100" blurXFrom="0.0" blurXTo="10.0" blurYFrom="0.0" blurYTo="10.0"/>
            <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: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:Canvas>
</mx:Application>

   
    
    
  








Related examples in the same category

1.Define a filter of effectDefine a filter of effect
2.Filter EffectFilter Effect