o non ho capito il problema o la funzione finisce così
codice:
function ingran (dici, vel,x,y){
dici._yscale= 100;
dici._xscale= 100;
dici.onEnterFrame = function (){
a = Math.abs(y-dici._yscale);
dici._yscale += (Math.round(y-dici._yscale))/vel;
b = Math.abs(x-dici._xscale);
dici._xscale+= (Math.round(x-dici._xscale))/ vel;
trace(b)
trace(a)
trace(this._xscale)
if(b<=1 && a<=1){
trace("ha finito l'effetto");
x= 100;
y= 100;
}
if( this._xscale > 99 && this._yscale > 99){
delete this.onEnterFrame
}
}
}