Ver Mensaje Individual
  #7 (permalink)  
Antiguo 19/04/2008, 02:02
Avatar de Mahalo
Mahalo
 
Fecha de Ingreso: julio-2004
Ubicación: Mallorca (Illes Balears)
Mensajes: 1.121
Antigüedad: 19 años, 9 meses
Puntos: 12
Re: Pausa en Actionscript

Jo, había cometido otro fallo. Lamento haberte hecho perder tiempo; mi idea era suprimir el bucle y no lo hice...
Código:
var id:Number;
var index:Number = 0;
var agenda_noticias:XML = new XML();
agenda_noticias.ignoreWhite = 1;
_root.createEmptyMovieClip("foto",10);
foto._x = 5;
foto._y = 45;
foto.loadMovie("foto.jpg");

function muestraNoticia() {
   titular_txt.text=agenda_noticias.firstChild.childNodes[index].childNodes[0].attributes.titular;
   cuerpo_txt.text=agenda_noticias.firstChild.childNodes[index].childNodes[0].attributes.cuerpo;
   index++;
   if (index>=agenda_noticias.firstChild.childNodes.length) {
      index = 0;
   }
}

parsea=function(exito){
	if (exito){
		id = setInterval(this, "muestraNoticia", 10000);	
	} else {
		trace("Error");
	}
}
agenda_noticias.load("noticias.xml");
agenda_noticias.onLoad = parsea;
Prueba este código y cuéntame...
__________________
Los ignorantes se empeñan en enseñar. Los sabios en aprender.
SourceForge