ciao,
ho fatto vari test del preload che mi hai fornito, in tutti gli esperimenti sono riuscito ad adattare lo script
rimane però una cosa che non mi riesce, ed è questa:
mentre sul MC vuoto con n-istanza "targetClip"codice:function preload() { car = targetClip.getBytesLoaded(); tot = targetClip.getBytesTotal(); perc = Math.round((car / tot) * 100); imagestat.text = "Loading... " + perc + "%"; if (car == tot && targetClip._url != _root.url) { targetClip._width = 80; targetClip._height = 60; clearInterval(a); imagestat.text = ""; targetClip._alpha=100; } } targetClip._alpha =0 targetClip.loadMovie("images/image1.jpg"); a = setInterval(preload, 200);
La domanda:codice:images_xml = new XML(); images_xml.onLoad = startImageViewer; images_xml.load("xml/images.xml"); images_xml.ignoreWhite = true; function startImageViewer(success) { if (success == true) { rootNode = images_xml.firstChild; totalImages = rootNode.childNodes.length; firstImageNode = rootNode.firstChild; currentImageNode = firstImageNode; currentIndex = 1; updateImage(firstImageNode); } } function updateImage(newImageNode) { imagePath = newImageNode.attributes.imgURL; targetClip.loadMovie(imagePath); imageCount = "image " + currentIndex + " of " + totalImages; } next_btn.onRelease = function() { nextImageNode = currentImageNode.nextSibling; if (nextImageNode == null) { break; } else { currentIndex++; updateImage(nextImageNode); currentImageNode = nextImageNode; } }; back_btn.onRelease = function() { previousImageNode = currentImageNode.previousSibling; if (previousImageNode == null) { break; } else { currentIndex--; currentImageNode = previousImageNode; updateImage(previousImageNode); } };
tramite i due pulsanti passo le varie immagini, la prima appare perfettamente e passa nel "preloader"
mentre invece le altre due no!
vorrei che anche le altre due alla pressione del pulsante"back_btn" passassero nel "preloader"
grazie :quipy:

Rispondi quotando