I'm working on something similar at the moment with vm1 swf's.
If your loading a vm2 movie into another vm2 movie, LocalConnection
is not required.
if your loading vm1 movie into a vm2 movie, it sucks.
The vm1 movie must define a localconnection object and a connection
string.
vm2 can then send messages via with that identical connection string.
Getting back to your original problem, unloading the swf should stop
the sound from playing.
It does in my app. Are you getting the [UnloadSWF] message in your
console?
Regards,
Bjorn
On 22/01/2007, at 10:26 PM, Ryan Stewart wrote:
Hi All,
I'm loading YouTube videos in my application using SWFLoader (I
don't want to grab the FLV directly so I have to use SWF). The
problem is that while the video plays, when I unload the SWF, the
sound keeps playing. Calling AS3 functions like stopAll(); does
nothing, so I'm assuming I need to call stopAllSounds(); directly
on the YouTube SWF.
In researching, I know I can use LocalConnection to talk to VM2
SWFs, but all of the examples I've seen are ones in which I would
have access to the code in the VM2 SWF, which I don't. I'm not sure
I totally understand how LocalConnection works, so I may be missing
something, but I thought I'd ping the list and see if anyone could
point me in the right direction. I'm also not a huge fan of using
External interface, so that's my last resort right now.
Thanks in advance,
=Ryan