Frame 1
log.Reset = function () {
log.log = (log.log_ = "");
};
log.Reset();
log.Add = function (str) {
log.log = (log.log_ = log.log_ + (str + "\r"));
};
function socket(args) {
_root.parts_progress++;
loading_manager.url = ("parts/xpr3-" + _root.screen_name) + _root.parts_progress;
loading_manager.onSocketResponse();
}
stop();
var Qvar = ["mainmenu", "screen0", "screen0_1", "screen1", "screen1_1", "screen1_2", "screen2", "screen3_1", "screen3", "screen4", "screen5", "screen6", "screen7", "screen8", "screen9", "screen10", "screen11", "screen_select"];
var screen_name;
var parts_progress;
var Qscr;
var loading_manager = new LoadingManager();
var game_path = "parts/xpr3-game";
loading_bar._visible = false;
getURL ("fscommand:" + "bct", 18);
play();
Frame 2
stop();
var listener = new Object();
listener.onLoadProgress = function (target_mc, bytesLoaded, bytesTotal) {
percent = (percent_shadow = ("Loading: " + Math.round((100 * bytesLoaded) / bytesTotal)) + "%");
};
listener.onLoadError = function (target_mc, error) {
};
listener.onLoadInit = function (target_mc) {
play();
};
var loader = new MovieClipLoader();
loader.addListener(listener);
loader.loadClip(_root.game_path, game);
Frame 3
function setScreen(args) {
i = 0;
while (i < 18) {
if (_root.Qvar[i] == args) {
_root.Qpos = i + 1;
getURL ("fscommand:" + "bar", _root.Qpos);
}
i++;
}
if (game.screen != undefined) {
removeMovieClip(game.screen);
}
game.attachMovie(args, "screen", 1);
_root.screen_name = args;
_root.parts_progress = 0;
}
function gotoScreen(args) {
if (game.trans != undefined) {
game.removeMovieClip(trans);
}
game.attachMovie("trans_screen", "trans", 2).next_screen = args;
}
stop();
onEnterFrame = function () {
if (_root.Qwait <= 0) {
if (Key.isDown(33) && (_root.Qpos > 1)) {
_root.Qscr = _root.Qpos - 1;
_root.Qwait = 3;
}
if (Key.isDown(34) && (_root.Qpos < 18)) {
_root.Qscr = _root.Qpos + 1;
_root.Qwait = 3;
}
} else {
_root.Qwait = _root.Qwait - 1;
}
if (_root.Qscr != undefined) {
stopAllSounds();
Mouse.show();
setScreen(_root.Qvar[Qscr - 1]);
_root.Qscr = undefined;
}
};
stop();
_root.Qscr = 1;
Symbol 2 MovieClip Frame 31
gotoAndPlay (1);
Symbol 22 MovieClip [__Packages.LoadingManager] Frame 0
class LoadingManager
{
var loading_array, loading_flag, listener, loader, url;
function LoadingManager () {
loading_array = new Array();
loading_flag = false;
listener = new Object();
listener.onLoadInit = function (target_mc) {
target_mc.part._x = 0;
target_mc.part._y = 0;
_root.loading_manager.loading_array.splice(0, 1);
_root.loading_manager.loading_flag = false;
_root.game.screen._visible = true;
_root.loading_bar._visible = false;
_root.loading_manager.StartNextLoading();
};
loader = new MovieClipLoader();
loader.addListener(listener);
}
function AddLoading(clip) {
loading_array.push(clip);
StartNextLoading();
}
function StartNextLoading() {
if (loading_flag) {
return(undefined);
}
if (loading_array.length > 0) {
loading_flag = true;
_root.game.screen._visible = false;
_root.loading_bar._visible = true;
_root.socket("+");
}
}
function onSocketResponse() {
loader.loadClip(url, loading_array[0]);
}
}