Показать сообщение отдельно
Старый 27.12.2002, 03:36
Hirn вне форума Посмотреть профиль Отправить личное сообщение для Hirn Посетить домашнюю страницу Hirn Найти все сообщения от Hirn
  № 7  
Hirn

Регистрация: Jan 2000
Адрес: BRD
Сообщений: 42
В компоненте FListBox используется точно такойже принцип.
Код:
class.clickHandler = function(itmNum) {
	super.clickHandler(itmNum);
	if (this.dragScrolling == undefined && this.scrollBar_mc != undefined) {
		this.dragScrolling = setInterval(this, "dragScroll", 15);   
	};
};
class.dragScroll = function() {
	clearInterval(this.dragScrolling);   
	var yMouse = this.container_mc._ymouse;
	if (yMouse < 0) {
		this.scrollPosition--;
		this.selectionHandler(0);
		this.scrollInterval = Math.max(25, -23.8*(-yMouse) + 500);
		this.dragScrolling = setInterval(this, "dragScroll", this.scrollInterval);   
	} else if (yMouse > this._height) {
		this.scrollPosition++;
		this.selectionHandler(this.numDisplayed - 1);
		this.scrollInterval = Math.max(25, -23.8*Math.abs(yMouse-this._height) + 500);   
		this.dragScrolling = setInterval(this, "dragScroll", this.scrollInterval);
	} else {
		this.dragScrolling = setInterval(this, "dragScroll", 15);  
	};
};
и все работает за милую душу.
__________________
Дааа, не перевелись на Руси богатыри добры-молодцы!!?