Fedia Posted January 31, 2019 Share Posted January 31, 2019 I do everything by the example : this.pauseBtn.on('pointerdown', function (event) { timer = this.time.addEvent({ delay: 10000, callback: hidePopup, callbackScope: this}); }); When compiling it issues an error : Uncaught TypeError: Cannot read property 'addEvent' of undefined. How to fix it? Link to comment Share on other sites More sharing options...
prob Posted February 2, 2019 Share Posted February 2, 2019 You need to bind or reference the original scope of this within your function being called on pointerdown. Link to comment Share on other sites More sharing options...
Recommended Posts