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