Frame 1
function loadnewgame(gnum) {
trace("load new game " + gnum);
gamePath = ((_root.hostPath + "game_0") + gnum) + ".swf";
trace("gamepath " + gamePath);
mc_game = this.createEmptyMovieClip("game", 1);
loadMovie (gamePath, mc_game);
fullscreenbutton.onRelease = function () {
Stage.displayState = "fullScreen";
};
trouble = 0;
gotoAndPlay (2);
mc_text.text = "chapter " + gnum;
}
stop();
_root.hostPath = "http://uploads.ungrounded.net/userassets/547000/547199/prawn/";
var gamePath = "";
trace("loader starting");
var trouble;
loadnewgame(1);
Instance of Symbol 11 MovieClip in Frame 1
on (release) {
getURL ("http://ad.doubleclick.net/clk;135165104;20577119;x?http://www.t-mobilesimgiveaway.co.uk/", "_blank");
}
Instance of Symbol 4 MovieClip [mc_loader] "mc_loader" in Frame 1
onClipEvent (load) {
_alpha = 0;
}
onClipEvent (enterFrame) {
if (_alpha < 75) {
_alpha = (_alpha + 5);
}
}
Frame 2
var percentage;
percentage = Math.ceil((mc_game.getBytesLoaded() / mc_game.getBytesTotal()) * 100);
mc_loader.gotoAndStop(percentage * 2);
if (mc_game.getBytesTotal() > 256) {
loadText.text = percentage + "% loaded";
}
Frame 3
if ((mc_game.getBytesLoaded() >= mc_game.getBytesTotal()) && (mc_game.getBytesTotal() > 4000)) {
gotoAndStop (5);
} else if (mc_game.getBytesTotal() < 4000) {
if ((trouble++) > 60) {
loadMovie (gamePath, mc_game);
loadText.text = "looking for game file...";
trouble = 0;
}
gotoAndPlay (2);
} else {
gotoAndPlay (2);
}
Frame 5
mc_game.startGame();
trace("loader ends");
Symbol 23 Button
on (release) {
mc_game.play();
mc_game.startGame();
gotoAndStop (6);
}