MACROMEDIA FLASH 8-COMPONENTS LANGUAGE Reference page 1388

Components language reference
Table of Contents

Advertisement

Parameters
A string indicating the name of the style property. Supported styles vary
propertyName
depending on the component. Each component has a different set of styles that you can set.
For example,
"Customizing the TextArea component" on page 1180
including
fontWeight
parameter.
propertyName
The value of the property. If the value is a string, it must be enclosed in
value
quotation marks.
Returns
Nothing.
Description
Method; sets the style property on the style declaration or object. If the style property is an
inheriting style, the children of the object are notified of the new value.
For a list of the styles that each component supports, see individual component entries. For
example, Button component styles are listed in
on page
94.
To enhance performance, you can change styles before they are loaded, calculated, and applied
to the objects in your SWF file. If you can change styles before the styles are loaded and
calculated, you do not have to call
Macromedia recommends that you set properties on each object because objects are
instantiated to improve performance when you use styles. When you dynamically attach
instances to the Stage, set properties in the
UIObject.createClassObject()
createClassObject(ComponentClass, "myInstance", 0, {styleName:"myStyle",
color:0x99CCFF});
This example uses the myStyle custom style declaration. To change multiple properties,
or change properties for multiple component instances, create a custom style
declaration. Flash renders a component using a custom style declaration faster than it
renders a component using UIObject.setStyle() for multiple properties. For more
information, see "Setting custom styles for groups of components" in Using
Components.
Example
The following code sets the
cb.setStyle("fontWeight", "bold");
1384
UIObject class
. So, for a TextArea component, you can use
setStyle
initObj
, as shown in the following ActionScript:
style property of the
fontWeight
"Using styles with the Button component"
.
parameter for the call that you make to
cb
shows a table of styles,
as the
fontWeight
check box instance to bold:

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents