ssCore.Joystick.getInfo

Retrieve joystick capability information.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

None.


Output Parameters:

result - Joystick and port information, in XML format.


Asynchronous Mode:

When this method is called asynchronously, a return object containing the output parameters is passed to the specified callback function.

ssCore.Joystick.getInfo( paramsObject [, callbackParamsObject] [, errorParamsObject] );


Synchronous Mode:

When this method is called synchronously, a return object containing the output parameters is returned to the caller immediately.

var returnObject = ssCore.Joystick.getInfo( paramsObject );


Notes:

The joystick information is returned in XML format with a joystick node for each installed joystick that contains information such as the type of joystick, number of buttons, number of axes supported, etc. as in the example below (line breaks have been added to improve readability).

<joysticks>
    <joystick
        id='0'
        name='2-axis, 4-button joystick'
        oem=''
        mid='0000045E'
        pid='00000103'
        axes='2'
        maxaxes='6'
        buttons='4'
        maxbuttons='32'
        hasz='0'
        hasr='0'
        hasu='0'
        hasv='0'
        haspov='0'
        haspov4dir='0'
        haspovcts='0'
        x='0,65535'
        y='0,65535'
        z='0,65535'
        r='0,65535'
        u='0,65535'
        v='0,65535'
    />
</joysticks>

If no joysticks are installed an XML tree with no <joystick> nodes will be returned.

<joysticks>
</joysticks>

                

Examples:

var return_obj = ssCore.Joystick.getInfo();

ssDebug.trace(return_obj.result);