My company has a bunch of 20 minute video DVDs that I am
moving to the web. The full movie is 75 megs, so I broke it up into
four chapters. I want flash to load in the second "chapter" while
the first one is playing, and so on up to the end. My goal is to
have these four clips play (mostly) seamless from the first clip to
the end of the 4th cip.
Here is the main code that makes the movie go from one
chapter to the next.
_root.chapter is determined by a URL string variable, so that
the user can jump right in at any chapter between 1-4 depending on
which part of the video they want to see first.
======================================================
vid.contentPath = "VTS_05_1_Chapter_"+_root.chapter+".flv";
vid.setBufferTime(3);
_global.moveNum = _root.chapter;
var vidList : Object = new Object();
vidList.complete = function() {
_global.moveNum++
if (_global.moveNum < 5) {
vid.contentPath = "VTS_05_1_Chapter_" + _global.moveNum +
".flv";
vid.setBufferTime(3);
_root.chapter++;
} else {
gotoAndStop("fin");
}
}
vid.addEventListener ("complete",vidList);
stop();
======================================================
The movie plays great, but there are load pauses between each
video. I added the 3 second buffer intentionally, but if I can get
the preloading to work I will remove it. Without the 3 second
buffer the video is choppy at first.
Any help is greatly appreciated!