ssCore.Joystick.setPeriod

Allows you to set how frequently joystick state information is sent to Flash.


Availability:

First available in version 3.0 build 2039.


Input Parameters:

milliseconds - [Optional] - Specifies how much time is to elapse between updates, in milliseconds. Default value is 50.


Output Parameters:

No output parameters.


Asynchronous Mode:

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

ssCore.Joystick.setPeriod( 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.setPeriod( paramsObject );


Notes:

The milliseconds parameter must be 1 or greater. If an invalid value is passed in, the default (50) will be used.

Normally you should not need to adjust this parameter. If joystick movement seems sluggish, you may be getting information too quickly to process efficiently. In that case you can use a longer period to receive joystick information less frequently. If joystick movement in your game is choppy, you can decrease the period so you receive joystick information more frequently.

                

Examples:

ssCore.Joystick.setPeriod({milliseconds:100});