1 Reply Latest reply on Mar 19, 2007 9:43 AM by ahref

    setting getting manipulating focus

    ahref
      hi again,

      ive decided to do my menus for a game of mine using the list component. I have come across a problem. the player's character is controlled with the arrow keys but i also wish for the menu to be controlled this way. The problem is that when the list component or menu has focus the players character can still move.

      ive tried using get focus and set focus combined with an if to try and make the menu active only when the player has pressed a button. I failed at this however and would now like some help/advice.

      atm i am using this:

      function focus_manage () {
      if(FocusManager.getFocus() =="menu"){
      Player.setFocus();
      }else{
      menu.setFocus();
      }
      }
      _root.FocusManager.setFocus(ship);
      trace(FocusManager.getFocus());

      to try and do this but it is not working. Am i aproaching this correctly. Is there an alternative way to do this?


      thanks in advance