I’m using flash 8 and I’ve a code that kinda work but I’ve an issue with it. I created a textArea box that loads an external txt file. I want to modify the style of the box but it doesn’t really work. It works only for the backgroundColor and backgroundSteyle. The fontSize, fontFamily and Color does not work. Anyone has any idea?
//init TextArea component
myText.html = true;
myText.wordWrap = true;
myText.multiline = true;
myText.label.condenseWhite=true;
myText.setStyle(“backgroundColor”, “0x585858”);
myText.setStyle(“borderStyle”, “none”);
myText.setStyle(“fontSize”, “16”);
myText.setStyle(“fontFamily”, “arial”);
loadVarsText = new LoadVars();
loadVarsText.load(“test.txt”);
//assign a function which fires when the data is loaded:
loadVarsText.onLoad = function(success) {
if (success) {
trace(“done loading”);
//Now that we know the data is loaded,
//set the text content of the Text Field
//with the instance name “scroller” equal to the
//contents of the variable
myText.text = this.var1;
} else {
trace(“not loaded”);
}
};