title: Clearing input text fields when clicked on in Flash (AS 2.0)
body: <p>I have a problem where I want a text field that by default has the word NAME in it, to become empty when a user clicks on it.</p>
  
  <p>The text field has the instance name 'nam' and is inside a movie with the instance name 'input_text'.</p>
  
  <p>I've searched around and found samples of code where everyone keeps suggesting this:</p>
  
  <pre><code>textboxinstancename.onSetFocus = function() {
      textboxinstancename.text = "";
  };
  </code></pre>
  
  <p>should work. It seems to work for everyone else but me.</p>
  
  <p>I've tried using the following on the first frame of the 'input_text' movie with no luck:</p>
  
  <pre><code>this.input_text.nam.onSetFocus = function() {
      this.input_text.nam.text = ""
  }
  </code></pre>
  
  <p>I've tried putting this on the first frame of the scene, again with no result:</p>
  
  <pre><code>_root.input_text.nam.onSetFocus = function() {
      _root.input_text.nam.text = ""
  }
  </code></pre>
  
  <p>I've tried this in the same manner as the last respectively with both 'this' on the instance and '_root' on the scene (denoted by x):</p>
  
  <pre><code>x.input_text.nam.onSetFocus = function() {
      if (x.input_text.nam.text == "NAME") {
          x.input_text.nam.text = "";
      }
  };
  </code></pre>
  
  <p>Still no luck.</p>