Ciao a tutti,
dovrei far ruotare attorno ad un centro da me stabilito un semicerchio tramite action script..
mi potreste aiutare ??
Perfavore
mymc.Rotation();????
Grazie mille
Ciao a tutti,
dovrei far ruotare attorno ad un centro da me stabilito un semicerchio tramite action script..
mi potreste aiutare ??
Perfavore
mymc.Rotation();????
Grazie mille
questo è quello che uso sui mc (come se fosse un bottone), vedi se riesci a riutilizzarlo....
onClipEvent (load) {
x = -_x;
y = _y;
}
on (press) {
ruota = setInterval(ruota, Math.round(1000/35));
function ruota() {
xmouse = _root._xmouse+x;
ymouse = -_root._ymouse+y;
tg = ymouse/xmouse;
actg = -Math.atan(tg)*57.3+90;
if (xmouse<0) {
_rotation = actg-180;
} else {
_rotation = actg;
}
}
![]()
}
on (release, releaseOutside) {
clearInterval(ruota);
}
La rapidità che è una virtù, genera un vizio che è la fretta !
-------------------------
Browser: Opera & Firefox
non è che abbia capito molto da questo script....
ad ogni modo ho provato ad usare:
my_btn._rotation = 90
e in effetti mi sposta il pulsante di 90°, il fatto è che dovrei creare un movimento graduale che mi faccia arrivare a 90°..
Come posso fare?
ho provato così con un mc e funziooona!
inc=1
fat=10
max=600
initX=-50
mc.onEnterFrame=function(){
if(this._x<= max){
this._rotation+=inc*fat
}else{
this._x=initX
}
}
però come faccio a dirgli che deve ruotare attorno a delle coordinate ben precise?
grazie