Tree Component - Applying Shadow Filter
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;
}
Nonetheless, it's still not working. I'm basing my usage of the tree component on http://www.sephiroth.it/tutorials/flashPHP/custom_tree/index.php
So it may have something to do with the external extends of the mx.controls.treeclasses.TreeRow
I don't really know. I just can't seem to tweak it in the right place. I guess I'm not understanding how the script is setup.
import flash.filters.DropShadowFilter;
this.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, 0, .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;
}
#If you have any other info about this subject , Please add it free.# |

