salve a tutti.
sappiamo tutti che per ruotare un movie clip basta settare il parametro _rotation, ma se io volessi farlo ruotare gradualmente, e non di scatto? che codice dovrei utilizzare?
salve a tutti.
sappiamo tutti che per ruotare un movie clip basta settare il parametro _rotation, ma se io volessi farlo ruotare gradualmente, e non di scatto? che codice dovrei utilizzare?
Metti che la tua movieclip da ruotare si chiami 'mc'. Sul frame scrivi:
codice:_root.onEnterFrame = function(){ mc._rotation += 2; }![]()
A me mi dà la carica, agli italiani gli dà la carica
Approfitto per porre una mia domanda anche se c'entra parzialmente. Allora volevo fare ruotare un mc a sx o dx a seconda se il mouse stava a sx o dx del centro dello schermo. Ho associato questo script al mc in questione:
onClipEvent (enterFrame) {
if (_xmouse<0) {
this._rotation -= 20;
} else if (_xmouse>0) {
this._rotation += 20;
}
}
Solo che mi prende in considerazione lo 0 rispetto al mc non allo stage, si puo' rendere questo valore riferito allo stage.
Ho provato anche ad associarlo ad un mc trasparente grande quanto lo stage (sostituendo ovviamente _root.mc a this), solo che oltre ad essere una soluzione scomoda, nn mi funzia neanche![]()
Overhead the albatross hangs/motionless upon the air/And deep beneath the rolling waves/in labyrinths of coral caves/The echo of a distant time/Comes willowing across the sand/And everything is green and submarine
onClipEvent (enterFrame) {
if (_root._xmouse<0) {
this._rotation -= 20;
} else if (_root._xmouse>0) {
this._rotation += 20;
}
}
ciauz
![]()
grazie, siete davvero dei grandi...