Does anyone know how to apply the shadow filter to the tree component?
I tried (with tree the instance name of the component):
import flash.filters.DropShadowFilter;
this.tree.setFilters(3);
var isDropShadow:Boolean = true;
function setFilters(dis):Void {
// Define a new array for the filters.
var filtersArr:Array = new Array();
// If isDropShadow is true, make a new
// DropShadowFilter object, and add it to the array.
if(isDropShadow) {
//(distance:Number, angle:Number, color:Number, alpha:Number, blurX:Number, blurY:Number, strength:Number, quality:Number, inner:Boolean, knockout:Boolean, hideObject:Boolean)
var dropShadow:DropShadowFilter = new DropShadowFilter(dis, 81, 0x000000, .3, 5, 5, 4, 15, false, false, false);
filtersArr.push(dropShadow);
}
// Assign the filters array to the filters property
// of imageClip in order that the filters will
// get applied.
tree.filters = filtersArr;
}