Estoy haciendo un módulo de noticias, en el cual lee la información de un xml generado por php, pero estoy viendo que tarda un par de segundos en cargar esa información, y mientras tanto, aparece en el campo de texto la palabra 'undefined' y desaparece hasta que el texto ha sido cargado por completo... cómo puedo solucionar eso? no se si haya que poner una precarga, pero por lo menos me gustaría hacer que no apareciera el texto 'undefined' mientras carga la información.
Este es el script que estoy usando para flash 8 (como les comento, funciona perfecto en mx 2004, pero yo necesito usar el archivo en version 8 :
Código :
theNews = new XML(); theNews.ignoreWhite = true; theNews.load('xml.php'+"?cK="+random(9999)+1); System.useCodepage = true; function Article( id, title, date, body){ this.id = id; this.title = title; this.date = date; this.body = body; } Article.prototype.putOut = function(titletxt, datetxt, bodytxt){ _root.clipvacio.contenido.clipnews[titletxt].text = this.title; _root.clipvacio.contenido.clipnews[datetxt].text = this.date; _root.clipvacio.contenido.clipnews[bodytxt].text = this.body; } function articleOut(xml){ _global.numArts = xml.firstChild.childNodes.length-1; info = xml.firstChild.childNodes[at].attributes; body = xml.firstChild.childNodes[at].firstChild.firstChild.nodeValue; currArticle = new Article(info.id, info.title, info.date, body); currArticle.putOut("titletxt","datetxt","bodytxt"); delete currArticle; delete info; } theNews.onLoad = function(){ articleOut(this); at = numArts; articleOut(this); to = Number(items.length-1); } articleOut(theNews);
Agradezco toda la ayuda y asesoría que me pudieran brindar al respecto. Saludos!!