

css or cascading style sheets are essential to create flexible and consistent text layouts, you can easily change color, size of weight from classes and the changes affect your whole site. CSS is well integrated for year in HTML now, in flash this feature is really new. Flash mx 2004 introduces cascading style sheets. This short aticle show you the code to assign a style sheet to text in flash. You just create your .css file like you do for an html site and use following code to attach the css to your textfield in flash.
//Create a new style sheet object
var myCSS = new TextField.StyleSheet();
//location of the CSS file.
var cssURL = "stylesheet.css";
//Load CSS file
myCSS.load(cssURL);
//define onLoad handler
myCSS.onLoad = function(success) {
if (success) {
// attach style to textfield
myText.styleSheet = myCSS;
myText.text = "MyText…”;
}
};
This is all you need to use CSS in flash. 
CSS property ActionScript property Usage and supported values text-align textAlign Recognized values are left, center, right, and justify. font-size fontSize Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. text-decoration textDecoration Recognized values are none and underline. margin-left marginLeft Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. margin-right marginRight Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. font-weight fontWeight Recognized values are normal and bold. kerning kerning Recognized values are true and false. font-style fontStyle Recognized values are normal and italic. letter-spacing letterSpacing Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. text-indent textIndent Only the numeric part of the value is used. Units (px, pt) are not parsed; pixels and points are equivalent. font-family fontFamily A comma-separated list of fonts to use, in descending order of desirability. Any font family name can be used. If you specify a generic font name, it is converted to an appropriate device font. The following font conversions are available: mono is converted to _typewriter, sans-serif is converted to _sans, and serif is converted to _serif. color color Only hexadecimal color values are supported. Named colors (such as blue) are not supported. Colors are written in the following format: #FF0000. display display Supported values are inline, block, and none.
