1 Reply Latest reply on Jul 14, 2006 10:56 AM by jfishman03

    Help with wav file, stop and play buttons

    jfishman03
      Hey everyone,

      I'm new to actionscript, and flash for that matter. I created a new flash file, and a new layer. On that layer I put 2 buttons, btnPlay and btnStop.

      I found some code on this forum, and tried it, but it isn't working. The code is below. I get no errors, but when I test the movie, it doesn't play any music. I selected this layer, selected frame 1, and put this code in the actions window.

      mySound = new Sound();
      btnPlay.onRelease = function () {
      mySound.attachSound("adagio");
      mySound.start(0);
      }

      btnStop.onRelease = function() {
      mySound.stop("adagio");
      }

      I should also note, I have another layer with a movie clip on it, and another layer with a picture on it.

      Any help would be appreciated,
      Thanks,
      Jesse