2 Replies Latest reply on Apr 24, 2008 8:28 AM by skn154

    sound

    skn154
      Hello there,

      When a user clicks on a button, I would like a sound clip to play, but I don't want it to play each time the user clicks. So if the user clicks on the sprite for the first time, the sound plays, but if they click again, I don't want the sound clip to play.

      also if the user click on the sprite for the 5th time for example, can a different sound clip be played?

      Last question: Can anyone give me advice on how to create a timer? I want to create a countdown from 1 minute. When the countdown has reached 0, I want to go to to a different section on the score.

      Thanks for your help
        • 1. Re: sound
          Level 7
          behaviour script on the button:

          property pTimesPressed

          on beginSprite me
          pTimesPressed=0
          end

          on mouseUp me
          pTimesPressed=pTimesPressed+1
          case pTimesPressed of
          1:
          puppetSound("AudioMemberForThe1stPress")
          5:
          puppetSound("AudioMemberForeThe5thPress")
          end case
          end

          --------------

          There is a countdown behaviour in the built in library that I think will
          do what you want for a countdown timer.
          • 2. Re: sound
            skn154 Level 1
            Thank you!!! :D