//////////
<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;
//...
}
<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;
//...
}
本文介绍了一种文本显示配置方法及如何使用ActionScript通过监听键盘事件来发送信息。具体涉及配置文本流参数、设置键盘输入行为等内容。
2179

被折叠的 条评论
为什么被折叠?



