Tengo un archivo flash que carga imagenes mediante un XML y un par de botones , uno para pasar a la siguiente y el otro para volver a la anterior.
El tema es que no tiene precarga y no consigo terminar de meterla puesto que nunca lo hice con botones, el tema es que cuando le de al boton para pasar a la siguiente foto me muestre una pregarga del estilo al que tienen en esta pagina http://www.zara.com/v07/index.html
cuando se le da a la foto siguiente mantiene la actual y muestra precarga y cuando termina la precarga muestra la foto. Espero haberme expresado bien y os agradeceria vuestra ayuda.
El codigo que yo tengo es el siguiente:
Código :
slides_xml = new XML();
slides_xml.onLoad = startSlideShow;
slides_xml.load("coleccion.xml");
slides_xml.ignoreWhite = true;
//
// Show the first slide and intialize variables
function startSlideShow(success) {
if (success == true) {
rootNode = slides_xml.firstChild;
totalSlides = rootNode.childNodes.length;
firstSlideNode = rootNode.firstChild;
currentSlideNode = firstSlideNode;
currentIndex = 1;
updateSlide(firstSlideNode);
}
}
//
// Updates the current slide with new image and text
function updateSlide(newSlideNode) {
imagePath = newSlideNode.attributes.jpegURL;
slideText = newSlideNode.firstChild.nodeValue;
loadMovie(imagePath, targetClip);
}
//
// Event handler for 'Next slide' button
next_btn.onRelease = function() {
nextSlideNode = currentSlideNode.nextSibling;
if (nextSlideNode == null) {
break;
} else {
currentIndex++;
updateSlide(nextSlideNode);
currentSlideNode = nextSlideNode;
}
};
//
// Event handler for 'Previous slide' button
back_btn.onRelease = function() {
previousSlideNode = currentSlideNode.previousSibling;
if (previousSlideNode == null) {
break;
} else {
currentIndex--;
currentSlideNode = previousSlideNode;
updateSlide(previousSlideNode);
}
};
stop();[Zah]Usa las etiquetas code[/Zah]
