Salve dal blog di julius ho preso uno slideshow scorrevole orizzontale,l'ho trasformato in verticale solo che portando il mouse verso l'altro la velocità aumenta,ma portandolo verso il basso essa non diminuisce mai,vi posto il codice magari riuscite a darmi una dritta:
Codice PHP:larghezzamovie = Stage.height; posSin = 1; vel = -3; dimImm = 179; selezione._x = 100; letto = false; leggi = function () { nuovo = new XML(); nuovo.ignoreWhite = true; nuovo.load("file.xml"); nuovo.onLoad = function(success) { if (success) { nfoto = this.childNodes.length; posDes = nfoto; for (i=0; i<nfoto; i++) { _root.attachMovie("mc", "mc"+(i+1), i+1); _root["mc"+(i+1)]._y = dimImm*i; _root["mc"+(i+1)]._x = 0; _root["mc"+(i+1)].big = this.childNodes[i].attributes.photo_big; _root["mc"+(i+1)].a = this.childNodes[i].attributes.photo; _root["mc"+(i+1)].contenitore.loadMovie(this.childNodes[i].attributes.photo); _root["mc"+(i+1)]._alpha = 50; _root["mc"+(i+1)].onRelease = released; } letto = true; } else { _root.didascalia.text = "errore di lettura"; } }; }; leggi(); _root.onMouseMove = function() { x = _root._ymouse; y = _root._ymouse; if (y>20 && y<80 && x>=0 && x<=larghezzamovie) { vel = -(Math.round((y-(larghezzamovie/2))/10)); } }; function released() { _root.box.loadMovie(this.big); _root.selezione._y = (larghezzamovie)/2; _root.didascalia.text = this.etichetta.text; //getURL(percorso,"_blank") } _root.onEnterFrame = function() { if (letto) { for (i=1; i<=nfoto; i++) { _root["mc"+i]._y += vel; } if (vel>0 && _root["mc"+posSin]._y>0) { _root["mc"+posDes]._y = _root["mc"+posSin]._y-dimImm; posSin = posDes; posDes--; if (posDes == 0) { posDes = nfoto; } } if (vel<0 && _root["mc"+posSin]._y<=-dimImm) { _root["mc"+posSin]._y = _root["mc"+posDes]._y+dimImm; posDes = posSin; posSin++; if (posSin>nfoto) { posSin = 1; } } } };

Rispondi quotando
