Comunidad de diseño web y desarrollo en internet online

Precarga Fotos mediante XML

Citar            
MensajeEscrito el 06 Ago 2007 08:54 pm
Hola amigos, tengo un pequeño problema y no se como solucionarlo.
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]

Por popeke

10 de clabLevel



 

msie7
Citar            
MensajeEscrito el 06 Ago 2007 09:11 pm
Busca por los tutoriales y foros de esta web sobre MovieClipLoader. Debería solucionar tu problema.

Por Zah

BOFH

4290 de clabLevel

27 tutoriales
5 articulos

  Bastard Operators From Hell Editores

Zaragoza, España

firefox

 

Cristalab BabyBlue v4 + V4 © 2011 Cristalab
Powered by ClabEngines v4, HTML5, love and ponies.