Stylesheet Constructor; Transform (Stylesheet.transform Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

StyleSheet constructor

public StyleSheet()
Creates a StyleSheet object.
Availability: ActionScript 1.0; Flash Player 7
Example
The following example loads in a style sheet and traces the styles that load into the document.
Add the following ActionScript to your ActionScript or FLA file:
import TextField.StyleSheet;
var my_styleSheet:StyleSheet = new StyleSheet();
my_styleSheet.onLoad = function(success:Boolean) {
if (success) {
trace("Styles loaded:");
var styles_array:Array = my_styleSheet.getStyleNames();
trace(styles_array.join(newline));
} else {
trace("Error loading CSS");
}
};
my_styleSheet.load("styles.css");
The styles.css file contains two styles, called
information is displayed in the Output panel:
Styles loaded:
.heading
.mainBody
The complete code for styles.css is found in the example for
See also
getStyle (StyleSheet.getStyle method)

transform (StyleSheet.transform method)

public transform(style:Object) : TextFormat
Extends the CSS parsing capability. Advanced developers can override this method by
extending the StyleSheet class.
Availability: ActionScript 1.0; Flash Player 7
and
.heading
.mainbody
getStyle()
StyleSheet (TextField.StyleSheet)
, so the following
.
1153

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

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

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF