Показать сообщение отдельно
Старый 07.09.2010, 00:46
FriOne вне форума Посмотреть профиль Отправить личное сообщение для FriOne Найти все сообщения от FriOne
  № 1  
Ответить с цитированием
FriOne
 
Аватар для FriOne

Регистрация: Jul 2010
Адрес: Бердск, НСК
Сообщений: 171
Записей в блоге: 1
По умолчанию не отображается UIScrollBar

Взял из примера, не пойму почему не отображается.
Поле есть, стандартный скролл в библиотеке и имортирован.. Подскажите в чем дело
Код AS1/AS2:
Function makeScrollBar(x:Number, y:Number, scrollingObject:Object, scrollListener:Function):UIScrollBar {
 
	// Make a new scrollbar. Note that the UIScrollBar component is in the
	// library.
	var depth:Number = this.getNextHighestDepth();
	var textSb:UIScrollBar = this.createClassObject(UIScrollBar, "textSb" + depth, depth);
 
	// Move the scrollbar to the specified location.
	textSb.move(x,y);
 
	// Set the dimensions of the scrollbar so they align properly with the
	// text field.
	textSb.setSize(textSb.width,160);
 
	//textSb.setScrollTarget(scrollingObject);
	textSb.setScrollProperties(scrollingObject._height / 160,0,scrollingObject._height - 160);
	textSb.pageScrollSize = scrollingObject._height / 160;
 
	textSb.addEventListener("scroll",scrollListener);
 
	return textSb;
}
// Each time the text in the upper right is scrolled update the scrollRect // property of scrollingRectangleClip.
function onScrollRectangle(event:Object):Void {
	contact_form_txt_input.scrollRect = new Rectangle(0, event.target.scrollPosition, 160, 160);
}
Добавлено через 25 минут
Все вроде разобрался.. дело было в ссылке this


Последний раз редактировалось FriOne; 07.09.2010 в 01:14.