Quote:
Originally Posted by tem
Ciao!
lo scroller di Flep si basa sulle proporzioni tra la posizione del mouse nel filmato e la dimensione del clip che contiene le thumbs..
la velocità dello scroll è dato da questa proporzione..
per avere uno scroll come descrivete dovreste usare uno script tipo questo:
Classe Scroll Clip in base al valore mouseX
spero possa aiutare..
|
Felice di sentirti
tem.
Si, la Tua classe va benissimo da dx a sx, ma io intendevo qualcosa come questa che t'allego, anche se scritta in as2 sulla timeline:
Quote:
larghezzamovie = Stage.width;
posSin = 1;
vel = -1;
dimImm = 140;
selezione._y = 105;
letto = false;
leggi = function () {
nuovo = new XML();
nuovo.ignoreWhite = true;
nuovo.load("images.xml");
nuovo.onLoad = function(success) {
if (success) {
nfoto = this.childNodes.length;
posDes = nfoto;
for (i=0; i _root.attachMovie("mc","mc"+(i+1),i+1);
_root["mc"+(i+1)]._x = dimImm*i;
_root["mc"+(i+1)]._y = 0;
_root["mc"+(i+1)].percorso = this.childNodes[i].attributes.percorso;
_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._xmouse;
y = _root._ymouse;
if (y>20 && y<120 && x>=0 && x<=larghezzamovie) {
vel = -(Math.round((x-(larghezzamovie/2))/80));
}
};
function released() {
getURL(this.percorso, "_self");
}
_root.onEnterFrame = function() {
if (letto) {
for (i=1; i<=nfoto; i++) {
_root["mc"+i]._x += vel;
}
if (vel>0 && _root["mc"+posSin]._x>0) {
_root["mc"+posDes]._x = _root["mc"+posSin]._x-dimImm;
posSin = posDes;
posDes--;
if (posDes == 0) {
posDes = nfoto;
}
}
if (vel<0 && _root["mc"+posSin]._x<=-dimImm) {
_root["mc"+posSin]._x = _root["mc"+posDes]._x+dimImm;
posDes = posSin;
posSin++;
if (posSin>nfoto) {
posSin = 1;
}
}
}
|