0 Replies Latest reply on Jun 28, 2007 12:04 AM by gigasaurus

    onSoundComplete no longer working

    gigasaurus Level 1
      I had some old MX MP3 streaming code that I used dependably for a long time. I have some cfm pages that display large lists of audio clips that you can click on and play, and recently these pages have started having Flash9 player errors show up, and the browser crashes.

      I figured the old way I was handling the sound must have been the problem, so I opened it in Flash8 and switched:

      play_sound = new Sound(playsound);


      var play_sound:Sound = new Sound();

      I had to change the ActionScript pulldown to ActionScript2 on the publish settings, and it plays.

      The problem is my old "onSoundComplete" doesn't respond anymore.

      I'll put an example of how the code looks at this stage.

      Frame 5 looks like this:

      playbutton.onRelease = function() {
      // ** this was my old code below
      //play_sound = new Sound(playsound);
      // ** the line below is my new code
      var play_sound:Sound = new Sound();
      play_sound.loadSound("audio/"+StreamSound+".mp3", true);

      Frame 6 looks like this:

      play_sound.onSoundComplete = function() {

      Could someone please help me figure out what I'm doing wrong?

      Maybe I'll find out the intermittent crash thing had nothing to do with the way I'm starting the sound.