title: Actionscript 3 TextField scrollH property gets set to 0 on click
body: <p>I am populating a textfield programmatically and scrolling to the maxScrollH as the new text is added so the user can see the progression of text. This works fine, until I click the TextField, which sets scrollH back to 0 and places the caret in the text at the equivalent position.</p>
  
  <pre><code>textField.setSelection( text.length, text.length ); //sets the caretIndex/selection to the end
  textField.scrollH = textField.maxScrollH; //scrolls to max
  </code></pre>
  
  <p>this is the code that I am using to scroll when the textField text property is updated. I've tried adding a listener to the click event on the textField, which works in a way, but causes a visible jump.</p>
  
  <pre><code>override protected function createChildren() : void
  {
      super.createChildren();
      textField.addEventListener(MouseEvent.CLICK, handleTextFieldClick, false, 0, true);
  }
  
  protected function handleTextFieldClick(event:MouseEvent):void
  {
      textField.scrollH = currentTextFieldScrollPosition; //stored scrollH value
      trace(textField.scrollH);
  }
  </code></pre>
  
  <p>My guess is that there is a scroll position being calculated or stored someplace that I can't find.</p>