Use ActionScript to apply DropShadowFilter to Label's filter : DropShadowFilter « Effects « Flex






Use ActionScript to apply DropShadowFilter to Label's filter

Use ActionScript to apply DropShadowFilter to Label's filter
  
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    <mx:Script>
        import flash.filters.*; 
        public function addFilter():void { 
            var f:DropShadowFilter = new DropShadowFilter(5,30,0x00FFFF,.8); 
            var myFilters:Array = new Array(); 
            myFilters.push(f); 
            label1.filters  = myFilters; 
        }
    </mx:Script>
    <mx:Label id="label1" text="ActionScript-applied filter" />
    <mx:Button id="b1" label="Add Filter" click="addFilter()" />
</mx:Application>

   
    
  








Related examples in the same category

1.Apply DropShadowFilter to controlApply DropShadowFilter to control
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