Тема: панорама
Показать сообщение отдельно
Старый 26.09.2005, 13:21
as_68 вне форума Посмотреть профиль Отправить личное сообщение для as_68 Найти все сообщения от as_68
  № 2  
Ответить с цитированием
as_68
 
Аватар для as_68

Регистрация: Apr 2002
Адрес: СПб
Сообщений: 288
может так.
pic - твоя панорама
лежит по у от 0 до pic._height
Код:
stop();
shirina_ecrana = 550;
pic.onEnterFrame = function() {
	if (_ymouse>0 && _ymouse<=this._height) {
		if (_xmouse<shirina_ecrana/2 && this._x<0) {
			this._x += 1+(shirina_ecrana/2-_xmouse)/10;
		} else if (_xmouse>shirina_ecrana/2 && this._x>shirina_ecrana-this._width) {
			this._x += -1-(_xmouse-shirina_ecrana/2)/10;
		}
	} else if (_ymouse>this._height) {
		this._x += shag;
		if (this._x<=shirina_ecrana-this._width) {
			shag = 1;
		} else if (this._x>=0) {
			shag = -1;
		}
	}
};
__________________
Хватит клавиши топтать... :mad: