LA SOURCE DE SPY : CE QU'IL FAUT FAIRE ET PAS FAIRE...
SPY00
Messages postés11Date d'inscriptionsamedi 15 mai 2004StatutMembreDernière intervention13 juin 2006
-
16 mai 2004 à 11:08
individis-bis
Messages postés293Date d'inscriptionvendredi 26 septembre 2003StatutMembreDernière intervention25 septembre 2008
-
17 mai 2004 à 11:12
Cette discussion concerne un article du site. Pour la consulter dans son contexte d'origine, cliquez sur le lien ci-dessous.
17 mai 2004 à 11:12
16 mai 2004 à 11:10
je bricole en action scipt ;)
merci pour le cours ;)
16 mai 2004 à 11:08
onMouseMove = function () {
XRotation.gotoAndStop (Math.ceil (_root._xmouse /(320 / XRotation._totalframes) % XRotation._totalframes));
à la place de :
L = getProperty(_root.XRotation, _width);
N = getProperty(_root.XRotation, _totalframes);
interval = (L/2)/(N+1);
xm = getProperty(_root.XRotation, _xmouse);
if (i>N) {
i = 0;
} else {
i += 1;
}
if (xm>=interval*i && xm<=interval*(i+1)) {
trace("Image "+(i+1));
_root.XRotation.gotoAndStop(i);
setProperty("_root.XRotation", _visible, true);
setProperty("_root.XRotation2", _visible, false);
}
if (xm<=-(interval*i) && xm>=-(interval*(i+1))) {
trace("Image "+(i+1));
_root.XRotation2.gotoAndStop(i);
setProperty("_root.XRotation", _visible, false);
setProperty("_root.XRotation2", _visible, true);
}
trace("L = "+L);
// trace("N = "+N);
trace("interval = "+interval);
// trace("i = "+i);
trace("xm = "+xm);
c'est sur que ça allège le code !