Sigo con mi galería en XML pero me ha surgido un problemilla.
Ahora mismo estoy mostrando en pantalla sólo 4 imágenes de las cuales 2 de ellas se repiten y no se por qué...
Les explico el XML:
<galeria nombre="Galería1">
<foto1>foto4.jpg</foto1>
<foto2>foto2.jpg</foto2>
<foto3>foto3.jpg</foto3>
<foto4>foto1.jpg</foto4>
</galeria>
En el flash lo leo asi:
function cargarDatos(_indice:Number){
var nombre:String;
var foto1:String;
var foto2:String;
var foto3:String;
var foto4:String;
nombre = noticias_xml.firstChild.childNodes[_indice].attributes.nombre;
foto1 = noticias_xml.firstChild.childNodes[_indice].firstChild.firstChild.nodeValue;
foto2 = noticias_xml.firstChild.childNodes[_indice].firstChild.nextSibling.firstChild.nodeValue;
foto3 = noticias_xml.firstChild.childNodes[_indice].firstChild.nextSibling.firstChild.nodeValue;
foto4 = noticias_xml.firstChild.childNodes[_indice].lastChild.firstChild.nodeValue;
}
Entonces me muestra la misma imagen en "Foto2" y "Foto3".
¿Que estoy haciendo mal?