Jump to content

About unbind mousemove event


Recommended Posts

Hello everyone, I am new to using pixi.js and I have the following problem:


How I can unbind the mousemove event in pixi js?


For example with JQuery would be something like this;

$('#lalala').on('mousedown', function (event) {     // do something     $(this).on('mousemove', function (event) {          //do something     }); }).on('mouseup', function (event) {     $(this).unbind('mousemove');});

As you can see, I want to stop the mousemove event when I call the mouseup event


And as far as I know, with pixi js would be something like this;

STAGE.mousedown = function (event) {     //do something     this.mousemove = function (event) {          //do something     };};STAGE.mouseup = function (event) {     //I do not know what should go here to stop the mousemove event};

I need to stop the mousemove event when I call the mouseup event, but I want to be able to call again the mousemove event when the mousedown event is called and so on.


Please help me. I'm stuck.


Thank you. 

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...