# No scroll button if there is not enough text

**URL:** <https://forum.kirupa.com/t/no-scroll-button-if-there-is-not-enough-text/208306>\
**Category:** flash\
**Created:** [November 27, 2006, 2:41pm UTC](https://forum.kirupa.com/t/no-scroll-button-if-there-is-not-enough-text/208306 "2006-11-27T14:41:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ponyack](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@ponyack](https://forum.kirupa.com/u/ponyack)\
**Post date:** [November 27, 2006, 2:41pm UTC](https://forum.kirupa.com/t/no-scroll-button-if-there-is-not-enough-text/208306/1 "2006-11-27T14:41:19Z")

</div>

Hi

I am loading a text file. When the file fits into the dynamic text box I do not want the scroll buttons to appear.

When there is an overflow, I would like the scroll buttons to appear

I think the solution has to do with figuring out many lines of text can appear before the overflow occurs. Just not sure how to write that.

Any help would be great

Thanks

Ponyack

How can I code this

here is the code I am using…this works fine.

```auto
load_btn.onPress = function() {
    my_lv = new LoadVars();
    my_lv.load("my_txt.txt");
    my_lv.onLoad = function(success) {
        if (success) {
            my_txt.htmlText = this.my_txt;
            trace("loaded");
        } else {
            trace("not_loaded");
        }
    };
};
up_btn.onPress = function() {
    onEnterFrame = function () {
        _root.my_txt.scroll -= 1;
    };
};
up_btn.onRelease = function() {
    onEnterFrame = null;
};
down_btn.onPress = function() {
    onEnterFrame = function () {
        _root.my_txt.scroll += 1;
    };
};
down_btn.onRelease = function() {
    onEnterFrame = null;
};

```
