ho questo prototype:
che uso così:codice:MovieClip.prototype.slowSetProperty = function(prop, newVal, b) { var bb, prevVal; bb = (b == undefined) ? 5 : b; prevVal = this[prop]; this.onEnterFrame = function() { this[prop] += (newVal-this[prop])/bb; if (Math.abs(this[prop]-prevVal)<.01) { this[prop] = newVal; delete this.onEnterFrame; } else { prevVal = this[prop]; } }; };
e fin qui tutto bene...codice:mioClip.slowSetProperty("_x", 100);
ma se voglio fare:
non posso farlo...codice:mioClip.slowSetProperty("_x", 100); mioClip.slowSetProperty("_xScale", 200);
funziona solo la seconda chiamata che naturalmente cancella onEnterFrame della prima.
Come risolvo?

Rispondi quotando

