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,
Home_btn1.addEventListener(MouseEvent.CLICK,getMainMenu);
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!
It is not clear where your code is based on what you just wrote, but if you need to talk to a parent timeline you can target it using Movie(parent), as in... MovieClip(parent).myChannel2.stop();
Another way would be to assign an event listener to that movieclip from the main timeline for a custom event and have that movieclip dispatch the custom event when you want to call the function in the main timeline to stop the sound.
The program I am building is a demo of a software program we make, so it basically says "go here...click this...go there...click that." I have a main menu that has 8 btns that go to sections(mc's) with 2 to 12 subsections (each are mc's as well) The home btns that returns you to the MM are at the root level because I don't know how to word the code so go from inside a mc to the root level, and I'm thinking that might be my best solution because when the Home btn is chosen is when the "clicks" keep playing but the narration stops. They don't play going between subsections or when I pause.
North America
Europe, Middle East and Africa
Asia Pacific