right, right, there are two swfs, i overlooked that, yes they can communicate -
you can use the LocalConnection object or even the external interface and add callBacks from one to another:
i'm used to doing it via the external interface:
in the one with sound, set up a function that can get called to stop the sound:
ActionScript Code:
function stopSound():void
{
//do sound stop
//this functions code can be similar to the code you have on the stop button
}
//then set up a external interface callback that when called will invoke the above function
if (ExternalInterface.available) {ExternalInterface.addCallback("stopTheSound", stopSound);}
//now, this part is a bit fiddly , but you need to call a javaScript function that will call stopTheSound
//on the swf , so in your wrapper you'll have a function like this:
Code:
<script type="text/javascript">
function callForTheSoundStop()
{
//it may take more than this to reference your swf, this is a general example
document.getElementById("theIdofYourSWF").stopTheSound();
}
</script>
ActionScript Code:
//now, right before the second swf is to be unloaded, call:
ExternalInterface.call("callForTheSoundStop");
//and that should work, however i'm not sure how the fact that it's a swf inside a swf will effect things
//but that's a general solution and how i do things
//the normal way is via the LocalConnection