#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2011
    Posts
    3
    Rep Power
    0

    Navigation with the keyboard


    Hi,

    can anyone help me how to change the focus of movieclips and buttons when I press the arrow keys of the keyboard. Its kind like the tab navigation but with de arrows keys, in the four direcctions.
    This flash app i'm developing has to be handled 100% with the keyboard.

    Thanks in advance...
  2. #2
  3. No Profile Picture
    Gotta get to the next screen..
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2003
    Location
    Legion of Dynamic Discord
    Posts
    6,678
    Rep Power
    3165
    Hi, I think you can use the FocusManager class to do what you're after.

    That will let you set the focus to a particular control based on its instance name but you will still have to write the code that works out what control you are currently on and which are in each direction relative to that particular one.
    Quis custodiet ipsos custodes?
  4. #3
  5. No Profile Picture
    Gotta get to the next screen..
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2003
    Location
    Legion of Dynamic Discord
    Posts
    6,678
    Rep Power
    3165
    Also; using the arrow keys is problematic if you have arrow-sensitive components on the stage like TextFields or scrollers. Imagine you arrow over to a TextField. The user then presses the right arrow. How do you know if the user meant to move the cursor right in the TextField or if they meant to move to the next control.
    Quis custodiet ipsos custodes?

IMN logo majestic logo threadwatch logo seochat tools logo