
Filter object
213
Example
The following example sets the contrast value to -15.5 for the Adjust Color filters on the
selected object(s):
var myFilters = fl.getDocumentDOM().getFilters();
for(i=0; i < myFilters.length; i++){
if(myFilters[i].name == 'adjustColorFilter'){
myFilters[i].contrast = -15.5;
}
}
fl.getDocumentDOM().setFilters(myFilters);
filter.distance
Availability
Flash 8.
Usage
filter.distance
Description
Property; a float value that specifies the distance between the filter’s effect and an object, in
pixels. Acceptable values are from -255 to 255. This property is defined for Filter objects with
a value of
"bevelFilter"
,
"dropShadowFilter"
,
"gradientBevelFilter"
, or
"gradientGlowFilter"
for the
filter.name
property.
Example
The following example sets the distance to 10 pixels for the Drop Shadow filters on the
selected object(s):
var myFilters = fl.getDocumentDOM().getFilters();
for(i=0; i < myFilters.length; i++){
if(myFilters[i].name == 'dropShadowFilter'){
myFilters[i].distance = 10;
}
}
fl.getDocumentDOM().setFilters(myFilters);
See also
document.setFilterProperty()
Содержание FLASH 8-EXTENDING FLASH
Страница 1: ...Extending Flash...
Страница 38: ...38 Top Level Functions and Methods...
Страница 532: ...532 Objects...
Страница 554: ...554 C Level Extensibility...