Ver Mensaje Individual
  #6 (permalink)  
Antiguo 18/04/2008, 11:08
Avatar de Arwen215
Arwen215
 
Fecha de Ingreso: enero-2007
Ubicación: Madrid
Mensajes: 57
Antigüedad: 17 años, 2 meses
Puntos: 3
Re: Pausa en Actionscript

En principio tu codigo no hacia nada, lo modifiqué un poco y funciona pero no me hace la parada, se ve directamente la segunda noticia :(

Código:
var id:Number;
var index:Number = 0;
agenda_noticias = new XML();
agenda_noticias.ignoreWhite = 1;

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;
   }
}

agenda_noticias.load("noticias.xml");
agenda_noticias.onLoad = function(exito){
	if (exito){
		
		for(i=0; i<this.firstChild.childNodes.length; i++)
		{
			id = setInterval(muestraNoticia(), 10000);	
				
			}
	}
	else
	{
		trace("Error");
		}
}
Muchas gracias de todos modos, a ver si puedes seguir echandome un cable ;)
Buen fin de semana para ti tmb!!!