Like title, you nevertry this? can you help me to do this guys?
Using Joypad (like xbox360) in our games?
You can use third-party applications to map keys to gamepad as is discussed in How to Play Flash Games with a Gamepad.
You can also try your luck with some beta code, but I’ve not messed with it at all. Check out the GameInput
class.
As far as I’m aware, GameInput only works in AIR for TV, which is a shame.
To get joysticks working, you’ll likely need a native extension like this one. Sadly it only works on Windows, so Mac and Linux users will be left out of the loop. You could write your own extension for Macs, though it would take a lot of work.
As for Linux, the last version of AIR released was 2.6, and native extensions were implemented in 3.0. So, again sadly, it is not possible to get joysticks fully working on Linux (as far as I’m aware).
I really hope Adobe considers adding native joystick support. It seems like a strange thing to leave out, especially considering how heavily they’ve been focusing on AIR as a game platform.
I use AutoHotKey all the time to remap keys on my keyboard and controls to better suit the games I’m playing. The scripting language only takes a little time to get the hang of. Plus, its handy for game development also. I have a script right now that compiles a bunch of Ogmo levels into a single XML file. Very handy.
Adobe hasn’t been too committed to progressing Flash as a platform, and as a result, many of the development frameworks (like Unity and Unreal) are dropping support. It’s a shame.