szabesz's Recent Forum Activity

  • Sorry for the wrong attempt to insert a gif, clearly, I have no idea how I should do that.

    I am not jet allowed to edit my post as this is my second post on the forum. I am sorry for not being able to use the forum properly.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello, Does anyone know how to dispatch a click/touch event from JavaScript so that the PRO UI Button behavior handles it (so that I can trigger a click event on the given PRO UI Button behavior)?

    Something like this (but this one does not work...):

    const event = new C3.Event("Click");
    runtime.objects.myButton.getFirstInstance().behaviors.Button.dispatchEvent(event);
    

    Is it possible at all, somehow?

    What I am trying to achieve is that if I have two sprites one on the other then clicking on them only triggers the Button behavior for the one on the top. I have different behaviors appleid to each sprites and I would like to run both on click/touch.

    Here is what happens currently when I click on the foreground sprite and after that I click on the background sprite:

    szabesz.hu/_dl/who-to-trigger-both-events.gif

    Any ideas how to achive that?

szabesz's avatar

szabesz

Member since 22 Mar, 2018

Twitter
szabesz has 2 followers

Connect with szabesz