ciao,
tempo fa avevo aperto una discussione e, non ricordo se And80 o enigma_79 ( :master: o forse qualcun altro), mi avevano passato una proto. purtroppo non posso inserire il link della vecchia discussione perchè non funziona il search.
il problema è che la proto non esce dal enterframe. ho provato a modificarla ma...
non riesco a bloccarla e così ho la CPU che mi spara a mille.
la proto in questione è la seguente:
codice:
MovieClip.prototype.funzione= function (x,y,a,sx,sy,steps) {
this.onEnterFrame=function () {
this._xstep=(Number(x)-this._x)/Number(steps);
this._ystep=(Number(y)-this._y)/Number(steps);
this._rot=(Number(a)-this._rotation)/Number(steps);
this._xsca=(Number(sx)-this._xscale)/Number(steps);
this._ysca=(Number(sy)-this._yscale)/Number(steps);
this._steps=steps;
if (this._xstep != Number(x)) {
this._rotation+=this._rot;
this._alpha+=10;
this._x+=this._xstep;
this._y+=this._ystep;
this._xscale+=this._xsca;
this._yscale+=this._ysca;
this._steps--;
}
else {
delete this._xstep;
delete this._ystep;
delete this._xsca;
delete this._ysca;
delete this._steps;
this.onEnterFrame=function () {}
}
}
}