Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.

Revision as of 06:53, 14 May 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


From Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

We do not recommend Flash Lite development on current Nokia devices, and all Flash Lite articles on this wiki have been archived. Flash Lite has been removed from all Nokia Asha and recent Series 40 devices and has limited support on Symbian. Specific information for Nokia Belle is available in Flash Lite on Nokia Browser for Symbian. Specific information for OLD Series 40 and Symbian devices is available in the Flash Lite Developers Library.

Article Metadata
Platform(s): Flash Lite: 1.1, 2.x
By morisawafnj
Last edited: hamishwillee (14 May 2013)


on(keyPress aKeyCode) {A command handling code}


  • テキストツールを使用し、静止テキストフィールドをドキュメントの外にドラッグします。

Handle keyevent.jpg

  • このテキストをボタンに変更します: テキストフィールドを選択 → 右クリック → シンボルに変換ボタンを選択
  • アクションパネルを開き、以下のコードを追加します:
on(keyPress "<Up>") 
trace("You have pressed the Up key");
//Add your command handling code here
on(keyPress "9")
//Add your command handling code here



端末のキー Keypressコード
0-9, *, # 0-9, *, #
左矢印キー <Left>
右矢印キー <Right>
上矢印キー <Up>
下矢印キー <Down>
選択キー <Enter>
左ソフトキー <PageUp>
右ソフトキー <PageDown>

キーリスナーを使用したkeypressイベントの処理(Flash Lite 2.x以降のみ)

//Create a listener object named keyListener 
var keyListener:Object = new Object();
//Define a function that responds to the KeyDown event
keyListener.onKeyDown = function()
if (Key.getCode() == Key.UP)
trace("You have pressed the Up key");
//Add your command handling code here
trace("You have pressed: "+Key.getCode());
//The keyListener object is then registered to the Key object

キーリスナーを使用してソフトキーを処理する方法は、Flash Lite 2.0のソフトキーを使用した例題をご参照ください。

This page was last modified on 14 May 2013, at 06:53.
75 page views in the last 30 days.