Announcement

Collapse
No announcement yet.

Key mapping

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Key mapping

    Hi!

    I would like to ask if someone knows how to map keys in Scaleform. I mean, the scrolling list is used with the Up, Down, Left, Right and Enter keys and I would like it to be used with the W, S, A, D and E keys (and, of course, with the Xbox Controller).

    Regards!

    #2
    yeah I know how I will teach you if you make a tutorial of it

    Comment


      #3
      If you know how to do that, why don't you make the tutorial?

      Comment


        #4
        I have no patience for writing those things. Anyways sounds like you're talking about FocusHandler.as that's inside the development>Flash folder gfx>managers... if you're talking about remapping focus and not talking about keybinding. Look into the function handleInput() and uncomment those traces. For editing this, just look for the things you want to change:

        Code:
        				var dirH:Boolean = (nav == NavigationCode.LEFT || nav == NavigationCode.RIGHT);
        				var dirV:Boolean = (nav == NavigationCode.UP || nav == NavigationCode.DOWN);
        or
        Code:
        			case NavigationCode.UP:
        				if (!actualFocus.multiline) { return false; }
        			case NavigationCode.LEFT:
        				return (position > 0);
        			case NavigationCode.DOWN:
        				if (!actualFocus.multiline) { return false; }
        			case NavigationCode.RIGHT:
        				return (position < TextField(actualFocus).length);

        Comment


          #5
          Look through InputDelegate.as in the same folder for a list of keys for the controller and keyboard

          Comment


            #6
            Xbox controller should already be working if you use CLIK buttons and you can map your own keys by using a actionscript key listener like

            Code:
            stage.addEventListener(KeyboardEvent.KEY_DOWN, key_down);
            
            
            function key_down(keyEvent:KeyboardEvent)
            {
                if (keyEvent.keyCode == 32) //32 is ASCII CODE FOR SPACEBAR
                {
                      //DO SOMETHING HERE.
                }
            }
            Hope that helps.

            P.S. Also there was a tutorial for Xbox controller keys for scaleform in the UDN somewhere.

            Comment

            Working...
            X