onJoystick2Move This page was last modified over 30 day(s) ago and has 0 comment(s)

Back to Input.Joystick Class Summary



xlevel:Number - Percentage of protrusion in the x axis

ylevel:Number - Percentage of protrusion in the y axis

b1:String - Current state of Button 1

b2:String - Current state of Button 2

b3:String - Current state of Button 3

b4:String - Current state of Button 4

An Object

Executes when Joystick 1's directional pad/analogue stick is moved. Number values are returned to x and y, and String values (as "true" or "false") are returned to the parameters b1, b2, b3 and b4 (corresponding to the buttons on the Joystick).

The range of values for the 'xlevel' and 'ylevel' parameters is -100 to 100.

Example Code
mdm.Input.Joystick.onJoystick2ButtonDown = function(myObject:Object){
    var xProt = myObject.xlevel;
    var yProt = myObject.ylevel;
    var b1 = myObject.b1;
    // ... and so on

mdm.Input.Joystick Class Example Downloads
No Example Downloads Available

Registered Users must be logged in to 'MyAccount' to add a Comment - Log In Here
  After Logging In, Click Here to Refresh This Page