TextField.StyleSheet.getStyleNames()

Availability

Flash Player 7.

Usage

styleSheet.getStyleNames()

Parameters

None.

Returns

An array.

Description

Method; returns an array that contains the names (as strings) of all of the styles registered in this style sheet.

Example

This example creates a style sheet object named styleSheet that contains two styles, heading and bodyText. It then invokes the style sheet object's getStyleNames() method, assigns the results to the array names_array, and displays the contents of the array in the Output panel.

var styleSheet= new TextField.StyleSheet();
styleSheet.setStyle("heading", {
  fontsize: '24px'
});
styleSheet.setStyle("bodyText", {
  fontsize: '12px'
});
var names_array = styleSheet.getStyleNames();
trace(names.join("\n"));

The following is displayed in the Output panel:

bodyText
heading

See also

TextField.StyleSheet.getStyle()