title: ActionScript 3.0 textInput and Display
body: <p>I am new at flash, the below is my script, i have 3 textinput boxes, name1, name2, name3 and 3 dynamic texts, output1, output2, output3. Once the user, enters the text in the box, it should appear exactly the same in the dynamic output text. It works for the first one, but does not work for the second and third one. I renamed changehandlers differently to remove compile errors, but now only the first one works. Is there a better way of doing this, if i want to have multiple textbox entrees?</p>
  
  <pre><code>name1.addEventListener(Event.CHANGE, changeHandler);
  
  function changeHandler(e:Event):void 
  {
      output1.text = name1.text
  
  }
  name2.addEventListener(Event.CHANGE, changeHandler);
  
  function changeHandler1(e:Event):void 
  {
      output2.text = name2.text;
  }
  
  name3.addEventListener(Event.CHANGE, changeHandler);
  
  function changeHandler2(e:Event):void 
  {
      output3.text = name3.text;
  }
  </code></pre>