My favorites | Sign in
Project Logo
                
Search
for
Updated May 24, 2009 by cwoffenden
Labels: Featured, Phase-Implementation
API  
JavaScript API

JavaScript API

The plug-in currently works with Firefox, IE, Opera and Safari on Windows, and Safari on OS X. The API is the same across all browsers.

Methods

booleansetDevice(int index)
Select the game device the plug-in instance is connected to; returns true if a controller is connected.
int getDevice()
Returns the index of the game device currently set.
booleanisConnected()
Returns true if a controller is connected.

Properties

int x
Joystick x-axis.
int y
Joystick y-axis.
int z
Throttle (or z-axis).
int r
Rudder (or r-axis).
booleana
true if the A button is pressed (the A button can be reassigned to any of the controller's buttons)
booleanb
true if the B button is pressed (the B button can be reassigned to any of the controller's buttons)

Embedding

For IE (or other ActiveX containers) the class ID is 3AE9ED90-4B59-47A0-873B-7B71554B3C3E. For all other browsers the MIME-type is application/x-vnd.numfum-joystick. Sample code to follow.


Comment by Serge.Kolgan, Jul 27, 2009

How one can join this project? I'm willing to be a beta-tester/contributor.

Comment by cwoffenden, Dec 11, 2009

You can drop me a mail and we can take it from there (if you're still interested?). It's my name at gmail.com.


Sign in to add a comment
Hosted by Google Code