-- Xtras for Macromedia Director --
Laurent Cozic, freextra@laposte.net
Last updated 21 September, 2003 

- Joystick

This Xtra allows using some simple functions to control a game device such as a joystick or a game pad.

Download Joystick Xtra (57 K)

Available functions: 
Name	Description	Input	Output	
useJoy	Use the specified joystick.	<integer> Joystick ID (from 1 to numberOfJoy)	<boolean> Return TRUE if the specified joystick is available.	
button	Test the state of a button.	<integer> Button ID (from 1 to buttonCount)	<boolean> Button state (TRUE if it's pressed, FALSE otherwise)	
xPos	Return the X position of the analogic axis.	(no input)	<integer> X Position (1st axis)	
yPos	Return the Y position of the analogic axis.	(no input)	<integer> Y Position (1st axis)	
zPos	Return the Z position of the second analogic axe.	(no input)	<integer> Z Position (1st axis)	
rPos	Return the X position of the second analogic axis.	(no input)	<integer> X Position (2nd axis)	
uPos	Return the Y position of the second analogic axis.	(no input)	<integer> Y Position (2nd axis)	
vPos	Return the Z position of the analogic axe.	(no input)	<integer> Z Position (2nd axis)	
numberOfJoy	Return the number of connected joysticks.	(no input)	<integer> Number of joysticks.	
buttonCount	Return the number of buttons.	(no input)	<integer> Number of buttons	
axeCount	Return the number of axes.	(no input)	<integer> Number of axes.