I'm having some issues with touch and how to confine an object in touch to a certain area. This requires the use of touch commands as 2 touches at the same time need to be present when the problem occurs.
Dropbox Capx - https://dl.dropbox.com/u/74175978/Construct/Analog_Issues.capx
Dropbox CoccoonJS - https://dl.dropbox.com/u/74175978/Construct/newproject.zip
Above you'll find the capx and an extracted cocoonJS.
(Instructions on how the game currently works)
In my game I move an object labelled "Analog_Area" to where the users touches the screen and another object labelled "Analog_Stick" to the same place.
After the initial touch the user is unable to move the Analog_Area but is free to move the Analog_Stick, this allows the player to move the on screen sprite.
The button on the right side of the screen labelled "Analog_Jump" allows the player to jump.
The large green box is the only area the controller is allowed to appear.
(Problem and how I expect it to work)
My problem is when the user touches and holds the jump button and then tries moving, the movement analog positions itself on the right hand side of the screen, no longer on the green touch area.
I have tried to lock it to the touch area but I can't seem to figure out how.
Any help on this issue would be appreciated.