특별한딸기이야기
키보드 이벤트 본문
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
private function keyboardEvent(event : KeyboardEvent) : void
{
lblMsg.text = event.type + " code = " + String(event.keyCode);
}
]]>
</mx:Script>
<mx:TextInput x="23" y="53" id="txtInput" width="127" keyDown="keyboardEvent(event)" keyUp="keyboardEvent(event)" />
<mx:Label x="23" y="24" text="문자를 입력해 주세요." fontFamily="Arial" fontSize="12" id="lblMsg" />
</mx:Application>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
private function keyboardEvent(event : KeyboardEvent) : void
{
lblMsg.text = event.type + " code = " + String(event.keyCode);
}
]]>
</mx:Script>
<mx:TextInput x="23" y="53" id="txtInput" width="127" keyDown="keyboardEvent(event)" keyUp="keyboardEvent(event)" />
<mx:Label x="23" y="24" text="문자를 입력해 주세요." fontFamily="Arial" fontSize="12" id="lblMsg" />
</mx:Application>