I’ve completed the tutorial on O’Reilly’s site:
The script on frame 5 uses the _totalframes variable. I want to not use this, but take say first 400 frames of my flash video and then start playing. I’ve tried changing the values, but the preloader never advances to the movie, and loads all 3400k and then stops at 100%. Can someone let me know how I need to change this script to start streaming the movie at 400 frames.
// Specify how many frames to load before playing.
var loadAmount = _totalframes;
// If the required number of frames have finished loading…
if (_framesloaded == loadAmount) {
// …start the movie
gotoAndPlay(“beginMovie”);
} else {
// …otherwise, display the load status
// then go back and check load progress again.
// First, determine the loaded and total kilobytes.
loaded = Math.round(getBytesLoaded() / 1024);
total = Math.round(getBytesTotal() / 1024);
percent = Math.round((loaded/total) * 100);
// Display the loaded kb, total kb, and percentage of
// kb loaded in text fields.
bytesLoadedOutput = loaded;
bytesTotalOutput = total;
percentOutput = percent + “%”;
// Set the width of the loadBar to a percentage of
// the loadBarHousing.
loadBar._width = loadBarHousing._width * (percent / 100);
// Now go back and check load progress.
gotoAndPlay(“loading”);
}