Code:
//this.createTextField("news_txt", 99, 50, 50, 550, 400);
news_txt.border = false;
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 = "emails.htm";
var css_url:String = "html_styles.css";
// Define onLoad handler and Load CSS file.
styles.onLoad = function(success:Boolean):Void {
if (success) {
/* If the style sheet loaded without error,
then assign it to the text object,
and assign the HTML text to the text field. */
news_txt.styleSheet = styles;
} else {
trace("Unable to load CSS file.");
}
};
styles.load(css_url);
// 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);
--------------------------------------------------------------------------------
Quello che è stato fatto è attribuire delle proprietà ad una textBox dinamica dove poi verrà caricata una pagina HTML che assumerà le regole css, ma non funziona come dovrebbe, perchè se imposto colore di sfondo per il body nel css, non si vede poi in flash, per esempio se voglio creare una box attorno a ciò che è racchiuso dai tag <p></p>, non si vede, ma viene solo preso il font del testo ed il colore di esso.
Dove sto sbagliando? Oppure flash non vede tutte le regole css da attribuire?
Grazie per qualsiasi risposta. PS.Gran bel sito, il top...FlepTop

--------------------------------------------------------------------------------
Vi posto il css.
Code:
body {
background-color: #CCCCCC;
font-size:18px;
}
p {
color: #000000;
font-family: Arial,Helvetica,sans-serif;
font-size: 12px;
display: inline;
}
a:link {
color: #FF0000;
font-size: 14px;
}
a:hover{
text-decoration: underline;
}
.headline {
color: #000000;
font-family: Arial,Helvetica,sans-serif;
font-size: 18px;
font-weight: bold;
display: block;
}
.byline {
color: #666600;
font-style: italic;
font-weight: bold;
display: inline;
}