Ver Mensaje Individual
  #1 (permalink)  
Antiguo 17/12/2007, 16:15
thephantombrc
 
Fecha de Ingreso: noviembre-2007
Mensajes: 36
Antigüedad: 16 años, 4 meses
Puntos: 0
Agenda XML (bandit ayuda please)

Bandit estube haciendo la agenda en xml a modo de practica, pero me tira errores, copio el codigo que yo lo mire y lo mire y lo mire, y no le encuentro la falla, gracias desde ya

var news:Number = 0;
var separacion:Number = 10;
var ancho_Escenario:Number = 550;
_root.createEmptyMovieClip("foto",10);
foto._x = 226;
foto._y = 114
var agenda_noticias:XML = new XML();
agenda_noticias.ignoreWhite=true;
function parsea(exito:Boolean){
if(exito){
_root.createEmptyMovieClip("menu",11);
menu._visible=false;
nombre.htmlText="<p aling=\"center\"><b>"+this.firstChild.nodeName.toU pperCase()+"</>: Elija las noticias en el menú inferio de la pantalla</p>";
for (var i = 0; izthis.firstChild.childNodes.lenght; i++){
menu.attachMovie("nueva_noticia", "boton"+news, news);
menu["boton"+news].numero.txt = news+1;
menu["boton"+news]._x = news*(meni["boton"+news]._width+separacion);
// menu["boton"+news].id = this.firstChild.childNodes[i].childNodes[j]attributes.id;
menu["boton"+news].cabecera = this.firstChild.childNodes[i].childNodes[j].attributes.cabecera;
menu["boton"+news].url = this.firstChild.childNodes[i].childNodes[j].attributes.url;
menu["boton"+news].fecha = this.firstChild.childNodes[i].attributes.dia;
menu["boton"+news].onReleace = function(){
cabecera.htmlText="<p align=\"left\"><b>"+this.fecha+".-</b>"+this.cabecera+"</p>";
if(this.url !="no"){
foto.loadMovie(this.url);
}else{
foto.loadMovie("no.jpg");
}
var cargador:LoadVars = new LoadVars()
cargador.onLoad = function(exito:Boolean){
if(exito){
cuerpo.text = cargador.texto;
}else{
cuerpo.text = "No se pudo cargar el texto de esta noticia";
}
delete cargador;
};
cargador.load(+this.id+".txt");
};
news++;
}
}
menu._x = (ancho_Escenario/2)-(menu._width/2);
menu._y = 350;
menu._visible = true;
}else{
nombre.htmlText= "<p align=\"center\"><b>Error al cargar los datos</b></p>";
}
}
agenda_noticias.onLoad = parsea;
agenda_noticias.load("datos.xml")