Filter.enabled, Filter.hideobject – Adobe Extending Flash Professional CS4 User Manual

Page 233

Advertising
background image

211

EXTENDING FLASH CS4 PROFESSIONAL

Filter object

filter.enabled

Availability
Flash CS3 Professional.

Usage

filter.enabled

Description
Property; a Boolean value that specifies whether the specified filter is enabled (

true

) or disabled (

false

).

Example
The following example disables the 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].enabled = false;

}

}

fl.getDocumentDOM().setFilters(myFilters);

filter.hideObject

Availability
Flash 8.

Usage

filter.hideObject

Description
Property; a Boolean value that specifies whether the source image is hidden (

true

) or displayed (

false

). This property

is defined for Filter objects with a value of

"dropShadowFilter"

for the

filter.name

property.

Example
The following example sets the

hideObject

value to

true

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].hideObject = true;

}

}

fl.getDocumentDOM().setFilters(myFilters);

Advertising