7 Replies Latest reply: Jun 26, 2012 11:10 AM by Ned Murphy RSS

    Sound continues to play after leaving movieclip

    mgjacob117 Community Member

      I have some sound loaded with AS3 in the first frame of the mc(s):


      var mySound:Sound = new Sound();

      var myChannel:SoundChannel = new SoundChannel();

      var lastPosition:Number = 0;

      mySound.load(new URLRequest("narration/43_Pres.mp3"));

      myChannel = mySound.play();


      when you click the home btn to go back to the main menu the narration stops,



      function getMainMenu(evt:MouseEvent):void {stop(); SoundMixer.stopAll(); gotoAndStop(2);}


      but the sounds that are loaded in later frames keep playing


      var mySound2:Sound = new Sound();

      var myChannel2:SoundChannel = new SoundChannel();

      mySound2.load(new URLRequest("narration/CLICK.mp3"));

      myChannel2 = mySound2.play();


      I tried adding the main part of the above to the first frame and just the last line to the frame that needs the clicks, but that still did not work.


      I'm a novice at this and it's driving me crazy that I can't fix the problem. HELP!