Tony Polinelli
Tarwin Stroh-Spijer

contact [at]

6/25 Easey Street
Collingwood, 3066
Vic, Australia

+61 3 8060 5321

Joystick / Joypad in Flash

I’ve always wanted to use a Joytick with my Flash games.

A while ago I was working on small game for Lorial – in-store advertising for Biotherm – through a great company Eness. It was a simple “catch the falling objects with a timelimit game” made in Flash, but needeed to be controlled using a joytick as it had to be simple and easy to use for anyone walking through Myer.

After a little research I found the amazing program AutoHotKey. This lets you specify macros to do things like using a joystick as a mouse or keys, or pressing a combination of keys and starting a program. Using this amazing peice of software (Windows only sorry) and hacking around with some of their joystick input exampels it was easy to map joystick movements and buttons to the arrow keys and “A” on the keyboard, which were then read by Flash.

On a recent game I’ve been working on (Scarygirl) I’ve found that user testing on the keyboard really gets in the way of the gameplay itself, especially for those not used to games. It was a lot easier to hand them a Playstation 2 DualShock controlller attached via a USB converter and have an AutoHotKey script running that converted the D-Pad and buttons to input. The hardest part of this is finding which button on the controller relates to what input into windows. The easiest way I found to work with this was Start->Control Panel->Controllers and just writing down a list of buttons as I pressed them.

So yeah. Easy. And fun. Some games are just so much better with a good controller – just never let me catch you playing an FPS on a console!


  1. jorge

    Hi, I’ve been trying to control a flash game with a Joypad.
    I managed to create an script to capture the direction buttons of the joypad and send left, right, up, down to notepad or the browser, but in flash doesn`t.
    ¿Any clues?

  2. when you test the movie in flash, look under control>disable shortcut keys in the top menu. You might need to turn that on to get keys working properly- otherwise flash hijacks some of them :P

  3. Hi – first off I’m going to say that scarygirl looks absolutely amazing! Well done and I look forward to playing it. I completely agree with you about Flash + Joystick = brilliant, and I’m definitely going to have a play with Auto Hotkey, but I’m sure you’ll agree that Adobe need to make it work in the browser – check out my little “campaign” on my blog:

    Wishing there was an easy way to bring Flash games to consoles too – Scarygirl would rock on Xbox Live arcade. I’m learning C#/XNA so that I can get round this.

  4. Comments should now be seeable!

  5. In the past I’ve used a Japanese program called joy2key to use controllers in Flash. It’s got a really easy to use interface, usually takes a couple minutes to setup the key mapping.

    This Scarygirl game looks friggin awesome! I found this place from a concave shape discussion on the motor2 source page.

    Looking forward to seeing the game release!

  6. yeah this is awesome. nice game buddy. ;)

  7. josemym

    There is a new program that is useful for games in offline mode. It´s Flash Game Station and the web is you can use the joystick and can play in full screen mode.


Leave a Reply

Our Friends:

Powered by haXe / poko cms | Copyright 2008-09 TouchMyPixel