Skip to main content
Participant
December 6, 2006
Answered

Seamless transition between FLVs

  • December 6, 2006
  • 1 reply
  • 197 views
Hi,

I would like to pre-buffer a progressive download FLV without displaying it on the stage. So when my movie loads an FLV starts buffering invisibly in the background.

So far I have done this by connecting and then immediately pausing the video.

var nc:NetConnection = new NetConnection();
nc.connect(null);
var ns:NetStream = new NetStream(nc);
my_video.attachVideo(ns);
ns.play(" http://www.url.com/myvideo.flv");
ns.pause();

When a user action (ns.pause(false)) plays the video it starts to play. All good so far....

When video 1 has finished buffering to the end of the clip I want to start buffering video 2 in the same manner (in the background) to be auto-played when clip 1 ends.

I have tried putting a second video object on stage and doing the same again...

var nc2:NetConnection = new NetConnection();
nc2.connect(null);
var ns2:NetStream = new NetStream(nc2);
my_video2.attachVideo(ns2);
ns2.pause();

With no luck! Nothing seems to happen...Can anyone advise on how I should manage this seamless transition between video clips?

Thanks in advance for any help,

HR
This topic has been closed for replies.
Correct answer h.risley
I have solved this by using a single NetConnection and then multiple NetStream Objects.

var nc:NetConnection = new NetConnection();
nc.connect(null);

var ns_bumper:NetStream = new NetStream(nc);
var ns_buffer:NetStream = new NetStream(nc);
var ns_player:NetStream = new NetStream(nc);

1 reply

h.risleyAuthorCorrect answer
Participant
December 7, 2006
I have solved this by using a single NetConnection and then multiple NetStream Objects.

var nc:NetConnection = new NetConnection();
nc.connect(null);

var ns_bumper:NetStream = new NetStream(nc);
var ns_buffer:NetStream = new NetStream(nc);
var ns_player:NetStream = new NetStream(nc);