click event on mobile devices

0 favourites
  • 7 posts
From the Asset Store
High quality sound effect pack, in the following categories: Simple, negative, pozitive
  • I use click events on an intro screen and a help screen at the beginning of a game. The click event triggers a liteTween event that moves out intro and moves help in and then help is moved out on another click even.

    All works wonderful on the web but when the web page is seen on a mobile device, the click event do not respond.

    I added touch events and select use mouse input Yes. still no joy.

    Any one could tell me what I am doing wrong?

  • replace all your mouse inputs for touch inputs.

  • Will this mess up the event on a PC?

    Basically I am not making a game for mobiles specifically, I am making games that are part of a webpage. Since people surf the web on they iPads and other devices, I want them to work on PC and mobiles as web page elements.

    I am very surprised that a click event would not work on an iPad since in HTML5 they do and I publish as HTML5.

  • "I added touch events and select use mouse input Yes. still no joy."

    that means that touch inputs will also work with the mouse, not that the mouse will trigger touch inputs.

    I'll admit it is tricky to understand at first.

    basically, you need to have touch events with this setting "use mouse input" set to yes for it to work on touchscreens and on mouse clicks.

  • Thanks Aphrodite. I am trying something right now and if it does not work I will try and make a sample to reproduce the problem.

    BTW I did not consider this being a bug but rather a mistake I am making somewhere. Thus I did not submit a bug.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • OK. I made a sample with just my start screens and it is working. So there must be something in the game that is interfering. So I am working on it changing some settings to see if the problem is corrected.

  • Update:

    It is working now. My take.

    As suggested by Chris Dmm on FB:

    Separate the layout for the intro screen from the game layout

    Add the screens on the layer and make it global.

    Voila.

    Not sure why it does not work when the screen are on the same layout though because the code is exactly the same.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)