FlashJoystick is an application developed in C++ and DirectX 9 that allows a user to play Adobe Flash games using the Xbox 360 controller. Bundled with FlashJoystick is the JoystickMapper which allows a Flash developer to map out controls for their Flash games as well as the FlashJoystick Utils component to add rumble support in Flash games. On this page you will find updates and help on how to use, install, and develop with FlashJoystick.

System Requirements Top


Using FlashJoystick Top


FlashJoystick allows a user to play Flash games with an Xbox 360 controller.
FlashJoystick is automatically associated to the file type *.fstick (hehe...fstick). Double clicking on a local fstick file or opening an fstick file from the internet will automatically run FlashJoystick. FlashJoystick runs in the system tray and will notify you via tooltip bubbles over the system tray when mapping files are loaded, joysticks are activated or deactivated, etc. You can also run FlashJoystick by clicking on Start and going to Programs->PillowFort->FlashJoystick->FlashJoystick. For games with rumble functionality, FlashJoystick must be running before the game is loaded. If the FlashJoystick program is not running when a game is started, rumble functionality will fail but movement and button mapping will work. Simply refresh the page and rumble will be enabled.
By right clicking on the tray icon, you can close the application by selecting Quit.
To load a mapping file, you can either open any .fstick file or you can right click on the system tray icon and select Load Mapping.
Once a mapping file is loaded, you can view the file to see the button configuration currently loaded. Right click on the system tray icon and select View Mapping. Once the mapping file is displayed you can load or save .fstick files from that dialog.
To load a file while in the mapping view, click Load Mapping, select the file you want to load, and hit Ok.
To save the currently loaded mapping file, click Save Mapping, select where you want to save the file, and hit Ok.
Right clicking on the system tray icon and selecting Check for Updates will bring you to this website to see if a new update is avaliable.

Using JoystickMapper Top


The JoystickMapper application is used by a developer to map buttons used in their Flash application for use with Flash Joystick. At this time, there is only mapping support for one joystick. This will be updated in the next release to allow mapping for up to 4 controllers.
To run JoystickMapper click on Start and go to Programs->PillowFort->FlashJoystick->JoystickMapper
To map a button, click on the gray box associated with the button on the joystick and press any keyboard or mouse button and it will associate that keyboard or mouse button to the joystick button. To delete a key mapping hit the Delete key. Next to each gray box is a white box. This is used to give each button mapped a friendly name. The friendly name is displayed when a user selects View Mapping from the FlashJoystick system tray icon. Each friendly name can be up to 16 characters.
The circles under the Left and Right joystick mapping sections allow you to map keys to the up, down, left, and right directions of the Joystick. These will work just like any other joystick meaning that in the left joystick mapping below, when a player presses the joystick in the diagonally up right direction, the FlashJoystick will send both the W and D keys to the Flash application.
To have the left or right joystick emulate mouse movement, Click one of the checkboxes in the options box. Only one joystick can emulate mouse movement. The MouseSpeed slider allows you to control at which speed the mouse will move.
To load a joystick mapping file, click on Load Mapping, select the .fstick file to load, and hit OK. To save a joystick mapping file, click on Save Mapping, select where to save the file, and hit OK. The Mapping Name field is a field to provied a friendly name for the mapping file to be displayed when a user selects View Mapping.

Installing the FlashJoystick Component Top


FlashJoystick.swc is located in the FlashComponent directory. It is not required to use the joystick, but is required when developing to add rumble functionality to your Flash CS3 applications. At this time the component is only built for Flash CS3. Support for older versions of Flash will be added as time goes on. To install the Flash CS3 component included with the install, copy FlashJoystick.swc from DirectoryYouInstalledFlashJoystick/FlashComponent/ and in XP move it to:
For Vista move it to:
Once you have copied the swc file to the components directory, restart Flash and look in the components tab. You should see FlashJoystick Utils v1.0 under Standard Components in the Components tab.

Using FlashJoystick Utils in your Flash Application Top


Due to Flash security policies, when testing on a local machine, you will get this error:
This problem is fixed by hitting the settings button, and adding the directory where your flash movie is into into the Global Security Settings tab. You will have to take out any %20's out of the path as the Flash Player settings does not recoginze the %20 as a space. This isn't an issue online. Players of games online using FlashJoystick Utils will not have to do anything to get this to work. This is a local security setting.

To use the component in your Flash application, simply move the component to the stage. Once it is on the stage, give the newly dragged component an instance name.
Once you have given the component an instance name, it is ready to use. As it stands right now, FlashJoystick Utils only has one function, Rumble. Rumble allows a developer to send a vibration message to a specific controller. Below is the function definition in the component:
/**
Sends a rumble command to a joystick
@param[in] playerIndex player that should get the rumble this should be between 1 and 4
@param[in] leftMotorSpeed value between 0 and 100 defining the intensity of the left motor
@param[in] rightMotorSpeed value between 0 and 100 defining the intensity of the right motor
*/
public function Rumble(playerIndex:int, leftMotorSpeed:int, rightMotorSpeed:int):void
In the example below, joystick one will rumble at 100% power on the left and right motor.
joyUtil.Rumble(1,100,100);
This will rumble at full power until the developer sends another message to turn off the rumble on that joystick. This can be done like this:
joyUtil.Rumble(1,0,0);
At this time, there is only mapping support for one joystick. This will be updated in the next release to allow mapping for up to 4 controllers.

Version History Top


Version 1.1 Jan. 30th, 2008
Fixed a problem with unicode mapping. Should work for just about anything including Off-Road Velociraptor Safari
Version 1.1 Jan. 4th, 2008
Improved communication between FlashJoystick and FlashJoystick Utils component
Added mouse speed variable to UI
Fixed problem with repeating buttons being sent
Version 1.0 Jan. 3rd, 2008
Initial Release