title: How to change fillColor of a textfield while typing in that textfield?
body: <p>i want to change the fillColor of a textfield while typing in it.</p>
  
  <p>The field is empty and the fillColor is red for default.
  How to change the fillColor to transparent while typing in this field, so before leaving it?</p>
  
  <p>Thanks.</p>
  
  <p>Edit: Im using Adobe Acrobat Pro DC.</p>
  
  <p>my code in custom keystroke script:</p>
  
  <pre><code>var a = this.getField("a");
  if(event.value == 0){
  a.fillColor = color.red;
  }else{
  a.fillColor = color.transparent;
  };
  </code></pre>
  
  <p>but this changes the color after leaving the textfield.
  How to change that code to change the color before leaving the textfield?</p>