Why not use the Button’s Transition property to set the SpriteFrame and you don’t need to care about the TOUCH_START event. And Button also has a event handler property for you to register a callback to do the heavy lifting.
Yes, thanks, I’m using it, but I have a quick question, I understand that I can use the AudioSource Component attached to the Button Component, so I managed to changed the Pressed State to pause music, as well as Pressed State - Music Off Sprite, however, how can I add another Target, to resume music? If I add 2 click events, and add pause and resume, the music will just keep on playing…when I pressed the button? Any thoughts? God Bless…
I dunno if this is a good practice but you can add the button sprite as a property to your main game component, then write the function to turn off the music in the game components script and within it set the spriteframe for your button using the property. of course that function then has to be called upon button action.
i’m using a similar method to load itemsprites onto a cursor conditionally and it’s really quite simple