BunBunBun Posted March 17, 2015 Share Posted March 17, 2015 I have the sound button graphic in the spriteSheet file, frame names are "soundButtonOn" and "soundButtonOff"this.btnSound = game.add.sprite(10, 10, 'sprite_sheet', 'soundButtonOn');this.btnSound.inputEnabled = true;this.btnSound.events.onInputDown.add(this.muteSounds, this);how to change the texture with frame name 'soundButtonOff'?muteSounds: function () { //this.btnSound.changeTexture('sprite_sheet', 'soundButtonOff'); //something like that?} Link to comment Share on other sites More sharing options...
rich Posted March 17, 2015 Share Posted March 17, 2015 btnSound.frameName = 'whatever' Link to comment Share on other sites More sharing options...
BunBunBun Posted March 17, 2015 Author Share Posted March 17, 2015 Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts