# Controller support in Flash

**URL:** <https://forum.kirupa.com/t/controller-support-in-flash/329063>\
**Category:** flash\
**Created:** [July 17, 2012, 1:43pm UTC](https://forum.kirupa.com/t/controller-support-in-flash/329063 "2012-07-17T13:43:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Quiggz](https://avatars.discourse-cdn.com/v4/letter/q/96bed5/32.png) [@Quiggz](https://forum.kirupa.com/u/Quiggz)\
**Post date:** [July 17, 2012, 1:43pm UTC](https://forum.kirupa.com/t/controller-support-in-flash/329063/1 "2012-07-17T13:43:23Z")

</div>

Hi,

I wanted to make a small game with AS3 which is played with a xbox controller. I’ve made a little test to see if Flash would get the controller at all. Written like this:

```auto

stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyPress)

function onKeyPress(e:KeyboardEvent):void{
    trace(e.keyCode)
}

```

It didn’t trace anything at all. I went googling this issue and ended up in someones blog. He said that he made a library with C which catches the input of the controller and sends it to Flash. But my question is:

Is there a build in solution for this in Flash? Or what is the best approach for movement and interaction with a xbox controller with Flash?

I already know about the existance of JoyToKey and XPadder, but that’s not what I want. I want to avoid that the user has to map the keys for himself.

Thanks in advance,

Quiggz
