flex s:TextArea 回车提交数据

//////////
<s:TextArea  id="infoText"  maxChars="30" width="100%" height="23"  alpha=".2"   />

//////////
var config:Configuration = TextFlow.defaultConfiguration;
config.manageEnterKey = false;

Object(infoText.textDisplay).textFlow = new TextFlow(config);


infoText.addEventListener(KeyboardEvent.KEY_DOWN,sendInfo);

///////////
protected function sendInfo(event:*):void
{
   if((event is KeyboardEvent)&&event.charCode!="13")return;
   //...
}

你可能感兴趣的:(textarea)