3 Replies Latest reply: Mar 12, 2010 6:26 AM by Mr_Mayhem RSS

    Softkey in omnia i900! Help please.


      I am creating a game for omnia i900.  And in the game the user has to long press a button so that to move the character.  As the context menu appear i cannot put on screen buttons.  The other solution was a softkey.  So i have put two softkey, one left and right. So to detect whether the user is still pressing i am using a flag which keeps that whether the button is pressed or not.  So when i get an on keydown event i put the flag true and when it is released i put the flag false.  It is working fine in Adobe Device Central but when package in mobile it is not working.  It is just detecting the release event.  Not the pressed one! Please help me out!

      Here is a test code which is not working:

      fscommand2("SetSoftKeys", "Left", "Right");


      var myListener = new Object();

      myListener.onKeyDown = function() {
          var code = Key.getCode();
          //status.text=code + " down";
          if (Key.isDown(soft1))

      myListener.onKeyUp = function() {
          status.text="onKeyUp called";




      Please help me out!