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/qe-" + _root.screen_name) + _root.parts_progress;
loading_manager.onSocketResponse();
}
stop();
var Qvar = ["mainmenu", "screen1", "screen2", "screen3", "screen4", "screen5", "screen6", "screen7", "screen8", "screen9", "screen10", "screen11", "screen12", "screen13", "screen14", "screen15", "screen16", "screen17", "screen18", "screen19", "screen20", "screen21", "screen22", "screen23"];
var screen_name;
var parts_progress;
var Qscr;
var Qmax = 24;
var loading_manager = new LoadingManager();
var game_path = "parts/qe-game";
loading_bar._visible = false;
fscommand ("bct", Qmax);
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 < _root.Qmax) {
if (_root.Qvar[i] == args) {
_root.Qpos = i + 1;
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) {
_root.Qwait = _root.Qwait - 1;
} else {
if (Key.isDown(33) && (_root.Qpos > 1)) {
_root.Qscr = _root.Qpos - 1;
_root.Qwait = 3;
}
if (Key.isDown(34) && (_root.Qpos < _root.Qmax)) {
_root.Qscr = _root.Qpos + 1;
_root.Qwait = 3;
}
if (Key.isDown(77) || (Key.isDown(109))) {
stopAllSounds();
}
}
if (_root.Qscr != undefined) {
stopAllSounds();
Mouse.show();
setScreen(_root.Qvar[Qscr - 1]);
_root.Qscr = undefined;
}
};
stop();
_root.Qscr = 1;
Symbol 3 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]);
}
}