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

Регистрация: May 2003
Адрес: Третья планета от Солнца
Сообщений: 1,254
Отправить сообщение для Пушистик с помощью ICQ
вот так может быть:

Код:
MovieClip.prototype.onEnterFrame = function() {
    this.distanceX = _root._xmouse-this._x;
    this.distanceY = _root._ymouse-this._y;
    this.distance = Math.sqrt(Math.pow(this.distanceX, 2)+Math.pow(this.distanceY, 2));
    this.powerX = this._x-this.distanceX/this.distance;
    this.powerY = this._y-this.distanceY/this.distance;
    this.forceX = (this.forceX+(this.x-this._x)/2)/1.66;
    this.forceY = (this.forceY+(this.y-this._y)/2)/1.66;
    this._x = this.powerX+this.forceX;
    this._y = this.powerY+this.forceY;
};
__________________
Portfolio