Jump to content

[Touch] drag event on holdDown


Recommended Posts



I need to track the pointer position when someone is holding and moving his finger.

I tried a combination of things but none work.


Here is 2 that does not work:


Listening to events:

    this.drawing = this.game.add.sprite(0, 0, this.bmd);    this.drawing.inputEnabled = true;    this.drawing.events.onInputUp.add(this.onInputUp, this);    this.drawing.events.onInputDown.add(this.onInputDown, this);

onInputDown is not trigger while the finger is moving


Checking bool on update:


update: function(){    for (var i = 1; i <= 10; i++) {      if (this.game.input["pointer" + i])        console.log( this.game.input["pointer" + i].isDown );    };

This is always false.



I am out of ideas, does anymore knows how to do what I need?


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.

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.


  • Recently Browsing   0 members

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