×

Discussion Board

Results 1 to 14 of 14
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Open keyboard by ActionScript

    Is there a way to automatically open a virtual keyboard on the 5800 to allow entering text into an input text field? Maybe (if possible) by simulating a click inside the text field itself?
    Thanks,
    Ranco

  2. #2
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    Re: Open keyboard by ActionScript

    Hi,
    I am not sure if this would work.. But u can place a textfield off-stage and at that moment( as you desire), set focus to textField. But there is nothing you can do with that, in the broad angle.
    Twitter - manikantan_k
    Just in --

  3. #3
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Open keyboard by ActionScript

    Quote Originally Posted by manikantan View Post
    Hi,
    I am not sure if this would work.. But u can place a textfield off-stage and at that moment( as you desire), set focus to textField. But there is nothing you can do with that, in the broad angle.
    Manikantan, can you please explain a bit what you mean? why off-stage? why would you expected that to work?
    Thanks,
    Ranco

  4. #4
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    Re: Open keyboard by ActionScript

    My intuition goes like this.
    the virtual keypad is launched with the help of the native OS. Which launches the keypad once it gains focus and is clicked.
    Since you want to launch the virtual keypad automatically, you can simulate the effect by having the textField off-stage ( not in visible area) and issuing a Click event to it.
    I hope I am clear. But I am not sure if u can achieve anything with this.. can you be more elaborate on your use-case ?
    Twitter - manikantan_k
    Just in --

  5. #5
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Open keyboard by ActionScript

    Quote Originally Posted by manikantan View Post
    My intuition goes like this.
    the virtual keypad is launched with the help of the native OS. Which launches the keypad once it gains focus and is clicked.
    Since you want to launch the virtual keypad automatically, you can simulate the effect by having the textField off-stage ( not in visible area) and issuing a Click event to it.
    Ok, I'll surely try this later today. Does setFocus() simulates a click or justs sets the control in focus?

    I hope I am clear. But I am not sure if u can achieve anything with this.. can you be more elaborate on your use-case ?
    Well, when game ends it switchs to the top 10 scores screen, in which the user has to enter his/her name. There's an input text field that he's suppose to click for the keyboard to open. It is not 100% intuitive - the user easily skips this phase and leaves the current score empty, loosing his place in the top 10 scores. I just want to force him to enter his name, or at least ignore it knowingly...
    thanks,

    Ranco

  6. #6
    Registered User
    Join Date
    Apr 2008
    Location
    India / Singapore
    Posts
    549

    Re: Open keyboard by ActionScript

    Is the game for a touch phone ?
    Twitter - manikantan_k
    Just in --

  7. #7
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Open keyboard by ActionScript

    Quote Originally Posted by manikantan View Post
    Is the game for a touch phone ?
    Yes, sorry. Forgot to mention that... 5800, N97, X6 only.

  8. #8
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Open keyboard by ActionScript

    Quote Originally Posted by manikantan View Post
    My intuition goes like this.
    the virtual keypad is launched with the help of the native OS. Which launches the keypad once it gains focus and is clicked.
    Since you want to launch the virtual keypad automatically, you can simulate the effect by having the textField off-stage ( not in visible area) and issuing a Click event to it.
    I hope I am clear. But I am not sure if u can achieve anything with this.. can you be more elaborate on your use-case ?
    Unfortunately, this trick doesn't work...
    any other idea anyone?
    Thanks,
    Ranco

  9. #9
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: Open keyboard by ActionScript

    Simulating key presses in Flash is a feature introduces in AS 3 & i tried few trick today but not able to make it work. Therefore, the workaround will be:
    1- Create ur own keyboard.
    2- Extend Flash Lite with this feature using native languages coz Python & Symbian C++ supports key simulation (& it needs SwEvent Capability)
    3- Leave it as it is.

    Best Regards,
    SajiSoft

  10. #10
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Open keyboard by ActionScript

    Quote Originally Posted by sajisoft View Post
    Simulating key presses in Flash is a feature introduces in AS 3 & i tried few trick today but not able to make it work. Therefore, the workaround will be:
    1- Create ur own keyboard.
    2- Extend Flash Lite with this feature using native languages coz Python & Symbian C++ supports key simulation (& it needs SwEvent Capability)
    3- Leave it as it is.

    Best Regards,
    SajiSoft
    Thanks Sajid, I think I'll be lazy and leave it as is...
    Unless.... do you know it there a way to force a click at a specific location on the screen using javascript embedded in the actionscript (via getURL ("javascript: ...")??
    Ranco

  11. #11
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: Open keyboard by ActionScript

    I am afraid that even WRT doesnt allow to simulate keys. But do a research in WRT section may b u will find something.

    Best Regards,
    SajiSoft

  12. #12
    Registered User
    Join Date
    Oct 2009
    Posts
    126

    Re: Open keyboard by ActionScript

    Quote Originally Posted by sajisoft View Post
    I am afraid that even WRT doesnt allow to simulate keys. But do a research in WRT section may b u will find something.

    Best Regards,
    SajiSoft
    I'm not talking about WRT, but a direct call to Javascript from flash, using getURL("javascript...". Isn't that possible?
    Best regards,
    Ranco

  13. #13
    Regular Contributor
    Join Date
    Mar 2008
    Location
    Brazil
    Posts
    111

    Re: Open keyboard by ActionScript

    Quote Originally Posted by ranco View Post
    Ok, I'll surely try this later today. Does setFocus() simulates a click or justs sets the control in focus?



    Well, when game ends it switchs to the top 10 scores screen, in which the user has to enter his/her name. There's an input text field that he's suppose to click for the keyboard to open. It is not 100% intuitive - the user easily skips this phase and leaves the current score empty, loosing his place in the top 10 scores. I just want to force him to enter his name, or at least ignore it knowingly...
    thanks,

    Ranco
    Use a popup window (with Ok and Cancel) telling him that the score will be blank if he didn't fill it.

    Best regards,
    Atila Correia
    SCJP, SCWCD, SCJA and MCP C#
    Game Developer and 3D Modeller
    www.atilacorreia.com
    www.linkedin.com/in/atilacorreia

  14. #14
    Nokia Developer Champion
    Join Date
    Jul 2008
    Location
    Pakistan
    Posts
    1,065

    Smile Re: Open keyboard by ActionScript

    Quote Originally Posted by ranco View Post
    I'm not talking about WRT, but a direct call to Javascript from flash, using getURL("javascript...". Isn't that possible?
    Best regards,
    Ranco
    According to my knowledge, JavaScript doesnt has such features like key simulating on S60.

    Best Regards,
    SajiSoft

Similar Threads

  1. Phones should be open...
    By gbraad in forum General Development Questions
    Replies: 1
    Last Post: 2009-10-28, 17:42
  2. Getting Open C++ to work with carbide
    By monoceres in forum Open C/C++
    Replies: 6
    Last Post: 2009-09-08, 18:23
  3. how to open a pdf file using adobe reader through open c
    By gurvindersinghdahiya in forum Open C/C++
    Replies: 0
    Last Post: 2009-07-31, 09:09
  4. Replies: 2
    Last Post: 2009-06-24, 12:51
  5. Replies: 3
    Last Post: 2005-10-12, 05:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×