Clearing Text From Text Input Component

I have a text input component on stage and a button next to it. I want to clear any text that’s entered when the button is clicked. Here’s what I’ve got so far. Thanks for any help.

tf.addEventListener(TextEvent.TEXT_INPUT, onTextInput);
function onTextInput(e:TextEvent):void {
//need some code to clear tf

}

myButton.addEventListener(MouseEvent.MOUSE_UP,clearBoxFunction);

function clearBoxFunction(e:MouseEvent):void {
   e.target.parent.myTextInput.text = "";
}

I modified the code you gave me and now it works great!