//*** FUNCTION ELASTICRESIZE ***// MovieClip.prototype.elasticResize = function (xvalue,yvalue,duration,amp,period) { this.createEmptyMovieClip("resizer",300); var xstart = this._xscale; var xchange = xvalue - this._xscale; var ystart = this._yscale; var ychange = yvalue - this._yscale; var t = 0; this.resizer.onEnterFrame = function() { t++; if (t <= duration) { this._parent._xscale = Math.easeOutElastic(t, xstart, xchange, duration, amp, period); this._parent._yscale = Math.easeOutElastic(t, ystart, ychange, duration, amp, period); } else { this._parent._xscale = xvalue; this._parent._yscale = yvalue; this._parent.onComplete(); removeMovieClip(this); } } } //*** FUNCTION ELASTICMOVE ***// MovieClip.prototype.elasticMove = function (xvalue,yvalue,duration,amp,period) { this.createEmptyMovieClip("mover",301); var xstart = this._x; var xchange = xvalue - this._x; var ystart = this._y; var ychange = yvalue - this._y; var t = 0; this.mover.onEnterFrame = function() { t++; if (t <= duration) { this._parent._x = Math.easeOutElastic(t, xstart, xchange, duration, amp, period); this._parent._y = Math.easeOutElastic(t, ystart, ychange, duration, amp, period); } else { this._parent._x = xvalue; this._parent._y = yvalue; this._parent.onComplete(); removeMovieClip(this); } } } //*** FUNCTION MOVE ***// MovieClip.prototype.Move = function (xvalue,yvalue,duration){ this.createEmptyMovieClip("mover",301); var xstart = this._x; var xchange = xvalue - this._x; var ystart = this._y; var ychange = yvalue - this._y; var t = 0; this.mover.onEnterFrame = function(){ t++; if (t <= duration) { this._parent._x = Math.linearTween(t, xstart, xchange, duration); this._parent._y = Math.linearTween(t, ystart, ychange, duration); } else { this._parent._x = xvalue; this._parent._y = yvalue; this._parent.onComplete(); removeMovieClip(this); } } }; //*** FUNCTION ROTATE ***// MovieClip.prototype.rotate = function (value,duration){ this.createEmptyMovieClip("rotator",300); var rotostart = this._rotation; var rotochange = value - this._rotation; var t = 0; this.rotator.onEnterFrame = function(){ t++; if (t <= duration) { this._parent._rotation = Math.easeOutCubic(t, rotostart, rotochange, duration); } else { this._parent._rotation = value; removeMovieClip(this); } }; }; //*** FUNCTION EASEOUTMOVE ***// MovieClip.prototype.easeOutMove = function (xvalue,yvalue,duration) { this.createEmptyMovieClip("mover",301); var xstart = this._x; var xchange = xvalue - this._x; var ystart = this._y; var ychange = yvalue - this._y; var t = 0; this.mover.onEnterFrame = function() { t++; if (t <= duration) { this._parent._x = Math.easeOutCubic(t, xstart, xchange, duration); this._parent._y = Math.easeOutCubic(t, ystart, ychange, duration); } else { this._parent._x = xvalue; this._parent._y = yvalue; this._parent.onComplete(); removeMovieClip(this); } } }