FORUMS: list search recent posts

FLV audio continues playing, can't get rid of it with removeChild

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Ben Lundquist
FLV audio continues playing, can't get rid of it with removeChild
on Feb 7, 2008 at 8:48:48 pm

This is tough to explain so I will break down my problem.

I have 2 .swf files. One exported from keynote and one I created which holds an FLV external.

Now in a new flash file, which i've named contain, I am loading the swf files.
The first frame loads the FLV .swf file and the movie plays fine.
I have created a button, that on click goes to frame 2.
Frame 2 loads the .swf file from Keynote, which works.

The problem here is that the audio from the FLV continues on.

I am loading the swf file with addChild, but removeChild doesn't get rid of it.

At this point I am stuck. If anyone could help or would like more information, please reply.

Thanks in advance.


Return to posts index

Steve Parker
Re: FLV audio continues playing, can't get rid of it with removeChild
on Apr 17, 2009 at 4:03:32 pm

I know this is a pretty old post, but I am having a very similar problem. My audio continues playing even after using removeChild. Ben did you ever have any luck with this?


Return to posts index

Ben Lundquist
Re: FLV audio continues playing, can't get rid of it with removeChild
on Apr 17, 2009 at 3:59:55 pm

I did figure this out, let me look back at my files and I'll post the answer soon.


Return to posts index


Ben Lundquist
Re: FLV audio continues playing, can't get rid of it with removeChild
on Apr 17, 2009 at 4:33:00 pm

Ok, it basically comes down to firing the pause method on your NetStream object.
Here is some code from inside my ReelVideo class, as you can see i've put the stream.pause method inside of a public function so I can fire it from the main controller along with the removeChild method.

Hope this helps.

var stream:NetStream = new NetStream(connection);

public function pause():void {
stream.pause();
}

And here is adobe explanation of the pause method too:

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetStre...


Return to posts index

Steve Parker
Re: FLV audio continues playing, can't get rid of it with removeChild
on Apr 17, 2009 at 4:47:03 pm

Thanks for the quick response! I should have specified the difference with my situation. I don't have FLVs in my external swfs I simply have audio clips in certain external swfs.

Same idea though, i have a container swf using addChild/removeChild to load external swfs, but the audio keeps playing even after using removeChild and loading a new swf. Unfortunately I don't think your solution would work since they aren't FLVs, right?

Also tried:
SoundMixer.stopAll();

but that didn't seem to work. not sure how to use this in my container swf and still direct it to the external swf...


Return to posts index

Ben Lundquist
Re: FLV audio continues playing, can't get rid of it with removeChild
on Apr 17, 2009 at 5:22:17 pm

hmm, sounds tricky. Do you have access to the code for the external swf?
If so, make a public method inside of it that will let you kill the sound.
If not, you have stumped me sir.

And thank CreativeCow for emailing me when someone responded to this thread!


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]