MovieClip.prototype.easeX = function( to:Number , speed:Number , endF:Function , endO , endP:Array ){ var _this:MovieClip = this; var aux:MovieClip = _this.createEmptyMovieClip( "easeX_aux" , 1223 ); var previousPosition:Number = this._x; if( isNaN(speed) || speed == undefined || speed == '' || speed <= 1 ) speed = 1.2; if( _this._x != to ){ aux.onEnterFrame = function(){ _this._x = to - ( to - _this._x ) / speed; if( _this._x == previousPosition ){ _this._x = to; this.removeMovieClip(); if( endF ) endF.apply( endO , endP ); } previousPosition = _this._x; } } else { if( endF ) endF.apply( endO , endP ); } } MovieClip.prototype.easeY = function( to:Number , speed:Number , endF:Function , endO , endP:Array ){ var _this:MovieClip = this; var aux:MovieClip = _this.createEmptyMovieClip( "easeY_aux" , 1224 ); var previousPosition:Number = this._y; if( isNaN(speed) || speed == undefined || speed == '' || speed <= 1 ) speed = 1.2; if( _this._y != to ){ aux.onEnterFrame = function(){ _this._y = to - ( to - _this._y ) / speed; if( _this._y == previousPosition ){ _this._y = to; this.removeMovieClip(); if( endF ) endF.apply( endO , endP ); } previousPosition = _this._y; } } else { if( endF ) endF.apply( endO , endP ); } } MovieClip.prototype.easeW = function( to:Number , speed:Number , endF:Function , endO , endP:Array ){ var _this:MovieClip = this; var aux:MovieClip = _this.createEmptyMovieClip( "easeW_aux" , 1225 ); var previousWidth:Number = this._width; if( isNaN(speed) || speed == undefined || speed == '' || speed <= 1 ) speed = 1.2; if( _this._width != to ){ aux.onEnterFrame = function(){ _this._width = to - ( to - _this._width ) / speed; if( _this._width == previousWidth ){ _this._width = to; this.removeMovieClip(); if( endF ) endF.apply( endO , endP ); } previousWidth = _this._width; } } else { if( endF ) endF.apply( endO , endP ); } } MovieClip.prototype.easeH = function( to:Number , speed:Number , endF:Function , endO , endP:Array ){ var _this:MovieClip = this; var aux:MovieClip = _this.createEmptyMovieClip( "easeH_aux" , 1226 ); var previousHeight:Number = this._height; if( isNaN(speed) || speed == undefined || speed == '' || speed <= 1 ) speed = 1.2; if( _this._height != to ){ aux.onEnterFrame = function(){ _this._height = to - ( to - _this._height ) / speed; if( _this._height == previousHeight ){ _this._height = to; this.removeMovieClip(); if( endF ) endF.apply( endO , endP ); } previousHeight = _this._height; } } else { if( endF ) endF.apply( endO , endP ); } } MovieClip.prototype.easeAlpha = function( to:Number , speed:Number , endF:Function , endO , endP:Array ){ var _this:MovieClip = this; var aux:MovieClip = _this.createEmptyMovieClip( "easeAlpha_aux" , 1227 ); var previousAlpha:Number = this._alpha; if( isNaN(speed) || speed == undefined || speed == '' || speed <= 1 ) speed = 1.2; if( _this._alpha != to ){ aux.onEnterFrame = function(){ _this._alpha = to - ( to - _this._alpha ) / speed; if( _this._alpha == previousAlpha ){ _this._alpha = to; this.removeMovieClip(); if( endF ) endF.apply( endO , endP ); } previousAlpha = _this._alpha; } } else { if( endF ) endF.apply( endO , endP ); } } MovieClip.prototype.easeXScale = function( to:Number , speed:Number , endF:Function , endO , endP:Array ){ var _this:MovieClip = this; var aux:MovieClip = _this.createEmptyMovieClip( "easeXScale_aux" , 1228 ); var previousScale:Number = this._xscale; if( isNaN(speed) || speed == undefined || speed == '' || speed <= 1 ) speed = 1.2; if( _this._xscale != to ){ aux.onEnterFrame = function(){ _this._xscale = to - ( to - _this._xscale ) / speed; if( Math.abs( _this._xscale - previousScale ) <= 1 ){ _this._xscale = to; this.removeMovieClip(); if( endF ) endF.apply( endO , endP ); } previousScale = _this._xscale; } } else { if( endF ) endF.apply( endO , endP ); } } MovieClip.prototype.easeYScale = function( to:Number , speed:Number , endF:Function , endO , endP:Array ){ var _this:MovieClip = this; var aux:MovieClip = _this.createEmptyMovieClip( "easeYScale_aux" , 1229 ); var previousScale:Number = this._yscale; if( isNaN(speed) || speed == undefined || speed == '' || speed <= 1 ) speed = 1.2; if( _this._yscale != to ){ aux.onEnterFrame = function(){ _this._yscale = to - ( to - _this._yscale ) / speed; if( Math.abs( _this._yscale - previousScale ) <= 1 ){ _this._yscale = to; this.removeMovieClip(); if( endF ) endF.apply( endO , endP ); } previousScale = _this._yscale; } } else { if( endF ) endF.apply( endO , endP ); } } MovieClip.prototype.easeScale = function( to:Number , speed:Number , endF:Function , endO , endP:Array ){ var _this:MovieClip = this; var aux:MovieClip = _this.createEmptyMovieClip( "easeScale_aux" , 1230 ); var previousXScale:Number = this._xscale; var previousYScale:Number = this._yscale; if( isNaN(speed) || speed == undefined || speed == '' || speed <= 1 ) speed = 1.2; if( _this._xscale != to || _this._yscale != to ){ aux.onEnterFrame = function(){ _this._yscale = to - ( to - _this._yscale ) / speed; _this._xscale = to - ( to - _this._xscale ) / speed; if( Math.abs( _this._xscale - previousXScale ) <= 1 && Math.abs( _this._yscale - previousYScale ) <= 1 ){ _this._yscale = to; _this._xscale = to; this.removeMovieClip(); if( endF ) endF.apply( endO , endP ); } previousXScale = _this._xscale; previousYScale = _this._yscale; } } else { if( endF ) endF.apply( endO , endP ); } } MovieClip.prototype.easeRotation = function( to:Number , speed:Number , endF:Function , endO , endP:Array ){ var _this:MovieClip = this; var aux:MovieClip = _this.createEmptyMovieClip( "easeRotation_aux" , 1231 ); var previousRotation:Number = this._rotation; if( isNaN(speed) || speed == undefined || speed == '' || speed <= 1 ) speed = 1.2; if( _this._rotation != to ){ aux.onEnterFrame = function(){ _this._rotation = to - ( to - _this._rotation ) / speed; if( _this._rotation == previousRotation ){ _this._rotation = to; this.removeMovieClip(); if( endF ) endF.apply( endO , endP ); } previousRotation = _this._rotation; } } else { if( endF ) endF.apply( endO , endP ); } }