getStyleNames (StyleSheet.getStyleNames method)
public getStyleNames() : Array
Returns an array that contains the names (as strings) of all of the styles registered in this style
sheet.
Availability: ActionScript 1.0; Flash Player 7
Returns
- An array of style names (as strings).
Array
Example
This example creates a StyleSheet object named
and
heading
bodyText
assigns the results to the array
Output panel.
import TextField.StyleSheet;
var my_styleSheet:StyleSheet = new 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 information appears in the Output panel:
bodyText
heading
See also
getStyle (StyleSheet.getStyle method)
load (StyleSheet.load method)
public load(url:String) : Boolean
Starts loading the CSS file into the StyleSheet. The load operation is asynchronous; use the
callback handler to determine when the file has finished loading. The CSS file must
onLoad()
reside in the same domain as the SWF file that is loading it.
Availability: ActionScript 1.0; Flash Player 7
Parameters
- The URL of a CSS file to load. The URL must be in the same domain as the
url:String
URL where the SWF file currently resides.
1148
ActionScript classes
. It then invokes the StyleSheet object's
, and displays the contents of the array in the
names_array
that contains two styles,
styleSheet
getStyleNames()
method,
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?