Jump to content

How to trigger both touch and click events?


Recommended Posts



I'm trying to write a mobile game using Phaser and CocoonJS, but I'm having some trouble getting touch events to fire. Right now I have a very simple event set up as follows:

game.input.onDown.add(click, this);

with "click" being the function used to handle interactions. This works fine in the browser, but it isn't triggering at all with touch. Is there some other input I'm supposed to be using for touch events? Or, better yet, an event that recognizes both click and touch events? I've also tried using

game.input.touch.touchStartCallback = click;

but I had no luck with that either. Any help would be appreciated.

Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...