0 Replies Latest reply on Jul 6, 2008 5:31 PM by CBrasfield

    ToggleButtonBar and key events

    CBrasfield Level 1
      Okay, first off, I have a togglebuttonbar that is linked to a viewstack.

      I have a function that is initialized when the app loads. It's purpose is to listen for keyboard events. stage.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);

      I then have an if statement for a specific key press and switches states. This works all fine and dandy for the first viewstack/button the togglebar (that's where the state is being changed). However, when I click on another button in the togglebar and return to the first view, the keys no longer work. I've tried adding the creationComplete and click commands to the togglebuttonbar, but to no avail.

      Any suggestions?