tags:

views:

797

answers:

2

What is the best approach to play a sequence of flv video files in Flash (with actionscript)? My goal is to have the transitions occur as smoothly as possible.

Currently i'm using the netStream class and capturing the onStatus events to play the next video when the current video has reached it's end duration. Althought this approach works fine, there is still a small gap between the ending of the current video and start of the next. Any ideas on how to optimize this method?

Thanks in advance :)

+1  A: 

I can't really answer this properly as I only really know as3 but you've had no other answers so far.

I presume this is happening because you trigger the new video to start and it first has to download and buffer part of the movie before it can start playing it hence the delay. Can you start the next movie earlier in a different component and pause it on the first frame and somehow swap and un-pause it when the previous one is finished so that it's already ready to play?

John Burton
+1  A: 

My thoughts exactly! That's just how I approached the concept, only thing is the gap between the ending of the current video and start of the next video is still present.

My solution: try to catch the meta data of the video (especially the duration), and use an setInterval to check if the seconds played of the video is somewhere near the end of the video file. When it is approaching the end, i remove the video file and start playing the next video. This approach works fine locally, but online i'm still running into some problems. I'll let you know when i've found a proper solution.

SolidSmile