I have an html text field that displays content from an xml file, and a class that determines whether or not to show a scrollbar.
The code that determines this is as straightforward as
if (field.maxScrollV>1){
showscrollbars()
}
And 9 times out of ten it is working. Sometimes – it seems when the html contains <li> – maxScrollV is reporting ‘2’ and the scrollbars are showing, even though all text is visible onscreen and it will not actually scroll at all.
Even if I force the textfield larger: field.height +=100 it still reports maxScrollV=2 and shows the scrollbars.
Ideas?
Turns out if I add a small timer delay it will report the value correctly. I imagine this means I need to look as the
addedToStageevent?