Hide or Show Scrollbar for Multiline INPUT Textfield

Hello people!

I am at my wits end here. I have tried to search everywhere, but cant find a sollution…

Backgorund:
I use AS3 which I keep separate from my fla project.

I have a contact page and the textfield where you type your message is an Input textfield with multiline and textwrap enabled. The height of my textfield allows for 5 lines of text, then you will have to start scrolling after that.

I use a my own scroll bar nested in a movieclip with instance name “txtScroller”
The Input textfield instance name is “messageText”

What I want to do:
I want to hide the “txtScroller” mc and show it when the user has typed more than 5 lines of text (using enter to break to a new line, etc).

Now for my problem:
The first part of the code works, the “txtScroller” mc is hidden, and I have even tested it with the trace function (see code bellow).

I can for the life of me NOT get the the second part to work, the part where i want to show “txtScroller” mc again. I’ve treid with the trace function as well but it shows nothing in the ‘output’ pannel (see code bellow).

If anyone knows a sollution i would be really glad!

The Code:
This is all I have with regards to hiding or showing the “txtScroller” mc.

if (messageText.numLines <= 5) {
    trace("less");
    txtScroller.visible = false;
    
}

if (messageText.numLines > 6) {
    trace("more");
    txtScroller.visible = true; 
}