Question about audio from child loaded swf files

Hello,

I’m trying to figure something out and would really like some input on this. I have a swf (file1.swf) and that loads another swf (file2.swf). In file1.swf, I have a SoundMixer that controls the overall volume. file2.swf has the ability to load another swf (file3.swf) and file3.swf has the possibility of loading file4.swf. file1.swf doesn’t necessarily know that file2.swf is loading the other swfs, but those other loaded swf files can contain audio.

It’s my understanding that the SoundMixer in file1.swf controls the volume for all child swf files but i’d like to know if there are any possible ways that audio from file2.swf - file4.swf can have audio come through if file1.swf has the volume set to 0.

Your responses are appreciated.

SoundMixer is for controlling the entire application, so it affects everything. If you want something not to be affected, then you would want to not use SoundMixer and instead delegate your audio handling to only those sounds you want it to affect (those in file1). As far as I know, there’s no special filter which says: only affect the sounds in this file. Its either affect them all, or use whats available to each individually through SoundChannel.

Thanks for the response. This was my understanding as well. I set the SoundMixer on my application in file1.swf to 0, but i’m still hearing sound from other swf files that file1.swf is loading. I’m trying to figure out how this is happening. Can it be possible that file2.swf - file4.swf is setting audio after I’ve set the SoundMixer to 0? Do I need to keep setting the volume on the SoundMixer using a TimerEvent?

Are those swf files hosted on other domains by any chance? I thought volume control was universal, despite domain privileges, but that could be a possible clue if they were.

Otherwise I’d be surprised if the other SWFs were able to get through with that SoundMixer setting. If you check the sound mixer after loading those SWFs, does it still show a volume of 0? Do you have control of these SWFs? Is it possible they might be resetting volume after you set it?

Thanks again for the response. Yes, the other swfs are on other domains and the SoundMixer keeps its setting at 0. I don’t have control over the loaded swfs volume, but could it be possible that the loaded swf has a SoundMixer too that can be overriding the one in the initial swf file? ex: If I set the SoundMixer in file1.swf and then if file3.swf sets its own SoundMixer (and I don’t re-set in file1.swf) does the new SoundMixer take precedence? If so, then that would explain a lot.

If they are on separate domains, that’s probably it. Again, I thought the master SWFs SoundMixer would be able to override for, at least, volume. But that doesn’t seem to be the case. I know there’s an api that can tell you something about different domain sounds. Lemme look that up…

SoundMixer.areSoundsInaccessible()

That doesn’t really tell you much. It sounds like it will just return true for you - which we basically already know. But that basically confirms, yes, there are sounds that exist that are outside of your control.

If there’s no permissions being granted for these SWFs, the best thing I can suggest is googling this specific use case to see if anyone has any clever workarounds. I really haven’t worked with enough sound myself to have any direct experience to share.

Is this question related to the same situation as this other thread?

@krilnon, these are two completely separate issues that I’ve been working through.

@senocular, i saw the areSoundsInaccessible() method which doesn’t do much, I’m going to keep digging into this one and let you guys know what I figure out. Thanks you two for all of your help!