Frame 1
stop();
fscommand ("showmenu", "false");
prel.onEnterFrame = function () {
prel.procent.text = Math.ceil((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
prel.gotoAndStop(prel.procent.text);
if (Number(prel.procent.text) > 99) {
play();
delete this.onEnterFrame;
}
};
Frame 2
stop();
Frame 3
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("294634a0", this, 10301, true);
Frame 4
function loadText(success) {
if (success) {
var _local2 = 0;
while (_local2 < textXML.firstChild.childNodes.length) {
_global.levelTexts.push(textXML.firstChild.childNodes[_local2].firstChild);
_local2++;
}
delete textXML;
} else {
trace("error when loading XML");
}
}
Stage.showMenu = false;
Stage.scaleMode = "noScale";
_global.soundingFlag = 0;
_global.levelTexts = new Array(0);
var textXML = new XML();
textXML.ignoreWhite = true;
textXML.onLoad = loadText;
textXML.load("levelText.xml");
Frame 5
loadBar_mc._xscale = 100 * (_framesloaded / _totalframes);
Frame 6
if (_framesloaded < _totalframes) {
gotoAndPlay (5);
} else {
gotoAndPlay (7);
}
Frame 7
stop();
stopAllSounds();
delete scoreSound;
var fonSound = new Sound();
fonSound.attachSound("fonSound");
fonSound.setVolume(40);
fonSound.start(0, 1000);
sound_btn.onRelease = function () {
if (_global.soundingFlag == 0) {
_global.soundingFlag = 1;
stopAllSounds();
delete fonSound;
} else if (_global.soundingFlag == 1) {
_global.soundingFlag = 0;
var fonSound = new Sound();
fonSound.attachSound("fonSound");
fonSound.setVolume(40);
fonSound.start(0, 1000);
}
};
play_btn.onRelease = function () {
stopAllSounds();
delete fonSound;
if (_global.soundingFlag != 1) {
var _local2 = new Sound();
_local2.attachSound("ingameSound");
_local2.start(0, 2000);
}
gotoAndStop (9);
};
playmore_btn.onRelease = function () {
getURL ("http://www.freeonlinegames.com/?maximus", "_blank");
};
moregames_btn.onRelease = function () {
getURL ("http://www.freegamesforyourwebsite.com/?maximus", "_blank");
};
viewhigh_btn.onRelease = function () {
gotoAndStop ("highs");
};
Frame 8
function updateScoreboard(sNum) {
xmlPlayer = new XML();
xmlPlayer.ignoreWhite = true;
xmlPlayer.onLoad = function (success) {
if (success) {
_root["mcScoreboard" + sNum].mcLoading._visible = false;
myPlayer = xmlPlayer.firstChild.childNodes;
ctr2 = 0;
while (ctr2 < myPlayer.length) {
thisPlayer = _root["mcScoreboard" + sNum].sboard.mcScoreHolder.mcScore.duplicateMovieClip("mcScore" + ctr2, ctr2);
thisPlayer._y = ctr2 * thisPlayer._height;
thisPlayer._visible = true;
if ((ctr2 % 2) > 0) {
thisPlayer.gotoAndStop(2);
}
thisPlayer.txtNumber.text = (ctr2 + 1) + ")";
thisPlayer.txtNickname.text = myPlayer[ctr2].attributes.player;
thisPlayer.txtScore.text = myPlayer[ctr2].attributes.score;
ctr2++;
}
_root["mcScoreboard" + sNum].sboard.mcScoreHolder.item = myPlayer.length;
_root["mcScoreboard" + sNum].sboard.mcScoreHolder.speedy = 0;
_root["mcScoreboard" + sNum].sboard.mcScoreHolder.desty = 0;
_root["mcScoreboard" + sNum].sboard.mcScoreHolder.onEnterFrame = function () {
if ((this.desty < 0) && (this._parent.dir == "up")) {
trace("up");
this.desty = this.desty + 10;
if (this.desty > 0) {
this.desty = 0;
}
}
trace((this._parent.mcBlock._height + " - ") + (this.mcScore._height * this.item));
if ((this.desty > (this._parent.mcBlock._height - (this.mcScore._height * this.item))) && (this._parent.dir == "down")) {
trace("down");
this.desty = this.desty - 10;
if (this.desty < (this._parent.mcBlock._height - (this.mcScore._height * this.item))) {
this.desty = this._parent.mcBlock._height - (this.mcScore._height * this.item);
}
}
this.speedy = (this.desty - this._y) + (this.speedy * 0.4);
this._y = this._y + this.speedy;
};
}
if (sNum == 1) {
updateScoreboard(2);
}
};
if (sNum == 1) {
xmlPlayer.load((((("http://" + _root.Dsource) + ".freeonlinegames.com/scoreboard/getTopPlayer.php?id=") + _root.gameID) + "&rand=") + random(999999));
} else if (sNum == 2) {
xmlPlayer.load(((((("http://" + _root.Dsource) + ".freeonlinegames.com/scoreboard/getTopPlayer.php?id=") + _root.gameID) + "&rand=") + random(999999)) + "&filt=1");
}
}
stop();
stopAllSounds();
delete fonSound;
var scoreTune = new Sound();
scoreTune.attachSound("scoreSound");
scoreTune.setVolume(30);
scoreTune.start(0, 500);
var gameID = 11;
Dsource = "www";
mcScoreboard1.sboard.dir = "stop";
mcScoreboard2.sboard.dir = "stop";
mcScoreboard1.sboard.mcScoreHolder.mcScore._visible = false;
mcScoreboard2.sboard.mcScoreHolder.mcScore._visible = false;
updateScoreboard(1);
backfrhighs_btn.onRelease = function () {
gotoAndStop (7);
};
Frame 9
function spearmanMove(action) {
if (_global.pauseMe != 1) {
switch (action) {
case "stop" :
_root.ingame_menu.enabled = true;
if (currentSpear == null) {
onFly = false;
}
bg_mc.spearMan_mc.gotoAndStop("stop");
break;
case "give" :
_root.ingame_menu.gotoAndPlay("menu_out");
gBack = 0;
bg_mc.spearMan_mc.gotoAndStop("give");
if (currentSpear._rotation != 0) {
currentSpear._rotation = currentSpear._rotation + 5;
}
currentSpear._x = currentSpear._x + ((bg_mc.spearMan_mc._x - currentSpear._x) / 3);
currentSpear._y = currentSpear._y + ((bg_mc.spearMan_mc._y - currentSpear._y) / 3);
var wait = setInterval(function () {
manAction = "inHand";
clearInterval(wait);
}, 500);
break;
case "inHand" :
_root.ingame_menu.enabled = false;
bg_mc.spearMan_mc.gotoAndStop("inHand");
currentSpear.__set__xSpeed(power * Math.cos((Math.PI * currentSpear._rotation) / 180));
currentSpear.__set__ySpeed((-1 * power) * Math.sin((Math.PI * currentSpear._rotation) / 180));
currentSpear.__set__weight(8);
rotateSpear();
moveScene();
break;
case "run" :
_root.ingame_menu.gotoAndPlay("menu_in");
_root.ingame_menu.enabled = true;
bg_mc.spearMan_mc.gotoAndStop("run");
bg_mc.spearMan_mc._x = bg_mc.spearMan_mc._x + 5;
currentSpear._x = bg_mc.spearMan_mc._x;
var wait = setInterval(function () {
manAction = "throw";
clearInterval(wait);
}, 700);
break;
case "throw" :
_root.ingame_menu.enabled = true;
onFly = true;
if (moveFon) {
moveFon = false;
}
currentSpear.__set__fly(true);
bg_mc.spearMan_mc.gotoAndStop("throw");
var wait = setInterval(function () {
manAction = "back";
clearInterval(wait);
}, 1400);
break;
case "back" :
bg_mc.spearMan_mc.gotoAndStop("back");
bg_mc.spearMan_mc._x = bg_mc.spearMan_mc._x - 2.5;
if (bg_mc.spearMan_mc._x >= 70) {
break;
}
bg_mc.spearMan_mc._x = 70;
manAction = "stop";
}
}
}
function pausingTheGame() {
if (_global.pauseMe == 0) {
_global.pauseMe = 1;
_root.pausePrompt._visible = true;
_root.attachMovie("continue_btn", "item1", getNextHighestDepth());
_root.item1._x = 38.9;
_root.item1._y = 27.9;
_root.attachMovie("menu", "item2", getNextHighestDepth());
_root.item2._x = 38.9;
_root.item2._y = 56.9;
_root.attachMovie("playmore_btn", "item3", getNextHighestDepth());
_root.item3._x = 38.9;
_root.item3._y = 85.8;
_root.attachMovie("moregames_btn", "item4", getNextHighestDepth());
_root.item4._x = 38.9;
_root.item4._y = 114.8;
_root.attachMovie("sound_btn", "item5", getNextHighestDepth());
_root.item5._x = 38.9;
_root.item5._y = 143.8;
_root.item1.onRelease = function () {
_global.pauseMe = 0;
_root.pausePrompt._visible = false;
removeMenu();
};
_root.item2.onRelease = function () {
gotoAndStop (7);
removeMenu();
};
_root.item3.onRelease = function () {
getURL ("http://www.freeonlinegames.com/?maximus", "_blank");
};
_root.item4.onRelease = function () {
getURL ("http://www.freegamesforyourwebsite.com/?maximus", "_blank");
};
_root.item5.onRelease = function () {
if (_global.soundingFlag == 0) {
_global.soundingFlag = 1;
stopAllSounds();
} else if (_global.soundingFlag == 1) {
_global.soundingFlag = 0;
var _local2 = new Sound();
_local2.attachSound("ingameSound");
_local2.start(0, 2000);
}
};
} else if (_global.pauseMe == 1) {
_global.pauseMe = 0;
_root.pausePrompt._visible = false;
removeMenu();
}
}
function removeMenu() {
removeMovieClip("item1");
removeMovieClip("item2");
removeMovieClip("item3");
removeMovieClip("item4");
removeMovieClip("item5");
}
function createBackground() {
if (_global.pauseMe != 1) {
var i = 0;
while (i < 10) {
bg_mc.attachMovie("grass", "grass" + i, i + 5001);
eval ("bg_mc.grass" + i)._x = i * 550;
eval ("bg_mc.grass" + i)._y = 448;
if (i == 0) {
eval ("bg_mc.grass" + i).a_txm._visible = 0;
eval ("bg_mc.grass" + i).b_txm._visible = 0;
}
eval ("bg_mc.grass" + i).a_txm.mc_txt.text = 10 * ((3 * i) - 1);
eval ("bg_mc.grass" + i).a_txm.flag_mc.gotoAndPlay(random(50) + 1);
eval ("bg_mc.grass" + i).b_txm.mc_txt.text = 10 * (3 * i);
eval ("bg_mc.grass" + i).b_txm.flag_mc.gotoAndPlay(random(50) + 1);
eval ("bg_mc.grass" + i).c_txm.mc_txt.text = 10 * ((3 * i) + 1);
eval ("bg_mc.grass" + i).b_txm.flag_mc.gotoAndPlay(random(50) + 1);
i++;
}
bg_mc.attachMovie("spearPack", "spearPack", bg_mc.getNextHighestDepth());
bg_mc.spearPack._x = 30;
bg_mc.spearPack._y = 290;
}
}
function goBack() {
if (_global.pauseMe != 1) {
if (stoped) {
if (gBack < 64) {
bg_mc._x = bg_mc._x - 0.5;
gBack++;
} else {
if (ammountOfHits >= 2) {
help_guide_txt.text = "";
_root.level_prompt._visible = true;
manAction = "stop";
winGame = "win";
_global.pauseMe = 1;
_root.level_prompt.continue_btn.onRelease = function () {
_global.pauseMe = 0;
startNewLevel();
};
}
if (winGame == "lose") {
startNewLevel();
}
bg_mc._x = bg_mc._x * 0.7;
}
}
if (Math.abs(bg_mc._x) < 1) {
bg_mc._x = 0;
stoped = false;
}
}
}
function rotateSpear() {
if (_global.pauseMe != 1) {
if (_ymouse >= 50) {
currentSpear._rotation = currentSpear._rotation + ((((180 * Math.atan((currentSpear._y - _ymouse) / (currentSpear._x - _xmouse))) / Math.PI) - currentSpear._rotation) / 5);
bg_mc.spearMan_mc.hand_mc._rotation = 180 + currentSpear._rotation;
mouse_angle_txt._visible = true;
showAngle();
}
}
}
function createNewSpear() {
if (_global.pauseMe != 1) {
bg_mc.attachMovie("spear", "spear_mc" + spear_ammount, spear_ammount + 10);
currentSpear = eval ("bg_mc.spear_mc" + spear_ammount);
currentSpear._x = bg_mc.spearMan_mc._x - 5;
currentSpear._y = bg_mc.spearMan_mc._y + 15;
currentSpear._rotation = -120;
currentSpear.__set__fonMovie(bg_mc);
currentSpear.__set__fly(false);
new Color(eval (("bg_mc.spear_mc" + spear_ammount) + ".color_mc")).setRGB(spearColor);
currentSpear.__set__hitPoint(eval ("bg_mc.spear_mc" + spear_ammount).hitPoint_mc);
spear_ammount++;
}
}
function moveScene() {
if (_global.pauseMe != 1) {
if (moveFon) {
if ((bg_mc._x <= 0) && (bg_mc._x >= -4950)) {
bg_mc._x = bg_mc._x + (sceneSpeed * sceneDecay);
if (bg_mc._x > 0) {
bg_mc._x = 0;
}
if (bg_mc._x < -4950) {
bg_mc._x = -4950;
}
if (sceneSpeed < 15) {
sceneSpeed++;
}
}
}
}
}
function setSpearProperties(thisMovie, color, newPower, spearTypeStr) {
if (_global.pauseMe != 1) {
if ((manAction == "stop") || (manAction == "inHand")) {
power = newPower;
spearColor = color;
spear_type_txt.text = spearTypeStr;
heavySpear_mc.enabled = true;
mediumSpear_mc.enabled = true;
lightSpear_mc.enabled = true;
heavySpear_mc._alpha = 50;
mediumSpear_mc._alpha = 50;
lightSpear_mc._alpha = 50;
thisMovie._alpha = 100;
thisMovie.enabled = false;
if (manAction == "inHand") {
new Color(eval (("bg_mc.spear_mc" + (spear_ammount - 1)) + ".color_mc")).setRGB(spearColor);
}
}
}
}
function checkTime() {
if (_global.pauseMe != 1) {
if (((clock_mc.arrow_mc._rotation >= -60) && (clock_mc.arrow_mc._rotation <= -1)) && (_global.soundingFlag != 1)) {
_root.ticker.gotoAndStop(2);
}
if ((getTimer() - startTime) > 1000) {
startTime = getTimer();
clock_mc.arrow_mc._rotation = clock_mc.arrow_mc._rotation + 6;
}
if ((clock_mc.arrow_mc._rotation == -6) && (ammountOfHits < 2)) {
_root.ticker.gotoAndStop(1);
startTime = 0;
manAction = "stop";
winGame = "lose";
startNewLevel();
}
}
}
function showAngle() {
if (_global.pauseMe != 1) {
angle_txt.text = -1 * Math.ceil(currentSpear._rotation);
o_txt.text = "o";
o_txt._x = (angle_txt._width + angle_txt._x) + 0;
mouse_angle_txt.angle_txt.autoSize = true;
mouse_angle_txt.back_mc._width = mouse_angle_txt.angle_txt._width + 8;
mouse_angle_txt.o_txt._x = mouse_angle_txt.angle_txt._width - 3;
mouse_angle_txt.angle_txt.text = angle_txt.text;
mouse_angle_txt.o_txt.text = "o";
mouse_angle_txt._x = _xmouse;
mouse_angle_txt._y = _ymouse;
if (_ymouse > 370) {
mouse_angle_txt._visible = false;
} else {
mouse_angle_txt._visible = true;
}
}
}
function compileScore(myTarget) {
if (_global.pauseMe != 1) {
var _local3 = currentSpear._y + (69 * Math.sin((Math.PI * (180 - (currentSpear._rotation - 17))) / 180));
trace(31 - Math.abs(_local3 - Math.abs(((myTarget.hitArea_mc._height / 2) - myTarget._y) - (myTarget.hitArea_mc._height + myTarget.hitArea_mc._y))));
var _local4 = (500 * (32 - Math.abs(_local3 - Math.abs(((myTarget.hitArea_mc._height / 2) - myTarget._y) - (myTarget.hitArea_mc._height + myTarget.hitArea_mc._y))))) / 32;
return(Math.abs(Math.ceil(_local4)));
}
}
function showScoreText(_myTarget) {
if (_global.pauseMe != 1) {
bg_mc.attachMovie("currentScore_mc", "currentScore_mc", bg_mc.getNextHighestDepth());
bg_mc.currentScore_mc._x = currentSpear._x + (60 * Math.cos((Math.PI * currentSpear._rotation) / 180));
bg_mc.currentScore_mc._y = currentSpear._y;
currentScore = "+" + compileScore(_myTarget);
scoreNumber = scoreNumber + compileScore(_myTarget);
score_txt.text = scoreNumber;
}
}
function startNewLevel() {
if (_global.pauseMe != 1) {
_root.level_prompt._visible = false;
clock_mc.arrow_mc._rotation = 0;
startTime = null;
clearInterval(wait);
delete wait;
menu = true;
var i = 0;
while (i < 10) {
removeMovieClip(eval ("bg_mc.grass" + i));
i++;
}
var i = 0;
while (i < spear_ammount) {
removeMovieClip(eval ("bg_mc.spear_mc" + i));
i++;
}
hitSpearsArray.splice(0, hitSpearsArray.length);
removeMovieClip(bg_mc.target_mc);
removeMovieClip(bg_mc.target2_mc);
removeMovieClip(bg_mc.spearPack);
ammountOfHits = 0;
bg_mc._x = 0;
sceneSpeed = 0;
sceneDecay = -1;
moveFon = false;
gBack = 0;
onFly = false;
stoped = false;
currentSpear = null;
spear_ammount = 0;
bg_mc.spearMan_mc._x = 75;
bg_mc.spearMan_mc._y = 277;
createBackground();
attachMovie("level_menu", "level_menu", getNextHighestDepth());
level_menu._x = 0;
level_menu._y = 0;
if (winGame == "win") {
levelNumber++;
} else if (winGame == "lose") {
levelNumber = null;
}
if (((winGame == "win") && (levelNumber != 6)) || ((levelNumber == 0) && (winGame != "lose"))) {
_root.ticker.gotoAndStop(1);
level_menu.coments_txt.html = true;
level_menu.coments_txt.condenseWhite = true;
level_menu.coments_txt.htmlText = _global.levelTexts[levelNumber];
level_menu.attachMovie(levelPix[levelNumber], "levelPicture_mc", level_menu.getNextHighestDepth());
level_menu.levelPicture_mc._x = 110;
level_menu.levelPicture_mc._y = 95;
level_menu.attachMovie("play", "play_btn", level_menu.getNextHighestDepth());
level_menu.play_btn._x = 144.8;
level_menu.play_btn._y = 385.9;
level_menu.attachMovie("menu", "menu_btn", level_menu.getNextHighestDepth());
level_menu.menu_btn._x = 275.4;
level_menu.menu_btn._y = 385.9;
level_menu.menu_btn.onRelease = function () {
removeMovieClip("level_menu");
gotoAndStop (7);
};
level_menu.play_btn.onRelease = function () {
removeMovieClip("level_menu.levelPicture_mc");
mouse_angle_txt._visible = false;
startTime = getTimer();
newCreateLevels[levelNumber].call();
angle_txt.text = "0";
levelT_txt.text = "Level " + (levelNumber + 1);
winGame = "";
manAction = "stop";
removeMovieClip("level_menu.menu_btn");
removeMovieClip(this);
level_menu.play();
menu = false;
};
}
if (winGame == "lose") {
inGameSound.stop();
delete inGameSound;
if (_global.soundingFlag != 1) {
var endSound = new Sound();
endSound.attachSound("lose_tune");
endSound.start(0, 1000);
}
level_menu.attachMovie("gameOver", "gameOver_mc", level_menu.getNextHighestDepth());
level_menu.gameOver_mc._x = 110;
level_menu.gameOver_mc._y = 95;
level_menu.gameOver_mc.finishScore_txt.text = scoreNumber;
level_menu.gameOver_mc.gameover1._visible = false;
level_menu.gameOver_mc.gameover2._visible = false;
if (_global.killedfriend == true) {
level_menu.gameOver_mc.gameover2._visible = true;
} else {
level_menu.gameOver_mc.gameover1._visible = true;
}
level_menu.attachMovie("play_again", "play_again_btn", level_menu.getNextHighestDepth());
level_menu.play_again_btn._x = 11.9;
level_menu.play_again_btn._y = 385.9;
level_menu.attachMovie("menu", "menu_btn", level_menu.getNextHighestDepth());
level_menu.menu_btn._x = 144.8;
level_menu.menu_btn._y = 385.9;
level_menu.attachMovie("playmore_btn", "playmore", level_menu.getNextHighestDepth());
level_menu.playmore._x = 275.4;
level_menu.playmore._y = 385.9;
level_menu.attachMovie("moregames_btn", "moregames", level_menu.getNextHighestDepth());
level_menu.moregames._x = 410.8;
level_menu.moregames._y = 385.9;
level_menu.moregames.onRelease = function () {
getURL ("http://www.freegamesforyourwebsite.com/?maximus", "_blank");
};
level_menu.playmore.onRelease = function () {
help_guide_txt.text = "";
getURL ("http://www.freeonlinegames.com/?maximus", "_blank");
};
level_menu.menu_btn.onRelease = function () {
_global.killedfriend = false;
help_guide_txt.text = "";
stopAllSounds();
delete endSound;
_global.soundingFlag = 0;
removeMovieClip("level_menu");
gotoAndStop (7);
};
this.level_menu.play_again_btn.onRelease = function () {
_global.killedfriend = false;
help_guide_txt.text = "";
stopAllSounds();
scoreNumber = 0;
delete endSound;
if (_global.soundingFlag != 1) {
var _local3 = new Sound();
_local3.attachSound("ingameSound");
_local3.start(0, 2000);
}
removeMovieClip("level_menu.gameOver_mc");
removeMovieClip("level_menu.playmore");
removeMovieClip("level_menu.moregames");
mouse_angle_txt._visible = false;
levelNumber = 0;
level_menu.attachMovie(levelPix[levelNumber], "levelPicture_mc", level_menu.getNextHighestDepth());
level_menu.levelPicture_mc._x = 110;
level_menu.levelPicture_mc._y = 95;
level_menu.coments_txt.html = true;
level_menu.coments_txt.condenseWhite = true;
level_menu.coments_txt.htmlText = _global.levelTexts[levelNumber];
winGame = "";
manAction = "stop";
level_menu.attachMovie("play", "play_btn", level_menu.getNextHighestDepth());
level_menu.play_btn._x = 144.8;
level_menu.play_btn._y = 385.9;
level_menu.menu_btn._x = 275.4;
level_menu.menu_btn._y = 385.9;
level_menu.play_btn.onRelease = function () {
removeMovieClip("level_menu.levelPicture_mc");
mouse_angle_txt._visible = false;
startTime = getTimer();
newCreateLevels[levelNumber].call();
angle_txt.text = "0";
levelT_txt.text = "Level " + (levelNumber + 1);
winGame = "";
manAction = "stop";
level_menu.play();
removeMovieClip("level_menu.menu_btn");
removeMovieClip(this);
menu = false;
};
removeMovieClip(this);
};
}
if (levelNumber == 6) {
stopAllSounds();
var endSound = new Sound();
endSound.attachSound("endingTune");
endSound.start(0, 1000);
level_menu.attachMovie("winPicture", "winPicture_mc", level_menu.getNextHighestDepth());
level_menu.winPicture_mc._x = 110;
level_menu.winPicture_mc._y = 95;
level_menu.winPicture_mc.finishScore_txt.text = scoreNumber;
level_menu.attachMovie("play_again", "play_again_btn", level_menu.getNextHighestDepth());
level_menu.play_again_btn._x = 11.9;
level_menu.play_again_btn._y = 385.9;
level_menu.attachMovie("menu", "menu_btn", level_menu.getNextHighestDepth());
level_menu.menu_btn._x = 144.8;
level_menu.menu_btn._y = 385.9;
level_menu.attachMovie("playmore_btn", "playmore", level_menu.getNextHighestDepth());
level_menu.playmore._x = 275.4;
level_menu.playmore._y = 385.9;
level_menu.attachMovie("moregames_btn", "moregames", level_menu.getNextHighestDepth());
level_menu.moregames._x = 410.8;
level_menu.moregames._y = 385.9;
level_menu.menu_btn.onRelease = function () {
help_guide_txt.text = "";
stopAllSounds();
removeMovieClip("level_menu");
gotoAndStop (7);
};
level_menu.moregames.onRelease = function () {
help_guide_txt.text = "";
getURL ("http://www.freegamesforyourwebsite.com/?maximus", "_blank");
};
level_menu.playmore.onRelease = function () {
help_guide_txt.text = "";
getURL ("http://www.freeonlinegames.com/?maximus", "_blank");
};
this.level_menu.play_again_btn.onRelease = function () {
help_guide_txt.text = " ";
level_menu.menu_btn._x = 210;
level_menu.menu_btn._y = 400;
removeMovieClip("level_menu.winPicture_mc");
mouse_angle_txt._visible = false;
levelNumber = 0;
level_menu.attachMovie(levelPix[levelNumber], "levelPicture_mc", level_menu.getNextHighestDepth());
level_menu.levelPicture_mc._x = 110;
level_menu.levelPicture_mc._y = 95;
level_menu.coments_txt.html = true;
level_menu.coments_txt.condenseWhite = true;
level_menu.coments_txt.htmlText = _global.levelTexts[levelNumber];
winGame = "";
manAction = "stop";
level_menu.attachMovie("play", "play_btn", level_menu.getNextHighestDepth());
level_menu.play_btn._x = 11.9;
level_menu.play_btn._y = 385.9;
level_menu.play_btn.onRelease = function () {
removeMovieClip("level_menu.levelPicture_mc");
mouse_angle_txt._visible = false;
startTime = getTimer();
newCreateLevels[levelNumber].call();
angle_txt.text = "0";
levelT_txt.text = "Level " + (levelNumber + 1);
winGame = "";
manAction = "stop";
level_menu.play();
removeMovieClip("level_menu.menu_btn");
removeMovieClip(this);
menu = false;
};
removeMovieClip(this);
};
levelNumber = 0;
}
}
}
function hitToObject() {
if (_global.pauseMe != 1) {
if (bg_mc.target_mc.hitArea_mc.hitTest(currentSpear.__get__hitPoint()) || (bg_mc.target2_mc.hitArea_mc.hitTest(currentSpear.__get__hitPoint()))) {
if (_global.soundingFlag != 1) {
hitBoardSound.attachSound("hitSound");
hitBoardSound.start(0.2, 1);
}
} else if (_global.soundingFlag != 1) {
hitBoardSound.attachSound("grassSound");
hitBoardSound.start();
}
onFly = false;
currentSpear.play();
currentSpear = null;
stoped = true;
}
}
function createLevel_1() {
bg_mc.attachMovie("target_1", "target_mc", 0);
bg_mc.target_mc._x = 1350 + (random(3) * 183);
bg_mc.target_mc._y = 350;
score_txt.text = "0";
setSpearProperties(mediumSpear_mc, 65280, 120, "Medium spear");
}
function Level1() {
if (bg_mc.target_mc.hitArea_mc.hitTest(currentSpear.__get__hitPoint())) {
showScoreText(bg_mc.target_mc);
hitToObject();
ammountOfHits++;
}
if (currentSpear.__get__hitPoint().hitTest(hit_mc)) {
hitToObject();
}
}
function createLevel_2() {
bg_mc.attachMovie("target_2", "target_mc", 0);
bg_mc.target_mc._x = 1550 + (random(4) * 183);
bg_mc.target_mc._y = 350;
}
function Level2() {
if (bg_mc.target_mc.hitArea_mc.hitTest(currentSpear.__get__hitPoint())) {
showScoreText(bg_mc.target_mc);
hitToObject();
ammountOfHits++;
}
if (currentSpear.__get__hitPoint().hitTest(hit_mc)) {
hitToObject();
}
}
function createLevel_3() {
bg_mc.attachMovie("target_1", "target_mc", 0);
bg_mc.target_mc._x = 1350 + (random(3) * 183);
bg_mc.target_mc._y = 350;
bg_mc.attachMovie("target_2", "target2_mc", 1);
bg_mc.target2_mc._x = 1915 + (random(4) * 183);
bg_mc.target2_mc._y = 350;
}
function Level3() {
if (bg_mc.target_mc.hitArea_mc.hitTest(currentSpear.__get__hitPoint())) {
if (targetType != "first") {
targetType = "first";
showScoreText(bg_mc.target_mc);
hitToObject();
ammountOfHits++;
} else {
hitToObject();
help_guide_txt.text = "Now aim for the other target.";
}
}
if (bg_mc.target2_mc.hitArea_mc.hitTest(currentSpear.__get__hitPoint())) {
if (targetType != "second") {
targetType = "second";
showScoreText(bg_mc.target2_mc);
hitToObject();
ammountOfHits++;
} else {
hitToObject();
help_guide_txt.text = "Now aim for the other target.";
}
}
if (currentSpear.__get__hitPoint().hitTest(hit_mc)) {
hitToObject();
}
}
function createLevel_4() {
bg_mc.attachMovie("target_4", "target_mc", 0);
dist = random(3) * 183;
bg_mc.target_mc._x = 1350 + dist;
bg_mc.target_mc._y = 350;
}
function Level4() {
bg_mc.target_mc._x = bg_mc.target_mc._x + targetMoveingNum;
bg_mc.target_mc.wheel1._rotation = bg_mc.target_mc.wheel1._rotation + (Math.PI * targetMoveingNum);
bg_mc.target_mc.wheel2._rotation = bg_mc.target_mc.wheel2._rotation + (Math.PI * targetMoveingNum);
if (bg_mc.target_mc._x < (1350 + dist)) {
targetMoveingNum = 1.5;
}
if (bg_mc.target_mc._x > (1716 + dist)) {
targetMoveingNum = -1.5;
}
if (bg_mc.target_mc.hitArea_mc.hitTest(currentSpear.__get__hitPoint())) {
hitSpearsArray.push({spearMovie:currentSpear, distance:bg_mc.target_mc._x - currentSpear._x});
showScoreText(bg_mc.target_mc);
hitToObject();
ammountOfHits++;
}
if (currentSpear.__get__hitPoint().hitTest(hit_mc)) {
hitToObject();
}
var _local1 = 0;
while (_local1 < hitSpearsArray.length) {
hitSpearsArray[_local1].spearMovie._x = bg_mc.target_mc._x - hitSpearsArray[_local1].distance;
_local1++;
}
}
function createLevel_5() {
targetMoveingNum = 0;
bg_mc.attachMovie("target_5", "target_mc", 0);
bg_mc.target_mc._x = 1350 + (random(3) * 183);
bg_mc.target_mc._y = 354;
}
function Level5() {
if (currentSpear.__get__hitPoint().hitTest(hit_mc)) {
miss = true;
}
if (bg_mc.target_mc.hitArea_mc.hitTest(currentSpear.__get__hitPoint())) {
dist = bg_mc.target_mc._x - currentSpear._x;
hitSpearsArray.push({spearMovie:currentSpear, distance:dist});
showScoreText(bg_mc.target_mc);
hitToObject();
ammountOfHits++;
}
if (currentSpear.__get__hitPoint().hitTest(hit_mc)) {
hitToObject();
}
if (miss) {
bg_mc.target_mc._x = bg_mc.target_mc._x + 3;
targetMoveingNum = targetMoveingNum + 3;
bg_mc.target_mc.gotoAndPlay(2);
}
if (miss && (targetMoveingNum > 175)) {
miss = false;
targetMoveingNum = 0;
bg_mc.target_mc.gotoAndPlay(1);
}
var _local1 = 0;
while (_local1 < hitSpearsArray.length) {
hitSpearsArray[_local1].spearMovie._x = bg_mc.target_mc._x - hitSpearsArray[_local1].distance;
_local1++;
}
}
function createLevel_6() {
bg_mc.attachMovie("target_6", "target_mc", 0);
bg_mc.target_mc._x = 1350 + (random(4) * 183);
bg_mc.target_mc._y = 350;
}
function Level6() {
if (bg_mc.target_mc.hitArea_mc.hitTest(currentSpear.__get__hitPoint())) {
showScoreText(bg_mc.target_mc);
hitToObject();
ammountOfHits++;
}
if (bg_mc.target_mc.hitArea2_mc.hitTest(currentSpear.__get__hitPoint())) {
hitToObject();
_global.killedfriend = true;
winGame = "lose";
}
if (currentSpear.__get__hitPoint().hitTest(hit_mc)) {
hitToObject();
}
}
stop();
_global.pauseMe = 0;
_global.killedfriend = false;
_root.level_prompt._visible = false;
_root.pausePrompt._visible = false;
var power = 100;
var spearColor = 16711680;
var sceneSpeed = 0;
var sceneDecay = -1;
var moveFon = false;
var gBack = 0;
var onFly = false;
var stoped = false;
var manAction = "stop";
var currentSpear = new Spear();
var spear_ammount = 0;
var levelNumber = 0;
var scoreNumber = 0;
var ammountOfHits = 0;
var winGame = new String();
var startTime = new Number();
var captureTime = new Number();
var menu = new Boolean();
var miss = false;
bg_mc.spearMan_mc._x = 75;
bg_mc.spearMan_mc._y = 277;
var newCreateLevels = [createLevel_1, createLevel_2, createLevel_3, createLevel_4, createLevel_5, createLevel_6];
var newLevels = [Level1, Level2, Level3, Level4, Level5, Level6];
var levelPix = ["level_1_picture", "level_2_picture", "level_3_picture", "level_4_picture", "level_5_picture", "level_6_picture"];
var hitBoardSound = new Sound();
heavySpear_mc.enabled = false;
mediumSpear_mc.enabled = false;
lightSpear_mc.enabled = false;
score_txt.autoSize = true;
angle_txt.autoSize = true;
var format = new TextFormat();
format.font = "Courier New TUR";
spear_type_txt.setTextFormat(format);
startNewLevel();
onEnterFrame = function () {
if (_global.pauseMe != 1) {
trace(levelNumber);
checkTime();
bg2_mc._x = bg_mc._x / 3;
mountain_mc._x = bg_mc._x / 5;
currentSpear.onTheWing();
spearmanMove(manAction);
newLevels[levelNumber].call();
goBack();
}
};
onMouseDown = function () {
if (_global.pauseMe != 1) {
if (((board_mc.hitTest(_xmouse, _ymouse, true) == false) && (!onFly)) && (!menu)) {
if ((manAction == "stop") && (bg_mc._x == 0)) {
mouse_angle_txt._x = _xmouse;
mouse_angle_txt._y = _ymouse;
mouse_angle_txt.angle_txt.text = "0";
mouse_angle_txt.o_txt.text = "o";
createNewSpear();
manAction = "give";
}
if (manAction == "inHand") {
mouse_angle_txt._visible = false;
bg_mc._x = 0;
gBack = 0;
manAction = "run";
}
}
}
};
ShowSpearType_txt.autoSize = true;
ShowSpearType_txt.background = true;
ShowSpearType_txt.backgroundColor = 13158;
ShowSpearType_txt.textColor = 16777215 /* 0xFFFFFF */;
ShowSpearType_txt._visible = false;
heavySpear_mc.onRollOver = function () {
if (_global.pauseMe != 1) {
ShowSpearType_txt._visible = true;
ShowSpearType_txt._x = _xmouse + 5;
ShowSpearType_txt._y = _ymouse - 15;
ShowSpearType_txt.text = "Heavy spear";
}
};
mediumSpear_mc.onRollOver = function () {
if (_global.pauseMe != 1) {
ShowSpearType_txt._visible = true;
ShowSpearType_txt._x = _xmouse + 5;
ShowSpearType_txt._y = _ymouse - 15;
ShowSpearType_txt.text = "Medium spear";
}
};
lightSpear_mc.onRollOver = function () {
if (_global.pauseMe != 1) {
ShowSpearType_txt._visible = true;
ShowSpearType_txt._x = _xmouse + 5;
ShowSpearType_txt._y = _ymouse - 15;
ShowSpearType_txt.text = "Light spear";
}
};
heavySpear_mc.onRollOut = function () {
if (_global.pauseMe != 1) {
ShowSpearType_txt._visible = false;
}
};
mediumSpear_mc.onRollOut = function () {
if (_global.pauseMe != 1) {
ShowSpearType_txt._visible = false;
}
};
lightSpear_mc.onRollOut = function () {
if (_global.pauseMe != 1) {
ShowSpearType_txt._visible = false;
}
};
heavySpear_mc.onReleaseOutside = function () {
if (_global.pauseMe != 1) {
ShowSpearType_txt._visible = false;
}
};
mediumSpear_mc.onReleaseOutside = function () {
if (_global.pauseMe != 1) {
ShowSpearType_txt._visible = false;
}
};
lightSpear_mc.onReleaseOutside = function () {
if (_global.pauseMe != 1) {
ShowSpearType_txt._visible = false;
}
};
heavySpear_mc.onRelease = function () {
if (_global.pauseMe != 1) {
ShowSpearType_txt._visible = false;
setSpearProperties(this, 16711680, 100, "Heavy spear");
}
};
mediumSpear_mc.onRelease = function () {
if (_global.pauseMe != 1) {
ShowSpearType_txt._visible = false;
setSpearProperties(this, 65280, 120, "Medium spear");
}
};
lightSpear_mc.onRelease = function () {
if (_global.pauseMe != 1) {
ShowSpearType_txt._visible = false;
setSpearProperties(this, 255, 140, "Light spear");
}
};
var keyListener = new Object();
var pauseListener = new Object();
var soundListener = new Object();
keyListener.onKeyDown = function () {
if (_global.pauseMe != 1) {
if (Key.getCode() == 39) {
moveFon = true;
sceneDecay = -1;
}
if (Key.getCode() == 37) {
moveFon = true;
sceneDecay = 1;
}
}
};
keyListener.onKeyUp = function () {
if (_global.pauseMe != 1) {
if ((Key.getCode() == 39) || (Key.getCode() == 37)) {
sceneSpeed = 0;
moveFon = false;
}
}
};
pauseListener.onKeyDown = function () {
if ((Key.getCode() == 80) || (Key.getCode() == 112)) {
if ((_global.pauseMe == 0) && (_root.ingame_menu.enabled == true)) {
pausingTheGame();
} else if (_global.pauseMe == 1) {
pausingTheGame();
}
}
};
soundListener.onKeyDown = function () {
if (Key.isDown(83) || (Key.isDown(115))) {
if (_global.soundingFlag == 0) {
_global.soundingFlag = 1;
stopAllSounds();
} else if (_global.soundingFlag == 1) {
_global.soundingFlag = 0;
var _local2 = new Sound();
_local2.attachSound("ingameSound");
_local2.start(0, 2000);
}
}
};
Key.addListener(keyListener);
Key.addListener(pauseListener);
Key.addListener(soundListener);
ingame_menu.onRelease = function () {
pausingTheGame();
};
var targetType = null;
var targetMoveingNum = 1.5;
var hitSpearsArray = new Array();
var dist = new Number();
Symbol 25 MovieClip [currentScore_mc] Frame 50
removeMovieClip(this);
Symbol 31 MovieClip [level_menu] Frame 1
stop();
Symbol 31 MovieClip [level_menu] Frame 15
removeMovieClip(this);
Symbol 65 MovieClip [spear] Frame 1
#initclip 2
Object.registerClass("spear", Spear);
#endinitclip
stop();
Symbol 65 MovieClip [spear] Frame 33
stop();
Symbol 97 MovieClip [target_5] Frame 1
stop();
Symbol 97 MovieClip [target_5] Frame 2
stop();
Symbol 132 Button
on (release) {
var myVar = new LoadVars();
myVar.onLoad = function () {
getURL ("http://www.freeonlinegames.com/scoreboard.php?", "_blank");
};
myVar.score = _root.scoreNumber;
myVar.gamer = 11;
myVar.id = random(9999999);
myVar.toString();
myVar.sendAndLoad("http://www.freeonlinegames.com/scoreboard/score_c.php", myVar, "POST");
gotoAndStop (2);
}
Symbol 143 Button
on (release) {
var myVar = new LoadVars();
myVar.onLoad = function () {
getURL ("http://www.freeonlinegames.com/scoreboard.php?", "_blank");
};
myVar.score = _root.scoreNumber;
myVar.gamer = 11;
myVar.id = random(9999999);
myVar.toString();
myVar.sendAndLoad("http://www.freeonlinegames.com/scoreboard/score_c.php", myVar, "POST");
gotoAndStop (2);
}
Symbol 144 MovieClip [gameOver] Frame 1
stop();
Symbol 144 MovieClip [gameOver] Frame 2
stop();
Symbol 161 MovieClip [ingameMenu] Frame 1
stop();
Symbol 161 MovieClip [ingameMenu] Frame 2
stop();
Symbol 161 MovieClip [ingameMenu] Frame 10
stop();
Symbol 176 MovieClip Frame 1
stop();
Symbol 348 MovieClip [__Packages.Spear] Frame 0
class Spear extends MovieClip
{
var _x, _y, _rotation;
function Spear () {
super();
}
function set xSpeed(x_speed) {
this.x_speed = x_speed;
//return(xSpeed);
}
function get xSpeed() {
return(x_speed);
}
function set ySpeed(y_speed) {
this.y_speed = y_speed;
//return(ySpeed);
}
function get ySpeed() {
return(y_speed);
}
function set weight(s_weight) {
this.s_weight = s_weight;
//return(weight);
}
function get weight() {
return(s_weight);
}
function set fly(spear_fly) {
this.spear_fly = spear_fly;
//return(fly);
}
function get fly() {
return(spear_fly);
}
function set fonMovie(fon_movie) {
this.fon_movie = fon_movie;
//return(fonMovie);
}
function get fonMovie() {
return(fon_movie);
}
function set hitPoint(hit_point) {
this.hit_point = hit_point;
//return(hitPoint);
}
function get hitPoint() {
return(hit_point);
}
function onTheWing() {
if (spear_fly) {
fon_movie._x = fon_movie._x - (x_speed / s_weight);
_x = _x + (x_speed / s_weight);
_y = _y - (y_speed / s_weight);
_rotation = (-180 * Math.atan(y_speed / x_speed)) / Math.PI;
y_speed = y_speed - 1;
}
}
var x_speed = null;
var y_speed = null;
var s_weight = null;
var fon_movie = null;
var spear_fly = null;
var hit_point = null;
}
Symbol 195 MovieClip Frame 42
Symbol 195 MovieClip Frame 55
stop();
_parent.play();
Symbol 236 MovieClip Frame 1
stop();
l = 0;
Instance of Symbol 180 MovieClip "mcNotice" in Symbol 236 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 236 MovieClip Frame 28
l++;
if (l < 6) {
gotoAndPlay ("loop");
} else {
_root.play();
}
Symbol 237 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?maximus", "_blank");
}
Instance of Symbol 236 MovieClip "logo" in Symbol 238 MovieClip Frame 1
on (release) {
getURL ("http://www.freeonlinegames.com/?battleofberlin", "_blank");
}
Symbol 248 Button
on (release) {
getURL ("http://www.freeonlinegames.com/?maximus", "_blank");
}
Symbol 266 MovieClip Frame 1
stop();
Symbol 266 MovieClip Frame 2
stop();
Symbol 277 Button
on (press) {
sboard.dir = "up";
}
on (release) {
sboard.dir = "stop";
}
Symbol 278 Button
on (press) {
sboard.dir = "down";
}
on (release) {
sboard.dir = "stop";
}
Symbol 311 MovieClip Frame 17
stop();
Symbol 314 MovieClip Frame 20
stop();
Symbol 315 MovieClip Frame 5
stop();
Symbol 315 MovieClip Frame 10
stop();
Symbol 315 MovieClip Frame 15
stop();
Symbol 315 MovieClip Frame 21
stop();
Symbol 315 MovieClip Frame 26
stop();
Symbol 345 MovieClip Frame 1
stop();