Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   не отображается UIScrollBar (http://www.flasher.ru/forum/showthread.php?t=144227)

FriOne 07.09.2010 00:46

не отображается 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


Часовой пояс GMT +4, время: 18:31.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.