Skip to main content
AttaBoy2
Inspiring
June 8, 2010
Answered

sound problem

  • June 8, 2010
  • 1 reply
  • 866 views

I'm building a site that has an mp3 player that's available all the time.  I'm adding a video page to the site.  The videos use an FLVPlayback component.

When I leave the video page I want the sound that was playing on that video to stop.  I can't use SoundMixer.stopAll() because if I had the mp3 player playing before I went to a page I want it to keep playing.

This topic has been closed for replies.
Correct answer kglad

use the removedfromstage event listener to your flv component instance:

flv.addEventListener(Event.REMOVED_FROM_STAGE,f);


function f(e:Event){

flv.stop();

}

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
June 8, 2010

use the removedfromstage event listener to your flv component instance:

flv.addEventListener(Event.REMOVED_FROM_STAGE,f);


function f(e:Event){

flv.stop();

}

AttaBoy2
AttaBoy2Author
Inspiring
June 8, 2010

no that didn't do it.

is there any way to refer to the sound channel in the component instance?

kglad
Community Expert
Community Expert
June 8, 2010

if that didn't work you either did something wrong or your component is not removed from the stage "..when you leave the video page."  if it's the later, you should fix your app so it is removed.

and yes, you can control the sound of an flv but that's more difficult than the above suggestion.