1 Reply Latest reply on Aug 23, 2006 6:49 AM by Newsgroup_User

    Sound button

    lindseyhuth
      I'm trying to build a button in director that can play out of sound channel 2 when clicked then when that same button is clicked again the music stops, then if clicked again it will play again. Like an on / off button. I figured out how to do it with two different buttons, but I'd really like to do it with the same button????

      Thanks,
      Lindsey
        • 1. Re: Sound button
          Level 7
          Here you go. Just change "soundNameHere" to the name of your sound member.

          property pUsage

          on beginSprite me
          pUsage="Play"
          end

          on mouseUp me
          case pUsage of
          "Play":
          puppetsound 2,"soundNameHere"
          pUsage="Stop"

          "Stop":
          puppetsound 2,0
          pUsage="Play"
          end case
          end