Working with sound

Hi I need help with working with sound.
I want to do the sound button, that can change image and change the sound to yes or no.
My problem is when I do the button that doesn´t change image and doesn´t change sound.
I need help to do the button.
Thanks
I want to do the sound button, that can change image and change the sound to yes or no.
My problem is when I do the button that doesn´t change image and doesn´t change sound.
I need help to do the button.
Thanks
Comments
A couple of ways to do this; you mentioned boolean as one of your tags; that'll be one way to go. Let's call the boolean Switch, set to the default false. Let's say you're starting off with your No image
In the rules of the button:
Rule:
When touch is pressed
When Switch is false
Change Image to Yes.png
Play Sound YesSound
change Switch to true
otherwise
When Switch is true
Change Image to No.png
Play Sound NoSound
change Switch to false
This way works by flipping it every touch, which I'm guessing you're after. If you want it to flip on touch pressed and touch released, that'll have to be amended. Hope that's what you're after anyway.
----------------------------------------------------------------------------
iPad app: End of the Earth –•– http://davidgriffinapps.co.uk/
----------------------------------------------------------------------------
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps
I suspect (but am not sure) he simply wants a button that mutes the audio ?
OK, @Sampy, that'll be:
Rule:
When touch is pressed
When Switch is false
Change Image to On.png
Change Attribute game.Audio.Sound Volume to 1
change Switch to true
otherwise
When Switch is true
Change Image to Off.png
Change Attribute game.Audio.Sound Volume to 0
change Switch to false
I wait to see if I've got it right this time! :-)
""You are in a maze of twisty passages, all alike." - Zork temp domain http://spidergriffin.wix.com/alphaghostapps