Flash CS3 Documentation |
|||
| ActionScript 2.0 Components Language Reference > UIObject class > UIObject.getStyle() | |||
Flash Player 6 (6.0.79.0).
Flash MX 2004.
componentInstance.getStyle(propertyName)
propertyName A string indicating the name of the style property (for example, "fontWeight", "borderStyle", and so on).
The value of the style property. The value can be of any data type.
Method; gets the style property from the style declaration or object. If the style property is an inheriting style, the ancestors of the object may be the source of the style value.
For a list of the styles supported by each component, see the individual component entries. See also Using global, custom, and class styles in the same document in Using ActionScript 2.0 Components.
The following code sets the ib instance's fontWeight style property to bold if the cb instance's fontWeight style property is bold:
if (cb.getStyle("fontWeight") == "bold") {
ib.setStyle("fontWeight", "bold");
};
Flash CS3