beautypg.com

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

Page 232

background image

210

EXTENDING FLASH PROFESSIONAL

Filter object

Last updated 5/2/2011

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);

This manual is related to the following products: