Demonstration of the AIRGamepad API (video: https://www.youtube.com/watch?v=n_-B9ADlmcM)
In order for this to work you will need to include the gamepad.swc file from the AIR 15 sdk (found in frameworks/libs/air). Add this swc to the lib folder and right-click, Add To Library in FlashDevelop.
You will also need Adobe AIR installed on your Android Device. Shake the device to bring up the gamepad screen and copy the PIN into the desktop app, click connect and you're good to go.
Blog Post: http://rhuno.com/flashblog/2014/08/19/airgamepad-example/