2 Replies Latest reply on Apr 28, 2006 12:44 PM by TimSymons

    create sound

      Any one can teach me how to
      play a sound when button play click ,
      stop the sound when button stop click ,
      mute the sound when button mute click.,

      i try to use attach.sound() but it doesn't work...
      I need it urgently, is there anyone can help?
        • 1. Re: create sound
          Simon Bailey Level 1
          Have you got more code to show?

          Have you also got the sound in your library or loading it in externally?

          If in you library is it identified so actionscript can load it in accordingly?

          Check these points out dude and feed back and will see whats on!

          • 2. Re: create sound
            TimSymons Level 1
            var gSound:Sound = new Sound();
            gSound.attachSound( your_linakge_name_here);
            // or if you want to load an external sound then use gSound.load( url );

            playButton.onPress = function() {

            stopButton.onPress = function() {

            muteButton.onPress = function() {
            if (gSound.getVolume == 0) {
            // already muted, turn back on
            } else {
            // sound is on, now mute it

            This should get you started.