Symbolinstance.description, Symbolinstance.filters – Adobe Extending Flash Professional CS4 User Manual
Page 447
425
EXTENDING FLASH CS4 PROFESSIONAL
SymbolInstance object
fl.getDocumentDOM().selection[0].colorRedPercent = 10;
symbolInstance.description
Availability
Flash MX 2004.
Usage
symbolInstance.description
Description
Property; a string that is equivalent to the Description field in the Accessibility panel. The description is read by the
screen reader. This property is not available for graphic symbols.
Example
The following example stores the value for the Accessibility panel description of the object in the
theDescription
variable:
var theDescription = fl.getDocumentDOM().selection[0].description;
The following example sets the value for the Accessibility panel description to
Click the home button to go to home
:
fl.getDocumentDOM().selection[0].description= "Click the home button to go to home";
symbolInstance.filters
Availability
Flash 8.
Usage
symbolInstance.filters
Description
Property; an array of Filter objects (see
). To modify filter properties, you don’t write to this array directly.
Instead, retrieve the array, set the individual properties, and then set the array to reflect the new properties.
Example
The following example traces the name of the filter at index 0. If it is a Glow filter, its
blurX
property is set to 100 and
the new value is written to the filters array.
var filterName =
fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0].filters[0].name;
fl.trace(filterName);
var filterArray = fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0].filters;
if (filterName == 'glowFilter'){
filterArray[0].blurX = 100;
}
fl.getDocumentDOM().getTimeline().layers[0].frames[0].elements[0].filters = filterArray;