Apply DropShadowFilter to control : DropShadowFilter « Effects « Flex






Apply DropShadowFilter to control

Apply DropShadowFilter to control
  

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    creationComplete="createFilters()">
    <mx:Script>
        import flash.filters.*;
        private var myBlurFilter:BlurFilter;
        private var myGlowFilter:GlowFilter;
        private var myBevelFilter:BevelFilter;
        private var myDropShadowFilter:DropShadowFilter;
        private var color:Number = 0xFF33FF;

        public function createFilters():void {
            myDropShadowFilter = new DropShadowFilter(15, 45,color, 0.8, 8, 8, 0.65, 1, false, false);

            hs1.filters = [myDropShadowFilter];
        }
        public function changeFilters():void {
            color = 0x336633;
            createFilters();
        }
      </mx:Script>
    <mx:HSlider id="hs1" />
</mx:Application>

   
    
  








Related examples in the same category

1.Use ActionScript to apply DropShadowFilter to Label's filterUse ActionScript to apply DropShadowFilter to Label's filter
2.Apply a white shadow to the Label controlApply a white shadow to the Label control
3.DropShadowFilter for filtersDropShadowFilter for filters
4.Graphics DropShadowFilter
5.Apply Filter with ActionScriptApply Filter with ActionScript