Mobile Click/Touch Event Listener?
Hello,
I have been trying to get my game to work on both a PC browser and mobile device. My game simply involves the user clicking the screen if the gameobject is within range of its target, quite simple. However I have noticed when I click with the mouse or press with a mobile device the action only registers when i release/stop touching the mobile screen, this is very detrimental to the game as you have to be rather fast to hit an object.
Currently I have:
this.screen_hs.addEventListener("click", fl_MouseClickHandler2.bind(this));
function fl_MouseClickHandler2() {
//do action
}
For the mobile interaction i have tried the following with no luck:
createjs.Touch.enable(stage);
this.screen_hs.addEventListener("touchstart", f2_MouseClickHandler.bind(this));
function f2_MouseClickHandler(){
//do action
}
This code does absolutely nothing!
I was convinced this was the way forward however nothing seems to be working, can anyone point me in the right direction please?!
