Mouse does not release

0 favourites
  • 4 posts
From the Asset Store
The underworld has released another villain who is more menacing than ever before!
  • Hi Scirra.

    I dont know if this is a bug or something else but i dont know where else to get help for my problem.

    I already tried the "how do i" section, but no answers there.

    The folowing link brings u to my game.

    Test

    The problem is this:

    When the player holds down the mouse button and moves the mouse outside of the iframe and then back in to the game area "stil holding down the mouse button".

    Then that mouse button wil be down infinite within the game.

    So u can release the mouse button with your finger, but it doesnt release the event in the game.

    The Green square sprite is set to move to the mouse X&Y when mouse button is down.

    And not to do that when mouse is released.

    However, due to this bug the green sprite keeps comming towards the mouse after the player got his mouse button down and outside the iframe.

    Here is my CapX

    I wonder how to solve this iframe bug, if it has to do with that?

    Any help would be great!

    Kind Regards.

    Savvy001

  • I cannot reproduce any issue in Chrome if I press the mouse down, move it outside then back in again, then release. It seems to work correctly. The only issue is if you press inside, drag outside, then release. The game doesn't receive the mouse up event, so still thinks the mouse is down. Then you have to click inside the game to get it working again.

    I'm not sure what can be done about this - AFAIK the browser just won't send the mouse up event. Perhaps you could try playing with some iframe attributes like seamless or sandbox...

  • I wil google what seamless or sandbox means and can do for me.

    At my own pc i can't get the mouse up to work even after i click inside the game to get it working.

    Well, the mouse does release, but the green sprite still keeps moving towards the mouse infinite.

    So the green sprite event does not see the mouse releasing.

    Only the text that displays mouse down and mouse released functions properly.

    Il be looking in to the Tips.

    Thanx!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So, it seems to be a physics problem.

    The text object does reset after i click the mouse again when in the iframe.

    The "apply force to sprite" event on mouse down does not.

    I tried the iframe solutions but they did not work for this issue.

    I solved it by setting the events to check if the textobject displays "Mouse down".

    Because the text object does reset after a click, when the mouse is in the iframe again,

    So its solved for now.

    But its still a strange iframe/physics object issue

    Thanx for the help!

    Kind Regards

    Savvy001

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