title: AS3 create a textField from a class
body: <p>I created a document class for an empty stage and would like to create an output class which is imported into the document class.</p>
  
  <p>Inside the output class I would like to create a textField with the methods to set and read the text.</p>
  
  <p>a) empty stage with document class "tommy"</p>
  
  <p>b) document class "tommy"</p>
  
  <pre><code>package  {
    import flash.display.MovieClip;
    import cOutput;
  
    public class tommy extends MovieClip {
      var _loc_1:cOutput;
  
      public function tommy() {
        _loc_6 = new cOutput;
        _loc_6.setOutput();//("hurra");       
      }
    }
  }
  </code></pre>
  
  <p>c) output class cOutput (with or without extends Movieclip)</p>
  
  <pre><code>package {
    //import flash.display.MovieClip;
    import fl.controls.TextInput;
  
    public class cOutput{ //extends MovieClip {
      public var texteField:TextInput;
  
      public function cOutput() {
        texteField = new TextInput();
        addChild(texteField);
        texteField.text = "Seriously... I need to be displayed."
      }
      public function setOutput(printValue:String){
        texteField.text = printValue;
      }
    }
  }
  </code></pre>
  
  <p>I am receiving "Definition fl.controls:TextInput could not be found".</p>
  
  <p>I read that you need to have this in the library (I dragged a text field as classic text, input text on stage).
  Seems I am not getting this working.</p>
  
  <p>Any idea what I am doing wrong?</p>