news=0;
separacion=10;
anchoEscenario=450;
_root.createEmptyMovieClip("foto",10);
foto._x=105;
foto._y=100;
agenda_noticias=new XML();
agenda_noticias.ignoreWhite=1;
parsea=function(exito){
if (exito){
_root.createEmptyMovieClip("menu",11);
menu._visible=0;
nombre.htmlText="<p align=\"center\"><b>"+this.firstChild.nodeName.toUpperCase()+"</b>: Elija las noticias en el menú inferior de la pantalla</p>";
for (i=0;i<this.firstChild.childNodes.length;i++){
for (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].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].onRelease=function(){
cabecera.htmlText="<p align=\"left\"><b>"+this.fecha+".-</b> "+this.cabecera+"</p>";
if (this.url!="no"){
foto.loadMovie(this.url);
} else {
foto.loadMovie("fotografias/no.jpg");
}
cargador=new LoadVars();
cargador.onLoad=function(exito){
if (exito){
cuerpo.text=cargador.texto;
} else {
cuerpo.text="No se pudo cargar el texto de esta noticia";
}
delete cargador;
}
cargador.load("textos/"+this.id+".txt")
}
news++;
}
}
menu._x=(anchoEscenario/2)-(menu._width/2);
menu._y=410;
menu._visible=1;
} else {
nombre.htmlText="<p align=\"center\"><b>Error al cargar los datos</b></p>";
}
}
agenda_noticias.onLoad=parsea;
agenda_noticias.load("evolucion.xml");
con este codigo me genera perfectamnte la galeria tal y como la quiero yo... y si modifico el xml para poner mas imagenes...automaticamente me crea el boton del menu y tal... mi problema es q lo q trato de hacer es q los botones los genero horizontalmente... y me gustaria q cuando llegue al final de la pelicula los botones q se generen nuevos lo hagan debajo de los otros... no se si me explico, espero q si y q me puedan ayudar.
