bueno, tengo este codigo... y me gustaria personaizaro mas porke muestra un mensaje solo si falla a carga del .css... y el .htm? como puedo hacerlo?
y seria mejor si aguien sabe como hacer un link en el mensaje de carga fallida, para ke vuelva a cargar estos archivos o actualice la pagina...
// 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;
} else {
svnews.htmlText = "<br><br><br><br><br><br><br><br><p align='center'><font color='#FF0000'>¡ERROR!<BR>CARGA DE DATOS FALLIDA</font></p>";
}
}
espero ke puedan ayudarme, no parece dificil...
y... otra cosa... hay algun cdigo para hacer ke un mc este arriba de todos los demas? porke cargo un swf dentro de otro, y kiero ke un mc dentro de archivo caragado, este arriba de todos los demas elementos de swf principal...
gracias por adelantado...
saludos!
