l'onPress si sovrappone creando un errore nel calcolo della nuova posizione, puoi fare in modo che il pulsante sia enabled=false una volta cliccato, e una volta finito il movimento sia di nuovo true, tradotto
codice:
var my_root=this;
var newPosY= Math.round(quadro._y);
function mov(clip, x, y, vel, pulsante){//
clip.onEnterFrame = function() {
b=Math.abs(y-this._y)
a=Math.abs(x-this._x)
this._x += (x-this._x)/vel ;
this._y += (y-this._y)/vel ;
if (a <= 0.5 && b <= 0.5){
delete this.onEnterFrame;
pulsante.enabled = true;
}
}
}
my_root.sopra.onPress= function (){
this.enabled = false;
if(quadro._y <= 145){
newPosY += 70;
mov(quadro, x, newPosY, 3, this);
}
}
my_root.sotto.onPress= function (){
this.enabled = false;
if(quadro._y >= 16){
newPosY -=70;
mov(quadro, x, newPosY, 3, this);
}
}
se non dovesse andare è un problema di percorsi, magari invece di this nel richiamo metti il percorso assoluto del clip che fa da pulsante