Hi,
This is a more or less complete revision of the Joystick object in Android, includes an example where it will be possible to be seen all mentioned here.
Frame properties
When you go from “joystick” to “controlled by an extension” fire 1 and 2 get disabled but the checkbox is not resetted.
General comment, the ” End application when not in foreground” is not working in project that use the joystick and accelerometer.
Actions
Accelerometer
Start accelerometer joystick
Stop accelerometer joystick
Try to use this configuration with no success, the accelerometer object was added to the frame, and in the frame properties was set for frame 1 with accelerometer and for frame 2 with controlled by extension with no success, also the start accelerometer as joystick was executed as action.
Using the acelerometer as joystick does not work for me though, I don´t know if this is the correct setting, adding both object to frame and make the frame controlled by extension.
Touch joystick
Start/stop touch joystick
Using controlled by an extension this action is working as expected.
-----------------------------------------
Set joystick position
Set joystick X coordinate
Set joystick Y coordinate
-----------------------------------------
Set button 1 position
Set button 1 X coordinate
Set button 1 Y coordinate
-----------------------------------------
Set button 2 position
Set button 2 X coordinate
Set button 2 Y coordinate
Set Joystick and buttons position is referenced to the screen and not to the frame, you may test this in frame 3, also the position is referred to the middle bottom of the images that correspond to the “back” “Fire1” and “Fire2”in joystick images.
Set joystick mask
The all masks for filtering the joystick are working Ok.
Expressions
Touch joystick
X Coordinate
Y Coordinate
Button 1
X Coordinate
Y Coordinate
Button 2
X Coordinate
Y Coordinate
All expression do required an open parenthesis in the string formula, XJoystick, FireOne, FireTwo,….
All the position returned are not in the real position of the joystick, for instance in the frame 3 you may see that asking to position the joystick at 0,0 of frame and correspond to the screen, also when you ask to set at the middle which is; 400, 240 you get this position (which seems to correspond to the screen)
But the hot spot is the middle bottom.
The Condition include in Joystick
All the continuos events does work Ok
Repeat while (Player 1) Moved top
Repeat while (Player 1) Moved right
Repeat while (Player 1) Moved down
Repeat while (Player 1) Moved left
Repeat while (Player 1) Pressed fire 1
Repeat while (Player 1) Pressed fire 2
Repeat while (Player 1) Moved up+right
Repeat while (Player 1) Moved up+left
Repeat while (Player 1) Moved down+left
Repeat while (Player 1) Moved down+right
But the event- based conditions does not works
(Player 1) Moved top
(Player 1) Moved right
(Player 1) Moved down
(Player 1) Moved left
(Player 1) Pressed fire 1
(Player 1) Pressed fire 2
(Player 1) Moved up+right
(Player 1) Moved up+left
(Player 1) Moved down+left
(Player 1) Moved down+right
(Player 1) No joystick action




