insig Posted January 16, 2017 Share Posted January 16, 2017 Hi, is there a way how I can remove all listener from sprite object? Something like this: var simpleObject = new PIXI.Sprite(myTexture); simpleObject.on("click", function(){ doSomething(); }); simpleObject.on("mouseOver", function(){ doSomething(); }); function doSomething(){ if(iLikeThis) simpleObject.removeAllListeners(); } Quote Link to comment Share on other sites More sharing options...
xerver Posted January 16, 2017 Share Posted January 16, 2017 Does what you have not work? https://nodejs.org/api/events.html#events_emitter_removealllisteners_eventname Quote Link to comment Share on other sites More sharing options...
insig Posted January 17, 2017 Author Share Posted January 17, 2017 My bad. My example works great. Thx and sorry. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.