Jump to content

How to trigger both touch and click events?


finkophonium
 Share

Recommended Posts

Hi,

 

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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