Skip to main content
Participating Frequently
March 30, 2010
Answered

Build website using labels in flash cs4

  • March 30, 2010
  • 1 reply
  • 1058 views

I build a web site in flash using lables and one of the lables is video. I put video in the video label. When I click to go to anyother label, the video is still playing. Can someone tell me what code I would write when I click off the video label the video would stop playing. It sounds like some if statement.

Thanks

This topic has been closed for replies.
Correct answer kglad

Thank you very much?


you're welcome.

p.s.  please mark this thread as answered, if you can.

1 reply

kglad
Community Expert
Community Expert
March 30, 2010

if you're using an flvplayback component to display your video and, your component only exists on the frame labeled "video", you can use the removed_from_stage event to stop your video.

Participating Frequently
March 30, 2010

Where can i find out how to write this remove_from stage script at?

Thanks

kglad
Community Expert
Community Expert
March 30, 2010

if flv is your flvplayback instance or reference, you would use:

flv.addEventListener(Event.REMOVED_FROM_STAGE,removedF);


function removedF(e:Event){

flv.stop();

// rewind if that's desired.

}