как вариант (насколько надежно/универсально не проверял )

Код AS3:
public class Main extends Sprite
{
public function Main():void
{
var tf:TextField = new TextField();
tf.type = TextFieldType.INPUT;
tf.border = true;
tf.addEventListener(TextEvent.TEXT_INPUT, tf_textInput);
tf.addEventListener(KeyboardEvent.KEY_DOWN, tf_keyDown);
addChild(tf);
}
private function tf_keyDown(e:KeyboardEvent):void
{
if (e.charCode > 0x20)
{
var tf:TextField = e.target as TextField;
tf.appendText(String.fromCharCode(e.charCode));
tf.setSelection(tf.text.length,tf.text.length);
}
}
private function tf_textInput(e:TextEvent):void
{
if (e.text.charCodeAt(0) > 0x20) e.preventDefault();
}
}