marius98 Posted October 3, 2018 Share Posted October 3, 2018 Hi! I just made an button. I want to change his texture when that button is pressed and change it back when i release the mouse, for that i use pointerup and pointerdown but is slow, i use an old pc, when i try my code in a better pc works great. My questions are: Why is slow on my slow pc, is this normal? There is a better way? var buttonCancel=this.add.sprite(122,1038,'megaset',"Button.png"); buttonCancel.setTint(0xf858f5); buttonCancel.setInteractive(); buttonCancel.on('pointerdown',function(){ this.setFrame("ButtonApasat.png"); }); buttonCancel.on('pointerup',function(){ this.setFrame("Button.png"); }); Link to comment Share on other sites More sharing options...
Recommended Posts