Scrollbar component

I’m full of questions :stuck_out_tongue:
So the thing is I have an input text (comment) with a scrollbar (bar) and I’d like it to visible only if it needs to. I wrote this

comment.onChanged = function(){
	if (this.maxscroll>1) {
		_root.bar._visible=true;
	}
	else _root.bar._visible=false;
}

but the problm is that the scrollbar appears but isn’t active. Any idea ?

pom :asian:

I tried the code that you supplied and it works for me. when I enter text into the text box with the name comment, the scroll bar disappears. When there is enough text in the text box, the bars reappears.

I don’t know why it would not work with you.

Well, it didnt work for me, until I made the following change:

_root.bar._visible=false;

comment.onChanged = function(){
if (this.maxscroll>1) {
_root.bar._visible=true;
}
else _root.bar._visible=false;

}

this was, of course, all on frame 1

I had tried that already and it didn’t seem to work. Can you send me a fla that works ?

pom :asian:

I hope this helps. It works for me.

Thanks Dijon (must I understand that you’re French ?), but I removed the scrollbar and put another, and it now works perfectly. Go figure…

Thanks also Inigo.

pom :asian:

no prob! That’s why we’re here, to help each other out.

:frowning:

heheh