Apply Blur effect : Blur Effect « Effects « Flex






Apply Blur effect

Apply Blur effect
    
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="http://www.adobe.com/2006/mxml"
               width="460" height="428">
<s:Group width="400" height="300">
    <mx:Script>
        
            import flash.filters.*;
            protected const BLUR:Class = flash.filters.BlurFilter;
            
            protected function addFilter(value:Class):void {
                var arr:Array = this.filters.concat();
                var fil:BitmapFilter = new value() as BitmapFilter;
                arr.push(fil);
                filters = arr;
            }
      
    </mx:Script>
    <mx:Button click="addFilter(BLUR)" label="Blur"/>


</s:Group>
</mx:Application>

   
    
    
    
  








Related examples in the same category

1.Graphics BlurFilterGraphics BlurFilter
2.Define a BlurFilter and the animation on that filter.Define a BlurFilter and the animation on that filter.
3.Using a Blur effect on a buttonUsing a Blur effect on a button
4.Three-phase blur effectThree-phase blur effect
5.Blur DemoBlur Demo
6.Blur a controlBlur a control
7.Resize as blurResize as blur