Originariamente inviato da alpeweb
posta il codice
eccolo tutto intero:
Codice PHP:
stop();
function rot() {
friction = 0.15;
distanceR = (targetR-this._rotation)*friction;
this._rotation += distanceR;
}
function updateEnshu(r, a) {
targetR = r;
this.a = a == undefined ? undefined : a;
if (this.a != undefined) {
_root.yajirushi["ya_" + a]._alpha = 0;
for (x=1; x<6; x++) {
if(x!= this.a)_root.yajirushi["ya_" + x]._alpha = 30;
}
_root.yajirushi.enshu.gotoAndStop(a+1);
}
}
yajirushi.onEnterFrame = rot;
for (var x=1; x<6; x++) {
_root.yajirushi["ya_" + x]._alpha = 0;
}
Nei bottoni che richiamano la funzione associo così i valori:
Codice PHP:
on (release) {
_root.updateEnshu(-41, 2);
}
Il problema sorge quando do' dei valori superiori a 180°