I’m using a very simple LoadVars to load in an external text file that has been formatted with some basic HTML tags, like <b>, <p>, and <i>. I have a simple style sheet that formats each of these tags, including font-size, font-family, and color.
I’m using the new TextField.StyleSheet() object to apply those styles to the imported text file. The basic formatting appears correctly, such as bold and Italic, but none of the size changes or colors appear in
var format = new TextField.StyleSheet();
var path = “styles.css”;
format.load(path);
format.onLoad = function(loaded) {
if (loaded) {
output.styleSheet = format;
myLoadVar = new LoadVars();
myLoadVar.load(“story1.txt”);
myLoadVar.onLoad = function(success) {
if (success == true) {
output.variable = “story”;
output.htmlText = myLoadVar.story;
}
};
} else {
output.text = “Error loading text”;
}
};
The dynamic text field I’m using has HTML formatting enabled with a Var called story and an instance name of outup.
Has something changed with CSS formatting from MX2004 to 8? What am I missing?