Skip to main content
Known Participant
October 6, 2009
Answered

Stop flv when leaving a frame

  • October 6, 2009
  • 3 replies
  • 799 views

i want to stop a video from playing,when leaving a frame

i tried to use SoundMixer.stopAll(); but it only stops the sound,

i think my video is still streaming in the background because im starting to notice performance problems when i go back and open the video again

the website gets very slow.

please help

This topic has been closed for replies.
Correct answer getnaleen

I am sorry, my answer may be too late.

Anyway, I guess you have to stop streaming by calling close() method.

Have a look at

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetStream.html#includeExamplesSummary

Then you can call stream.close() to stop it.

Or if you have a flvPlayBack component on stage then you have to call stop() on that.

For an example, if flvPlayBack component on stage has been named as "myVideoObj" then you have to call myVideoObj.stop();

Also may be you have to set

myVideoObj.autoPlay = false;

Good luck

getnaleen

3 replies

abram11Author
Known Participant
October 7, 2009

thanks for the help but i figured out how to do it.

i put

myFLVPlaybk.stop(); in a keyframe before the stop keyframe

getnaleenCorrect answer
Inspiring
October 7, 2009

I am sorry, my answer may be too late.

Anyway, I guess you have to stop streaming by calling close() method.

Have a look at

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetStream.html#includeExamplesSummary

Then you can call stream.close() to stop it.

Or if you have a flvPlayBack component on stage then you have to call stop() on that.

For an example, if flvPlayBack component on stage has been named as "myVideoObj" then you have to call myVideoObj.stop();

Also may be you have to set

myVideoObj.autoPlay = false;

Good luck

getnaleen

kglad
Community Expert
Community Expert
October 6, 2009

you must explicitly stop the flv BEFORE exiting the frame when it's playing.

abram11Author
Known Participant
October 6, 2009

how can i do that?

kglad
Community Expert
Community Expert
October 7, 2009

the answer depends what you use to play your flv.

are you using an flvplayback component?   are you using the netstream class?