Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stop FLV video playback (AS3)

Status
Not open for further replies.

moleproductions

Programmer
Oct 23, 2003
43
GB
I have been looking at thread250-1333195 - but this does not work in my situation. Possibly because I have misunderstood, or possibly because the solutions here do not work in ActionScript 3 (AS3).

I have a number of FLV video files which I have imported into my Flash project (Adobe Flash CS3) using "File" -> "Import video..." and then choosen the relevant options. The project has around 90 pages, split into scenes. Each frame within a scene has a "Next" and "Back" button so that the user can quick navigate through the project.

Just to be clear - the FLV files are stored externally from the .SWF files as they are so big.

The "import" feature loads the videos into the relevant page of the flash project and when a user opens the page, the video starts to play. However, when a user clicks the "next" or "back" button the video does not stop. The video can no longer be seen, but the audio continues to play in the background. If a user re-visits the same page with a video on it before the initial video has stopped, another instance of the video begins to play!

I have tried:
FLVPlayback.stop();
FLVPlayback.clear();
FLVPlayback.pause();
and
MovieClip.stop();
etc.

However, what I don't really understand is how does Flash know which video I am refering to? When I am authoring in Flash, I have given the instance of the video a name "vid_1" and then tried:
var vid_1:Video = new Video();
vid_1.stop();
but that does not work.

Any ideas? Ideally I would like to stop the video when the frame that contains the FLVPlayback is exited.

Many thanks,
Tim
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top