Frame 1
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;
var pv;
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);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&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);
}
mochi.as2.MochiAd.showPreGameAd({id:"07b90899537403df", res:"800x440"});
__com_mochibot__("efaeec7e", this, 10301, true);
_root.lavr = 13;
_root.gore = 1;
function menuChoiceOne() {
getURL ("http://www.pyrozen.com");
}
_root.user = SharedObject.getLocal("user_bloodshade");
onEnterFrame = function () {
urlStart = _url.indexOf("://") + 3;
urlEnd = _url.indexOf("/", urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf(".") - 1;
domEnd = domain.lastIndexOf(".", LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain == "gamesfree.ca") {
_root.gore = 2;
} else {
_root.gore = 1;
}
};
NewMenu = new ContextMenu();
NewMenu.hideBuiltInItems();
NewMenu.customItems.push(new ContextMenuItem("Pyrozen", menuChoiceOne));
this.menu = NewMenu;
Frame 2
Frame 3
stop();
onEnterFrame = function () {
if (_root.got2go == 2) {
_root.got2go = 1;
gotoAndPlay (4);
}
};
Frame 19
stop();
onEnterFrame = function () {
if (_root.got2go == 2) {
_root.got2go = 1;
gotoAndStop (20);
}
};
Frame 20
stop();
_root.tp = 1;
_root.tpb = 0;
onEnterFrame = function () {
if (_root.got2go == 2) {
_root.got2go = 1;
gotoAndStop (41);
}
if (_root.got2go == 3) {
_root.got2go = 1;
gotoAndStop (21);
}
if (_root.got2go == 4) {
_root.got2go = 1;
gotoAndStop (22);
}
if (_root.got2go == 4) {
_root.got2go = 1;
gotoAndStop (23);
}
};
Instance of Symbol 653 MovieClip in Frame 20
onClipEvent (load) {
boxx.txx = "ninja masters";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
getURL ("http://www.gamesfree.ca/hs/bloodshadehs.php", "_blank");
}
}
Instance of Symbol 653 MovieClip in Frame 20
onClipEvent (load) {
boxx.txx = "more games";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
getURL ("http://www.gamesfree.ca", "_blank");
}
}
Instance of Symbol 653 MovieClip in Frame 20
onClipEvent (load) {
boxx.txx = "treasures";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
getURL ("http://www.gamesfree.ca/walkthrough/bloodshade.php", "_blank");
}
}
Instance of Symbol 653 MovieClip in Frame 20
onClipEvent (load) {
boxx.txx = "pyrozen";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
getURL ("http://www.pyrozen.com", "_blank");
}
}
Instance of Symbol 653 MovieClip in Frame 20
onClipEvent (load) {
boxx.txx = "start game";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
_root.got2go = 3;
}
}
Frame 41
function loadLevel() {
if ((bowDamageToAdd + attackEffect[0].damage) < 40) {
arrowType = 1;
} else if ((bowDamageToAdd + attackEffect[0].damage) < 45) {
arrowType = 2;
} else if ((bowDamageToAdd + attackEffect[0].damage) < 50) {
arrowType = 3;
} else if ((bowDamageToAdd + attackEffect[0].damage) < 55) {
arrowType = 4;
} else {
arrowType = 5;
}
_root.tp = 2;
upgradeWindow._visible = false;
deadWindow._visible = false;
Mouse.hide();
mousePointer._visible = true;
tracers.crl.text = String("Wave : " + (currentLevel + 1));
_root.dif = 1;
charOverYSpace = gameContainer.character._y - gameContainer.characterOver._y;
gameContainer.characterOver._visible = false;
if (_root.dif == 1) {
enemyStats[0] = {speed:2 + (0.1 * currentLevel), damage:10 + (5 * currentLevel), timeInCastle:5 - (0.1 * currentLevel), health:100 + (5 * currentLevel)};
enemyStats[1] = {speed:6 + (0.1 * currentLevel), damage:5 + (5 * currentLevel), timeInCastle:5 - (0.1 * currentLevel), health:50 + (5 * currentLevel)};
enemyStats[2] = {speed:2 + (0.1 * currentLevel), damage:20 + (5 * currentLevel), timeInCastle:5 - (0.1 * currentLevel), health:200 + (5 * currentLevel)};
enemyStats[3] = {speed:1 + (0.1 * currentLevel), damage:30 + (5 * currentLevel), timeInCastle:5 - (0.1 * currentLevel), health:150 + (5 * currentLevel)};
} else if (_root.dif == 2) {
enemyStats[0] = {speed:2.5 + (0.15 * currentLevel), damage:15 + (5 * currentLevel), timeInCastle:4 - (0.15 * currentLevel), health:100 + (7 * currentLevel)};
enemyStats[1] = {speed:5 + (0.15 * currentLevel), damage:7.5 + (5 * currentLevel), timeInCastle:4 - (0.15 * currentLevel), health:50 + (7 * currentLevel)};
enemyStats[2] = {speed:2.5 + (0.15 * currentLevel), damage:30 + (5 * currentLevel), timeInCastle:4 - (0.15 * currentLevel), health:200 + (7 * currentLevel)};
enemyStats[3] = {speed:1.75 + (0.15 * currentLevel), damage:45 + (5 * currentLevel), timeInCastle:4 - (0.15 * currentLevel), health:150 + (7 * currentLevel)};
} else if (_root.dif == 3) {
enemyStats[0] = {speed:3 + (0.2 * currentLevel), damage:20 + (5 * currentLevel), timeInCastle:3 - (0.2 * currentLevel), health:100 + (10 * currentLevel)};
enemyStats[1] = {speed:6 + (0.2 * currentLevel), damage:10 + (5 * currentLevel), timeInCastle:3 - (0.2 * currentLevel), health:50 + (10 * currentLevel)};
enemyStats[2] = {speed:3 + (0.2 * currentLevel), damage:40 + (5 * currentLevel), timeInCastle:3 - (0.2 * currentLevel), health:200 + (10 * currentLevel)};
enemyStats[3] = {speed:1.5 + (0.2 * currentLevel), damage:60 + (5 * currentLevel), timeInCastle:3 - (0.2 * currentLevel), health:150 + (10 * currentLevel)};
}
startEnemySpawn();
}
function checkKeys() {
if (Key.isDown(87)) {
if ((upKey == false) && (downHit == true)) {
upKeyClick = true;
}
upKey = true;
} else {
upKey = false;
}
if (Key.isDown(49)) {
selectedWeapon = 0;
}
if (Key.isDown(50)) {
selectedWeapon = 1;
}
if (Key.isDown(65)) {
leftKey = true;
} else {
leftKey = false;
}
if (Key.isDown(68)) {
rightKey = true;
} else {
rightKey = false;
}
if ((leftKey == true) && (rightKey == true)) {
leftKey = false;
rightKey = false;
}
}
function checkHits() {
downCheck = true;
var _local1 = 0;
while (_local1 < trees) {
if (gameContainer.character.hit.hitTest(gameContainer["treeHit" + _local1])) {
canMoveOnGround = false;
isOnTree = true;
downCheck = false;
downHit = true;
if ((gameContainer.character._y != gameContainer["treeHit" + _local1]._y) && (vaRatio < 0)) {
canMove = false;
gameContainer.character.gotoAndStop("climbing");
gameContainer.character.characterIn.gotoAndStop("climbing");
}
gameContainer.character._y = gameContainer["treeHit" + _local1]._y + 1;
gameContainer.characterOver._y = gameContainer.character._y - charOverYSpace;
break;
}
_local1++;
}
if (downCheck == true) {
if (gameContainer.character.hit.hitTest(gameContainer.ground)) {
if (canMoveOnGround == false) {
canMove = false;
shakeIt(0.5);
gameContainer.character.gotoAndStop("groundHit");
gameContainer.character.characterIn.gotoAndStop("groundHit");
}
isOnTree = false;
downHit = true;
gameContainer.character._y = gameContainer.ground._y + 1;
gameContainer.characterOver._y = gameContainer.character._y - charOverYSpace;
} else {
isOnTree = false;
downHit = false;
}
}
if (gameContainer.character.hit.hitTest(gameContainer.wall0)) {
leftHit = true;
gameContainer.character._x = (gameContainer.wall0._x + (gameContainer.character.hit._width / 2)) - 1;
gameContainer.characterOver._x = gameContainer.character._x;
} else {
leftHit = false;
}
if (gameContainer.character.hit.hitTest(gameContainer.wall1)) {
rightHit = true;
gameContainer.character._x = gameContainer.wall1._x - (gameContainer.character.hit._width / 2);
gameContainer.characterOver._x = gameContainer.character._x;
} else {
rightHit = false;
}
}
function calculateMovement() {
if ((((canMove == false) || (charState == "usingBow")) || (charState == "launchingArrow")) || (charState == "throwingDagger")) {
return(undefined);
}
if (downHit == true) {
if (upKeyClick == true) {
upKeyClick = false;
vaRatio = -1;
moveY = moveY + (charVS * vaRatio);
} else {
vaRatio = 0;
}
} else {
if (vaRatio < 1) {
vaRatio = vaRatio + vaInc;
}
moveY = moveY + (charVS * vaRatio);
}
if ((leftKey == true) && (leftHit == false)) {
if (charSide == "right") {
if ((gameContainer.character.bow != undefined) && (bowSide == "right")) {
bowSide = "left";
gameContainer.character.bow._yscale = gameContainer.character.bow._yscale * -1;
}
charSide = "left";
gameContainer.character.characterIn._xscale = gameContainer.character.characterIn._xscale * -1;
}
if (haRatio > -1) {
if (haRatio > 0) {
haRatio = haRatio - haInc;
}
haRatio = haRatio - haInc;
}
moveX = moveX + (charHS * haRatio);
} else if ((leftKey == true) && (leftHit == true)) {
haRatio = 0;
}
if ((rightKey == true) && (rightHit == false)) {
if (charSide == "left") {
if ((gameContainer.character.bow != undefined) && (bowSide == "left")) {
bowSide = "right";
gameContainer.character.bow._yscale = gameContainer.character.bow._yscale * -1;
}
charSide = "right";
gameContainer.character.characterIn._xscale = gameContainer.character.characterIn._xscale * -1;
}
if (haRatio < 1) {
if (haRatio < 0) {
haRatio = haRatio + haInc;
}
haRatio = haRatio + haInc;
}
moveX = moveX + (charHS * haRatio);
} else if ((rightKey == true) && (rightHit == true)) {
haRatio = 0;
}
if (((leftKey == false) && (rightKey == false)) && (haRatio != 0)) {
if ((haRatio < 0.1) && (haRatio > -0.1)) {
haRatio = 0;
} else if (haRatio > 0) {
haRatio = haRatio - haInc;
moveX = charHS * haRatio;
} else {
haRatio = haRatio + haInc;
moveX = charHS * haRatio;
}
}
}
function checkCharacterState() {
if (charSide == "right") {
}
if (canMove == false) {
return(undefined);
}
if ((charState == "launchingArrow") || (charState == "throwingDagger")) {
} else if (charState == "usingBow") {
if (mouseIsDown == true) {
if (charSide == "left") {
if ((gameContainer.character.bow._rotation >= -90) && (gameContainer.character.bow._rotation <= 90)) {
charSide = "right";
gameContainer.character.characterIn._xscale = gameContainer.character.characterIn._xscale * -1;
}
} else if ((gameContainer.character.bow._rotation < -90) || (gameContainer.character.bow._rotation > 90)) {
charSide = "left";
gameContainer.character.characterIn._xscale = gameContainer.character.characterIn._xscale * -1;
}
gameContainer.character.bow._rotation = (Math.atan2(_ymouse - bowPt.y, _xmouse - bowPt.x) * 180) / Math.PI;
gameContainer.characterOver.bowChargeBarMask._x = Math.ceil((gameContainer.character.bow._currentframe / gameContainer.character.bow._totalframes) * gameContainer.characterOver.bowChargeBar._width) + chargeBarMaskX;
} else if ((gameContainer.character.bow._currentframe / gameContainer.character.bow._totalframes) > 0.15) {
gameContainer.characterOver._visible = false;
charState = "launchingArrow";
if (bowType == 1) {
throwPr("arrow", (gameContainer.character.bow._currentframe / gameContainer.character.bow._totalframes) + 0.2);
} else if (bowType == 2) {
throwPr("arrow", (gameContainer.character.bow._currentframe / gameContainer.character.bow._totalframes) + 0.2, -2);
throwPr("arrow", (gameContainer.character.bow._currentframe / gameContainer.character.bow._totalframes) + 0.2, 2);
} else if (bowType == 3) {
throwPr("arrow", (gameContainer.character.bow._currentframe / gameContainer.character.bow._totalframes) + 0.2);
throwPr("arrow", (gameContainer.character.bow._currentframe / gameContainer.character.bow._totalframes) + 0.2, -5);
throwPr("arrow", (gameContainer.character.bow._currentframe / gameContainer.character.bow._totalframes) + 0.2, 5);
}
gameContainer.character.gotoAndStop("launchingArrow");
gameContainer.character.characterIn.gotoAndStop("launchingArrow");
gameContainer.character.bow.bowIn.gotoAndStop(String("Bow" + bowType));
gameContainer.character.bow._rotation = (Math.atan2(_ymouse - bowPt.y, _xmouse - bowPt.x) * 180) / Math.PI;
} else {
charState = "standing";
gameContainer.characterOver._visible = false;
gameContainer.character.gotoAndStop("standing");
gameContainer.character.characterIn.gotoAndStop("standing");
}
} else if (((selectedWeapon == 0) && (mouseIsDown == true)) && ((charState == "standing") || (charState == "running"))) {
haRatio = 0;
charState = "usingBow";
gameContainer.characterOver.bowChargeBarMask._x = chargeBarMaskX;
gameContainer.characterOver._visible = true;
gameContainer.character.gotoAndStop("usingBow");
gameContainer.character.characterIn.gotoAndStop("usingBow");
gameContainer.character.bow.bowIn.gotoAndStop(String("Bow" + bowType));
if (bowSide != charSide) {
if (bowSide == "right") {
bowSide = "left";
} else {
bowSide = "right";
}
}
gameContainer.character.bow._rotation = (Math.atan2(_ymouse - bowPt.y, _xmouse - bowPt.x) * 180) / Math.PI;
if (chargeBarMaskX == undefined) {
chargeBarMaskX = gameContainer.characterOver.bowChargeBarMask._x;
}
} else if ((((selectedWeapon == 1) && (mouseIsDown == true)) && ((charState == "standing") || (charState == "running"))) && (isOnTree == true)) {
if (numberOfDaggers > 0) {
haRatio = 0;
if (gameContainer.character.bow != undefined) {
charState = "throwingDagger";
throwPr("dagger", 0);
numberOfDaggers--;
}
gameContainer.character.gotoAndStop("throwingDagger");
gameContainer.character.characterIn.gotoAndStop("throwingDagger");
}
} else if ((haRatio == 0) && (vaRatio == 0)) {
charState = "standing";
gameContainer.character.gotoAndStop("standing");
gameContainer.character.characterIn.gotoAndStop("standing");
} else if (vaRatio != 0) {
charState = "jumping";
gameContainer.character.gotoAndStop("jumping");
gameContainer.character.characterIn.gotoAndStop("jumping");
} else if (haRatio != 0) {
charState = "running";
gameContainer.character.gotoAndStop("running");
gameContainer.character.characterIn.gotoAndStop("running");
}
}
function moveIt() {
gameContainer.character._x = gameContainer.character._x + moveX;
gameContainer.characterOver._x = gameContainer.character._x;
gameContainer.character._y = gameContainer.character._y + moveY;
gameContainer.characterOver._y = gameContainer.character._y - charOverYSpace;
}
function moveGameContainer() {
if (gameContainer._x > 0) {
gameContainer._x = 0;
}
if (gameContainer._x < (-(gameContainer.ground._width - Stage.width))) {
gameContainer._x = -(gameContainer.ground._width - Stage.width);
}
if (((moveX > 0) && (charPt.x > (Stage.width / 2))) && (gameContainer._x > (-(gameContainer.ground._width - Stage.width)))) {
gameContainer._x = gameContainer._x - moveX;
} else if (((moveX < 0) && (charPt.x < (Stage.width / 2))) && (gameContainer._x < 0)) {
gameContainer._x = gameContainer._x - moveX;
}
}
function moveProjectiles() {
var _local2 = 0;
while (_local2 < prOnStage.length) {
if (((prOnStage[_local2] != null) && (prOnStage[_local2] != undefined)) && (gameContainer.prContainer[prOnStage[_local2]].onGround == false)) {
obj4Loop = gameContainer.prContainer[prOnStage[_local2]];
var _local1 = 0;
while (_local1 < enemyOnStage.length) {
if (((obj4Loop.hitTest(enemyOnStage[_local1].enemyIn) && (gameContainer.prContainer[prOnStage[_local2]]._visible == true)) && (gameContainer.prContainer[prOnStage[_local2]].onGround == false)) && ((enemyOnStage[_local1].thisState == "walking") || (enemyOnStage[_local1].thisState == "goingBack"))) {
gameContainer.prContainer[prOnStage[_local2]]._visible = false;
if (obj4Loop.prType == "arrow") {
enemyOnStage[_local1].hitPoints = enemyOnStage[_local1].hitPoints - ((attackEffects[0].damage + bowDamageToAdd) * (obj4Loop.str * bowDamageMultiplier));
enemyOnStage[_local1].bloodBurst = true;
} else if (obj4Loop.prType == "dagger") {
enemyOnStage[_local1].hitPoints = enemyOnStage[_local1].hitPoints - ((enemyOnStage[_local1].maxEnergy * 3) / 4);
enemyOnStage[_local1].bloodBurst = true;
}
}
_local1++;
}
if (((obj4Loop.hitTest(gameContainer.ground) || (obj4Loop._x < -500)) || (obj4Loop._x > (gameContainer.ground._width + 400))) || (obj4Loop._y > (Stage.height + 200))) {
gameContainer.prContainer[prOnStage[_local2]].onGround = true;
} else if (obj4Loop.prType == "arrow") {
if ((obj4Loop._rotation > 0) && (obj4Loop._rotation < 179)) {
obj4Loop._rotation = obj4Loop._rotation + 0.3;
} else if ((obj4Loop._rotation < 0) && (obj4Loop._rotation > -179)) {
obj4Loop._rotation = obj4Loop._rotation - 0.3;
}
obj4Loop._x = obj4Loop._x + obj4Loop.xConstant;
obj4Loop._y = obj4Loop._y - (obj4Loop.str * (strRatio * Math.cos((Math.PI/180) * obj4Loop._rotation)));
} else if (obj4Loop.prType == "dagger") {
obj4Loop._x = obj4Loop._x + (strRatio * Math.sin((Math.PI/180) * obj4Loop._rotation));
obj4Loop._y = obj4Loop._y - (strRatio * Math.cos((Math.PI/180) * obj4Loop._rotation));
}
}
_local2++;
}
}
function moveEnemies() {
var _local1 = 0;
while (_local1 < enemyOnStage.length) {
if (enemyOnStage[_local1] != null) {
enemyOnStage[_local1].enemyHP.hpMask._x = Math.ceil((enemyOnStage[_local1].hitPoints / enemyOnStage[_local1].maxEnergy) * enemyOnStage[_local1].enemyHP.hpBar._width);
if ((enemyOnStage[_local1]._x > 10) && (enemyOnStage[_local1].thisState == "walking")) {
if (((Math.abs(gameContainer.character._x - enemyOnStage[_local1]._x) < 75) && (Math.abs(gameContainer.character._y - enemyOnStage[_local1]._y) < 20)) && ((enemyOnStage[_local1].thisState == "walking") || (enemyOnStage[_local1].thisState == "goingBack"))) {
if ((recovering == false) && (gotHit == false)) {
enemyOnStage[_local1].enemyIn.gotoAndStop("attacking");
if (enemyOnStage[_local1].enemyIn.enemyIn.sword != undefined) {
if (enemyOnStage[_local1].enemyIn.enemyIn.sword.hitTest(gameContainer.character)) {
gotHit = true;
energy = energy - enemyOnStage[_local1].damage;
shakeIt(1);
}
}
}
}
if (enemyOnStage[_local1].hitPoints > 75) {
enemyOnStage[_local1]._x = enemyOnStage[_local1]._x - enemyOnStage[_local1].mSpeed;
} else if (enemyOnStage[_local1].hitPoints > 50) {
enemyOnStage[_local1]._x = enemyOnStage[_local1]._x - ((enemyOnStage[_local1].mSpeed * 3) / 4);
} else if (enemyOnStage[_local1].hitPoints > 25) {
enemyOnStage[_local1]._x = enemyOnStage[_local1]._x - (enemyOnStage[_local1].mSpeed / 2);
} else if (enemyOnStage[_local1].hitPoints > 0) {
enemyOnStage[_local1]._x = enemyOnStage[_local1]._x - (enemyOnStage[_local1].mSpeed / 4);
} else if (enemyOnStage[_local1].hitPoints <= 0) {
enemyOnStage[_local1].thisState = "dead";
enemyOnStage[_local1].enemyIn.gotoAndStop("dead");
enemyOnStage[_local1].enemyHP._visible = false;
}
} else if (enemyOnStage[_local1].thisState != "dead") {
if ((enemyOnStage[_local1].thisState != "goingBack") && (enemyOnStage[_local1].thisState != "GotThrough")) {
if (enemyOnStage[_local1].castleCounter >= (enemyOnStage[_local1].timeInCastle * fRate)) {
enemyOnStage[_local1].enemyIn._xscale = enemyOnStage[_local1].enemyIn._xscale * -1;
enemyOnStage[_local1].thisState = "goingBack";
enemyOnStage[_local1].side = "left";
enemyOnStage[_local1].enemyIn.gotoAndStop("goingBack");
} else {
enemyOnStage[_local1].castleCounter++;
enemyOnStage[_local1].thisState = "inCastle";
}
} else if ((enemyOnStage[_local1].thisState == "goingBack") || (enemyOnStage.thisState == "GotThrough")) {
if (enemyOnStage[_local1]._x > enemyOnStage[_local1].startingX) {
if (enemyOnStage[_local1].thisState != "GotThrough") {
enemyOnStage[_local1].thisState = "GotThrough";
enemiesThrough++;
}
} else if (enemyOnStage[_local1].hitPoints > 75) {
enemyOnStage[_local1]._x = enemyOnStage[_local1]._x + enemyOnStage[_local1].mSpeed;
} else if (enemyOnStage[_local1].hitPoints > 50) {
enemyOnStage[_local1]._x = enemyOnStage[_local1]._x + ((enemyOnStage[_local1].mSpeed * 3) / 4);
} else if (enemyOnStage[_local1].hitPoints > 25) {
enemyOnStage[_local1]._x = enemyOnStage[_local1]._x + (enemyOnStage[_local1].mSpeed / 2);
} else if (enemyOnStage[_local1].hitPoints > 0) {
enemyOnStage[_local1]._x = enemyOnStage[_local1]._x + (enemyOnStage[_local1].mSpeed / 4);
} else if (enemyOnStage[_local1].hitPoints <= 0) {
enemyOnStage[_local1].thisState = "dead";
enemyOnStage[_local1].enemyIn.gotoAndStop("dead");
enemyOnStage[_local1].enemyHP._visible = false;
}
}
}
}
_local1++;
}
}
function shakeIt(shakeStrength) {
function shakeItNow(moveNum) {
gameContainer._y = gameContainer._y + moveNum;
}
currentlyShaking = true;
startingY = gameContainer._y;
frameNumber = 0;
shakerObj.onEnterFrame = function () {
if (frameNumber == 1) {
shakeItNow(10 * shakeStrength);
} else if (frameNumber == 2) {
shakeItNow(-20 * shakeStrength);
} else if (frameNumber == 3) {
shakeItNow(18 * shakeStrength);
} else if (frameNumber == 4) {
shakeItNow(-16 * shakeStrength);
} else if (frameNumber == 5) {
shakeItNow(14 * shakeStrength);
} else if (frameNumber == 6) {
shakeItNow(-12 * shakeStrength);
} else if (frameNumber == 7) {
shakeItNow(10 * shakeStrength);
} else if (frameNumber == 8) {
shakeItNow(-8 * shakeStrength);
} else if (frameNumber == 9) {
shakeItNow(6 * shakeStrength);
} else if (frameNumber == 10) {
shakeItNow(-4 * shakeStrength);
} else if (frameNumber == 11) {
shakeItNow(2 * shakeStrength);
}
if (frameNumber < 11) {
frameNumber++;
} else {
gameContainer._y = startingY;
currentlyShaking = false;
delete this.onEnterFrame;
}
};
}
function startEnemySpawn() {
spawnObject.onEnterFrame = function () {
if (currentLevel == 0) {
if (spawnState == 1) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 250) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 350) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 650) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 700) {
spawnEnemy(1);
spawnedEnemies++;
allEnemiesSpawned = true;
delete this.onEnterFrame;
}
} else if (currentLevel == 1) {
if (spawnState == 1) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 100) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 150) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 250) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 350) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 350) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 650) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 850) {
spawnEnemy(1);
spawnedEnemies++;
allEnemiesSpawned = true;
delete this.onEnterFrame;
}
} else if (currentLevel == 2) {
if (spawnState == 1) {
spawnEnemy(2);
spawnedEnemies++;
} else if (spawnState == 150) {
spawnEnemy(2);
spawnedEnemies++;
} else if (spawnState == 150) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 100) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 175) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 250) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 650) {
spawnEnemy(2);
spawnedEnemies++;
} else if (spawnState == 780) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 800) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 850) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 1050) {
spawnEnemy(1);
spawnedEnemies++;
} else if (spawnState == 1100) {
spawnEnemy(1);
spawnedEnemies++;
allEnemiesSpawned = true;
delete this.onEnterFrame;
}
} else if (currentLevel >= 3) {
slvl_temps = 150;
slvl_nbenemy = 10 + (currentLevel * 2);
slvl_type1 = 10 + ((currentLevel - 2) * 13);
slvl_type2 = 10 + ((currentLevel - 2) * 12);
slvl_type3 = 11 + ((currentLevel - 2) * 12);
if ((spawnState == random_next_time) && (spawnedEnemies != slvl_nbenemy)) {
random_le_type = random(slvl_type1) + 1;
random_next_time = (random(slvl_temps) + 1) + spawnState;
trace(spawnedEnemies);
trace(((50 * spawnedEnemies) + 1) + random_next_time);
if (random_le_type <= 50) {
spawnEnemy(1);
spawnedEnemies++;
} else {
random_le_type = random(slvl_type2) + 1;
if (random_le_type <= 50) {
spawnEnemy(2);
spawnedEnemies++;
} else {
random_le_type = random(slvl_type3) + 1;
if (random_le_type <= 50) {
spawnEnemy(3);
spawnedEnemies++;
} else {
spawnEnemy(4);
spawnedEnemies++;
}
}
}
} else if ((spawnState == random_next_time) && (spawnedEnemies == slvl_nbenemy)) {
random_le_type = random(slvl_type1) + 1;
random_next_time = 100;
if (random_le_type <= 50) {
spawnEnemy(1);
spawnedEnemies++;
allEnemiesSpawned = true;
delete this.onEnterFrame;
} else {
random_le_type = random(slvl_type2) + 1;
if (random_le_type <= 50) {
spawnEnemy(2);
spawnedEnemies++;
allEnemiesSpawned = true;
delete this.onEnterFrame;
} else {
random_le_type = random(slvl_type3) + 1;
if (random_le_type <= 50) {
spawnEnemy(3);
spawnedEnemies++;
allEnemiesSpawned = true;
delete this.onEnterFrame;
} else {
spawnEnemy(4);
spawnedEnemies++;
allEnemiesSpawned = true;
delete this.onEnterFrame;
}
}
}
}
}
spawnState++;
};
}
function spawnEnemy(enemyType) {
var _local2 = 0;
while (_local2 <= enemyReady.length) {
if (_local2 == enemyReady.length) {
gameContainer.enemyContainer.attachMovie("Enemy", "enemy" + enemyID, gameContainer.enemyContainer.getNextHighestDepth());
obj4Loop = gameContainer.enemyContainer["enemy" + enemyID];
enemyID++;
break;
}
if (enemyReady[_local2] != null) {
obj4Loop = enemyReady[_local2];
enemyReady[_local2] = null;
break;
}
_local2++;
}
obj4Loop.enemyHP._visible = true;
obj4Loop._x = gameContainer.ground._width + 100;
obj4Loop.side = "right";
obj4Loop._y = gameContainer.ground._y;
obj4Loop.startingX = obj4Loop._x;
obj4Loop.enemyType = enemyType;
obj4Loop.gotoAndStop("Enemy" + enemyType);
obj4Loop.mSpeed = enemyStats[enemyType - 1].speed;
obj4Loop.damage = enemyStats[enemyType - 1].damage;
obj4Loop.timeInCastle = enemyStats[enemyType - 1].timeInCastle;
obj4Loop.thisState = "walking";
obj4Loop.bloodBurst = false;
obj4Loop.maxEnergy = enemyStats[enemyType - 1].health;
obj4Loop.hitPoints = enemyStats[enemyType - 1].health;
obj4Loop.castleCounter = 0;
var _local1 = 0;
while (_local1 <= enemyOnStage.length) {
if (_local1 == enemyOnStage.length) {
enemyOnStage[_local1] = obj4Loop;
break;
}
if (enemyOnStage[_local1] == null) {
enemyOnStage[_local1] = obj4Loop;
break;
}
_local1++;
}
}
function throwPr(prType, strength, arrowAngle) {
if ((prOnStage[prNumber - maxPrOnStage] != null) && (prOnStage[prNumber - maxPrOnStage] != undefined)) {
var _local5 = 0;
while (_local5 <= readyPr.length) {
if (_local5 == readyPr.length) {
gameContainer.prContainer["pr" + toRemove]._visible = false;
readyPr[_local5] = prOnStage[gameContainer.prContainer["pr" + toRemove].arrayPos];
prOnStage[gameContainer.prContainer["pr" + toRemove].arrayPos] = null;
break;
}
if (readyPr[_local5] == null) {
gameContainer.prContainer["pr" + toRemove]._visible = false;
readyPr[_local5] = prOnStage[gameContainer.prContainer["pr" + toRemove].arrayPos];
prOnStage[gameContainer.prContainer["pr" + toRemove].arrayPos] = null;
break;
}
_local5++;
}
if (toRemove < (maxPrOnStage - 1)) {
toRemove++;
} else {
toRemove = 0;
}
}
var _local2 = 0;
while (_local2 <= readyPr.length) {
if (_local2 == readyPr.length) {
gameContainer.prContainer.attachMovie("Projectile", "pr" + prNumber, gameContainer.prContainer.getNextHighestDepth());
prOnStage.push("pr" + prNumber);
gameContainer.prContainer[prOnStage[prOnStage.length - 1]].onGround = false;
gameContainer.prContainer[prOnStage[prOnStage.length - 1]].gotoAndStop(prType);
gameContainer.prContainer[prOnStage[prOnStage.length - 1]].arrowIn.gotoAndStop(arrowType);
gameContainer.prContainer[prOnStage[prOnStage.length - 1]].prType = prType;
gameContainer.prContainer[prOnStage[prOnStage.length - 1]].arrayPos = prOnStage.length - 1;
gameContainer.prContainer[prOnStage[prOnStage.length - 1]]._x = bowPt.x - gameContainer._x;
gameContainer.prContainer[prOnStage[prOnStage.length - 1]]._y = bowPt.y;
if (arrowAngle == undefined) {
gameContainer.prContainer[prOnStage[prOnStage.length - 1]].throwAngle = ((Math.atan2(_ymouse - bowPt.y, _xmouse - bowPt.x) * 180) / Math.PI) + 90;
} else {
gameContainer.prContainer[prOnStage[prOnStage.length - 1]].throwAngle = (((Math.atan2(_ymouse - bowPt.y, _xmouse - bowPt.x) * 180) / Math.PI) + 90) + arrowAngle;
}
gameContainer.prContainer[prOnStage[prOnStage.length - 1]]._rotation = gameContainer.prContainer[prOnStage[prOnStage.length - 1]].throwAngle;
gameContainer.prContainer[prOnStage[prOnStage.length - 1]]._visible = true;
gameContainer.prContainer[prOnStage[prOnStage.length - 1]].str = strength;
gameContainer.prContainer[prOnStage[prOnStage.length - 1]].xConstant = gameContainer.prContainer[prOnStage[prOnStage.length - 1]].str * (strRatio * Math.sin((Math.PI/180) * gameContainer.prContainer[prOnStage[prOnStage.length - 1]]._rotation));
prNumber++;
break;
}
if (readyPr[_local2] != null) {
var _local1 = 0;
while (_local1 <= prOnStage.length) {
if (_local1 == prOnStage.length) {
prOnStage.push(readyPr[_local2]);
gameContainer.prContainer[prOnStage[_local1]].onGround = false;
gameContainer.prContainer[prOnStage[_local1]].arrayPos = _local1;
gameContainer.prContainer[prOnStage[_local1]].gotoAndStop(prType);
gameContainer.prContainer[prOnStage[_local1]].arrowIn.gotoAndStop(arrowType);
gameContainer.prContainer[prOnStage[_local1]].prType = prType;
gameContainer.prContainer[prOnStage[_local1]]._x = bowPt.x - gameContainer._x;
gameContainer.prContainer[prOnStage[_local1]]._y = bowPt.y;
gameContainer.prContainer[prOnStage[_local1]]._visible = true;
if (arrowAngle == undefined) {
gameContainer.prContainer[prOnStage[_local1]].throwAngle = ((Math.atan2(_ymouse - bowPt.y, _xmouse - bowPt.x) * 180) / Math.PI) + 90;
} else {
gameContainer.prContainer[prOnStage[_local1]].throwAngle = (((Math.atan2(_ymouse - bowPt.y, _xmouse - bowPt.x) * 180) / Math.PI) + 90) + arrowAngle;
}
gameContainer.prContainer[prOnStage[_local1]].str = strength;
gameContainer.prContainer[prOnStage[_local1]]._rotation = gameContainer.prContainer[prOnStage[_local1]].throwAngle;
gameContainer.prContainer[prOnStage[_local1]].xConstant = gameContainer.prContainer[prOnStage[_local1]].str * (strRatio * Math.sin((Math.PI/180) * gameContainer.prContainer[prOnStage[_local1]]._rotation));
readyPr[_local2] = null;
break;
}
if (prOnStage[_local1] == null) {
prOnStage[_local1] = readyPr[_local2];
gameContainer.prContainer[prOnStage[_local1]].arrayPos = _local1;
gameContainer.prContainer[prOnStage[_local1]].gotoAndStop(prType);
gameContainer.prContainer[prOnStage[_local1]].arrowIn.gotoAndStop(arrowType);
gameContainer.prContainer[prOnStage[_local1]].onGround = false;
gameContainer.prContainer[prOnStage[_local1]].prType = prType;
gameContainer.prContainer[prOnStage[_local1]]._x = bowPt.x - gameContainer._x;
gameContainer.prContainer[prOnStage[_local1]]._y = bowPt.y;
gameContainer.prContainer[prOnStage[_local1]]._visible = true;
if (arrowAngle == undefined) {
gameContainer.prContainer[prOnStage[_local1]].throwAngle = ((Math.atan2(_ymouse - bowPt.y, _xmouse - bowPt.x) * 180) / Math.PI) + 90;
} else {
gameContainer.prContainer[prOnStage[_local1]].throwAngle = (((Math.atan2(_ymouse - bowPt.y, _xmouse - bowPt.x) * 180) / Math.PI) + 90) + arrowAngle;
}
gameContainer.prContainer[prOnStage[_local1]].str = strength;
gameContainer.prContainer[prOnStage[_local1]]._rotation = gameContainer.prContainer[prOnStage[_local1]].throwAngle;
gameContainer.prContainer[prOnStage[_local1]].xConstant = gameContainer.prContainer[prOnStage[_local1]].str * (strRatio * Math.sin((Math.PI/180) * gameContainer.prContainer[prOnStage[_local1]]._rotation));
readyPr[_local2] = null;
break;
}
_local1++;
}
break;
}
_local2++;
}
}
function resetAll() {
var _local5 = 0;
while (_local5 < prOnStage.length) {
if (prOnStage[_local5] != null) {
gameContainer.prContainer[prOnStage[_local5]]._visible = false;
var _local3 = 0;
while (_local3 <= readyPr.length) {
if (_local3 == readyPr.length) {
readyPr[_local3] = prOnStage[_local5];
break;
}
if (readyPr[_local3] == null) {
readyPr[_local3] = prOnStage[_local5];
break;
}
_local3++;
}
prOnStage[_local5] = null;
}
_local5++;
}
var _local2 = 0;
while (_local2 < enemyOnStage.length) {
if (enemyOnStage[_local2] != null) {
enemyOnStage[_local2]._x = enemyOnStage[_local2].startingX;
if (enemyOnStage[_local2].side == "left") {
enemyOnStage[_local2].side = "right";
enemyOnStage[_local2].enemyIn._xscale = enemyOnStage[_local2].enemyIn._xscale * -1;
}
var _local4 = 0;
while (_local4 <= enemyReady.length) {
if (_local4 == enemyReady.length) {
enemyReady[_local4] = enemyOnStage[_local2];
break;
}
if (enemyReady[_local4] == null) {
enemyReady[_local4] = enemyOnStage[_local2];
break;
}
_local4++;
}
enemyOnStage[_local2].thisState = "walking";
enemyOnStage[_local2].enemyIn.gotoAndStop("walking");
enemyOnStage[_local2] = null;
}
_local2++;
}
allEnemiesSpawned = false;
changeScore(500);
changeScore(energy);
changeScore(enemiesThrough * -20);
changeScore(deadEnemies * 20);
totalDeadEnemies = totalDeadEnemies + deadEnemies;
deadEnemies = 0;
enemiesThrough = 0;
spawnedEnemies = 0;
currentLevel++;
spawnState = 0;
energy = 100;
upgradePoints++;
showUpgradeWindow();
random_next_time = 100;
_root.tamerebox = "";
}
function changeScore(number) {
if ((score + number) < 0) {
score = 0;
} else {
score = score + number;
}
gameContainer.score.text = String("Score : " + score);
}
function deadFunc() {
_root.tp = 4;
stopAll = true;
Mouse.show();
deadWindow._visible = true;
mousePointer._visible = false;
deadWindow.restartBtn.onRollOver = function () {
this.gotoAndStop(2);
};
deadWindow.restartBtn.onRollOut = function () {
this.gotoAndStop(1);
};
deadWindow.restartBtn.onPress = function () {
gameContainer.character._x = charStartingX;
gameContainer.character._y = charStartingY;
gameContainer._x = gameContainerStartingX;
gameContainer._y = gameContainerStartingY;
this.gotoAndStop(1);
currentLevel = 0;
upgradePoints = 0;
daggerStack = 2;
bowType = 1;
bowDamageToAdd = 0;
bowDamageMultiplier = 1.5;
energyToAdd = 0;
stopAll = false;
allEnemiesSpawned = false;
totalDeadEnemies = 0;
deadEnemies = 0;
enemiesThrough = 0;
spawnedEnemies = 0;
spawnState = 0;
delete spawnObj.onEnterFrame;
energy = 100;
var _local5 = 0;
while (_local5 < prOnStage.length) {
if (prOnStage[_local5] != null) {
gameContainer.prContainer[prOnStage[_local5]]._visible = false;
var _local3 = 0;
while (_local3 <= readyPr.length) {
if (_local3 == readyPr.length) {
readyPr[_local3] = prOnStage[_local5];
break;
}
if (readyPr[_local3] == null) {
readyPr[_local3] = prOnStage[_local5];
break;
}
_local3++;
}
prOnStage[_local5] = null;
}
_local5++;
}
var _local2 = 0;
while (_local2 < enemyOnStage.length) {
if (enemyOnStage[_local2] != null) {
enemyOnStage[_local2]._x = enemyOnStage[_local2].startingX;
if (enemyOnStage[_local2].side == "left") {
enemyOnStage[_local2].side = "right";
enemyOnStage[_local2].enemyIn._xscale = enemyOnStage[_local2].enemyIn._xscale * -1;
}
var _local4 = 0;
while (_local4 <= enemyReady.length) {
if (_local4 == enemyReady.length) {
enemyReady[_local4] = enemyOnStage[_local2];
break;
}
if (enemyReady[_local4] == null) {
enemyReady[_local4] = enemyOnStage[_local2];
break;
}
_local4++;
}
enemyOnStage[_local2].thisState = "walking";
enemyOnStage[_local2].enemyIn.gotoAndStop("walking");
enemyOnStage[_local2] = null;
}
_local2++;
}
loadLevel();
};
}
function showUpgradeWindow() {
Mouse.show();
_root.tp = 3;
mousePointer._visible = false;
upgradeWindow._visible = true;
upgradeWindow.ptsAvailable.text = upgradePoints;
upgradeWindow.dagStkTxt.text = daggerStack;
upgradeWindow.bowTypeTxt.text = bowType;
upgradeWindow.arrowDmgTxt.text = bowDamageToAdd + attackEffects[0].damage;
upgradeWindow.arrowDmgAddTxt.text = bowDamageMultiplier;
upgradeWindow.charEnerTxt.text = energyToAdd + 100;
upgradeWindow.dagStkTxt2.text = daggerStack - 2;
upgradeWindow.bowTypeTxt2.text = bowType - 1;
upgradeWindow.arrowDmgTxt2.text = bowDamageToAdd;
upgradeWindow.arrowDmgAddTxt2.text = (bowDamageMultiplier - 1.5) * 10;
upgradeWindow.charEnerTxt2.text = energyToAdd / 10;
checkForPtsLeft();
upgradeWindow.continueBtn.onPress = function () {
canMove = true;
energy = 100 + energyToAdd;
numberOfDaggers = daggerStack;
loadLevel();
};
canMove = false;
}
function checkForPtsLeft() {
upgradeWindow.addPointBtn1.gotoAndStop(1);
upgradeWindow.addPointBtn3.gotoAndStop(1);
upgradeWindow.addPointBtn4.gotoAndStop(1);
upgradeWindow.addPointBtn5.gotoAndStop(1);
upgradeWindow.addPointBtn6.gotoAndStop(1);
if (_root.upgradePoints == 0) {
delete upgradeWindow.addPointBtn1.onRollOver;
delete upgradeWindow.addPointBtn1.onRollOut;
delete upgradeWindow.addPointBtn1.onPress;
delete upgradeWindow.addPointBtn4.onRollOver;
delete upgradeWindow.addPointBtn4.onRollOut;
delete upgradeWindow.addPointBtn4.onPress;
delete upgradeWindow.addPointBtn5.onRollOver;
delete upgradeWindow.addPointBtn5.onRollOut;
delete upgradeWindow.addPointBtn5.onPress;
delete upgradeWindow.addPointBtn6.onRollOver;
delete upgradeWindow.addPointBtn6.onRollOut;
delete upgradeWindow.addPointBtn6.onPress;
upgradeWindow.addPointBtn1._alpha = 30;
upgradeWindow.addPointBtn4._alpha = 30;
upgradeWindow.addPointBtn5._alpha = 30;
upgradeWindow.addPointBtn6._alpha = 30;
} else {
if ((daggerStack < 5) && (upgradePoints > 2)) {
upgradeWindow.addPointBtn1._alpha = 100;
} else if (upgradePoints < 3) {
delete upgradeWindow.addPointBtn1.onRollOver;
delete upgradeWindow.addPointBtn1.onRollOut;
delete upgradeWindow.addPointBtn1.onPress;
upgradeWindow.addPointBtn1._alpha = 30;
} else {
upgradeWindow.addPointBtn1._alpha = 30;
upgradeWindow.addPointBtn1.gotoAndStop(4);
delete upgradeWindow.addPointBtn1.onRollOver;
delete upgradeWindow.addPointBtn1.onRollOut;
delete upgradeWindow.addPointBtn1.onPress;
}
upgradeWindow.addPointBtn4._alpha = 100;
upgradeWindow.addPointBtn5._alpha = 100;
upgradeWindow.addPointBtn6._alpha = 100;
if ((daggerStack < 5) && (upgradePoints > 2)) {
upgradeWindow.addPointBtn1.onRollOver = (upgradeWindow.addPointBtn4.onRollOver = (upgradeWindow.addPointBtn5.onRollOver = (upgradeWindow.addPointBtn6.onRollOver = function () {
this.gotoAndStop(2);
})));
upgradeWindow.addPointBtn1.onRollOut = (upgradeWindow.addPointBtn4.onRollOut = (upgradeWindow.addPointBtn5.onRollOut = (upgradeWindow.addPointBtn6.onRollOut = function () {
this.gotoAndStop(1);
})));
upgradeWindow.addPointBtn1.onPress = function () {
daggerStack = daggerStack + 1;
upgradeWindow.dagStkTxt.text = daggerStack;
upgradeWindow.dagStkTxt2.text = daggerStack - 2;
upgradePoints = upgradePoints - 3;
upgradeWindow.ptsAvailable.text = upgradePoints;
checkForPtsLeft();
};
}
upgradeWindow.addPointBtn4.onPress = function () {
bowDamageToAdd = bowDamageToAdd + 1;
upgradeWindow.arrowDmgTxt.text = bowDamageToAdd + attackEffects[0].damage;
upgradeWindow.arrowDmgTxt2.text = bowDamageToAdd;
upgradePoints--;
upgradeWindow.ptsAvailable.text = upgradePoints;
checkForPtsLeft();
};
upgradeWindow.addPointBtn5.onPress = function () {
bowDamageMultiplier = bowDamageMultiplier + 0.1;
upgradeWindow.arrowDmgAddTxt.text = bowDamageMultiplier;
upgradeWindow.arrowDmgAddTxt2.text = (bowDamageMultiplier - 1.5) * 10;
upgradePoints--;
upgradeWindow.ptsAvailable.text = upgradePoints;
checkForPtsLeft();
};
upgradeWindow.addPointBtn6.onPress = function () {
energyToAdd = energyToAdd + 10;
upgradeWindow.charEnerTxt.text = energyToAdd + 100;
upgradeWindow.charEnerTxt2.text = energyToAdd / 10;
upgradePoints--;
upgradeWindow.ptsAvailable.text = upgradePoints;
checkForPtsLeft();
};
}
if ((_root.upgradePoints < 5) || (bowType == 3)) {
delete upgradeWindow.addPointBtn3.onRollOver;
delete upgradeWindow.addPointBtn3.onRollOut;
delete upgradeWindow.addPointBtn3.onPress;
upgradeWindow.addPointBtn3._alpha = 30;
if (bowType == 3) {
upgradeWindow.addPointBtn3.gotoAndStop(4);
}
} else {
upgradeWindow.addPointBtn3._alpha = 100;
upgradeWindow.addPointBtn3.onRollOver = function () {
this.gotoAndStop(2);
};
upgradeWindow.addPointBtn3.onRollOut = function () {
this.gotoAndStop(1);
};
upgradeWindow.addPointBtn3.onPress = function () {
bowType = bowType + 1;
upgradeWindow.bowTypeTxt.text = bowType;
upgradeWindow.bowTypeTxt2.text = bowType - 1;
upgradePoints = upgradePoints - 5;
upgradeWindow.ptsAvailable.text = upgradePoints;
checkForPtsLeft();
};
}
}
stop();
_root.tp = 2;
_root.tpb = 0;
_root.pts4upgrade = 0;
_root.pts4_1 = 0;
_root.pts4_2 = 0;
_root.pts4_3 = 0;
_root.pts4_4 = 0;
_root.pts4_5 = 0;
_root.pts4_1_2 = 0;
_root.pts4_2_2 = 0;
_root.pts4_3_2 = 0;
_root.pts4_4_2 = 0;
_root.pts4_5_2 = 0;
_root.random_next_time = 100;
var currentLevel = 0;
var startingY = 0;
var trees = 11;
var allEnemiesSpawned = false;
var deadEnemies = 0;
var spawnedEnemies = 0;
var totalDeadEnemies = 0;
var enemiesThrough = 0;
var charStartingX = 0;
var charStartingY = 0;
var gameContainerStartingX = 0;
var gameContainerStartingY = 0;
var energy = 100;
var charHitPts = new Array();
var stopAll = false;
var canMove = true;
var charPt = new Object();
var bowPt = new Object();
var charSide = "right";
var bowSide = "right";
var selectedWeapon = 0;
var bowDelay = false;
var isOnTree = false;
var chargeBarMaskX;
var charOverYSpace;
var gotHit = false;
var recovering = false;
var charVS = 10;
var vaInc = 0.04;
var charHS = 8;
var haInc = 0.03;
var charSide = "right";
var moveX = 0;
var moveY = 0;
var haRatio = 0;
var vaRatio = 0;
var charState = "";
var leftHit = false;
var rightHit = false;
var downHit = false;
var upHit = false;
var gotHit = false;
var jump = false;
var downCheck = true;
var spawnState = 0;
_root.createEmptyMovieClip("spawnObject", _root.getNextHighestDepth());
var enemyStats = new Array();
var enemyReady = new Array();
var enemyOnStage = new Array();
var enemyID = 0;
var mouseIsDown = false;
var leftKey = false;
var rightKey = false;
var upKey = false;
var upKeyClick = false;
var score = 0;
var maxPrOnStage = 30;
var currentlyShaking = false;
var frameNumber = 0;
var strRatio = 30;
var rootWidth = 800;
var rootHeight = 440;
var fRate = 48;
var randNum;
var arrowType = 1;
var prDelay = false;
var readyPr = new Array();
var prPoints = new Array();
var prSpeed = 40;
var numberOfDaggers = 2;
var prNumber = 0;
var prOnStage = new Array();
var toRemove = 0;
var attackEffects = new Array();
attackEffects[0] = {damage:35};
var obj4Loop;
_root._quality = "MEDIUM";
var upgradePoints = 10;
var daggerStack = 2;
var daggersDamageToAdd = 0;
var bowType = 1;
var bowDamageToAdd = 0;
var bowDamageMultiplier = 1.5;
var energyToAdd = 0;
_root.attachMovie("GameContainer", "gameContainer", this.getNextHighestDepth());
_root.attachMovie("Tracers", "tracers", this.getNextHighestDepth());
_root.attachMovie("UpgradeWindow", "upgradeWindow", this.getNextHighestDepth());
_root.attachMovie("DeadWindow", "deadWindow", this.getNextHighestDepth());
_root.attachMovie("MousePointer", "mousePointer", this.getNextHighestDepth());
_root.attachMovie("Branding", "branding", this.getNextHighestDepth());
gameContainerStartingX = gameContainer._x;
gameContainerStartingY = gameContainer._y;
charStartingX = gameContainer.character._x;
charStartingY = gameContainer.character._y;
startDrag (mousePointer, true);
_root.createEmptyMovieClip("shakerObj", this.getNextHighestDepth());
loadLevel();
_root.onMouseDown = function () {
mouseIsDown = true;
};
_root.onMouseUp = function () {
mouseIsDown = false;
};
gameContainer.character.onEnterFrame = function () {
if (stopAll == false) {
if (energy <= 0) {
deadFunc();
}
tracers.dag.text = String(numberOfDaggers);
tracers.score.text = String("Score : " + score);
tracers.charEner.text = String(energy);
if ((allEnemiesSpawned == true) && ((deadEnemies + enemiesThrough) == spawnedEnemies)) {
if (enemiesThrough > deadEnemies) {
deadFunc();
} else {
resetAll();
}
}
charPt = {x:gameContainer.character._x, y:gameContainer.character._y};
if (gameContainer.character.bow != undefined) {
bowPt = {x:gameContainer.character.bow._x, y:gameContainer.character.bow._y};
gameContainer.character.localToGlobal(bowPt);
}
gameContainer.localToGlobal(charPt);
if (gotHit == true) {
gameContainer.character.gotoAndStop("gotHit");
gameContainer.character.characterIn.gotoAndStop("gotHit");
canMoveOnGround = true;
canMove = true;
gotHit = false;
recovering = true;
} else if ((canMove == true) && (recovering == false)) {
if ((_root.energy <= 0) && (charState != dead)) {
charState = "dying";
this.gotoAndStop("dying");
this.characterIn.gotoAndStop("dying");
}
moveX = 0;
moveY = 0;
checkKeys();
checkHits();
calculateMovement();
checkCharacterState();
moveIt();
} else {
haRatio = 0;
vaRatio = 0;
}
moveGameContainer();
moveEnemies();
moveProjectiles();
}
};
Symbol 40 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 1
Instance of Symbol 40 MovieClip in Symbol 41 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.headcheat);
}
Symbol 49 MovieClip Frame 1
stop();
Instance of Symbol 49 MovieClip in Symbol 50 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.headcheat);
}
Symbol 55 MovieClip Frame 50
stop();
Symbol 57 MovieClip Frame 50
stop();
Symbol 59 MovieClip Frame 16
stop();
_root.charState = "standing";
_parent._parent._parent.gotoAndStop("standing");
_parent._parent.gotoAndStop("standing");
Symbol 67 MovieClip Frame 32
stop();
_root.canMove = true;
Symbol 69 MovieClip Frame 30
_root.canMove = true;
_root.canMoveOnGround = true;
Symbol 83 MovieClip Frame 1
_root.sdgotit = 2;
Symbol 83 MovieClip Frame 28
stop();
Instance of Symbol 84 MovieClip in Symbol 85 MovieClip Frame 1
onClipEvent (load) {
_rotation = (random(360) + 1);
_y = (10 - random(25));
}
Symbol 85 MovieClip Frame 30
_root.recovering = false;
_root.isOnTree = false;
_root.canMove = true;
stop();
Symbol 87 MovieClip Frame 1
typec = 3;
stop();
Instance of Symbol 54 MovieClip "characterIn" in Symbol 87 MovieClip Frame 10
onClipEvent (enterFrame) {
if (_root.haRatio < 0) {
gotoAndStop(Math.round((10 * (_root.haRatio * 100)) / 102) * -1);
} else {
gotoAndStop(Math.round((10 * (_root.haRatio * 100)) / 102));
}
}
Symbol 87 MovieClip Frame 60
_root.sdarrowgo = 2;
Symbol 97 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 48
stop();
Symbol 99 MovieClip Frame 80
stop();
Instance of Symbol 100 MovieClip in Symbol 101 MovieClip Frame 1
onClipEvent (enterFrame) {
_rotation = _parent._parent.bow._rotation;
if (_root.charSide == "right") {
_xscale = 100;
}
if (_root.charSide == "left") {
_xscale = -100;
_rotation = (_rotation - 180);
}
}
Symbol 108 MovieClip Frame 80
stop();
Instance of Symbol 109 MovieClip in Symbol 110 MovieClip Frame 1
onClipEvent (enterFrame) {
_root.bowhiss = boxx._currentframe;
_rotation = _parent._parent.bow._rotation;
if (_root.charSide == "right") {
_xscale = 100;
}
if (_root.charSide == "left") {
_xscale = -100;
_rotation = (_rotation - 180);
}
}
Instance of Symbol 100 MovieClip in Symbol 111 MovieClip Frame 1
onClipEvent (load) {
_rotation = _parent._parent.bow._rotation;
if (_root.charSide == "right") {
_xscale = 100;
}
if (_root.charSide == "left") {
_xscale = -100;
_rotation = (_rotation - 180);
}
}
Symbol 112 MovieClip Frame 15
stop();
Instance of Symbol 113 MovieClip in Symbol 114 MovieClip Frame 1
onClipEvent (load) {
_rotation = _parent._parent.bow._rotation;
if (_root.charSide == "right") {
_xscale = 100;
}
if (_root.charSide == "left") {
_xscale = -100;
_rotation = (_rotation - 180);
}
}
Symbol 115 MovieClip Frame 15
stop();
_root.charState = "standing";
this._parent.gotoAndStop("standing");
Symbol 117 MovieClip Frame 15
_root.recovering = false;
_root.isOnTree = false;
_root.canMove = true;
_root.stopAll = false;
_root.gotHit = false;
_root.canMoveOnGround = true;
_root.charState = "running";
_root.gameContainer.character.gotoAndStop("running");
_root.gameContainer.character.characterIn.gotoAndStop("running");
trace("shit");
_parent.gotoAndStop(2);
_parent.characterIn.gotoAndStop(2);
_parent.gotoAndStop("standing");
_parent.characterIn.gotoAndStop("standing");
stop();
Symbol 118 MovieClip Frame 1
stop();
Symbol 118 MovieClip Frame 60
_root.bowhiss = 1;
Symbol 137 MovieClip Frame 13
_root.bowhiss = 1;
Symbol 138 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 80
stop();
Symbol 149 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.tpb != _root.tp) {
_root.tpb = _root.tp;
stopAllSounds();
gotoAndPlay(_root.tp * 2);
}
};
Symbol 149 MovieClip Frame 3
stop();
Symbol 149 MovieClip Frame 5
stop();
Symbol 149 MovieClip Frame 7
stop();
Symbol 149 MovieClip Frame 9
stop();
Symbol 154 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.sdarrowgo == 2) {
_root.sdarrowgo = 1;
gotoAndPlay((random(3) + 1) * 2);
}
};
Symbol 154 MovieClip Frame 3
stop();
Symbol 154 MovieClip Frame 5
stop();
Symbol 154 MovieClip Frame 7
stop();
Symbol 164 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.sdgotit == 2) {
_root.sdgotit = 1;
gotoAndPlay((random(9) + 1) * 2);
}
};
Symbol 164 MovieClip Frame 3
stop();
Symbol 164 MovieClip Frame 5
stop();
Symbol 164 MovieClip Frame 7
stop();
Symbol 164 MovieClip Frame 9
stop();
Symbol 164 MovieClip Frame 11
stop();
Symbol 164 MovieClip Frame 13
stop();
Symbol 164 MovieClip Frame 15
stop();
Symbol 164 MovieClip Frame 17
stop();
Symbol 164 MovieClip Frame 19
stop();
Symbol 174 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.sddie == 2) {
_root.sddie = 1;
gotoAndPlay((random(9) + 1) * 2);
}
};
Symbol 174 MovieClip Frame 3
stop();
Symbol 174 MovieClip Frame 5
stop();
Symbol 174 MovieClip Frame 7
stop();
Symbol 174 MovieClip Frame 9
stop();
Symbol 174 MovieClip Frame 11
stop();
Symbol 174 MovieClip Frame 13
stop();
Symbol 174 MovieClip Frame 15
stop();
Symbol 174 MovieClip Frame 17
stop();
Symbol 174 MovieClip Frame 19
stop();
Symbol 184 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.sdattack == 2) {
_root.sdattack = 1;
gotoAndPlay((random(9) + 1) * 2);
}
};
Symbol 184 MovieClip Frame 3
stop();
Symbol 184 MovieClip Frame 5
stop();
Symbol 184 MovieClip Frame 7
stop();
Symbol 184 MovieClip Frame 9
stop();
Symbol 184 MovieClip Frame 11
stop();
Symbol 184 MovieClip Frame 13
stop();
Symbol 184 MovieClip Frame 15
stop();
Symbol 184 MovieClip Frame 17
stop();
Symbol 184 MovieClip Frame 19
stop();
Symbol 187 Button
on (keyPress "m") {
gotoAndStop (2);
}
on (keyPress "n") {
if (_currentframe == 2) {
gotoAndStop (3);
}
}
on (keyPress "b") {
if (_currentframe == 3) {
gotoAndStop (4);
}
}
on (keyPress "v") {
gotoAndStop (5);
}
on (keyPress "c") {
if (_currentframe == 5) {
gotoAndStop (6);
}
}
on (keyPress "x") {
if (_currentframe == 6) {
gotoAndStop (7);
}
}
Symbol 188 MovieClip Frame 1
stop();
Symbol 188 MovieClip Frame 4
_root.energy = 500;
Symbol 188 MovieClip Frame 7
_root.pts4upgrade = 100;
Symbol 189 MovieClip [GameContainer] Frame 1
stop();
Instance of Symbol 139 MovieClip in Symbol 189 MovieClip [GameContainer] Frame 1
onClipEvent (enterFrame) {
_x = _parent.character._x;
_y = (_parent.character._y - 70);
boxx.gotoAndStop(_root.bowhiss);
}
Symbol 193 MovieClip Frame 1
stop();
Symbol 198 MovieClip Frame 1
stop();
Symbol 203 MovieClip Frame 1
stop();
Symbol 209 MovieClip Frame 1
stop();
Symbol 214 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 1
stop();
Symbol 237 MovieClip Frame 1
stop();
Symbol 238 MovieClip Frame 40
if (_parent._parent._parent.hitPoints <= 66) {
gotoAndPlay (41);
} else {
gotoAndPlay (1);
}
Symbol 238 MovieClip Frame 120
if (_parent._parent._parent.hitPoints <= 33) {
gotoAndPlay (121);
} else if (_parent._parent._parent.hitPoints > 66) {
gotoAndPlay (1);
} else {
gotoAndPlay (41);
}
Symbol 238 MovieClip Frame 250
if (_parent._parent._parent.hitPoints > 33) {
gotoAndPlay (41);
} else {
gotoAndPlay (121);
}
Instance of Symbol 238 MovieClip "boxx" in Symbol 239 MovieClip Frame 1
onClipEvent (load) {
aa = _parent._parent._parent.typec;
boxx1.gotoAndStop(aa);
boxx2.gotoAndStop(aa);
boxx3.gotoAndStop(aa);
boxx4.gotoAndStop(aa);
boxx5.gotoAndStop(aa);
boxx6.gotoAndStop(aa);
boxx7.gotoAndStop(aa);
boxx8.gotoAndStop(aa);
boxx9.gotoAndStop(aa);
boxx10.gotoAndStop(aa);
boxx11.gotoAndStop(aa);
boxx12.gotoAndStop(aa);
boxx13.gotoAndStop(aa);
}
onClipEvent (enterFrame) {
if (boxx1._currentframe != _parent._parent._parent.typec) {
aa = _parent._parent._parent.typec;
boxx1.gotoAndStop(aa);
boxx2.gotoAndStop(aa);
boxx3.gotoAndStop(aa);
boxx4.gotoAndStop(aa);
boxx5.gotoAndStop(aa);
boxx6.gotoAndStop(aa);
boxx7.gotoAndStop(aa);
boxx8.gotoAndStop(aa);
boxx9.gotoAndStop(aa);
boxx10.gotoAndStop(aa);
boxx11.gotoAndStop(aa);
boxx12.gotoAndStop(aa);
boxx13.gotoAndStop(aa);
}
}
Symbol 245 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
if (this._parent._parent.bloodBurst == true) {
this._parent._parent.bloodBurst = false;
this.gotoAndPlay(2);
}
};
Instance of Symbol 84 MovieClip in Symbol 245 MovieClip Frame 3
onClipEvent (load) {
_rotation = (random(360) + 1);
_y = (10 - random(25));
}
Instance of Symbol 244 MovieClip in Symbol 245 MovieClip Frame 3
onClipEvent (load) {
gotoAndStop(Math.round((10 * _parent._parent._parent.hitPoints) / _parent._parent._parent.maxEnergy) + 1);
}
Symbol 249 MovieClip Frame 40
if (_parent._parent._parent.hitPoints <= 66) {
gotoAndPlay (41);
} else {
gotoAndPlay (1);
}
Symbol 249 MovieClip Frame 120
if (_parent._parent._parent.hitPoints <= 33) {
gotoAndPlay (121);
} else if (_parent._parent._parent.hitPoints > 66) {
gotoAndPlay (1);
} else {
gotoAndPlay (41);
}
Symbol 249 MovieClip Frame 250
if (_parent._parent._parent.hitPoints > 33) {
gotoAndPlay (41);
} else {
gotoAndPlay (121);
}
Instance of Symbol 249 MovieClip "boxx" in Symbol 250 MovieClip Frame 1
onClipEvent (load) {
aa = _parent._parent._parent.typec;
boxx1.gotoAndStop(aa);
boxx2.gotoAndStop(aa);
boxx3.gotoAndStop(aa);
boxx4.gotoAndStop(aa);
boxx5.gotoAndStop(aa);
boxx6.gotoAndStop(aa);
boxx7.gotoAndStop(aa);
boxx8.gotoAndStop(aa);
boxx9.gotoAndStop(aa);
boxx10.gotoAndStop(aa);
boxx11.gotoAndStop(aa);
boxx12.gotoAndStop(aa);
boxx13.gotoAndStop(aa);
}
Symbol 253 MovieClip Frame 1
_root.sdattack = 2;
Symbol 253 MovieClip Frame 40
if (this._parent._parent.thisState == "walking") {
trace(this._parent.gotoAndStop("walking"));
} else if (this._parent._parent.thisState == "goingBack") {
trace(this._parent.gotoAndStop("walking"));
}
Symbol 253 MovieClip Frame 41
_root.sdattack = 2;
Symbol 253 MovieClip Frame 80
if (this._parent._parent.thisState == "walking") {
trace(this._parent.gotoAndStop("walking"));
} else if (this._parent._parent.thisState == "goingBack") {
trace(this._parent.gotoAndStop("walking"));
}
Symbol 254 MovieClip Frame 1
_root.sddie = 2;
Symbol 254 MovieClip Frame 92
stop();
_root.deadEnemies++;
Symbol 254 MovieClip Frame 93
_root.sddie = 2;
Symbol 254 MovieClip Frame 184
stop();
_root.deadEnemies++;
Instance of Symbol 254 MovieClip "boxx" in Symbol 255 MovieClip Frame 1
onClipEvent (load) {
if (_parent._parent.gotor == 1) {
gotoAndPlay (93);
}
aa = _parent._parent._parent.typec;
boxx1.gotoAndStop(aa);
boxx2.gotoAndStop(aa);
boxx3.gotoAndStop(aa);
boxx4.gotoAndStop(aa);
boxx5.gotoAndStop(aa);
boxx6.gotoAndStop(aa);
boxx7.gotoAndStop(aa);
boxx8.gotoAndStop(aa);
boxx9.gotoAndStop(aa);
boxx10.gotoAndStop(aa);
boxx11.gotoAndStop(aa);
boxx12.gotoAndStop(aa);
boxx13.gotoAndStop(aa);
}
Symbol 255 MovieClip Frame 2
if (_parent._parent.typec == 2) {
_root.pts4upgrade = _root.pts4upgrade + 1;
}
if (_parent._parent.typec == 1) {
_root.pts4upgrade = _root.pts4upgrade + 1;
}
if (_parent._parent.typec == 5) {
_root.pts4upgrade = _root.pts4upgrade + 3;
}
if (_parent._parent.typec == 6) {
_root.pts4upgrade = _root.pts4upgrade + 2;
}
Symbol 255 MovieClip Frame 15
stop();
Symbol 256 MovieClip Frame 1
stop();
this.onEnterFrame = function () {
if (this._parent._parent.bloodBurst == true) {
this._parent._parent.bloodBurst = false;
this.gotoAndPlay(2);
}
};
Instance of Symbol 84 MovieClip in Symbol 256 MovieClip Frame 3
onClipEvent (load) {
_rotation = (random(360) + 1);
_y = (10 - random(25));
}
Symbol 257 MovieClip Frame 1
stop();
gotor = 1;
Symbol 257 MovieClip Frame 10
gotor = 2;
Instance of Symbol 253 MovieClip "enemyIn" in Symbol 257 MovieClip Frame 20
onClipEvent (load) {
ab = random(2) + 1;
if (ab == 2) {
gotoAndPlay (41);
}
aa = _parent._parent.typec;
boxx1.gotoAndStop(aa);
boxx2.gotoAndStop(aa);
boxx3.gotoAndStop(aa);
boxx4.gotoAndStop(aa);
boxx5.gotoAndStop(aa);
boxx6.gotoAndStop(aa);
boxx7.gotoAndStop(aa);
boxx8.gotoAndStop(aa);
boxx9.gotoAndStop(aa);
boxx10.gotoAndStop(aa);
boxx11.gotoAndStop(aa);
boxx12.gotoAndStop(aa);
boxx13.gotoAndStop(aa);
}
Symbol 260 MovieClip [Enemy] Frame 1
stop();
typec = 2;
Symbol 260 MovieClip [Enemy] Frame 10
typec = 1;
Symbol 260 MovieClip [Enemy] Frame 20
typec = 5;
Symbol 260 MovieClip [Enemy] Frame 30
typec = 6;
Symbol 264 MovieClip Frame 1
stop();
Symbol 270 MovieClip [Projectile] Frame 1
stop();
Symbol 288 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop(_root.energy + 1);
};
Symbol 298 Button
on (release) {
getURL (_root.moregameslink, "_blank");
}
Symbol 311 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
this.onReleaseOutside = function () {
this.gotoAndStop(1);
};
this.onRelease = function () {
getURL ("http://www.bubblebox.com/", "_blank");
};
Symbol 318 MovieClip Frame 27
stop();
Symbol 322 MovieClip Frame 1
stop();
Symbol 576 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop(_root.lavr + 1);
};
Symbol 576 MovieClip Frame 2
_root.moregameslink = "http://www.neodelight.com";
Symbol 576 MovieClip Frame 3
_root.moregameslink = "http://www.andkon.com";
Symbol 576 MovieClip Frame 4
_root.moregameslink = "http://www.anyad.rulez.org";
Symbol 576 MovieClip Frame 5
_root.moregameslink = "http://www.girldressupgames.biz";
Symbol 576 MovieClip Frame 6
_root.moregameslink = "http://www.bringler.com";
Symbol 576 MovieClip Frame 7
_root.moregameslink = "http://www.bubblebox.com";
Symbol 576 MovieClip Frame 8
_root.moregameslink = "http://www.bunnygames.com";
Symbol 576 MovieClip Frame 9
_root.moregameslink = "http://www.dailyfreegames.com";
Symbol 576 MovieClip Frame 10
_root.moregameslink = "http://www.directgamez.com";
Symbol 576 MovieClip Frame 11
_root.moregameslink = "http://www.2flashgames.com";
Symbol 576 MovieClip Frame 12
_root.moregameslink = "http://www.flashninjaclan.com";
Symbol 576 MovieClip Frame 13
_root.moregameslink = "http://www.dailyaddictinggames.com/";
Symbol 576 MovieClip Frame 14
_root.moregameslink = "http://www.funny-games.biz";
Symbol 576 MovieClip Frame 15
_root.moregameslink = "http://www.gameitnow.com";
Symbol 576 MovieClip Frame 16
_root.moregameslink = "http://www.gamesplz.com";
Symbol 576 MovieClip Frame 17
_root.moregameslink = "http://www.onjogos.com.br";
Symbol 576 MovieClip Frame 18
_root.moregameslink = "http://www.gamesfreak.net";
Symbol 576 MovieClip Frame 19
_root.moregameslink = "http://www.stoneagegames.com";
Symbol 576 MovieClip Frame 20
_root.moregameslink = "http://www.jarkey.net";
Symbol 576 MovieClip Frame 21
_root.moregameslink = "http://www.gamesgames.com/";
Symbol 576 MovieClip Frame 22
_root.moregameslink = "http://www.keepbusy.net";
Symbol 576 MovieClip Frame 23
_root.moregameslink = "http://www.microjogos.com";
Symbol 576 MovieClip Frame 24
_root.moregameslink = "http://www.minijuegos.com";
Symbol 576 MovieClip Frame 25
_root.moregameslink = "http://www.oyunskor.com/";
Symbol 576 MovieClip Frame 26
_root.moregameslink = "http://www.mostfungames.com";
Symbol 576 MovieClip Frame 27
_root.moregameslink = "http://www.gameshot.org";
Symbol 576 MovieClip Frame 28
_root.moregameslink = "http://www.online-games-zone.com/";
Symbol 576 MovieClip Frame 29
_root.moregameslink = "http://www.puffgames.com";
Symbol 576 MovieClip Frame 30
_root.moregameslink = "http://www.spele.nl";
Symbol 576 MovieClip Frame 31
_root.moregameslink = "http://www.t45ol.com";
Symbol 576 MovieClip Frame 32
_root.moregameslink = "http://www.thegamesonline.com/";
Symbol 576 MovieClip Frame 33
_root.moregameslink = "http://www.ultimatearcade.com";
Symbol 576 MovieClip Frame 34
_root.moregameslink = "http://www.girlgames4u.com/";
Symbol 576 MovieClip Frame 35
_root.moregameslink = "http://www.gamesfree.ca/";
Symbol 576 MovieClip Frame 36
_root.moregameslink = "http://www.stickpage.com/";
Symbol 576 MovieClip Frame 37
_root.moregameslink = "http://www.gamespond.net/";
Symbol 576 MovieClip Frame 38
_root.moregameslink = "http://www.flashgames.it/";
Symbol 576 MovieClip Frame 39
_root.moregameslink = "http://www.gamesgirl.ca/";
Symbol 576 MovieClip Frame 40
_root.moregameslink = "http://www.hallpass.com/";
Symbol 576 MovieClip Frame 41
_root.moregameslink = "http://www.addictinggames.com/";
Symbol 576 MovieClip Frame 42
_root.moregameslink = "http://www.benz.be";
Symbol 576 MovieClip Frame 43
_root.moregameslink = "http://www.net-games.co.il/";
Symbol 576 MovieClip Frame 44
_root.moregameslink = "http://www.net-games.biz/";
Symbol 576 MovieClip Frame 45
_root.moregameslink = "http://www.pinkyarcade.com/";
Symbol 576 MovieClip Frame 46
_root.moregameslink = "http://www.komikler.com/index.php";
Symbol 576 MovieClip Frame 47
_root.moregameslink = "http://www.twizl.com/";
Symbol 576 MovieClip Frame 48
_root.moregameslink = "http://www.a10.com/";
Symbol 576 MovieClip Frame 49
_root.moregameslink = "http://www.bonniegames.com/";
Symbol 576 MovieClip Frame 50
_root.moregameslink = "http://www.ug2.com/";
Symbol 576 MovieClip Frame 51
_root.moregameslink = "http://www.agame.com";
Symbol 576 MovieClip Frame 52
_root.moregameslink = "http://www.gamesclub.com/";
Symbol 576 MovieClip Frame 53
_root.moregameslink = "http://www.killhours.com/";
Symbol 576 MovieClip Frame 54
_root.moregameslink = "http://www.flasharcadegamessite.com/";
Symbol 576 MovieClip Frame 55
_root.moregameslink = "http://www.roundgames.com/";
Symbol 576 MovieClip Frame 56
_root.moregameslink = "http://www.arcadegangsta.com/";
Symbol 576 MovieClip Frame 57
_root.moregameslink = "http://www.gamebusted.com/";
Symbol 576 MovieClip Frame 58
_root.moregameslink = "http://www.flash-games.net/";
Symbol 576 MovieClip Frame 59
_root.moregameslink = "http://www.flash-game.net/";
Symbol 576 MovieClip Frame 60
_root.moregameslink = "http://www.kingofgames.net";
Symbol 576 MovieClip Frame 61
_root.moregameslink = "http://www.stungames.com/";
Symbol 576 MovieClip Frame 62
_root.moregameslink = "http://www.123spill.no/";
Symbol 576 MovieClip Frame 63
_root.moregameslink = "http://www.dailygames.com/";
Symbol 576 MovieClip Frame 64
_root.moregameslink = "http://www.octogames.com/";
Symbol 576 MovieClip Frame 65
_root.moregameslink = "http://www.ugotgames.com/";
Symbol 576 MovieClip Frame 66
_root.moregameslink = "http://www.fupa.com/";
Symbol 576 MovieClip Frame 67
_root.moregameslink = "http://www.kibagames.com/";
Symbol 576 MovieClip Frame 68
_root.moregameslink = "http://www.kraloyun.com/";
Symbol 576 MovieClip Frame 69
_root.moregameslink = "http://www.spielaffe.de/";
Symbol 576 MovieClip Frame 70
_root.moregameslink = "http://www.39games.com";
Symbol 576 MovieClip Frame 71
_root.moregameslink = "http://www.bijuegos.com";
Symbol 576 MovieClip Frame 72
_root.moregameslink = "http://www.mofunzone.com";
Symbol 581 Button
on (release) {
act = 2;
}
on (rollOver) {
act = 3;
gotoAndPlay (2);
}
on (rollOut) {
gotoAndPlay (11);
}
Symbol 585 MovieClip Frame 26
stop();
Symbol 586 MovieClip Frame 1
stop();
Symbol 591 MovieClip Frame 1
stop();
Symbol 591 MovieClip Frame 10
stop();
Symbol 591 MovieClip Frame 30
gotoAndStop (1);
Symbol 591 MovieClip Frame 31
stop();
Symbol 591 MovieClip Frame 32
stop();
Symbol 624 MovieClip Frame 1
stop();
Symbol 628 Button
on (release) {
act = 2;
}
on (rollOver) {
gotoAndPlay (2);
}
on (rollOut) {
gotoAndPlay (11);
}
Symbol 629 MovieClip Frame 1
stop();
Symbol 629 MovieClip Frame 10
stop();
Symbol 631 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (_root.sd_upgrade == 2) {
_root.sd_upgrade = 1;
gotoAndPlay (2);
}
};
Symbol 631 MovieClip Frame 3
stop();
Symbol 638 Button
on (release) {
gotoAndPlay (2);
}
Symbol 639 MovieClip Frame 1
stop();
Symbol 639 MovieClip Frame 30
stop();
_root.headcheat = 2;
Symbol 642 Button
on (release) {
gotoAndPlay (2);
}
Symbol 643 MovieClip Frame 1
stop();
Symbol 643 MovieClip Frame 30
_root.headcheat = 3;
stop();
Symbol 645 Button
on (release) {
_root.headcheat = 1;
}
Symbol 646 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop(_root.headcheat);
};
Instance of Symbol 591 MovieClip in Symbol 647 MovieClip [UpgradeWindow] Frame 1
onClipEvent (enterFrame) {
ndpts = 3;
maxpts = 20;
elementlvl = _root.daggerStack;
if (elementlvl == maxpts) {
gotoAndStop (31);
}
if (_root.pts4upgrade == 0) {
gotoAndStop (32);
}
if ((_root.pts4upgrade != 0) && (elementlvl != maxpts)) {
if ((_currentframe == 31) || (_currentframe == 32)) {
gotoAndStop (1);
}
}
if (act == 2) {
act = 1;
_root.pts4upgrade = _root.pts4upgrade - 1;
_root.pts4_1 = _root.pts4_1 + 1;
_root.pts4_1_2 = _root.pts4_1_2 + 1;
if (_root.pts4_1_2 == ndpts) {
upbl.gotoAndPlay(2);
_root.sd_upgrade = 2;
_root.pts4_1_2 = 0;
_root.daggerStack = _root.daggerStack + 1;
}
}
if (act == 3) {
act = 1;
_root.tamerebox = ndpts + " points needed to upgrade";
}
}
Instance of Symbol 591 MovieClip in Symbol 647 MovieClip [UpgradeWindow] Frame 1
onClipEvent (enterFrame) {
ndpts = 100;
maxpts = 3;
elementlvl = _root.bowType;
if (elementlvl == maxpts) {
gotoAndStop (31);
}
if (_root.pts4upgrade == 0) {
gotoAndStop (32);
}
if ((_root.pts4upgrade != 0) && (elementlvl != maxpts)) {
if ((_currentframe == 31) || (_currentframe == 32)) {
gotoAndStop (1);
}
}
if (act == 2) {
act = 1;
_root.pts4upgrade = _root.pts4upgrade - 1;
_root.pts4_2 = _root.pts4_2 + 1;
_root.pts4_2_2 = _root.pts4_2_2 + 1;
if (_root.pts4_2_2 == ndpts) {
upbl.gotoAndPlay(2);
_root.sd_upgrade = 2;
_root.pts4_2_2 = 0;
_root.bowType = _root.bowType + 1;
}
}
if (act == 3) {
act = 1;
_root.tamerebox = ndpts + " points needed to upgrade";
}
}
Instance of Symbol 591 MovieClip in Symbol 647 MovieClip [UpgradeWindow] Frame 1
onClipEvent (enterFrame) {
ndpts = 8;
maxpts = 65;
elementlvl = _root.bowDamageToAdd;
_root.bowDamageToAdd_debug = _root.bowDamageToAdd + 35;
if (elementlvl == maxpts) {
gotoAndStop (31);
}
if (_root.pts4upgrade == 0) {
gotoAndStop (32);
}
if ((_root.pts4upgrade != 0) && (elementlvl != maxpts)) {
if ((_currentframe == 31) || (_currentframe == 32)) {
gotoAndStop (1);
}
}
if (act == 2) {
act = 1;
_root.pts4upgrade = _root.pts4upgrade - 1;
_root.pts4_3 = _root.pts4_3 + 1;
_root.pts4_3_2 = _root.pts4_3_2 + 1;
if (_root.pts4_3_2 == ndpts) {
upbl.gotoAndPlay(2);
_root.sd_upgrade = 2;
_root.pts4_3_2 = 0;
_root.bowDamageToAdd = _root.bowDamageToAdd + 1;
}
}
if (act == 3) {
act = 1;
_root.tamerebox = ndpts + " points needed to upgrade";
}
}
Instance of Symbol 591 MovieClip in Symbol 647 MovieClip [UpgradeWindow] Frame 1
onClipEvent (enterFrame) {
ndpts = 5;
maxpts = 3;
elementlvl = _root.bowDamageMultiplier;
_root.bowDamageMultiplier_debug = Math.round(_root.bowDamageMultiplier * 10);
if (elementlvl == maxpts) {
gotoAndStop (31);
}
if (_root.pts4upgrade == 0) {
gotoAndStop (32);
}
if ((_root.pts4upgrade != 0) && (elementlvl != maxpts)) {
if ((_currentframe == 31) || (_currentframe == 32)) {
gotoAndStop (1);
}
}
if (act == 2) {
act = 1;
_root.pts4upgrade = _root.pts4upgrade - 1;
_root.pts4_4 = _root.pts4_4 + 1;
_root.pts4_4_2 = _root.pts4_4_2 + 1;
if (_root.pts4_4_2 == ndpts) {
upbl.gotoAndPlay(2);
_root.sd_upgrade = 2;
_root.pts4_4_2 = 0;
_root.bowDamageMultiplier = _root.bowDamageMultiplier + 0.1;
}
}
if (act == 3) {
act = 1;
_root.tamerebox = ndpts + " points needed to upgrade";
}
}
Instance of Symbol 591 MovieClip in Symbol 647 MovieClip [UpgradeWindow] Frame 1
onClipEvent (enterFrame) {
ndpts = 6;
maxpts = 400;
elementlvl = _root.energyToAdd;
_root.energyToAdd_debug = _root.energyToAdd + 100;
if (elementlvl == maxpts) {
gotoAndStop (31);
}
if (_root.pts4upgrade == 0) {
gotoAndStop (32);
}
if ((_root.pts4upgrade != 0) && (elementlvl != maxpts)) {
if ((_currentframe == 31) || (_currentframe == 32)) {
gotoAndStop (1);
}
}
if (act == 2) {
act = 1;
_root.pts4upgrade = _root.pts4upgrade - 1;
_root.pts4_5 = _root.pts4_5 + 1;
_root.pts4_5_2 = _root.pts4_5_2 + 1;
if (_root.pts4_5_2 == ndpts) {
upbl.gotoAndPlay(2);
_root.sd_upgrade = 2;
_root.pts4_5_2 = 0;
_root.energyToAdd = _root.energyToAdd + 10;
}
}
if (act == 3) {
act = 1;
_root.tamerebox = ndpts + " points needed to upgrade";
}
}
Instance of Symbol 629 MovieClip in Symbol 647 MovieClip [UpgradeWindow] Frame 1
onClipEvent (load) {
boxx.txx = "more games";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
getURL ("http://www.gamesfree.ca", "_blank");
}
}
Instance of Symbol 629 MovieClip in Symbol 647 MovieClip [UpgradeWindow] Frame 1
onClipEvent (load) {
boxx.txx = "ninja masters";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
getURL ("http://www.gamesfree.ca/hs/bloodshadehs.php", "_blank");
}
}
Instance of Symbol 629 MovieClip in Symbol 647 MovieClip [UpgradeWindow] Frame 1
onClipEvent (load) {
boxx.txx = "treasures";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
getURL ("http://www.gamesfree.ca/walkthrough/bloodshade.php", "_blank");
}
}
Symbol 652 Button
on (release) {
act = 2;
}
on (rollOver) {
gotoAndPlay (2);
}
on (rollOut) {
gotoAndPlay (11);
}
Symbol 653 MovieClip Frame 1
stop();
Symbol 653 MovieClip Frame 10
stop();
Symbol 658 MovieClip Frame 1
stop();
Symbol 661 MovieClip Frame 1
_root.headcheat = 1;
stop();
onEnterFrame = function () {
gotoAndStop(_root.headcheat);
};
Instance of Symbol 656 MovieClip in Symbol 663 MovieClip Frame 1
onClipEvent (enterFrame) {
txx = "your score : " + _root.score;
}
Symbol 664 MovieClip Frame 3
namee = _root.yourname;
scoree = _root.score;
levell = _root.currentLevel + 1;
_root.namee = _root.yourname;
_root.scoree = _root.totdist;
_root.levell = _root.currentLevel + 1;
Symbol 664 MovieClip Frame 5
loadVariablesNum ((((("http://www.gamesfree.ca/hs/bloodshade.php?submit=1&namee=" + namee) + "&scoree=") + scoree) + "&levell=") + levell, 0, "GET");
Symbol 664 MovieClip Frame 60
_parent.gotoAndStop(3);
stop();
Symbol 665 MovieClip [DeadWindow] Frame 1
stop();
Instance of Symbol 653 MovieClip in Symbol 665 MovieClip [DeadWindow] Frame 1
onClipEvent (load) {
boxx.txx = "skip";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
_parent.gotoAndStop(2);
}
}
Instance of Symbol 653 MovieClip in Symbol 665 MovieClip [DeadWindow] Frame 1
onClipEvent (load) {
boxx.txx = "send score to ninja masters";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
_parent.gotoAndStop(2);
}
}
Instance of Symbol 656 MovieClip in Symbol 665 MovieClip [DeadWindow] Frame 1
onClipEvent (enterFrame) {
txx = "your score : " + _root.score;
}
Symbol 665 MovieClip [DeadWindow] Frame 2
stop();
_root.yourname = "enter here";
Instance of Symbol 653 MovieClip in Symbol 665 MovieClip [DeadWindow] Frame 2
onClipEvent (load) {
boxx.txx = "ok";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
if (_root.yourname == "enter here") {
_parent.gotoAndStop(3);
} else {
_root.name44 = "-" + _root.yourname;
_parent.gotoAndStop(4);
}
}
}
Symbol 665 MovieClip [DeadWindow] Frame 3
stop();
_root.score = 0;
Instance of Symbol 653 MovieClip in Symbol 665 MovieClip [DeadWindow] Frame 3
onClipEvent (load) {
boxx.txx = "ninja masters";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
getURL ("http://www.gamesfree.ca/hs/bloodshadehs.php", "_blank");
}
}
Instance of Symbol 653 MovieClip in Symbol 665 MovieClip [DeadWindow] Frame 3
onClipEvent (load) {
boxx.txx = "more games";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
getURL ("http://www.gamesfree.ca", "_blank");
}
}
Instance of Symbol 653 MovieClip in Symbol 665 MovieClip [DeadWindow] Frame 3
onClipEvent (load) {
boxx.txx = "treasures";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
getURL ("http://www.gamesfree.ca/walkthrough/bloodshade.php", "_blank");
}
}
Instance of Symbol 653 MovieClip in Symbol 665 MovieClip [DeadWindow] Frame 3
onClipEvent (load) {
boxx.txx = "pyrozen";
boxx2.txx = boxx.txx;
}
onClipEvent (enterFrame) {
if (act == 2) {
act = 1;
getURL ("http://www.pyrozen.com", "_blank");
}
}
Symbol 665 MovieClip [DeadWindow] Frame 4
stop();
Symbol 670 MovieClip Frame 1
_root.stop();
_root.PercentLoaded = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (_root.PercentLoaded != 100) {
setProperty(bar, _xscale , _root.PercentLoaded);
} else {
gotoAndStop ("loaded");
}
Symbol 670 MovieClip Frame 2
gotoAndPlay (1);
Symbol 670 MovieClip Frame 3
_root.play();
Symbol 738 MovieClip [__Packages.mochi.as2.MochiAd] Frame 0
class mochi.as2.MochiAd
{
function MochiAd () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {id:"hostLoadPcnt", pcnt:_local2}, clip._mochiad._containerLCName);
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
mochi.as2.MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
if (_local7._url.indexOf("http") != 0) {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
}
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new Object();
var _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
containerNotify(clip, {id:"unload"}, clip._mochiad._containerLCName);
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
containerRpcResult(clip, callbackID, _local4, clip._mochiad._containerLCName);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
containerRpcResult(clip, callbackID, _local3, clip._mochiad._containerLCName);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
static function containerNotify(clip, args, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.notify) {
_local1.notify(args);
} else {
new LocalConnection().send(lcName, "notify", args);
}
}
static function containerRpcResult(clip, callbackID, val, lcName) {
var _local1 = clip._mochiad._mochiad_ctr.ad.app;
if (_local1.rpcResult) {
_local1.rpcResult(callbackID, val);
} else {
new LocalConnection().send(lcName, "rpcResult", callbackID, val);
}
}
}
Symbol 739 MovieClip [__Packages.mochi.as2.MochiSync] Frame 0
class mochi.as2.MochiSync
{
var _syncContainer;
function MochiSync () {
_syncContainer = {};
}
function getProp(name) {
return(_syncContainer[name]);
}
function setProp(name, value) {
if (_syncContainer[name] == value) {
return(undefined);
}
_syncContainer[name] = value;
mochi.as2.MochiServices.send("sync_propUpdate", {name:name, value:value});
}
function triggerEvent(eventType, args) {
switch (eventType) {
case SYNC_REQUEST :
mochi.as2.MochiServices.send("sync_syncronize", _syncContainer);
break;
case SYNC_PROPERTY :
_syncContainer[args.name] = args.value;
}
}
static var SYNC_REQUEST = "SyncRequest";
static var SYNC_PROPERTY = "UpdateProperty";
}
Symbol 740 MovieClip [__Packages.mochi.as2.MochiServices] Frame 0
class mochi.as2.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("3.3 as2");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
warnID(id, false);
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local6 = "_mochiservices_com_" + id;
var _local5 = new MovieClipLoader();
var _local3 = {};
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servURL) {
_servURL = urlOptions().servURL;
}
var _local4 = _servURL + _services;
if (urlOptions().servicesURL) {
_local4 = urlOptions().servicesURL;
}
allowDomains(_local4);
_clip = clip.createEmptyMovieClip(_local6, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
listen();
if (_local3.waitInterval != null) {
clearInterval(_local3.waitInterval);
}
_local3.onLoadError = loadError;
_local3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_local3.startTime = getTimer();
_local3.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_local3.waitInterval = setInterval(_local3, "wait", 1000);
_local5.addListener(_local3);
_local5.loadClip((((((_local4 + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options)) + "&api_version=") + getVersion(), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
return(_clip);
}
static function loadError(target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
disconnect();
onError.apply(null, [errorCode]);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case "events" :
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case "coins" :
mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case "sync" :
mochi.as2.MochiServices.servicesSync.triggerEvent(pkg.event, pkg.args);
}
};
_listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ["IOError"]);
};
trace("[SERVICES_API] connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
trace("Error: MochiServices not connected. Please call MochiServices.connect(). Function: " + methodName);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
var _local6;
if (_root._url.indexOf("mochiad_options") != -1) {
var _local2 = (_root._url.indexOf("mochiad_options") + "mochiad_options".length) + 1;
_local6 = _root._url.substr(_local2, _root._url.length);
} else if (_root.mochiad_options) {
_local6 = _root.mochiad_options;
}
if (_local6) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function warnID(bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace(("WARNING: " + (leaderboard ? "board" : "game")) + " ID is not the appropriate length");
return(undefined);
}
if (bid == "1e113c7239048b3f") {
if (leaderboard) {
trace("WARNING: Using testing board ID");
} else {
trace("WARNING: Using testing board ID as game ID");
}
return(undefined);
}
if (bid == "84993a1de4031cd8") {
if (leaderboard) {
trace("WARNING: Using testing game ID as board ID");
} else {
trace("WARNING: Using testing game ID");
}
return(undefined);
}
var _local1 = 0;
while (_local1 < bid.length) {
switch (bid.charAt(_local1)) {
case "0" :
case "1" :
case "2" :
case "3" :
case "4" :
case "5" :
case "6" :
case "7" :
case "8" :
case "9" :
case "a" :
case "b" :
case "c" :
case "d" :
case "e" :
case "f" :
break;
default :
trace("WARNING: Board ID contains illegal characters: " + bid);
return(undefined);
}
_local1++;
}
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static function setContainer(clip) {
}
static function stayOnTop(clip) {
}
static var _servURL = "http://www.mochiads.com/static/lib/services/";
static var _services = "services.swf";
static var _mochiLC = "MochiLC.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
static var servicesSync = new mochi.as2.MochiSync();
}
Symbol 741 MovieClip [__Packages.mochi.as2.MochiEventDispatcher] Frame 0
class mochi.as2.MochiEventDispatcher
{
var eventTable;
function MochiEventDispatcher () {
eventTable = {};
}
function buildDelegate(thisObject, thatObject) {
var _local2 = {thisObject:thisObject, thatObject:thatObject};
if (thatObject != undefined) {
var funct = ((typeof(thatObject) == "string") ? (thisObject[thatObject]) : (thatObject));
_local2.delegate = function (args) {
funct.call(thisObject, args);
};
} else {
_local2.delegate = thisObject;
}
return(_local2);
}
function compareDelegate(d_A, d_B) {
if ((d_A.thisObject != d_B.thisObject) || (d_A.thatObject != d_B.thatObject)) {
return(false);
}
return(true);
}
function addEventListener(event, thisObject, thatObject) {
removeEventListener(event, thisObject, thatObject);
eventTable[event].push(buildDelegate(thisObject, thatObject));
}
function removeEventListener(event, thisObject, thatObject) {
var _local3 = buildDelegate(thisObject, thatObject);
if (eventTable[event] == undefined) {
eventTable[event] = [];
return(undefined);
}
for (var _local4 in eventTable[event]) {
if (!compareDelegate(eventTable[event][_local4], _local3)) {
continue;
}
eventTable[event].splice(Number(_local4), 1);
}
}
function triggerEvent(event, args) {
if (eventTable[event] == undefined) {
return(undefined);
}
for (var _local4 in eventTable[event]) {
eventTable[event][_local4].delegate(args);
}
}
}
Symbol 742 MovieClip [__Packages.mochi.as2.MochiEvents] Frame 0
class mochi.as2.MochiEvents
{
static var gameStart, levelStart;
function MochiEvents () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function startSession(achievementID) {
mochi.as2.MochiServices.send("events_beginSession", {achievementID:achievementID}, null, null);
}
static function trigger(kind, obj) {
if (obj == undefined) {
obj = {};
} else if (obj.kind != undefined) {
trace("WARNING: optional arguements package contains key 'id', it will be overwritten");
obj.kind = kind;
}
mochi.as2.MochiServices.send("events_triggerEvent", {eventObject:obj}, null, null);
}
static function setNotifications(clip, style) {
var _local2 = {};
for (var _local3 in style) {
_local2[_local3] = style[_local3];
}
_local2.clip = clip;
mochi.as2.MochiServices.send("events_setNotifications", _local2, null, null);
}
static function addEventListener(eventType, thisObject, thatObject) {
_dispatcher.addEventListener(eventType, thisObject, thatObject);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, thisObject, thatObject) {
_dispatcher.removeEventListener(eventType, thisObject, thatObject);
}
static function startGame() {
gameStart = new Date().getTime();
trigger("start_game");
}
static function endGame() {
var _local1 = new Date().getTime() - gameStart;
trigger("end_game", {time:_local1});
}
static function startLevel() {
levelStart = new Date().getTime();
trigger("start_level");
}
static function endLevel() {
var _local1 = new Date().getTime() - levelStart;
trigger("end_level", {time:_local1});
}
static var ACHIEVEMENT_RECEIVED = "AchievementReceived";
static var ALIGN_TOP_LEFT = "ALIGN_TL";
static var ALIGN_TOP = "ALIGN_T";
static var ALIGN_TOP_RIGHT = "ALIGN_TR";
static var ALIGN_LEFT = "ALIGN_L";
static var ALIGN_CENTER = "ALIGN_C";
static var ALIGN_RIGHT = "ALIGN_R";
static var ALIGN_BOTTOM_LEFT = "ALIGN_BL";
static var ALIGN_BOTTOM = "ALIGN_B";
static var ALIGN_BOTTOM_RIGHT = "ALIGN_BR";
static var FORMAT_SHORT = "ShortForm";
static var FORMAT_LONG = "LongForm";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 743 MovieClip [__Packages.mochi.as2.MochiCoins] Frame 0
class mochi.as2.MochiCoins
{
function MochiCoins () {
}
static function getVersion() {
return(mochi.as2.MochiServices.getVersion());
}
static function showStore(options) {
mochi.as2.MochiServices.send("coins_showStore", {options:options}, null, null);
}
static function showItem(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showItem call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showItem", {options:options}, null, null);
}
static function showVideo(options) {
if ((options == undefined) || (typeof(options.item) != "string")) {
trace("ERROR: showVideo call must pass an Object with an item key");
return(undefined);
}
mochi.as2.MochiServices.send("coins_showVideo", {options:options}, null, null);
}
static function showLoginWidget(options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send("coins_showLoginWidget", {options:options});
}
static function hideLoginWidget() {
mochi.as2.MochiServices.send("coins_hideLoginWidget");
}
static function getStoreItems() {
mochi.as2.MochiServices.send("coins_getStoreItems");
}
static function getUserInfo() {
mochi.as2.MochiServices.send("coins_getUserInfo");
}
static function saveUserProperties(properties) {
mochi.as2.MochiServices.send("coins_saveUserProperties", properties);
}
static function addEventListener(eventType, delegate) {
_dispatcher.addEventListener(eventType, delegate);
}
static function triggerEvent(eventType, args) {
_dispatcher.triggerEvent(eventType, args);
}
static function removeEventListener(eventType, delegate) {
_dispatcher.removeEventListener(eventType, delegate);
}
static var LOGGED_IN = "LoggedIn";
static var LOGGED_OUT = "LoggedOut";
static var LOGIN_SHOW = "LoginShow";
static var LOGIN_HIDE = "LoginHide";
static var STORE_SHOW = "StoreShow";
static var STORE_HIDE = "StoreHide";
static var PROFILE_SHOW = "ProfileShow";
static var PROFILE_HIDE = "ProfileHide";
static var PROPERTIES_SAVED = "PropertySaved";
static var WIDGET_LOADED = "WidgetLoaded";
static var ITEM_OWNED = "ItemOwned";
static var ITEM_NEW = "ItemNew";
static var STORE_ITEMS = "StoreItems";
static var USER_INFO = "UserInfo";
static var ERROR = "Error";
static var IO_ERROR = "IOError";
static var NO_USER = "NoUser";
static var PROPERTIES_SIZE = "PropertiesSize";
static var _dispatcher = new mochi.as2.MochiEventDispatcher();
}
Symbol 676 Button
on (release, keyPress "<Space>") {
_root.got2go = 2;
}
Symbol 677 MovieClip Frame 150
stop();
Symbol 684 MovieClip Frame 67
stop();
Symbol 700 MovieClip Frame 12
stop();
Symbol 701 MovieClip Frame 7
stopAllSounds();
Symbol 701 MovieClip Frame 285
_root.got2go = 2;
stop();
Symbol 703 Button
on (release) {
getURL ("http://www.pyrozen.com/", "_blank");
}
on (keyPress "<Space>") {
_root.got2go = 2;
}
Symbol 712 Button
on (release) {
gotoAndStop (2);
}
Symbol 717 Button
on (release) {
gotoAndStop (3);
}
Symbol 734 Button
on (release) {
gotoAndStop (4);
}
Symbol 736 Button
on (release) {
gotoAndStop (5);
}
Symbol 737 MovieClip Frame 1
stop();
Symbol 737 MovieClip Frame 5
_root.got2go = 2;
stop();