Ciao a tutti,
non riesco a venirne a capo: ho creato una galleria dinamica con XML e Flash, dato che includere 80 foto in un flash non mi sembrava una buona idea. La gallery dovrebbe passare da un'immagine all'altra automaticamente, ma l'utente ha anche la possibilità di scorrere all'interno della gallery con dei pulsanti back, next, stop e play.
Fino ad ora sono riuscita a impostare i pulsanti next e back, con relativo fade-in e fade-out delle immagini (con l'aiuto di qualche esempio trovato in rete), ma non riesco a lasciare scorrere le immagini autonomamente e a capire come faccio poi a fermare (tasto stop) e a far partire di nuovo il filmato (tasto play).
Qualcuno ha qualche idea?
Posto l'AS:
Graziecodice:slides_xml = new XML(); slides_xml.onLoad = startSlideShow; slides_xml.load("slides.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); targetClip._alpha = 0; _root.onEnterFrame = function() { if(targetClip._alpha >= 100){ break; } else { targetClip._alpha += 5; } } } // 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); } };
L.

Rispondi quotando
