Game Controler

Ok so I have recently bought a game controller, it works with my computer, but I would like to integrate it into a Action Script project, how would I go about doing this?