title: AS3 Creating a "Text Tool"
body: <p>So i'm developing an application in which allows users to Type on the stage. The text needs to appear wherever the mouse cursor is positioned (and the text would follow the mouse cursor if moved). For the most part it works pretty well. I have two questions. </p>
  
  <p>1) How would I allow the text to follow the mouse cursor? My current code only allows users to type when they click down on the stage.</p>
  
  <pre><code>  var textfield = new TextField();
  textfield.type = TextFieldType.INPUT
  textfield.autoSize = TextFieldAutoSize.LEFT;
  textfield.defaultTextFormat = textformat;
  textfield.textColor = selectedColor;
  textfield.x = mouseX;
  textfield.y = mouseY;
  stage.focus = textfield;
  textfield.selectable = false;
  
          /* Add text to stage*/
  
  board.addChild(textfield);
  </code></pre>
  
  <p>My second question, how would I clear the text? The text would be "pasted" down onto the canvas, so using the "" method would not work. I want an "eraser" to erase the text from the stage. It would be just like stage.graphics.clear but just for text.</p>
  
  <p>Any help I could get would be greatly appreciated. I am still very new to AS3 and I think I gave all the information needed. Thanks.</p>