Показать сообщение отдельно
Старый 17.07.2003, 02:49
fiot вне форума Посмотреть профиль Отправить личное сообщение для fiot Посетить домашнюю страницу fiot Найти все сообщения от fiot
  № 87  
fiot
 
Аватар для fiot

Регистрация: Nov 2001
Адрес: Kyiv
Сообщений: 158
Отправить сообщение для fiot с помощью ICQ
Код:
MovieClip.prototype.onEnterFrame = function() {
	this.distanceX = _root._xmouse - this._x;
	this.distanceY = _root._ymouse - this._y;
	this.distance  = Math.sqrt(this.distanceX*this.distanceX+this.distanceY*this.distanceY);
	this.powerX    = this._x-this.distanceX/this.distance*magnet/this.distance;
	this.powerY    = this._y-this.distanceY/this.distance*magnet/this.distance;
	this.forceX    = (this.forceX+(this.x-this._x)/2)/1.66;
	this.forceY    = (this.forceY+(this.y-this._y)/2)/1.66;
	ASSetPropFlags(this, ["distanceX","distanceY","distance","powerX","powerY","forceX","forceY"], 1, 1);
	this._x = this.powerX + this.forceX;
	this._y = this.powerY + this.forceY;
};
можно ли как-то эту штуку оптимизировать ???
если можно то как ???
__________________
file-> new-> F9 -> Ctrl+v/*code*/ ->ctrl+enter