MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference page 1213

Actionscript 2.0 language reference
Table of Contents

Advertisement

css2_btn.onRelease = function() {
var styleObj:TextField.StyleSheet = new TextField.StyleSheet();
styleObj.onLoad = function(success:Boolean) {
if (success) {
news_txt.styleSheet = styleObj;
news_txt.htmlText = newsText;
}
};
styleObj.load("styles2.css");
};
clearCss_btn.onRelease = function() {
news_txt.styleSheet = undefined;
news_txt.htmlText = newsText;
};
The following styles are applied to the text field. Save the following two CSS files in the same
directory as the FLA or AS file you created previously:
// in styles.css
.important {
color: #FF0000;
}
.bold {
font-weight: bold;
}
.headline {
color: #000000;
font-family: Arial,Helvetica,sans-serif;
font-size: 18px;
font-weight: bold;
display: block;
}
// in styles2.css
.important {
color: #FF00FF;
}
.bold {
font-weight: bold;
}
.headline {
color: #00FF00;
font-family: Arial,Helvetica,sans-serif;
font-size: 18px;
font-weight: bold;
display: block;
}
TextField
1213

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Flash 8

Table of Contents