TextField
1213
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;
}
Summary of Contents for FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Page 1: ...ActionScript 2 0 Language Reference ...
Page 1352: ...1352 ActionScript classes ...