PDA

View Full Version : Need help on Text Formating



emeX
July 22nd, 2003, 01:51 PM
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;
}
}
------------------------------------------------------------------------------------

saint cleve
July 22nd, 2003, 02:02 PM
i don't know...thats something i have been trying to do for sometime now also

claudio
July 22nd, 2003, 02:20 PM
Hmm im not sure if this is what you want...dynamicText.embedFonts;
inputText.onKeyDown = function() {
if (Key.isDown(Key.ENTER) && this.text=="encode") {
dynamicText.text = this.text;
}
};
Key.addListener(inputText);Select the font type you want in the dynamic textfield.