Skip navigation
Currently Being Moderated

Mute Buttons

Apr 4, 2012 7:35 PM

Hello again bound to be getting used to me by now lol. Basically, i want to make a mute facility for the sound in a game controlled via a single button. The button changes member depending on its state ie. If its muted it will have the button with the image of a speakerphone with a line through it or if sound is playing it will have the image of a speakerphone.

So if the button is in the mute state(no sound) and it is clicked the sound will start playing again and if the button is in the unmute state (sound playing) the sound will stop.

How would i go about doing this?

 

Pseudocode:

on mousedown

     if currentmember = mute button is clicked then

          Sound1 played    

          Sound2 played    

          Change member to unmute button

     end

     if currentmember = unmute button is clicked then

          Sound1 stops    

          Sound2 stops

          Change member to mute button

     end

end

 

Thanks for any help, been trying this for a few hours getting absolutely no where although i think the above pseudocode is correct or at least close.

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points