JOYX

Top  Previous  Next

Syntax

INT = JOYX(OPT device as INT)

Description

Returns the current X axis position of a joystick device.

Parameters

device - Optional device number. Default is 0 or the first joystick attached to the system.

Return value

The current position of the X axis.

Remarks

A screen must be open or DirectInput initialized manually before using this function. The range of an axis is set by the SETJOYSTICKRANGE function.

See Also: JOYY, JOYZ, SETJOYSTICKRANGE

Example usage

pos = JOYX