User Guide
TextField.StyleSheet.getStyleNames() 863
TextField.StyleSheet.getStyleNames()
Availability
Flash Player 7.
Usage
styleSheet.getStyleNames() : Array
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 my_styleSheet:TextField.StyleSheet = new TextField.StyleSheet();
my_styleSheet.setStyle("heading", {fontsize:'24px'});
my_styleSheet.setStyle("bodyText", {fontsize:'12px'});
var names_array:Array = my_styleSheet.getStyleNames();
trace(names_array.join("\n"));
The following is displayed in the Output panel:
bodyText
heading
See also
TextField.StyleSheet.getStyle()