Symbol 1 MovieClip Frame 1
function LoadPercent() {
TotalByes = WatchedMovie.getBytesTotal();
LoadedByes = WatchedMovie.getBytesLoaded();
return(int((LoadedByes / TotalByes) * 100));
}
function FinishLoading() {
if (!FadeOut) {
gotoAndPlay(EmptyLoopStart);
} else {
gotoAndPlay (3);
}
WatchedMovie.play();
WatchedMovie = undefined;
Delay = 0;
if (OnLoaded != undefined) {
OnLoaded();
}
}
if (FirstPlay == undefined) {
FirstPlay = false;
if (_root._currentframe == 1) {
WatchedMovie = _root;
}
EmptyLoopStart = 3;
gotoAndPlay(EmptyLoopStart);
return(undefined);
}
LoadingPercent = LoadPercent();
ProgressText = LoadingPercent + "%";
setProperty("ProgressBar", _xscale , LoadingPercent);
setProperty("ProgressBar", _xscale, LoadingPercent);
Symbol 1 MovieClip Frame 2
if (LoadingPercent != 100) {
gotoAndPlay (1);
if (OnLoading != undefined) {
OnLoading();
}
} else {
FinishLoading();
}
Symbol 1 MovieClip Frame 4
if (WatchedMovie == undefined) {
gotoAndPlay(EmptyLoopStart);
return(undefined);
}
if (Delay < 1) {
Delay++;
gotoAndPlay(EmptyLoopStart);
return(undefined);
}
WatchedMovie.stop();
LoadingPercent = LoadPercent();
if (LoadingPercent == 100) {
FinishLoading();
return(undefined);
}
gotoAndPlay (1);