Need help on Text Formating

How do i get the font to change when the user types encode in the Input box then presses enter and then it changes the font in the Output box (which is dynamic) and also embed the font in the output box. So when they type inteh input box the font changes in the Output box. What am i doing wrong???

On (keyPress (“Enter”) {

if (_parent.Input.text == “encode”) {
tf = new TextFormat();
tf.font = “Beam”;
Output.setTextFormat(tf);
Output.embedFonts = true;
}
}

i don’t know…thats something i have been trying to do for sometime now also

Hmm im not sure if this is what you want…[AS]dynamicText.embedFonts;
inputText.onKeyDown = function() {
if (Key.isDown(Key.ENTER) && this.text==“encode”) {
dynamicText.text = this.text;
}
};
Key.addListener(inputText);[/AS]Select the font type you want in the dynamic textfield.