Accessing a game controller (eg 360 pad) in AS3

I’ve begun to program a game in Flash and intend for its controls to be configurable.

I’d like to give the option of using game controllers… however, I haven’t the faintest idea how I’d go about this.

Are there global classes for these things or would I have to find libraries online?

Thanks.