Ver Mensaje Individual
  #1 (permalink)  
Antiguo 23/09/2008, 07:53
banera
 
Fecha de Ingreso: septiembre-2008
Mensajes: 1
Antigüedad: 15 años, 6 meses
Puntos: 0
noticias flash y xml de banditweb

Hola a todos!
estoy aprendiendo flash y xml y sigo el tutorial de bandit
en el codigo flash tengo 3 errores :
me pueden decir que está mal aqui? voy a poner todo el código..no es mucho...

var news:Number=0;
var separacion:Number=10;
var ancho_Escenario:Number=550;
_root.createEmptyMovieClip("foto",10);
foto._x=230;
foto._y=120;
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()+"</b>:Elija las noticias en el menu inferior de la pantalla</p>";
for (var i=0; i=<this.firstChild.childNodes.length;i++){
for (var j=0; j=<this.firstChild.childNodes[i].childNodes.length;j++){
menu.attachMovie("nueva_noticia","boton"+news,news );
menu["boton"+news].numero.text=news+1;
menu["boton"+news]._x=news*(menu["boton"+news]._width+separacion);
menu["boton"+news].id=this.firstChild.childNodes[i].chlidNodes[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].onRelease=function(){
cabecera.htmlText="<p aling=\"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";
}
delete cargador;
};
cargador.load(+this.id+".txt");
};
news++;
}
}
menu._x=(ancho_Escenario/2)-(menu._width/2);
menu._y=340;
menu._visible=true;
}else{
nombre.htmlText="<p aling=\"center\"><b>Error al cargar los datos</b></p>";
}
agenda_noticias.onLoad=parsea;
agenda_noticias.load("datos.xml")
gracias

Última edición por banera; 23/09/2008 a las 09:44