# Playing sound in loaded layer problem

**URL:** <https://forum.kirupa.com/t/playing-sound-in-loaded-layer-problem/155208>\
**Category:** Uncategorized\
**Created:** [July 15, 2005, 1:09pm UTC](https://forum.kirupa.com/t/playing-sound-in-loaded-layer-problem/155208 "2005-07-15T13:09:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sci](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sci](https://forum.kirupa.com/u/sci)\
**Post date:** [July 15, 2005, 1:09pm UTC](https://forum.kirupa.com/t/playing-sound-in-loaded-layer-problem/155208/1 "2005-07-15T13:09:06Z")

</div>

Hello,

I’m sure this question was covered before, please forgive me if so.

I’ve created a flash movie that loads content into seperate layers. One of these layers is called music.swf and contains sound in the library. I’ve created a stop and start button and have attached the sounds to these with the following script:

mySound\_sound = new Sound ();  
mySound\_sound.attachSound(“setemID”);  
startButton\_btn.onRelease = function (){  
mySound\_sound.stop();  
mySound\_sound.start();  
};

stopButton\_btn.onRelease = function (){  
mySound\_sound.stop();  
};

mySound\_sound2 = new Sound ();  
mySound\_sound2.attachSound(“didID”);  
startButton2\_btn.onRelease = function (){  
mySound\_sound2.stop();  
mySound\_sound2.start();  
};

stopButton2\_btn.onRelease = function (){  
mySound\_sound2.stop();  
};

this is all working perfectly. However when I load this music.swf into my main movie (into a layer) it no longer plays the songs.

I’m a bit thick at the 'ol actionscript so if you can find the time to give us a hand it would be really appreciated.

many thanks
