Bueno, si el contenido de esa pagina web .html tiene Head, Title, Body etc, no lo reconocera, pero si solo tiene declaraciones como esta:
Código HTML :
<p class='headline'>Flash adds FlashType rendering technology!</p><p><span class='byline'>San Francisco, CA</span>--Macromedia Inc. announced today a new version of Flash that features a brand new font rendering technology called FlashType, most excellent at rendering small text with incredible clarity and consistency across platforms. For more information, visit the <a href='http://www.macromedia.com'>Macromedia Flash web site.</a></p>
osea no tiene esas etiquetas que mencione antes, entonces es posible abrir dicha url en el cuadro de texto, de este modo:
Código ActionScript :
this.createTextField("news_txt", 99, 50, 50, 450, 300);
news_txt.border = true;
news_txt.html = true;
news_txt.multiline = true;
news_txt.wordWrap = true;
// Create a new style sheet and LoadVars object.
var myVars_lv:LoadVars = new LoadVars();
var styles:TextField.StyleSheet = new TextField.StyleSheet();
// Location of CSS and text files to load.
var txt_url:String = "myText.htm";
var css_url:String = "html_styles.css";
// Define onData handler and load text to display.
myVars_lv.onData = function(src:String):Void {
if (src != undefined) {
news_txt.htmlText = src;
} else {
trace("Unable to load HTML file");
}
};
myVars_lv.load(txt_url);
// Define onLoad handler and Load CSS file.
styles.onLoad = function(success:Boolean):Void {
if (success) {
/* Si la hoja de estilos se ha cargado sin errores,
asígnela al objeto de texto,
y asigne el texto HTML al campo de texto. */
news_txt.styleSheet = styles;
news_txt.text = storyText;
} else {
trace("Unable to load CSS file.");
}
};
styles.load(css_url);
Suerte.