1 Reply Latest reply on Apr 6, 2012 9:05 AM by GKelly642

    Mute Buttons

    GKelly642

      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.