back to devpro   download
MovieClip.prototype.xShake = function() {
	// andr3a 15/04/2004 [ www.3site.it ]
	this.onEnterFrame = function() {
		this._x++;
		if( this.__yMove == true ) {
			this._yscale += ( this._yscale - 30 ) * 0.05;
			if( this._yscale > 99 ) {
				this._yscale = 100;
				this.__yMove = false;
			}
		}
		else {
			this._yscale -= ( this._yscale - 30 ) * 0.05;
			if( this._yscale < 71 ) {
				this._yscale = 70;
				this.__yMove = true;
			}
		}
		if( this.__xMove == true ) {
			this._xscale += 70 * 0.1;
			if( this._xscale > 99 ) {
				this._xscale = 100;
				this.__xMove = false;
			}
		}
		else {
			this._xscale -= 70 * 0.1;
			if( this._xscale < 31 ) {
				this._xscale = 30;
				this.__xMove = true;
			}
		}
	}
}
back to devpro   download
Creative Commons License