Código :
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "font"; /* this is the LinkageID not the symbol name. */
my_fmt.size = 8;
this.createTextField("svnews", this.getNextHighestDepth(), 0, 130, 140, 230);
svnews.setNewTextFormat(my_fmt);
svnews.embedFonts = true;
svnews.multiline = true;
svnews.wordWrap = true;
svnews.html = true;
svnews.selectable = false;
svnews._rotation = -1;
svnews._alpha = 75;
// Create a new style sheet and LoadVars object
var myVars:LoadVars = new LoadVars();
var styles = new TextField.StyleSheet();
// Location of CSS and text files to load
var txt_url = "news.htm";
var css_url = "news.css";
// Load text to display and define onLoad handler
myVars.load(txt_url);
myVars.onData = function(content) {
storyText = content;
};
// Load CSS file and define onLoad handler:
styles.load(css_url);
styles.onLoad = function(ok) {
if (ok) {
// If the style sheet loaded without error,
// then assign it to the text object,
// and assign the HTML text to the text field.
svnews.styleSheet = styles;
svnews.text = storyText;
}
}
muchas gracias por adelantado!
saludos!
