Creating a style sheet object

CSS style sheets are represented in ActionScript by the TextField.StyleSheet class. This class is only available for SWF files that target Flash Player 7 or later. To create a style sheet object, call the TextField.StyleSheet class's constructor function.

var newStyle = new TextField.StyleSheet();

To add styles to a style sheet object, you can either load an external CSS file into the object, or define the styles in ActionScript. See Loading external CSS files and Creating new styles with ActionScript.