4 Replies Latest reply on Oct 29, 2010 7:28 PM by kglad

    Need to know when text has finished loading

    AttaBoy2 Level 3

      The following code loades text into a textfield the problem I'm having is the routine at the bottom runs before the text loads and the scrollbar disappears even when there's enough text to overflow the textfield.  How would I make sure the text has finished loading before running the code that enables/disables the scrollbar?

       

       

      mainText.htmlText = main[1];

      textFieldLength = mainText.text.length;
          if(mainText.length > textFieldLength){
              mainScroll._visible = true;
          }else{
              mainScroll._visible = false;
          }