Enterキーでフィールド移動
---------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
private function moveNext(next_txt:TextInput,event:KeyboardEvent):void{
// Enterでなければ、そのまま
if(event.keyCode!=Keyboard.ENTER){
return;
}
// 次の入力項目へ
next_txt.setFocus();
}
]]>
</fx:Script>
<fx:Declarations>
<!-- 非ビジュアルエレメント (サービス、値オブジェクトなど) をここに配置 -->
</fx:Declarations>
<s:TextInput id="txt1" x="91" y="30"/>
<s:TextInput id="txt2" x="91" y="84"/>
<s:TextInput id="txt3" x="91" y="144"/>
<s:TextInput id="txt4" x="91" y="217"/>
</s:Application>