Frame 1
fscommand ("trapallkeys", true);
fscommand ("showmenu", false);
fscommand ("trapallkeys", "true");
fscommand ("allowscale", false);
id = 127;
mySound = new Sound(this);
mySound.setVolume(100);
Total = _root.getBytesTotal();
TotalField = Total;
Percent = 1;
Instance of Symbol 332 MovieClip "bar" in Frame 1
onClipEvent (enterFrame) {
this._xscale = _root.Percent;
}
Frame 2
Load = _root.getBytesLoaded();
LoadField = Load;
Percent = int((Load / Total) * 100);
PercentField = Percent + " %";
Frame 3
if (Load < Total) {
gotoAndPlay (2);
}
Instance of Symbol 256 MovieClip in Frame 4
on (release) {
getURL ("http://madfatcat.com", "_blank");
}
Frame 50
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("e6f8ab80", this, 10301, true);
Frame 166
loadMovie ("http://madfatcat.com/sw.swf", "sec");
zastSound = new Sound(this);
zastSound.stop();
zastSound.attachSound("_music1");
zastSound.start(0, 1000);
Instance of Symbol 346 MovieClip "i" in Frame 166
on (release) {
getURL ("http://www.madfatcat.com/highscores/" + _root.id, "_blank");
var thisSound = new Sound(this);
thisSound.stop();
thisSound.attachSound("_click");
thisSound.start();
}
Instance of Symbol 354 MovieClip in Frame 166
onClipEvent (load) {
zvuk = true;
}
on (release) {
zvuk = !zvuk;
if (zvuk == true) {
_root.mySound.setVolume(100);
this.gotoAndStop(1);
} else {
_root.mySound.setVolume(0);
this.gotoAndStop(2);
}
}
Frame 177
function buttonScale() {
if (this.hitTest(_xmouse, _ymouse)) {
this._xscale = (this._yscale = this._yscale + ((100 - this._yscale) / 5));
} else {
this._xscale = (this._yscale = this._yscale - ((this._yscale - 80) / 5));
}
}
s.onEnterFrame = buttonScale;
i.onEnterFrame = buttonScale;
c.onEnterFrame = buttonScale;
p.onEnterFrame = buttonScale;
s.onRelease = function () {
_root.play();
_root.rootSound.stop();
var _local3 = new Sound(this);
_local3.stop();
_local3.attachSound("_click");
_local3.start();
};
p.onRelease = function () {
getURL ("http://madfatcat.com", "_blank");
var _local2 = new Sound(this);
_local2.stop();
_local2.attachSound("_click");
_local2.start();
};
c.onRelease = function () {
_root.attachMovie("credits", "credits", _root.getNextHighestDepth());
var _local3 = new Sound(this);
_local3.stop();
_local3.attachSound("_click");
_local3.start();
};
stop();
Frame 187
function poKrugu() {
if (this._name != yourChars) {
this.gotoAndStop(1);
}
this.rotation = this.rotation + ((this.rotationTarget - this.rotation) / 10);
this._x = (Math.cos(this.rotation) * 150) + xOffset;
this._y = (Math.sin(this.rotation) * 40) + yOffset;
this._xscale = (this._yscale = ((this._y * 1.4) + 50) - yOffset);
this.aaa = Math.abs(220 - this._x) / 1000;
productGroup.redMultiplier = (this._xscale / 200) - this.aaa;
productGroup.greenMultiplier = (this._xscale / 200) - this.aaa;
productGroup.blueMultiplier = (this._xscale / 200) - this.aaa;
productGroupp.redMultiplier = (this._xscale / 137) - this.aaa;
productGroupp.greenMultiplier = (this._xscale / 137) - this.aaa;
productGroupp.blueMultiplier = (this._xscale / 137) - this.aaa;
this.transform.colorTransform = productGroup;
this.ccc.transform.colorTransform = productGroupp;
maxY = 0;
activeCard = 0;
i = 1;
while (i <= 3) {
if ((this._y > eval ("char" + i)._y) && (this.getDepth() < eval ("char" + i).getDepth())) {
this.swapDepths(eval ("char" + i));
}
if ((this._y < eval ("char" + i)._y) && (this.getDepth() > eval ("char" + i).getDepth())) {
this.swapDepths(eval ("char" + i));
}
if (eval ("char" + i)._y > maxY) {
activeCard = eval ("char" + i).num;
maxY = eval ("char" + i)._y;
}
i++;
}
}
productGroup = new flash.geom.ColorTransform();
productGroupp = new flash.geom.ColorTransform();
productGroup.alphaMultiplier = 1;
productGroup.redMultiplier = 1;
productGroup.greenMultiplier = 1;
productGroup.blueMultiplier = 1;
xOffset = 320;
yOffset = 240;
speed = 0;
picsAmount = 9;
shag = 0.161787653393233;
this.onEnterFrame = function () {
if (((char0._y > char1._y) && (char0._y > char2._y)) && (char0._y > char3._y)) {
yourChars = "char0";
} else if (((char1._y > char0._y) && (char1._y > char2._y)) && (char1._y > char3._y)) {
yourChars = "char1";
} else if (((char2._y > char1._y) && (char2._y > char0._y)) && (char2._y > char3._y)) {
yourChars = "char2";
} else if (((char3._y > char1._y) && (char3._y > char2._y)) && (char3._y > char0._y)) {
yourChars = "char3";
}
if (eval (yourChars)._currentframe == 1) {
eval (yourChars).gotoAndPlay("move");
}
if (((eval ("c" + activeCard)._x > 213) && (eval ("c" + activeCard)._x < 223)) && (Math.abs(speed) < 0.08)) {
speed = 0;
}
if ((Math.abs(speed) < 0.005) && (eval ("c" + activeCard)._x >= 180)) {
speed = 0;
}
speed = speed - (speed / 10);
if (Math.abs(speed) < 0.005) {
activeCard = 1;
maxY = 0;
speed = 0;
i = 1;
while (i <= picsAmount) {
if (eval ("c" + i)._y > maxY) {
activeCard = eval ("c" + i).num;
maxY = eval ("c" + i)._y;
}
i++;
}
eval ("c" + activeCard).gotoAndStop(2);
eval ("c" + activeCard).c.currentTime = 50;
_root.end = false;
_root.t = 100;
}
};
l.onRelease = function () {
if (speed == 0) {
char0.rotationTarget = char0.rotationTarget + (Math.PI/2);
char1.rotationTarget = char1.rotationTarget + (Math.PI/2);
char2.rotationTarget = char2.rotationTarget + (Math.PI/2);
char3.rotationTarget = char3.rotationTarget + (Math.PI/2);
char0.gotoAndStop(1);
char1.gotoAndStop(1);
char2.gotoAndStop(1);
char3.gotoAndStop(1);
}
var _local2 = new Sound(this);
_local2.stop();
_local2.attachSound("_click");
_local2.start();
};
r.onRelease = function () {
if (speed == 0) {
char0.rotationTarget = char0.rotationTarget - (Math.PI/2);
char1.rotationTarget = char1.rotationTarget - (Math.PI/2);
char2.rotationTarget = char2.rotationTarget - (Math.PI/2);
char3.rotationTarget = char3.rotationTarget - (Math.PI/2);
char0.gotoAndStop(1);
char1.gotoAndStop(1);
char2.gotoAndStop(1);
char3.gotoAndStop(1);
}
var _local2 = new Sound(this);
_local2.stop();
_local2.attachSound("_click");
_local2.start();
};
char0.rotation = 0;
char1.rotation = (Math.PI/2);
char2.rotation = Math.PI;
char3.rotation = 4.71238898038469;
char0.rotationTarget = char0.rotation;
char1.rotationTarget = char1.rotation;
char2.rotationTarget = char2.rotation;
char3.rotationTarget = char3.rotation;
char0.onEnterFrame = poKrugu;
char1.onEnterFrame = poKrugu;
char2.onEnterFrame = poKrugu;
char3.onEnterFrame = poKrugu;
Frame 195
stop();
s.onEnterFrame = buttonScale;
s.onRelease = function () {
_root.play();
_root.rootSound.stop();
var _local3 = new Sound(this);
_local3.stop();
_local3.attachSound("_click");
_local3.start();
};
Frame 213
stop();
stop();
s.onEnterFrame = buttonScale;
s.onRelease = function () {
_root.play();
_root.rootSound.stop();
var _local3 = new Sound(this);
_local3.stop();
_local3.attachSound("_click");
_local3.start();
};
Frame 231
s.onEnterFrame = buttonScale;
s.onRelease = function () {
gotoAndPlay ("init");
};
Frame 240
ch.gotoAndPlay("move");
Frame 306
ch.gotoAndStop(1);
Frame 708
ch.gotoAndPlay("move");
Frame 739
function burningMissile() {
if (missile.onEnterFrame != drown) {
_root.attachMovie("flame", "fl" + (_root.getNextHighestDepth() + 1), _root.getNextHighestDepth(), {_x:_root.missile._x, _y:_root.missile._y});
eval ("fl" + _root.getNextHighestDepth()).onEnterFrame = burnOffset;
}
}
Frame 749
ch.gotoAndStop(1);
Frame 1015
m.mm.gotoAndStop(2);
Frame 1094
mm.gotoAndStop(2);
Frame 1174
level = 1;
accuracy = 20;
score = 0;
_damp = 0.96;
_dampThrow = 0.982;
charKK = 0.003;
missileKK = 0.003;
maxLevel = 1;
dexterityFactor = 0;
strengthFactor = 0;
defenseFactor = 0;
fireFactor = 0;
var missilesOnLevel0 = new Array();
var missilesOnLevel1 = new Array();
var missilesOnLevel2 = new Array();
var missilesOnLevel3 = new Array();
missilesOnLevel0[0] = 16;
missilesOnLevel1[0] = 15;
missilesOnLevel2[0] = 5;
missilesOnLevel3[0] = 5;
missilesOnLevel0[1] = 16;
missilesOnLevel1[1] = 14;
missilesOnLevel2[1] = 4;
missilesOnLevel3[1] = 1;
missilesOnLevel0[2] = 15;
missilesOnLevel1[2] = 13;
missilesOnLevel2[2] = 3;
missilesOnLevel3[2] = 1;
missilesOnLevel0[3] = 12;
missilesOnLevel1[3] = 15;
missilesOnLevel2[3] = 5;
missilesOnLevel3[3] = 1;
missilesOnLevel0[4] = 16;
missilesOnLevel1[4] = 17;
missilesOnLevel2[4] = 4;
missilesOnLevel3[4] = 1;
missilesOnLevel0[5] = 12;
missilesOnLevel1[5] = 15;
missilesOnLevel2[5] = 8;
missilesOnLevel3[5] = 2;
missilesOnLevel0[6] = 10;
missilesOnLevel1[6] = 19;
missilesOnLevel2[6] = 6;
missilesOnLevel3[6] = 2;
missilesOnLevel0[7] = 16;
missilesOnLevel1[7] = 19;
missilesOnLevel2[7] = 12;
missilesOnLevel3[7] = 2;
missilesOnLevel0[8] = 12;
missilesOnLevel1[8] = 16;
missilesOnLevel2[8] = 5;
missilesOnLevel3[8] = 2;
missilesOnLevel0[9] = 12;
missilesOnLevel1[9] = 15;
missilesOnLevel2[9] = 6;
missilesOnLevel3[9] = 3;
missilesOnLevel0[10] = 14;
missilesOnLevel1[10] = 15;
missilesOnLevel2[10] = 7;
missilesOnLevel3[10] = 2;
missilesOnLevel0[11] = 20;
missilesOnLevel1[11] = 20;
missilesOnLevel2[11] = 7;
missilesOnLevel3[11] = 3;
missilesOnLevel0[12] = 17;
missilesOnLevel1[12] = 13;
missilesOnLevel2[12] = 2;
missilesOnLevel3[12] = 4;
var land = new Array();
i = 0;
while (i < 12) {
land[i] = new Object();
land[i].land = eval ("land" + i);
eval ("land" + i).num = i;
i++;
}
land[0].whose = "char0";
land[1].whose = "char0";
land[2].whose = "char0";
land[3].whose = "char1";
land[4].whose = "char1";
land[5].whose = "char1";
land[6].whose = "char2";
land[7].whose = "char2";
land[8].whose = "char2";
land[9].whose = "char3";
land[10].whose = "char3";
land[11].whose = "char3";
Frame 1179
play();
address = _url;
address = address.substr(0, 16);
if ((address != "http://madfatcat") && (address != "http://www.madfa")) {
bgrSound.stop();
zastSound.stop();
bSound.stop();
MochiAd.showInterLevelAd({id:"f4de11dbfb71554e", res:"640x480"});
}
Frame 1180
if (level > maxLevel) {
maxLevel = level;
attachMovie("skills", "skills", _root.getNextHighestDepth());
}
Frame 1187
function blinking() {
this.transform.colorTransform = availableLand;
}
function clickOnLand() {
if (land[this.num].whose != yourChars) {
activeLand = this.num;
availableLand.alphaMultiplier = 1;
availableLand.redMultiplier = 1;
availableLand.greenMultiplier = 1;
availableLand.blueMultiplier = 1;
i = 0;
while (i < 12) {
land[i].land.transform.colorTransform = availableLand;
delete land[i].land.onEnterFrame;
delete land[i].land.onRelease;
i++;
}
this.transform.colorTransform = chosenLand;
enemyChars = land[this.num].whose;
play();
}
var _local2 = new Sound(this);
_local2.stop();
_local2.attachSound("_click");
_local2.start();
}
stop();
zastSound.stop();
zastSound.attachSound("_music1");
zastSound.start(0, 1000);
availableLand = new flash.geom.ColorTransform();
availableLand.alphaMultiplier = 2;
availableLand.redMultiplier = 1;
availableLand.greenMultiplier = 1;
availableLand.blueMultiplier = 1;
chosenLand = new flash.geom.ColorTransform();
chosenLand.alphaMultiplier = 1;
chosenLand.redMultiplier = 9;
chosenLand.greenMultiplier = 9;
chosenLand.blueMultiplier = 9;
colorOffset = 0.2;
this.onEnterFrame = function () {
if ((availableLand.alphaMultiplier >= 2) || (availableLand.alphaMultiplier <= 0)) {
colorOffset = -colorOffset;
}
availableLand.alphaMultiplier = availableLand.alphaMultiplier + colorOffset;
};
i = 0;
while (i < 12) {
eval ("land" + i).num = i;
i++;
}
i = 0;
while (i < 12) {
land[i].land.gotoAndStop(land[i].whose);
if (land[i].whose != yourChars) {
land[i].land.onEnterFrame = blinking;
}
i++;
}
land0.onRelease = (land1.onRelease = (land2.onRelease = (land3.onRelease = (land4.onRelease = (land5.onRelease = (land6.onRelease = (land7.onRelease = (land8.onRelease = (land9.onRelease = (land10.onRelease = (land11.onRelease = clickOnLand)))))))))));
Frame 1246
zastSound.stop();
Frame 1247
function getNearestMissile() {
chosen = false;
you[activeChar].test = true;
charSpeed = 0;
noWay = 0;
jumpSpeed = 0;
you[activeChar].direct = undefined;
you[activeChar].jumping = false;
you[activeChar].oldX = undefined;
you[activeChar].oldY = undefined;
you[activeChar].oldXX = you[activeChar]._x;
you[activeChar].oldYY = you[activeChar]._y;
iiii = 0;
while (iiii < yourCharsAmount) {
nearest = youBgr[iiii];
if (((((you[activeChar]._x - bgr._x) <= nearest._x) && ((neprohod >= nearest._x) || (neprohod <= (you[activeChar]._x - bgr._x)))) || (((you[activeChar]._x - bgr._x) >= nearest._x) && ((neprohod <= nearest._x) || (neprohod >= (you[activeChar]._x - bgr._x))))) || (neprohod == undefined)) {
iii = 0;
while (iii < 300) {
you[activeChar].enemyMove();
iii++;
}
if (iii == 300) {
neprohod = you[activeChar]._x - bgr._x;
}
charSpeed = 0;
noWay = 0;
jumpSpeed = 0;
you[activeChar].direct = undefined;
you[activeChar].jumping = false;
you[activeChar].oldX = undefined;
you[activeChar].oldY = undefined;
you[activeChar]._x = you[activeChar].oldXX;
you[activeChar]._y = you[activeChar].oldYY;
if (iii == 2001) {
chosen = true;
iiii = yourCharsAmount;
}
}
iiii++;
}
uuu = 0;
if (chosen != true) {
iiii = missiles;
while (iiii >= 0) {
nearest = missileBgr[iiii];
if (((((you[activeChar]._x - bgr._x) <= nearest._x) && ((neprohod >= nearest._x) || (neprohod <= (you[activeChar]._x - bgr._x)))) || (((you[activeChar]._x - bgr._x) >= nearest._x) && ((neprohod <= nearest._x) || (neprohod >= (you[activeChar]._x - bgr._x))))) || (neprohod == undefined)) {
uuu++;
iii = 0;
while (iii < 300) {
you[activeChar].enemyMove();
iii++;
}
charSpeed = 0;
noWay = 0;
jumpSpeed = 0;
you[activeChar].direct = undefined;
you[activeChar].jumping = false;
you[activeChar].oldX = undefined;
you[activeChar].oldY = undefined;
you[activeChar]._x = you[activeChar].oldXX;
you[activeChar]._y = you[activeChar].oldYY;
if (iii == 2001) {
if ((nearest.typ != "m22") || (random(3) == 1)) {
iiii = -5;
chosen = true;
}
}
}
iiii--;
}
}
you[activeChar].test = false;
if (chosen != true) {
nearest = undefined;
}
}
function charMove() {
if (pauseOn == true) {
return(undefined);
}
if (Key.isDown(16)) {
direct = undefined;
}
if ((Key.isDown(37) || (Key.isDown(65))) && ((((Key.isDown(39) == false) && (Key.isDown(68) == false)) && (Key.isDown(16) == false)) && (charSpeed <= 0))) {
if (this._xscale < 0) {
this._xscale = -this._xscale;
}
if (charSpeed > (-maxCharSpeed)) {
charSpeed = charSpeed - speedPrirost;
}
if ((direct != "left") && (jumpSpeed <= 3)) {
direct = "left";
if (bgr.hitTest(this._x, this._y + 5, true)) {
this.gotoAndPlay("move");
playSoundBgr("_step", 100);
}
}
}
if ((Key.isDown(39) || (Key.isDown(68))) && ((((Key.isDown(37) == false) && (Key.isDown(65) == false)) && (Key.isDown(16) == false)) && (charSpeed >= 0))) {
if (this._xscale > 0) {
this._xscale = -this._xscale;
}
if (charSpeed < maxCharSpeed) {
charSpeed = charSpeed + speedPrirost;
}
if ((direct != "right") && (jumpSpeed <= 3)) {
direct = "right";
if (bgr.hitTest(this._x, this._y + 5, true)) {
this.gotoAndPlay("move");
playSoundBgr("_step", 100);
}
}
}
if (((Key.isDown(38) || (Key.isDown(87))) && (Key.isDown(16) == false)) && (bgr.hitTest(this._x, this._y + 2, true))) {
jumpSpeed = 20;
this.gotoAndPlay("jump");
this.jumping = true;
playSoundBgr("_jump");
}
if (((((Key.isDown(39) == false) && (Key.isDown(37) == false)) && (Key.isDown(65) == false)) && (Key.isDown(68) == false)) && (bgr.hitTest(this._x, this._y + 2, true))) {
direct = undefined;
}
if (((charSpeed == 0) && (jumpSpeed < 3)) && (this.jumping != true)) {
this.gotoAndStop(1);
bgrSound.stop();
}
i = 0;
while (i < missiles) {
if (this.hitTest(missileBgr[i])) {
missileBgr[i].transform.colorTransform = availMissile;
missileBgr[i].avail = true;
} else {
missileBgr[i].transform.colorTransform = defaultMissile;
missileBgr[i].avail = false;
}
i++;
}
i = 0;
while (i < (yourCharsAmount + enemyCharsAmount)) {
if (this.hitTest(youBgr[i])) {
youBgr[i].transform.colorTransform = availMissile;
youBgr[i].avail = true;
} else {
youBgr[i].transform.colorTransform = defaultMissile;
youBgr[i].avail = false;
}
i++;
}
if (jumpSpeed > 0) {
this._y = this._y - jumpSpeed;
} else {
jumpSpeed = 0;
}
jumpSpeed = jumpSpeed - (jumpSpeed / 20);
if (bgr.hitTest(this._x + ((15 * charSpeed) / Math.abs(charSpeed)), this._y - 20, true) || (bgr.hitTest(this._x + ((14 * charSpeed) / Math.abs(charSpeed)), this._y - 60, true))) {
charSpeed = 0;
} else {
this._x = this._x + charSpeed;
i = 0;
while (bgr.hitTest(this._x, this._y, true) && (bgr.hitTest(this._x, this._y - 10, true) == false)) {
this._y = this._y - 1;
if (direct == "left") {
this._x = this._x + 1;
} else if (direct == "right") {
this._x = this._x - 1;
}
}
}
while (bgr.hitTest(this._x, this._y, true)) {
this._y = this._y - 1;
}
i = 0;
if ((Math.abs(this._x) < 2000) && (Math.abs(this._y) < 2000)) {
while ((bgr.hitTest(this._x, this._y + 2, true) == false) && (i < 9)) {
this._y = this._y + 1;
i++;
}
}
if (bgr.hitTest(this._x, this._y + 2, true) && (this.jumping == true)) {
this.gotoAndStop(1);
bgrSound.stop();
jumpSpeed = 0;
this.jumping = false;
if (charSpeed != 0) {
playSoundBgr("_step", 100);
this.gotoAndPlay("move");
}
}
if ((Math.abs(charSpeed) < 1) && (charSpeed != 0)) {
charSpeed = 0;
}
if (charSpeed > 0) {
charSpeed = charSpeed - 1;
}
if (charSpeed < 0) {
charSpeed = charSpeed + 1;
}
if (this._y > (bgr._y + 80)) {
this.drownTimeout = 0;
water.swapDepths(_root.getNextHighestDepth());
pan.swapDepths(_root.getNextHighestDepth());
this.onEnterFrame = drown;
this.hideHealth();
this._y = this._y + 30;
xoffset = (yoffset = 0);
topLayer.attachMovie("fontanchik", "fontanchik", topLayer.getNextHighestDepth(), {_x:this._x - topLayer._x, _y:(this._y - topLayer._y) + 10});
focusingObj = topLayer.fontanchik;
}
scrolling();
}
function waiting() {
if (pauseOn == true) {
return(undefined);
}
if ((this.hitTest(_xmouse, _ymouse, true) && (this.avail == true)) && (currentAction == "move")) {
this.hideHealth();
i = 0;
while (i < missiles) {
missileBgr[i].avail = false;
i++;
}
i = 0;
while (i < (yourCharsAmount + enemyCharsAmount)) {
youBgr[i].avail = false;
i++;
}
currentAction = "takeBall";
xoffset = (yoffset = 0);
tSound.setVolume(0);
bgrSound.stop();
pan.sk._visible = false;
main2bgr(you[activeChar]);
focusingObj = youBgr[activeChar];
_root.taken = true;
bgr2main(this, true);
youBgr[activeChar].gotoAndStop("throw");
youBgr[activeChar].onEnterFrame = throwMissile;
missile.avail = false;
if (missile.enemy == true) {
missile._xscale = -missile._xscale;
}
missile._x = youBgr[activeChar]._x + bgr._x;
missile._y = (youBgr[activeChar]._y + bgr._y) - 90;
removeMovieClip(this);
removeMovieClip(you[activeChar]);
while (bgr.hitTest(Math.round(missile._x), Math.round(missile._y), true)) {
missile._y--;
}
missile.oldX = missile._x;
missile.oldY = missile._y;
_root.attachMovie("throwingArrow", "throwingArrow", _root.getNextHighestDepth(), {_x:missile._x, _y:missile._y});
}
}
function takeBall() {
if (pauseOn == true) {
return(undefined);
}
if (((Key.isDown(32) && (currentAction == "takeBall")) && (this.burning != true)) && (((this.typ == "m0") && (level >= 3)) || ((this.typ == "m22") && (level >= 6)))) {
this.burning = true;
this.gotoAndStop("burning");
playSoundBgr("_shoot fireball");
} else if ((Key.isDown(32) && (this.typ == "m0")) && (level < 3)) {
msg = "Firing the boughs will be available after 2th level";
} else if ((Key.isDown(32) && (this.typ == "m22")) && (level < 6)) {
msg = "Firing the empty nests will be available after 5th level";
}
if ((youBgr[activeChar]._x + bgr._x) != (Stage.width / 2)) {
xoffset = Math.round(((Stage.width / 2) - (youBgr[activeChar]._x + bgr._x)) / 10);
}
if ((youBgr[activeChar]._y + bgr._y) != (Stage.height / 1.3)) {
yoffset = Math.round(((Stage.height / 1.3) - (youBgr[activeChar]._y + bgr._y)) / 10);
}
scrolling();
if ((Math.abs((Stage.width / 2) - (youBgr[activeChar]._x + bgr._x)) < 10) && (Math.abs((Stage.height / 1.3) - (youBgr[activeChar]._y + bgr._y)) < 10)) {
this._x = this._x + this._vx;
this._y = this._y + this._vy;
if (bgr.hitTest(Math.round(this._x), Math.round(this._y), true) == false) {
this.xxo = (this._x - this.oldX) / 5;
this.yyo = (this._y - this.oldY) / 5;
i = 1;
while (i < 5) {
if (bgr.hitTest(Math.round(this._x) - (Math.round(this.xxo) * i), Math.round(this._y) - (Math.round(this.yyo) * i), true)) {
this._x = this._x - (Math.round(this.xxo) * i);
this._y = this._y - (Math.round(this.yyo) * i);
i = 20;
}
i++;
}
}
while (youBgr[activeChar].hitTest(this._x, this._y, true)) {
this._y--;
this._vx = 0;
this._vy = 0;
}
if (bgr.hitTest(Math.round(this._x), Math.round(this._y), true)) {
this.changeDir(bgr);
} else {
this.oldY = Math.round(this._y);
this.oldX = Math.round(this._x);
}
this.oldAx = this.ax;
this.ax = (_xmouse - this._x) * _k;
this.ay = (_ymouse - this._y) * _k;
if (((this.ax < 0) && (this.oldAx > 0)) && (Math.abs(this._vx) > 12)) {
playSoundBgr("_svist");
}
if ((isNaN(this._vx) == true) || (isNaN(this._vy) == true)) {
this._vx = (this._vy = 0);
}
this._vx = this._vx + this.ax;
this._vy = this._vy + this.ay;
this._vx = this._vx * this._damp;
this._vy = this._vy * this._damp;
}
}
function bgr2main(obj, m) {
obj.hideHealth();
if (m == true) {
attachMovie(obj.typ, "missile", _root.getNextHighestDepth(), {_x:Math.round(obj._x + bgr._x), _y:Math.round(obj._y + bgr._y)});
for (ii in obj) {
missile[ii] = obj[ii];
}
missile._rotation = obj._rotation;
} else {
you[obj.num] = attachMovie(obj.typ, "you" + obj.num, _root.getNextHighestDepth(), {_x:Math.round(obj._x + bgr._x), _y:Math.round(obj._y + bgr._y)});
you[obj.num].onRollOver = showHealth;
you[obj.num].onRollOut = hideHealth;
for (ii in obj) {
you[obj.num][ii] = obj[ii];
}
if (obj.enemy == true) {
you[obj.num]._xscale = -you[obj.num]._xscale;
}
you[obj.num]._rotation = obj._rotation;
}
}
function main2bgr(obj) {
obj.hideHealth();
if (obj.missile == true) {
missileBgr[obj.num] = bgr.attachMovie(obj.typ, "missile" + obj.num, bgr.getNextHighestDepth(), {_x:Math.round(obj._x - bgr._x), _y:Math.round(obj._y - bgr._y)});
for (ii in obj) {
missileBgr[obj.num][ii] = obj[ii];
}
missileBgr[obj.num]._rotation = obj._rotation;
} else {
youBgr[obj.num] = bgr.attachMovie(obj.typ, "you" + obj.num, bgr.getNextHighestDepth(), {_x:Math.round(obj._x - bgr._x), _y:Math.round(obj._y - bgr._y)});
youBgr[obj.num].onRollOver = showHealth;
youBgr[obj.num].onRollOut = hideHealth;
for (ii in obj) {
youBgr[obj.num][ii] = obj[ii];
}
if (obj.enemy == true) {
youBgr[obj.num]._xscale = -youBgr[obj.num]._xscale;
}
youBgr[obj.num]._rotation = obj._rotation;
}
}
function focus() {
if (pauseOn == true) {
return(undefined);
}
xoff = (yoff = 0);
if ((focusingObj._parent == bgr) || (focusingObj._parent == topLayer)) {
xoff = bgr._x;
yoff = bgr._y;
}
if (((focusingObj._name == "missile") || (focusingObj.typ == "m3")) || (focusingObj._name == "razriv")) {
screenKoef = 2;
divideKoef = 5;
} else {
screenKoef = 1.3;
divideKoef = 8;
}
if ((focusingObj._x != undefined) && (focusingObj._y != undefined)) {
xoffset = Math.round((((Stage.width / 2) - focusingObj._x) - xoff) / divideKoef) + xoffsetAx;
yoffset = Math.round((((Stage.height / screenKoef) - focusingObj._y) - yoff) / divideKoef) + yoffsetAy;
} else {
xoffset = (yoffset = 0);
}
}
function missileRotate() {
if (pauseOn == true) {
return(undefined);
}
if ((((Key.isDown(32) && (yourTurn == true)) && (currentAction == "takeBall")) && (this.burning != true)) && (((this.typ == "m0") && (fireFactor >= 1)) || ((this.typ == "m22") && (fireFactor >= 3)))) {
this.burning = true;
this.gotoAndStop("burning");
playSoundBgr("_shoot fireball");
} else if (((Key.isDown(32) && (this.typ == "m0")) && (fireFactor < 1)) && (mess.msg == undefined)) {
msg = "You should learn Fire Ability to fire the bough";
} else if (((Key.isDown(32) && (this.typ == "m22")) && (fireFactor < 3)) && (mess.msg == undefined)) {
msg = "You should reach 3rd level of fire ability to fire the nests";
}
if (youBgr[activeChar].enemy == true) {
this._vxx = 45;
this._vyy = 10;
} else {
this._vxx = ((youBgr[activeChar]._x + bgr._x) - _xmouse) / 5;
this._vyy = (((youBgr[activeChar]._y + bgr._y) - 90) - _ymouse) / 5;
}
this._x = ((Math.cos(this.i) * Math.abs(this._vxx)) + youBgr[activeChar]._x) + bgr._x;
this._y = (((Math.sin(this.i) * Math.abs(this._vyy)) + youBgr[activeChar]._y) + bgr._y) - 100;
this.i = this.i + 0.5;
if (this._x > this.oldX) {
this.dir = true;
} else {
this.dir = false;
}
if ((this.dir == true) && (this.oldDir == false)) {
playSoundBgr("_svist");
}
this.oldDir = this.dir;
}
function drown() {
if (pauseOn == true) {
return(undefined);
}
if (this._name == "missile") {
xoffset = Math.round(((Stage.width / 2) - this._x) / 6);
yoffset = Math.round(((Stage.height / 2) - this._y) / 6);
}
if (this.drownTimeout < 40) {
this.drownTimeout++;
this._y = this._y + 4;
this.oldY = this._y;
this.oldX = this._x;
} else {
if ((((((this.typ == "m0") || (this.typ == "m1")) || (this.typ == "m2")) || (this.typ == "m3")) || (this.typ == "m22")) || (this.typ == "egg")) {
xoffset = (yoffset = 0);
this.health = 0;
}
this.damage = this.health;
this.finish();
delete this.onEnterFrame;
}
}
function nextTurn() {
if (yourCharsAmount <= 0) {
endOfRound();
gotoAndStop ("lose");
} else if (enemyCharsAmount <= 0) {
endOfRound();
gotoAndStop ("win");
}
manageMiniChars();
firstDamaged = undefined;
bgrSound.stop();
tSound.setVolume(0);
t = 0;
neprohod = undefined;
taken = false;
t0 = getTimer();
currentAction = "move";
yourTurn = !yourTurn;
if (yourTurn == true) {
yourActiveChar++;
if (yourActiveChar >= yourCharsAmount) {
yourActiveChar = 0;
}
activeChar = yourActiveChar;
} else {
enemyActiveChar++;
if (enemyActiveChar >= (yourCharsAmount + enemyCharsAmount)) {
enemyActiveChar = yourCharsAmount;
}
activeChar = enemyActiveChar;
}
bgr2main(youBgr[activeChar], false);
if (you[activeChar].enemy == true) {
enemyTurnAfterFocus = true;
} else {
you[activeChar].onEnterFrame = charMove;
}
focusingObj = you[activeChar];
charSpeed = 0;
jumpSpeed = 0;
you[activeChar].direct = undefined;
you[activeChar].koef = 1;
you[activeChar]._kk = charKK;
you[activeChar]._y = you[activeChar]._y - 2;
youBgr[activeChar].removeMovieClip();
i = 0;
while (i < (yourCharsAmount + enemyCharsAmount)) {
youBgr[i].hideHealth();
i++;
}
if (yourTurn == true) {
pan.sk._visible = true;
} else {
pan.sk._visible = false;
}
}
function healthAnimation() {
if (pauseOn == true) {
return(undefined);
}
this.healthBar.gotoAndStop(healthChar.health);
if (healthChar._parent._name == "bgr") {
this._x = healthChar._x + bgr._x;
this._y = (healthChar._y + bgr._y) - 80;
} else {
this._x = healthChar._x;
this._y = healthChar._y - 80;
}
}
function damageFloat(i) {
if (pauseOn == true) {
return(undefined);
}
_root.damageAmount[i] = topLayer.attachMovie("damage", "damage" + i, topLayer.getNextHighestDepth(), {_x:youBgr[i]._x - 10, _y:youBgr[i]._y - 70});
_root.damageAmount[i].damage = youBgr[i].damage;
}
function scrolling() {
if (pauseOn == true) {
return(undefined);
}
var _local2 = bgr.getBounds(_root);
if (Key.isDown(16) && (t > 5)) {
if (Key.isDown(37) || (Key.isDown(65))) {
if (_local2.xMin < 100) {
xoffsetAx = xoffsetAx + 2;
}
}
if (Key.isDown(39) || (Key.isDown(68))) {
if (_local2.xMax > (Stage.width - 100)) {
xoffsetAx = xoffsetAx - 2;
}
}
if (Key.isDown(38) || (Key.isDown(87))) {
if (_local2.yMin < 100) {
yoffsetAy = yoffsetAy + 2;
}
}
if (Key.isDown(40) || (Key.isDown(83))) {
if (_local2.yMax > (Stage.height + 100)) {
yoffsetAy = yoffsetAy - 2;
}
}
} else {
xoffsetAx = 0;
yoffsetAy = 0;
}
xoffset = xoffset + xoffsetAx;
yoffset = yoffset + yoffsetAy;
}
function damageCount() {
if ((this.health > 0) && (this.damage > 0)) {
damagePrirost = Math.ceil(this.damage / 20);
this.damage = this.damage - damagePrirost;
this.health = this.health - damagePrirost;
if (this.enemy == true) {
score = score + damagePrirost;
} else {
score = score - damagePrirost;
}
} else if ((this.health <= 0) && (this.dead != true)) {
this.dead = true;
this.health = 0;
if (focusingObj.num > this.num) {
focusingObj = youBgr[this.num - 1];
}
if (focusingObj.num == this.num) {
focusingObj = undefined;
}
deathDelay++;
youBgr[this.num].gotoAndPlay("death");
playSoundBgr("_death" + (random(2) + 1));
i = this.num;
while (i <= (yourCharsAmount + enemyCharsAmount)) {
youBgr[i] = youBgr[i + 1];
youBgr[i].num = i;
bgr2main(youBgr[i], false);
youBgr[i].removeMovieClip();
main2bgr(you[i]);
you[i].removeMovieClip();
i++;
}
if (this.enemy == false) {
yourCharsAmount--;
} else {
enemyCharsAmount--;
}
if (enemyActiveChar > this.num) {
enemyActiveChar--;
}
if (yourActiveChar > this.num) {
yourActiveChar--;
}
delete this.onEnterFrame;
}
if ((this.damage <= 0) && (this.health > 0)) {
this.onEnterFrame = standBy;
}
}
function tryToFinish() {
busy = false;
i = 0;
while (i < (yourCharsAmount + enemyCharsAmount)) {
if ((((you[i].onEnterFrame == throwBall) || (you[i].onEnterFrame == charMove)) || (you[i].onEnterFrame == enemyMove)) || (you[i].onEnterFrame == drown)) {
busy = true;
}
i++;
}
if (((missile.onEnterFrame == throwBall) || (missile.onEnterFrame == takeBall)) || (missile._name == "missile")) {
busy = true;
}
if ((beesCounter != 0) || (eggsCounter != 0)) {
busy = true;
}
if (busy == false) {
currentAction = "finishing";
if (firstDamaged != undefined) {
focusingObj = firstDamaged;
}
i = 0;
while (i <= (yourCharsAmount + enemyCharsAmount)) {
if (youBgr[i].damage > 0) {
damageFloat(i);
youBgr[i].onEnterFrame = damageCount;
}
i++;
}
delay = 0;
}
}
function razrivDamage() {
ih = 0;
while (ih < (yourCharsAmount + enemyCharsAmount)) {
if (youBgr[ih].hitTest(topLayer.razriv)) {
bgr2main(youBgr[ih], false);
removeMovieClip(youBgr[ih]);
topLayer.razriv.range = Math.sqrt((((topLayer.razriv._x + topLayer._x) - you[ih]._x) * ((topLayer.razriv._x + topLayer._x) - you[ih]._x)) + (((topLayer.razriv._y + topLayer._y) - (you[ih]._y - 50)) * ((topLayer.razriv._y + topLayer._y) - (you[ih]._y - 50))));
you[ih].onEnterFrame = throwBall;
this.u = you[ih]._x - (topLayer.razriv._x + topLayer._x);
this.uu = (you[ih]._y - 50) - (topLayer.razriv._y + topLayer._y);
if (((this.u < 10) && (this.u > 0)) || (this.u == 0)) {
this.u = 10;
}
if (((this.uu < 10) && (this.uu > 0)) || (this.uu == 0)) {
this.uu = 10;
}
if ((this.u > -10) && (this.u < 0)) {
this.u = -10;
}
if ((this.uu > -10) && (this.uu < 0)) {
this.uu = -10;
}
you[ih]._vx = 400 / this.u;
you[ih]._vy = 400 / this.uu;
you[ih].oldX = you[ih]._x;
you[ih].oldY = you[ih]._y;
if (topLayer.razriv.typ == 1) {
dmg = Math.round(2700 / topLayer.razriv.range);
if (yourTurn == true) {
dmg = dmg * Math.round(1 + (fireFactor / 8));
}
if (you[ih].enemy == false) {
dmg = Math.round(dmg / (1 + (defenseFactor / 10)));
}
you[ih].damage = you[ih].damage + dmg;
dmg = 0;
} else if (topLayer.razriv.typ == 2) {
dmg = Math.round(4800 / topLayer.razriv.range);
if (yourTurn == true) {
dmg = dmg * Math.round(1 + (fireFactor / 8));
}
if (you[ih].enemy == false) {
dmg = Math.round(dmg / (1 + (defenseFactor / 10)));
}
you[ih].damage = you[ih].damage + dmg;
dmg = 0;
}
_root.firstDamaged = you[ih].num;
you[ih].gotoAndPlay("hit");
_root.focusingObj = you[ih];
}
ih++;
}
tryToFinish();
used = false;
}
function burningMissile() {
if (pauseOn == true) {
return(undefined);
}
if (missile.onEnterFrame != drown) {
_root.topLayer.attachMovie("flame", "fl" + (_root.topLayer.getNextHighestDepth() + 1), _root.topLayer.getNextHighestDepth(), {_x:_root.missile._x - _root.topLayer._x, _y:_root.missile._y - _root.topLayer._y});
}
}
function endOfRound() {
attachMovie("shadowOut", "shadowInOut", _root.getNextHighestDepth());
delete this.onEnterFrame;
delete this.onMouseUp;
water.removeMovieClip();
pan.swapDepths(panDepth);
pan.removeMovieClip();
healthBar.removeMovieClip();
missile.removeMovieClip();
you[activeChar].removeMovieClip();
topLayer.removeMovieClip();
fonSound.stop();
bgrSound.stop();
i = 0;
while (i < eggsCounter) {
eggs[i].removeMovieClip();
i++;
}
i = 0;
while (i < beesCounter) {
bees[beesCounter].removeMovieClip();
i++;
}
}
function generateEgg(xx, yy, v) {
eggs[eggsCounter] = attachMovie("egg", "egg" + eggsCounter, _root.getNextHighestDepth(), {_x:xx, _y:yy});
eggs[eggsCounter]._damp = 0.975;
eggs[eggsCounter].typ = "egg";
eggs[eggsCounter].koef = 1;
eggs[eggsCounter].damageKoef = 0.8;
eggs[eggsCounter]._rotation = random(360) - 180;
eggs[eggsCounter].missile = true;
eggs[eggsCounter].num = eggsCounter;
eggs[eggsCounter]._vx = ((random(180) / 10) - 9) + v;
eggs[eggsCounter]._vy = 1;
eggs[eggsCounter]._kk = missileKK;
eggs[eggsCounter].koef = 1;
eggs[eggsCounter].ab = 20;
eggs[eggsCounter].onEnterFrame = throwBall;
eggsCounter++;
}
function generateBee(xx, yy) {
bees[beesCounter] = attachMovie("bee", "bee" + beesCounter, _root.getNextHighestDepth());
bees[beesCounter].onEnterFrame = beeMove;
bees[beesCounter]._xAngle = random(314.159265358979) / 100;
bees[beesCounter]._yAngle = random(314.159265358979) / 100;
bees[beesCounter]._xSpeed = (random(12) / 100) + 0.02;
bees[beesCounter]._ySpeed = (random(16) / 100) + 0.02;
bees[beesCounter]._xRadius = random(150) + 20;
bees[beesCounter]._yRadius = random(150) + 20;
bees[beesCounter].xx = xx;
bees[beesCounter].yy = yy;
bees[beesCounter].framesAlive = random(300);
bees[beesCounter].currentFrame = 0;
beesCounter++;
}
function beeMove() {
if (pauseOn == true) {
return(undefined);
}
this._x = this.xx + (Math.sin(this._xAngle) * this._xRadius);
this._y = this.yy + (Math.cos(this._yAngle) * this._yRadius);
this._xAngle = this._xAngle + this._xSpeed;
this._yAngle = this._yAngle + this._ySpeed;
this.currentFrame++;
if (this.currentFrame >= this.framesAlive) {
this.removeMovieClip();
beesCounter--;
if (beesCounter <= 0) {
tryToFinish();
}
}
i = 0;
while (i < (yourCharsAmount + enemyCharsAmount)) {
if (youBgr[i].hitTest(this._x, this._y, true)) {
dmg = 5;
if (youBgr[i].enemy == false) {
dmg = Math.round(dmg / (1 + (defenseFactor / 10)));
}
youBgr[i].damage = youBgr[i].damage + dmg;
dmg = 0;
youBgr[i].gotoAndPlay("hit");
attachMovie("ukus", "ukus" + this._x, this.getDepth(), {_x:this._x, _y:this._y});
beesCounter--;
this.removeMovieClip();
if (beesCounter <= 0) {
tryToFinish();
focusingObj = firstDamages;
}
}
i++;
}
}
function generateChars() {
i = 0;
while (i < yourCharsAmount) {
youBgr[i] = bgr.attachMovie(yourChars, "you" + i, bgr.getNextHighestDepth(), {_x:(random((bgr._width / 2) - 400) + 200) + (bgr._width / 2), _y:0});
youBgr[i].typ = yourChars;
if (level <= 2) {
youBgr[i]._x = (random(Math.round(bgr._width / 6)) + Math.round(bgr._width / 2)) + 250;
}
while (bgr.hitTest(youBgr[i]._x + bgr._x, (youBgr[i]._y + bgr._y) + 11, true)) {
youBgr[i]._y = youBgr[i]._y - 2;
}
youBgr[i].enemy = false;
youBgr[i]._damp = 0.982;
youBgr[i].health = 100;
youBgr[i].damage = 0;
youBgr[i].missile = false;
youBgr[i].damageKoef = 0.6;
youBgr[i].koef = 1;
youBgr[i]._kk = charKK;
youBgr[i].num = i;
youBgr[i].onMouseDown = waiting;
youBgr[i].onRollOver = showHealth;
youBgr[i].onRollOut = hideHealth;
youBgr[i].onEnterFrame = standBy;
i++;
}
i = yourCharsAmount;
while (i < (enemyCharsAmount + yourCharsAmount)) {
youBgr[i] = bgr.attachMovie(enemyChars, "enemy" + i, bgr.getNextHighestDepth(), {_x:random((bgr._width / 2) - 400) + 100, _y:0});
if (level <= 2) {
youBgr[i]._x = (random(Math.round(bgr._width / 6)) + Math.round((bgr._width / 2) - (bgr._width / 6))) - 250;
}
youBgr[i]._xscale = -youBgr[i]._xscale;
youBgr[i].typ = enemyChars;
while (bgr.hitTest(youBgr[i]._x + bgr._x, (youBgr[i]._y + bgr._y) + 11, true)) {
youBgr[i]._y = youBgr[i]._y - 2;
}
youBgr[i].enemy = true;
youBgr[i]._damp = 0.982;
youBgr[i].health = 100;
youBgr[i].damage = 0;
youBgr[i].damageKoef = 0.6;
youBgr[i].missile = false;
youBgr[i].koef = 1;
youBgr[i]._kk = charKK;
youBgr[i].num = i;
youBgr[i].onRollOver = showHealth;
youBgr[i].onRollOut = hideHealth;
youBgr[i].onMouseDown = waiting;
youBgr[i].onEnterFrame = standBy;
i++;
}
}
function generateMissiles() {
i = 0;
while (i < missilesOnLevel0[level]) {
missileBgr[missiles] = bgr.attachMovie("m0", "missile" + missiles, bgr.getNextHighestDepth(), {_x:random(bgr._width - 400) + 200, _y:0});
if (level <= 1) {
missileBgr[missiles]._x = random(bgr._width - 2500) + 1250;
} else if (level == 2) {
missileBgr[missiles]._x = random(bgr._width - 2000) + 1000;
}
while ((index != 1) && (index != -1)) {
index = random(3) - 1;
}
if (bgr.bgrr.hitTest(missileBgr[missiles]._x + bgr._x, missileBgr[missiles]._y + bgr._y, true) == false) {
missileBgr[missiles]._x = missileBgr[missiles]._x + ((random(1000) + 390) * index);
}
missileBgr[missiles].onMouseDown = waiting;
missileBgr[missiles].onEnterFrame = standBy;
missileBgr[missiles]._damp = 0.982;
missileBgr[missiles].typ = "m0";
missileBgr[missiles].koef = 1;
missileBgr[missiles].damageKoef = 1.8;
missileBgr[missiles]._rotation = random(360) - 180;
missileBgr[missiles].missile = true;
missileBgr[missiles].num = missiles;
while (bgr.bgrr.hitTest(missileBgr[missiles]._x + bgr._x, missileBgr[missiles]._y + bgr._y, true)) {
missileBgr[missiles]._y = missileBgr[missiles]._y - 2;
}
missiles++;
i++;
}
i = 0;
while (i < missilesOnLevel1[level]) {
missileBgr[missiles] = bgr.attachMovie("m1", "missile" + missiles, bgr.getNextHighestDepth(), {_x:random(bgr._width - 400) + 200, _y:0});
if (level <= 1) {
missileBgr[missiles]._x = random(bgr._width - 2500) + 1250;
} else if (level == 2) {
missileBgr[missiles]._x = random(bgr._width - 2000) + 1000;
}
while ((index != 1) && (index != -1)) {
index = random(3) - 1;
}
if (bgr.bgrr.hitTest(missileBgr[missiles]._x + bgr._x, missileBgr[missiles]._y + bgr._y, true) == false) {
missileBgr[missiles]._x = missileBgr[missiles]._x + ((random(1000) + 390) * index);
}
missileBgr[missiles].onMouseDown = waiting;
missileBgr[missiles].onEnterFrame = standBy;
missileBgr[missiles]._damp = 0.982;
missileBgr[missiles].typ = "m1";
missileBgr[missiles].koef = 1;
missileBgr[missiles].damageKoef = 2.5;
missileBgr[missiles]._rotation = random(360) - 180;
missileBgr[missiles].missile = true;
missileBgr[missiles].num = missiles;
while (bgr.bgrr.hitTest(missileBgr[missiles]._x + bgr._x, missileBgr[missiles]._y + bgr._y, true)) {
missileBgr[missiles]._y = missileBgr[missiles]._y - 2;
}
missiles++;
i++;
}
i = 0;
while (i < missilesOnLevel2[level]) {
missileBgr[missiles] = bgr.attachMovie("m2", "missile" + missiles, bgr.getNextHighestDepth(), {_x:random(bgr._width - 400) + 200, _y:0});
if (level <= 1) {
missileBgr[missiles]._x = random(bgr._width - 2500) + 1250;
} else if (level == 2) {
missileBgr[missiles]._x = random(bgr._width - 2000) + 1000;
}
while ((index != 1) && (index != -1)) {
index = random(3) - 1;
}
if (bgr.bgrr.hitTest(missileBgr[missiles]._x + bgr._x, missileBgr[missiles]._y + bgr._y, true) == false) {
missileBgr[missiles]._x = missileBgr[missiles]._x + ((random(1000) + 390) * index);
}
missileBgr[missiles].onMouseDown = waiting;
missileBgr[missiles].onEnterFrame = standBy;
missileBgr[missiles]._damp = 0.982;
missileBgr[missiles].typ = "m2";
missileBgr[missiles].eggsAmount = random(9) + 5;
missileBgr[missiles].noEggs = false;
missileBgr[missiles].koef = 1;
missileBgr[missiles].damageKoef = 1.2;
missileBgr[missiles].missile = true;
missileBgr[missiles].num = missiles;
while (bgr.bgrr.hitTest(missileBgr[missiles]._x + bgr._x, missileBgr[missiles]._y + bgr._y, true)) {
missileBgr[missiles]._y = missileBgr[missiles]._y - 2;
}
missiles++;
i++;
}
i = 0;
while (i < missilesOnLevel3[level]) {
missileBgr[missiles] = bgr.attachMovie("m3", "missile" + missiles, bgr.getNextHighestDepth(), {_x:random(bgr._width - 400) + 200, _y:0});
if (level <= 1) {
missileBgr[missiles]._x = random(bgr._width - 2500) + 1250;
} else if (level == 2) {
missileBgr[missiles]._x = random(bgr._width - 2000) + 1000;
}
while ((index != 1) && (index != -1)) {
index = random(3) - 1;
}
if (bgr.bgrr.hitTest(missileBgr[missiles]._x + bgr._x, missileBgr[missiles]._y + bgr._y, true) == false) {
missileBgr[missiles]._x = missileBgr[missiles]._x + ((random(1000) + 390) * index);
}
missileBgr[missiles].onMouseDown = waiting;
missileBgr[missiles].onEnterFrame = standBy;
missileBgr[missiles]._damp = 0.982;
missileBgr[missiles].typ = "m3";
missileBgr[missiles].beesAmount = random(30) + 10;
missileBgr[missiles].koef = 1;
missileBgr[missiles].damageKoef = 1;
missileBgr[missiles].missile = true;
missileBgr[missiles].num = missiles;
while (bgr.bgrr.hitTest(missileBgr[missiles]._x + bgr._x, missileBgr[missiles]._y + bgr._y, true)) {
missileBgr[missiles]._y = missileBgr[missiles]._y - 2;
}
missiles++;
i++;
}
}
function throwMissile() {
if (pauseOn == true) {
return(undefined);
}
this.hand._rotation = ((Math.atan2(((this.hand._x + bgr._x) + this._x) - missile._x, ((this.hand._y + bgr._y) + this._y) - missile._y) * 180) / Math.PI) / 2;
this.head._rotation = (-(0 + ((Math.atan2(((this.head._x + bgr._x) + this._x) - missile._x, ((this.head._y + bgr._y) + this._y) - missile._y) * 180) / Math.PI))) / 6;
this.hand2._rotation = ((Math.atan2(((this.hand2._x + bgr._x) + this._x) - missile._x, ((this.hand2._y + bgr._y) + this._y) - missile._y) * 180) / Math.PI) / 8;
if ((bgr.hitTest(this._x + bgr._x, (this._y + 6) + bgr._y, true) == false) && (Math.abs(this._x + bgr._x) < 2000)) {
this._y = this._y + 5;
}
if (this.enemy == false) {
if ((((Math.abs(xoffset) <= 2) && (Math.abs(yoffset) <= 2)) && (xoffsetAx == 0)) && (yoffsetAy == 0)) {
missile._vxx = ((youBgr[activeChar]._x + bgr._x) * 2) - _xmouse;
missile._vyy = (((youBgr[activeChar]._y + bgr._y) - 90) * 2) - _ymouse;
throwingArrow._rotation = ((-Math.atan2(_xmouse - (youBgr[activeChar]._x + bgr._x), _ymouse - ((youBgr[activeChar]._y + bgr._y) - 90))) * 180) / Math.PI;
throwingArrow._x = missile._vxx;
throwingArrow._y = missile._vyy;
_root.createEmptyMovieClip("line", 9999);
line.beginFill(255, 30);
line.lineStyle(3, 16777215, 100);
line.moveTo(_xmouse, _ymouse);
line.lineTo(missile._vxx, missile._vyy);
line.lineStyle(1, 0, 100);
line.lineTo(_xmouse, _ymouse);
line.endFill();
bgr.oldX = bgr._x;
bgr.oldY = bgr._y;
bgr2.oldX = bgr2._x;
bgr2.oldY = bgr2._y;
bgr3.oldX = bgr3._x;
bgr3.oldY = bgr3._y;
} else {
line.removeMovieClip();
throwingArrow._y = -500;
}
scrolling();
}
}
function playSoundBgr(snd, times) {
bgrSound.stop();
bgrSound.attachSound(snd);
bgrSound.setVolume(100);
if (times == undefined) {
times = 1;
}
bgrSound.start(0, times);
}
function manageMiniChars() {
i = 0;
while (i < 8) {
miniChars[i].removeMovieClip();
delete miniChars[i];
if (youBgr[i].enemy == false) {
color = "miniCharBlack";
} else {
color = "miniCharRed";
}
if (youBgr[i]._x != undefined) {
miniChars[i] = pan.miniMap.attachMovie(color, "miniChar" + i, pan.miniMap.getNextHighestDepth(), {_x:youBgr[i]._x, _y:youBgr[i]._y});
}
i++;
}
}
bgrSound = new Sound(bgr);
bgrSound.stop();
fonSound = new Sound(bgr3);
fonSound.setVolume(60);
fonSound.stop();
fonSound.attachSound("_bgrSound" + activeLand);
fonSound.start(0, 1000);
yourCharsAmount = 1 + Math.floor(level / 3);
enemyCharsAmount = 1 + Math.floor(level / 3);
if (accuracy > 0) {
accuracy = 32 - (level * 3);
}
this.createEmptyMovieClip("topLayer", _root.getNextHighestDepth());
bgr.bgrr.gotoAndStop(activeLand + 1);
bgr2.gotoAndStop(activeLand + 1);
pan.miniMap.bgrr.gotoAndStop(activeLand + 1);
yourTurn = true;
index = 0;
bgr._x = Math.round(bgr._x);
bgr._y = Math.round(bgr._y);
_root.pauseOn = false;
panDepth = pan.getDepth();
deathDelay = 0;
charSpeed = 0;
maxCharSpeed = 5;
speedPrirost = 2;
noWay = 0;
xoffsetAx = 0;
yoffsetAy = 0;
msg = undefined;
missiles = 0;
t0 = getTimer();
eggsCounter = 0;
beesCounter = 0;
currentAction = "move";
attachMovie("shadowOut", "shadowOut", _root.getNextHighestDepth());
var miniChars = Array();
var eggs = Array();
var bees = Array();
var missileBgr = Array();
var you = Array();
var youBgr = Array();
var damageAmount = Array();
MovieClip.prototype.enemyMove = function () {
if (pauseOn == true) {
return(undefined);
}
if ((nearest == undefined) && (this.test != true)) {
t0 = t0 - (t * 1000);
msg = "Skipping...";
bgrSound.stop();
return(undefined);
}
if (this.hitTest(nearest) == false) {
if ((nearest._x + bgr._x) < this._x) {
if (charSpeed > (-maxCharSpeed)) {
charSpeed = charSpeed - speedPrirost;
}
if (this.direct != "left") {
if ((this._xscale < 0) && (Math.abs(this._x - (nearest._x + bgr._x)) > 10)) {
this._xscale = -this._xscale;
}
this.direct = "left";
if ((this.test != true) && (Math.abs(this._x - (nearest._x + bgr._x)) > 10)) {
this.gotoAndPlay("move");
playSoundBgr("_step", 100);
}
}
} else {
if (charSpeed < maxCharSpeed) {
charSpeed = charSpeed + speedPrirost;
}
if (this.direct != "right") {
if ((this._xscale > 0) && (Math.abs(this._x - (nearest._x + bgr._x)) > 10)) {
this._xscale = -this._xscale;
}
this.direct = "right";
if ((this.test != true) && (Math.abs(this._x - (nearest._x + bgr._x)) > 10)) {
this.gotoAndPlay("move");
playSoundBgr("_step", 100);
}
}
}
} else {
iii = 2000;
if ((used != true) && (this.test != true)) {
used = true;
main2bgr(this);
xoffset = (yoffset = 0);
tSound.setVolume(0);
youBgr[activeChar].onEnterFrame = standBy;
bgr2main(nearest, true);
removeMovieClip(nearest);
delete nearest;
taken = true;
missile._kk = missileKK;
_root.test = true;
bgrSound.stop();
currentAction = "throwBall";
delete this.onEnterFrame;
removeMovieClip(this);
delete target;
missile._x = youBgr[activeChar]._x + bgr._x;
missile._y = (youBgr[activeChar]._y + bgr._y) - 90;
missile.oldX = missile._x;
missile.oldY = missile._y;
if (missile.enemy != false) {
while (target.enemy != false) {
target = youBgr[random((yourCharsAmount + enemyCharsAmount) + 1)];
}
_vx = ((target._x + bgr._x) - missile._x) / 45;
_vy = (random(30) - 50) + (((random(Math.abs(target._y - missile._y)) / Math.abs(target._y - missile._y)) * (target._y - missile._y)) / 15);
missile._vx = _vx;
missile._vy = _vy;
missile.xx = missile._x;
missile.yy = missile._y;
ii = 0;
while (ii < 300) {
missile.throwBall();
ii++;
}
a = 0;
while (a < 4) {
if (Math.abs((target._x + bgr._x) - missile._x) > 20) {
found = false;
_vx = (missile._vx = _vx + (((target._x + bgr._x) - missile._x) / 60));
_vy = (missile._vy = _vy - (((target._x + bgr._x) - missile._x) / 120));
missile._x = missile.xx;
missile._y = missile.yy;
ii = 0;
while (ii < 300) {
missile.throwBall();
ii++;
}
} else {
a = 10;
found = true;
}
a++;
}
missile._x = missile.xx;
missile._y = missile.yy;
if (found != true) {
_vx = ((target._x + bgr._x) - missile._x) / 45;
_vy = (random(30) - 50) + (((random(Math.abs(target._y - missile._y)) / Math.abs(target._y - missile._y)) * (target._y - missile._y)) / 15);
}
_root.test = false;
missile._x = youBgr[activeChar]._x + bgr._x;
missile._y = (youBgr[activeChar]._y + bgr._y) - 90;
missile.oldX = missile._x;
missile.oldY = missile._y;
missile.xx = missile._x;
missile.yy = missile._y;
} else {
test = false;
_vy = random(50) - 80;
var _local3 = bgr.getBounds(_root);
if ((missile._x - _local3.xMin) > (_local3.xMax - missile._x)) {
_vx = ((_local3.xMax - missile._x) / 45) + random(50);
} else {
_vx = ((_local3.xMin - missile._x) / 45) - random(50);
}
}
missile._vx = (_vx + random(accuracy)) - (accuracy / 2);
missile._vy = (_vy + random(accuracy)) - (accuracy / 2);
missile.initialVx = missile._vx;
missile.initialVy = missile._vy;
if (missile.enemy == true) {
missile._xscale = -missile._xscale;
}
youBgr[activeChar].gotoAndPlay("throw");
bgrSound.stop();
xoffset = (yoffset = 0);
currentAction = "throwBall";
}
}
this.oX = this._x;
this.oY = this._y;
if (jumpSpeed > 0) {
this._y = this._y - jumpSpeed;
jumpSpeed = jumpSpeed - Math.ceil(jumpSpeed / 20);
if (bgr.bgrr.hitTest(this._x, this._y - 50, true)) {
this._y = this._y + jumpSpeed;
jumpSpeed = 0;
}
} else {
jumpSpeed = 0;
}
if ((bgr.hitTest(this._x + ((15 * charSpeed) / Math.abs(charSpeed)), this._y - 20, true) || (bgr.hitTest(this._x + ((10 * charSpeed) / Math.abs(charSpeed)), this._y - 13, true))) || (bgr.hitTest(this._x + ((6 * charSpeed) / Math.abs(charSpeed)), this._y - 8, true))) {
charSpeed = 0;
noWay++;
} else {
this._x = this._x + charSpeed;
i = 0;
while (bgr.hitTest(this._x, this._y, true) && (bgr.hitTest(this._x, this._y - 20, true) == false)) {
this._y = this._y - 1;
if (direct == "left") {
this._x = this._x + 1;
} else {
this._x = this._x - 1;
}
}
}
while (bgr.hitTest(this._x, this._y, true)) {
this._y = this._y - 1;
}
i = 0;
while ((bgr.hitTest(this._x, this._y + 2, true) == false) && (i < 9)) {
this._y = this._y + 1;
i++;
}
if (bgr.hitTest(this._x, this._y + 2, true) && (this.jumping == true)) {
this.gotoAndStop(1);
bgrSound.stop();
jumpSpeed = 0;
this.jumping = false;
if ((charSpeed != 0) && (this.test != true)) {
this.gotoAndPlay("move");
playSoundBgr("_step", 100);
}
}
if ((noWay >= 6) && (bgr.hitTest(this._x, this._y + 3, true))) {
if (Math.abs(this._x - this.oldX) == 0) {
iii = 5000;
if ((this.test == true) && (neprohod == undefined)) {
neprohod = this._x - bgr._x;
ii = 0;
while (ii < missiles) {
if (this.hitTest(missileBgr[ii]) && (missileBgr[ii]._x < 1800)) {
nearest = missileBgr[ii];
iii = 2000;
neprohod = undefined;
}
ii++;
}
}
}
this.oldX = this._x;
this.oldY = this._y;
jumpSpeed = 20;
this.jumping = true;
noWay = 0;
if (this.test != true) {
this.gotoAndPlay("jump");
playSoundBgr("_jump");
}
}
if ((bgr.hitTest(this._x + ((50 * charSpeed) / Math.abs(charSpeed)), this._y - 25, true) || (bgr.hitTest(this._x + charSpeed, this._y + 20, true) == false)) && (bgr.hitTest(this._x, this._y + 2, true))) {
jumpSpeed = 20;
this.jumping = true;
if (this.test != true) {
this.gotoAndPlay("jump");
playSoundBgr("_jump");
}
}
if ((Math.abs(charSpeed) < 1) && (charSpeed != 0)) {
charSpeed = 0;
}
if (charSpeed > 0) {
charSpeed = charSpeed - 1;
}
if (charSpeed < 0) {
charSpeed = charSpeed + 1;
}
if (this._y > (bgr._y + 80)) {
if (this.test != true) {
this.drownTimeout = 0;
water.swapDepths(_root.getNextHighestDepth());
pan.swapDepths(_root.getNextHighestDepth());
this.onEnterFrame = drown;
topLayer.attachMovie("fontanchik", "fontanchik", topLayer.getNextHighestDepth(), {_x:this._x - topLayer._x, _y:(this._y - topLayer._y) + 10});
focusingObj = topLayer.fontanchik;
} else {
iii = 5000;
if (neprohod == undefined) {
neprohod = this._x - bgr._x;
}
}
this.hideHealth();
}
};
this.onMouseUp = function () {
if (pauseOn == true) {
return(undefined);
}
if (_root.taken == true) {
if (yourTurn == true) {
if ((((xoffset != 0) || (yoffset != 0)) || (xoffsetAx != 0)) || (yoffsetAy != 0)) {
xoffset = (yoffset = (xoffsetAx = (yoffsetAy = 0)));
pan.miniMap.rama._x = pan.miniMap.rama._x - ((Stage.width / 2) - (youBgr[activeChar]._x + bgr._x));
pan.miniMap.rama._y = pan.miniMap.rama._y - ((Stage.width / 1.3) - (youBgr[activeChar]._y + bgr._y));
bgr._x = bgr.oldX;
bgr._y = bgr.oldY;
bgr2._x = bgr2.oldX;
bgr2._y = bgr2.oldY;
bgr3._x = bgr3.oldX;
bgr3._y = bgr3.oldY;
missile._x = youBgr[activeChar]._x + bgr._x;
missile._y = (youBgr[activeChar]._y + bgr._y) - 90;
}
playSoundBgr("_brosok");
delete youBgr[activeChar].onEnterFrame;
youBgr[activeChar].gotoAndStop(1);
youBgr[activeChar].onEnterFrame = standBy;
line.removeMovieClip();
xoffset = (yoffset = 0);
currentAction = "throwBall";
_root.taken = false;
missile.onEnterFrame = throwBall;
focusingObj = missile;
missile.avail = false;
firstDamaged = undefined;
_targetY = Stage.height;
_k = 0.05;
missile._kk = missileKK;
jumpCounter = 0;
missile.koef = 1;
missile.ab = 20;
missile._x = youBgr[activeChar]._x + bgr._x;
missile._y = (youBgr[activeChar]._y + bgr._y) - 90;
missile._vx = ((youBgr[activeChar]._x + bgr._x) - _xmouse) / 2;
missile._vy = (((youBgr[activeChar]._y + bgr._y) - 90) - _ymouse) / 2;
removeMovieClip(throwingArrow);
}
}
};
MovieClip.prototype.throwBall = function () {
if (pauseOn == true) {
return(undefined);
}
if ((this.typ == yourChars) || (this.typ == enemyChars)) {
miniChars[this.num]._x = this._x - bgr._x;
miniChars[this.num]._y = this._y - bgr._y;
}
if ((((this.typ == "m2") && (this.noEggs != true)) && (test != true)) && (Math.abs(this._vy) <= 1)) {
i = 0;
while (i < this.eggsAmount) {
generateEgg((this._x + (eggsCounter * 20)) - (this.eggsAmount * 10), this._y + 30, this._vx);
i++;
}
this.noEggs = true;
temp = this;
this=attachMovie("m22", "missile", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});//parameter overwritten
attachMovie("m22", "missile", _root.getNextHighestDepth(), {_x:this._x, _y:this._y});
for (i in temp) {
this[i] = temp[i];
}
this.onEnterFrame = throwBall;
this._rotation = temp._rotation;
this.typ = "m22";
temp.removeMovieClip();
}
if (test != true) {
this.oldX = this.oldX + xoffset;
this.oldY = this.oldY + yoffset;
}
if (this.rotationSpeed == undefined) {
this.rotationSpeed = 4;
}
if (this.missile == true) {
this._rotation = this._rotation + this.rotationSpeed;
}
this.oldXactual = this._x;
this.oldYactual = this._y;
bgrXold = bgr._x;
bgrYold = bgr._y;
if ((isNaN(this._vx) == true) || (isNaN(this._vy) == true)) {
this._vx = (this._vy = 0);
}
this._x = this._x + this._vx;
this._y = this._y + this._vy;
this.xxo = (this._x - this.oldXactual) / 6;
this.yyo = (this._y - this.oldYactual) / 6;
i = 1;
while (i < 6) {
if (bgr.hitTest(Math.round(this._x) - (Math.round(this.xxo) * i), Math.round(this._y) - (Math.round(this.yyo) * i), true)) {
this._x = this._x - (Math.round(this.xxo) * i);
this._y = this._y - (Math.round(this.yyo) * i);
i = 20;
}
i++;
}
if (((bgr.hitTest(Math.round(this._x), Math.round(this._y), true) && (this.burning == true)) && (currentAction == "throwBall")) && (this.health != 0)) {
if (this.typ == "m0") {
topLayer.attachMovie("razriv1", "razriv", topLayer.getNextHighestDepth(), {_x:this._x - topLayer._x, _y:this._y - topLayer._y});
topLayer.razriv.typ = 1;
} else if (this.typ == "m22") {
topLayer.attachMovie("razriv2", "razriv", topLayer.getNextHighestDepth(), {_x:this._x - topLayer._x, _y:this._y - topLayer._y});
topLayer.razriv.typ = 2;
}
_root.focusingObj = topLayer.razriv;
this.health = 0;
removeMovieClip(this);
}
this.hit = false;
if (bgr.hitTest(Math.round(this._x), Math.round(this._y), true)) {
i = 0;
while (i < (yourCharsAmount + enemyCharsAmount)) {
if ((youBgr[i].hitTest(this._x, this._y, true) && (this.hit == false)) && (test != true)) {
if (((((random(Math.round(18 / dexterityFactor)) == 0) && (dexterityFactor != 0)) && (youBgr[i].enemy == false)) && (this.typ != "egg")) && (this.missile == true)) {
youBgr[i].gotoAndPlay("throwBack");
_root.focusingObj = this;
this._x = youBgr[i]._x + bgr._x;
this._y = (youBgr[i]._y + bgr._y) - 90;
this._vx = -this.initialVx;
this._vy = this.initialVy;
this.hit = true;
} else {
bgr2main(youBgr[i], false);
removeMovieClip(youBgr[i]);
you[i].onEnterFrame = throwBall;
you[i]._vx = this._vx;
you[i]._vy = this._vy;
this._vx = this._vx / 2;
this._vy = this._vy / 2;
you[i].oldX = you[i]._x;
you[i].oldY = you[i]._y;
this.changeDir(you[i]);
this.hit = true;
}
}
i++;
}
if (this.hit != true) {
this.changeDir(bgr);
this.hit = true;
}
if (_root.test == true) {
ii = 20000;
}
} else {
i = 0;
while (i < (enemyCharsAmount + yourCharsAmount)) {
if (((you[i].hitTest(this._x, this._y, true) && (this.hit != true)) && (this._name != you[i]._name)) && (test != true)) {
this.hit = true;
you[i]._vx = you[i]._vx + this._vx;
you[i]._vy = you[i]._vy + this._vy;
this._vx = this._vx / 2;
this._vy = this._vy / 2;
this.changeDir(you[i]);
this._x = this._x + this._vx;
this._y = this._y + this._vy;
}
i++;
}
if ((((this._name != "missile") && (missile.hitTest(this._x, this._y, true))) && (this.hit != true)) && (this.typ != "egg")) {
this.hit = true;
missile._vx = missile._vx + this._vx;
missile._vy = missile._vy + this._vy;
this._vx = this._vx / 2;
this._vy = this._vy / 2;
this.changeDir(missile);
this._x = this._x + this._vx;
this._y = this._y + this._vy;
}
}
if (this.hit != true) {
this.oldY = Math.round(this._y);
this.oldX = Math.round(this._x);
oldXbgr = bgr._x;
oldYbgr = bgr._y;
this.ay = (Stage.height / 2) * this._kk;
this._vy = this._vy + this.ay;
}
this._vx = this._vx * this._damp;
this._vy = this._vy * this._damp;
if ((this._y > (bgr._y + 80)) && (test != true)) {
this.drownTimeout = 0;
this.gotoAndStop(1);
water.swapDepths(_root.getNextHighestDepth());
pan.swapDepths(_root.getNextHighestDepth());
this.onEnterFrame = drown;
topLayer.attachMovie("fontanchik", "fontanchik", topLayer.getNextHighestDepth(), {_x:this._x - topLayer._x, _y:(this._y - topLayer._y) + 10});
if (this._name == missile) {
focusingObj = topLayer.fontanchik;
}
this.hideHealth();
}
};
MovieClip.prototype.finish = function () {
_vx = (_vy = (ax = (ay = 0)));
this._x = this.oldX;
this._y = this.oldY;
if (this.missile != true) {
main2bgr(this);
if (focusingObj == this) {
focusingObj = youBgr[this.num];
}
if (missile._x != undefined) {
focusingObj = missile;
}
if (firstDamaged == this) {
firstDamaged = youBgr[this.num];
}
youBgr[this.num]._kk = charKK;
youBgr[this.num].onMouseDown = waiting;
youBgr[this.num].onEnterFrame = standBy;
} else if (this.health != 0) {
main2bgr(this);
missileBgr[this.num].onMouseDown = waiting;
missileBgr[this.num]._kk = missileKK;
xoffset = (yoffset = 0);
missileBgr[this.num].onEnterFrame = standBy;
} else {
if (this.typ != "egg") {
delete missileBgr[this.num];
} else {
eggsCounter--;
}
removeMovieClip(this);
}
if (this.typ == "m3") {
i = 0;
while (i < this.beesAmount) {
generateBee(this._x, this._y);
i++;
}
bgrSound.setVolume(100);
bgrSound.attachSound("_bees");
bgrSound.start();
}
if (this._name == "missile") {
xoffset = (yoffset = 0);
i = 0;
while (i < (yourCharsAmount + enemyCharsAmount)) {
youBgr[i].hideHealth();
i++;
}
}
used = false;
removeMovieClip(this);
tryToFinish();
};
MovieClip.prototype.changeDir = function (target) {
if ((_root.test != true) && (this.ab > 5)) {
if (this.typ == "m0") {
bgrSound.attachSound("_palka padenie");
bgrSound.setVolume(this.ab * 2);
bgrSound.start();
} else if (this.typ == "m1") {
bgrSound.attachSound("_kamen padenie");
bgrSound.setVolume(this.ab * 2);
bgrSound.start();
} else if ((this.typ == "m2") || (this.typ == "m22")) {
bgrSound.attachSound("_bees padenie");
bgrSound.setVolume(this.ab * 2);
bgrSound.start();
} else if ((this.typ == "m3") || (this.typ == "m22")) {
bgrSound.attachSound("_nest padenie");
bgrSound.setVolume(this.ab * 2);
bgrSound.start();
} else if ((((this.typ == "char0") || (this.typ == "char1")) || (this.typ == "char2")) || (this.typ == "char3")) {
bgrSound.attachSound("_char padenie");
bgrSound.setVolume(this.ab * 2);
bgrSound.start();
} else if (this.typ == "egg") {
bgrSound.attachSound("_egg padenie");
bgrSound.setVolume(this.ab * 2);
bgrSound.start();
}
}
target.gotoAndPlay("hit");
if (this.typ == "egg") {
if (target.damage != undefined) {
dmg = 15;
if (yourTurn == true) {
dmg = Math.round(dmg * (1 + (strengthFactor / 10)));
}
if (target.enemy == false) {
dmg = Math.round(dmg / (1 + (defenseFactor / 10)));
}
target.damage = target.damage + dmg;
dmg = 0;
if (firstDamaged == undefined) {
firstDamaged = target;
focusingObj = target;
}
}
_root.topLayer.attachMovie("lyaps", "lyaps" + _root.topLayer.getNextHighestDepth(), _root.topLayer.getNextHighestDepth(), {_x:this._x - _root.topLayer._x, _y:this._y - _root.topLayer._y});
eggsCounter--;
tryToFinish();
delete this.onEnterFrame;
removeMovieClip(this);
} else {
if ((this.onEnterFrame != takeBall) && (target.health > 0)) {
dmg = Math.round((Math.abs(this._vx) + Math.abs(this._vy)) * this.damageKoef);
if (yourTurn == true) {
dmg = Math.round(dmg * (1 + (strengthFactor / 10)));
}
if (target.enemy == false) {
dmg = Math.round(dmg / (1 + (defenseFactor / 10)));
}
target.damage = target.damage + dmg;
dmg = 0;
if (firstDamaged == undefined) {
firstDamaged = target;
if (this.typ != "m3") {
focusingObj = target;
}
}
}
this.rotationSpeed = random(16) - 8;
this.lastY = this._y;
this.lastX = this._x;
i = 0;
while (target.hitTest(this.oldX, this.oldY, true)) {
this.oldY--;
}
while (((Math.abs(this.lastX - this.oldX) > 5) || (Math.abs(this.lastY - this.oldY) > 5)) || (target.hitTest(this._x, this._y, true))) {
if (target.hitTest(Math.round(this._x), Math.round(this._y), true)) {
this.lastY = Math.round(this._y);
this.lastX = Math.round(this._x);
} else {
this.oldX = Math.round(this._x);
this.oldY = Math.round(this._y);
}
this._y = Math.round((this.lastY + this.oldY) / 2);
this._x = Math.round((this.lastX + this.oldX) / 2);
i++;
if (i >= 10) {
this._x = this.oldX;
this._y = this.oldY;
this.lastX = this.oldX;
this.lastY = this.oldY;
}
}
this.testPoint = new Object();
if (target.hitTest(10 + this._x, 0 + this._y, true)) {
this.naezd = true;
} else {
this.naezd = false;
}
this.pos = 0;
while (this.pos < 6.78318530717959) {
this.testPoint.x = (Math.cos(this.pos) * 10) + this._x;
this.testPoint.y = (Math.sin(this.pos) * 10) + this._y;
if (target.hitTest(this.testPoint.x, this.testPoint.y, true) && (this.naezd == false)) {
this.testPoint.x1 = this.testPoint.x;
this.testPoint.y1 = this.testPoint.y;
this.naezd = true;
}
if ((target.hitTest(this.testPoint.x, this.testPoint.y, true) == false) && (this.naezd == true)) {
this.testPoint.x2 = this.testPoint.x;
this.testPoint.y2 = this.testPoint.y;
this.naezd = false;
}
this.pos = this.pos + 0.0628318530717959;
}
this.ab = Math.sqrt((Math.abs((this.testPoint.y2 * 10) - (this.testPoint.y1 * 10)) * Math.abs((this.testPoint.y2 * 10) - (this.testPoint.y1 * 10))) + (Math.abs((this.testPoint.x2 * 10) - (this.testPoint.x1 * 10)) * Math.abs((this.testPoint.x2 * 10) - (this.testPoint.x1 * 10))));
this.angleRadians = Math.asin(Math.abs((this.testPoint.y2 * 10) - (this.testPoint.y1 * 10)) / this.ab);
if (this.testPoint.y2 > this.testPoint.y1) {
this.angleRadians = -this.angleRadians;
}
if (target.hitTest(6.12303176911189E-16 + this._x, 10 + this._y, true) == false) {
this.angleRadians = Math.PI - this.angleRadians;
}
this.ab = Math.sqrt((this._vx * this._vx) + (this._vy * this._vy));
if ((this._vx != 0) || (this._vy != 0)) {
this.ugolPadeniya = Math.acos(this._vx / this.ab);
}
if (this._vy < 0) {
this.ugolPadeniya = -this.ugolPadeniya;
}
this.ugolOtskoka = -((Math.PI/2) - (this.angleRadians * 2));
this.ugolOtskoka = this.ugolOtskoka - (this.ugolPadeniya - (Math.PI/2));
this._vx = (Math.cos(this.ugolOtskoka) * this.ab) * this._damp;
this._vy = ((Math.sin(this.ugolOtskoka) * this.ab) * this.koef) * this._damp;
if (((Math.abs(this._vy) < 12) && (Math.abs(this._vy) > 1)) && (currentAction == "throwBall")) {
this.koef = this.koef * 0.8;
}
if (Math.abs(this._vx) < 1) {
this._vx = this._vx * this.koef;
}
if ((this.ab < 3) && (this.onEnterFrame != takeBall)) {
this.finish();
}
}
};
this.attachMovie("water", "water", _root.getNextHighestDepth(), {_x:-100, _y:bgr._y});
water.onEnterFrame = function () {
this._y = bgr._y;
};
pan.swapDepths(_root.getNextHighestDepth());
MovieClip.prototype.showHealth = function () {
if (pauseOn == true) {
return(undefined);
}
this.busy = false;
_root.healthBar.removeMovieClip();
_root.attachMovie("healthBar", "healthBar", _root.getNextHighestDepth(), {_x:this._x, _y:this._y - 80});
_root.healthBar.num = this.num;
_root.healthBar.onEnterFrame = healthAnimation;
healthChar = this;
};
MovieClip.prototype.hideHealth = function () {
if (pauseOn == true) {
return(undefined);
}
_root.healthBar.removeMovieClip();
healthChar = undefined;
};
this.onEnterFrame = function () {
if (pauseOn == true) {
return(undefined);
}
if ((you[activeChar]._x != undefined) && (you[activeChar]._y != undefined)) {
miniChars[activeChar]._x = you[activeChar]._x - bgr._x;
miniChars[activeChar]._y = you[activeChar]._y - bgr._y;
}
if (((((enemyTurnAfterFocus == true) && (Math.abs(xoffset) <= 1)) && (Math.abs(yoffset) <= 1)) && (Math.abs(you[activeChar]._x - (Stage.width / 2)) < 15)) && (Math.abs(you[activeChar]._y - (Stage.height / 1.3)) < 200)) {
enemyTurnAfterFocus = false;
getNearestMissile();
you[activeChar].onEnterFrame = enemyMove;
}
if (msg != undefined) {
attachMovie("msgObj", "mess", _root.getNextHighestDepth(), {_x:Stage.width / 2, _y:Stage.height / 2});
mess.msg = _root.msg;
_root.msg = undefined;
}
if (currentAction == "move") {
t = Math.round(((t0 + 30000) - getTimer()) / 1000);
if (t <= 0) {
xoffset = (yoffset = 0);
main2bgr(you[activeChar]);
youBgr[activeChar].onEnterFrame = standBy;
removeMovieClip(you[activeChar]);
tryToFinish();
}
if ((t <= 5) && ((xoffsetAx != 0) || (yoffsetAy != 0))) {
xoffsetAx = (yoffsetAy = 0);
}
}
focus();
aaa._x = aaa._x + xoffset;
aaa._y = aaa._y + yoffset;
bgr._x = bgr._x + xoffset;
bgr._y = bgr._y + yoffset;
bgr2._x = bgr2._x + (xoffset / 3);
bgr2._y = bgr2._y + (yoffset / 3);
bgr3._x = bgr3._x + (xoffset / 10);
bgr3._y = bgr3._y + (yoffset / 10);
topLayer._x = bgr._x;
topLayer._y = bgr._y;
pan.miniMap.rama._x = pan.miniMap.rama._x - xoffset;
pan.miniMap.rama._y = pan.miniMap.rama._y - yoffset;
missile._x = missile._x + xoffset;
missile._y = missile._y + yoffset;
if (eggsCounter != 0) {
i = 0;
while (i < 15) {
eggs[i]._x = eggs[i]._x + xoffset;
eggs[i]._y = eggs[i]._y + yoffset;
i++;
}
}
i = 0;
while (i < (yourCharsAmount + enemyCharsAmount)) {
you[i]._x = you[i]._x + xoffset;
you[i]._y = you[i]._y + yoffset;
i++;
}
if (delay != undefined) {
delay++;
if (delay >= 30) {
i = 0;
while (i < (yourCharsAmount + enemyCharsAmount)) {
if ((youBgr[i].damage > 0) || (youBgr[i].health <= 0)) {
i = 50;
}
i++;
}
if ((i != 51) && (deathDelay == 0)) {
delay = undefined;
nextTurn();
}
}
}
};
MovieClip.prototype.standBy = function () {
if (pauseOn == true) {
return(undefined);
}
if ((((this._y + bgr._y) <= (bgr._y + 80)) && (Math.abs(this._x + bgr._x) < 1500)) && (Math.abs(this._y + bgr._y) < 1500)) {
this.hit = false;
i = 0;
while (i < (yourCharsAmount + enemyCharsAmount)) {
if (you[i].hitTest(this._x + bgr._x, (this._y + 6) + bgr._y, true) && (you[i]._name != this._name)) {
this.hit = true;
}
i++;
}
this._y = this._y - 50;
if (bgr.hitTest(this._x + bgr._x, (this._y + 56) + bgr._y, true)) {
this.hit = true;
if (bgr.bgrr.hitTest(this._x + bgr._x, (this._y + 56) + bgr._y, true)) {
delete this.onEnterFrame;
}
}
this._y = this._y + 50;
if (this.hit == false) {
this._y = this._y + 5;
}
}
};
availMissile = new flash.geom.ColorTransform();
availMissile.redOffset = 225;
availMissile.greenOffset = -40;
availMissile.blueOffset = -40;
defaultMissile = new flash.geom.ColorTransform();
defaultMissile.alphaMultiplier = 1;
defaultMissile.redMultiplier = 1;
defaultMissile.greenMultiplier = 1;
defaultMissile.blueMultiplier = 1;
pan.sk.onRelease = function () {
if (pauseOn == true) {
return(undefined);
}
if ((yourTurn == true) && (currentAction == "move")) {
t0 = t0 - (t * 1000);
}
this.swapDepths(panDepth);
this._visible = false;
tSound.setVolume(0);
currentAction == undefined;
bgrSound.stop();
};
var tSound = new Sound(pan.t);
tSound.stop();
tSound.attachSound("_tiktak");
pan.t.onEnterFrame = function () {
if (((((tSound.position == 0) || (tSound.position == 6434)) && (t <= 5)) && (t > 0)) && (currentAction == "move")) {
tSound.setVolume(100);
tSound.start();
}
};
_root.taken = false;
delete missile.onEnterFrame;
_k = 0.05;
missile._kk = 0.003;
generateMissiles();
generateChars();
manageMiniChars();
activeChar = 0;
yourActiveChar = 0;
enemyActiveChar = yourCharsAmount;
bgr2main(youBgr[activeChar], false);
you[activeChar].oldX = you[activeChar]._x;
you[activeChar].oldY = you[activeChar]._y;
you[activeChar].onEnterFrame = charMove;
focusingObj = you[activeChar];
youBgr[activeChar].removeMovieClip();
stop();
Frame 1248
bSound.stop();
delete bSound;
var bSound = new Sound(b);
bSound.attachSound("_musicLose");
bSound.start();
removeMovieClip(water);
removeMovieClip(missile);
m.onEnterFrame = (p.onEnterFrame = buttonScale);
m.onRelease = function () {
bSound.stop();
delete bSound;
gotoAndPlay ("chooseLand");
};
score = score - 100;
if (level > 0) {
level--;
}
i = 0;
while (i < 12) {
if (land[i].whose == yourChars) {
land[i].whose = enemyChars;
i = 15;
}
i++;
}
i = 0;
while (i < 12) {
if (land[i].whose == yourChars) {
i = 15;
}
i++;
}
if (i == 12) {
gotoAndPlay ("totalLose");
}
p.onRelease = function () {
getURL ("http://madfatcat.com", "_blank");
var _local2 = new Sound(this);
_local2.stop();
_local2.attachSound("_click");
_local2.start();
};
stop();
Frame 1256
m.onEnterFrame = (p.onEnterFrame = buttonScale);
m.onRelease = function () {
bSound.stop();
delete bSound;
gotoAndPlay ("mainMenu");
};
p.onRelease = function () {
getURL ("http://madfatcat.com", "_blank");
var _local2 = new Sound(this);
_local2.stop();
_local2.attachSound("_click");
_local2.start();
};
play();
Frame 1274
stop();
Frame 1296
gotoAndPlay ("mainMenu");
Frame 1297
bSound.stop();
c.gotoAndStop(yourChars);
delete bSound;
var bSound = new Sound(b);
bSound.attachSound("_music3");
bSound.start(0, 9999);
removeMovieClip(water);
ii = 0;
i = 0;
while (i < 12) {
if (land[i].whose == yourChars) {
ii++;
}
i++;
}
if (ii >= 2) {
level++;
}
land[activeLand].whose = yourChars;
n.onEnterFrame = (p.onEnterFrame = buttonScale);
n.onRelease = function () {
bSound.stop();
delete bSound;
gotoAndStop ("chooseLand");
};
p.onRelease = function () {
getURL ("http://madfatcat.com", "_blank");
var _local2 = new Sound(this);
_local2.stop();
_local2.attachSound("_click");
_local2.start();
};
i = 0;
while (i < 12) {
if (land[i].whose != yourChars) {
i = 15;
}
i++;
}
if (i == 12) {
gotoAndPlay ("totalWin");
}
stop();
Frame 1305
m.onEnterFrame = (v.onEnterFrame = (p.onEnterFrame = buttonScale));
m.onRelease = function () {
bSound.stop();
delete bSound;
gotoAndPlay ("mainMenu");
};
p.onRelease = function () {
getURL ("http://madfatcat.com", "_blank");
var _local2 = new Sound(this);
_local2.stop();
_local2.attachSound("_click");
_local2.start();
};
play();
Instance of Symbol 346 MovieClip "v" in Frame 1305
on (release) {
getURL ("http://www.madfatcat.com/highscores/" + _root.id, "_blank");
}
Frame 1321
stop();
Frame 1339
address = _url;
address = address.substr(0, 16);
if ((address != "http://madfatcat") && (address != "http://www.madfa")) {
this.gotoAndPlay("mainMenu");
}
loadMovie ("http://madfatcat.com/protect/slingWars.swf", "secur");
Symbol 42 MovieClip Frame 15
stop();
Symbol 43 MovieClip Frame 1
i = 2;
while (Number(i) < 50) {
duplicateMovieClip ("isk1", "isk" + i, i);
setProperty("isk" + i, _rotation , random(360));
scalefactor = 40 + Number(random(60));
setProperty("isk" + i, _xscale , scalefactor);
setProperty("isk" + i, _yscale , scalefactor);
i = Number(i) + 1;
}
Symbol 45 MovieClip Frame 15
stop();
Symbol 46 MovieClip Frame 1
i = 2;
while (Number(i) < 50) {
duplicateMovieClip ("isk1", "isk" + i, i);
setProperty("isk" + i, _rotation , random(360));
scalefactor = 40 + Number(random(60));
setProperty("isk" + i, _xscale , scalefactor);
setProperty("isk" + i, _yscale , scalefactor);
i = Number(i) + 1;
}
Symbol 51 MovieClip [razriv2] Frame 4
_root.razrivDamage();
Symbol 51 MovieClip [razriv2] Frame 74
removeMovieClip(this);
this.removeMovieClip();
Symbol 53 MovieClip [razriv1] Frame 4
_root.razrivDamage();
Symbol 53 MovieClip [razriv1] Frame 74
removeMovieClip(this);
this.removeMovieClip();
Symbol 79 MovieClip [char3] Frame 1
stop();
Symbol 79 MovieClip [char3] Frame 2
play();
Symbol 79 MovieClip [char3] Frame 14
if (this._currentframe != 15) {
gotoAndPlay ("move");
}
Symbol 79 MovieClip [char3] Frame 15
play();
Symbol 79 MovieClip [char3] Frame 46
stop();
Symbol 79 MovieClip [char3] Frame 47
stop();
Symbol 79 MovieClip [char3] Frame 49
play();
Symbol 79 MovieClip [char3] Frame 61
gotoAndStop (1);
Symbol 79 MovieClip [char3] Frame 63
_root.missile.i = 0;
if (this.enemy == true) {
play();
}
this.onEnterFrame = _root.throwMissile;
_root.missile.onEnterFrame = _root.missileRotate;
Symbol 79 MovieClip [char3] Frame 102
_root.missile._x = _root.missile.oldX;
_root.missile._y = _root.missile.oldY;
_root.missile.onEnterFrame = throwBall;
_root.focusingObj = _root.missile;
delete this.onEnterFrame;
delete _root.youBgr[activeChar].onEnterFrame;
this.onEnterFrame = standBy;
_root.youBgr[activeChar].gotoAndStop(1);
_root.line.removeMovieClip();
_root.playSoundBgr("_brosok");
gotoAndStop (1);
Symbol 79 MovieClip [char3] Frame 104
play();
Symbol 79 MovieClip [char3] Frame 157
_root.deathDelay--;
removeMovieClip(this);
Symbol 91 MovieClip [fontanchik] Frame 1
_root.bgrSound.setVolume(100);
Symbol 91 MovieClip [fontanchik] Frame 40
removeMovieClip(this);
this.removeMovieClip();
Symbol 113 MovieClip [char1] Frame 1
stop();
Symbol 113 MovieClip [char1] Frame 2
play();
Symbol 113 MovieClip [char1] Frame 14
if (this._currentframe != 15) {
gotoAndPlay ("move");
}
Symbol 113 MovieClip [char1] Frame 15
play();
Symbol 113 MovieClip [char1] Frame 46
stop();
Symbol 113 MovieClip [char1] Frame 47
stop();
Symbol 113 MovieClip [char1] Frame 49
play();
Symbol 113 MovieClip [char1] Frame 61
gotoAndStop (1);
Symbol 113 MovieClip [char1] Frame 63
_root.missile.i = 0;
if (this.enemy == true) {
play();
}
this.onEnterFrame = _root.throwMissile;
_root.missile.onEnterFrame = _root.missileRotate;
Symbol 113 MovieClip [char1] Frame 102
_root.missile._x = _root.missile.oldX;
_root.missile._y = _root.missile.oldY;
_root.missile.onEnterFrame = throwBall;
_root.focusingObj = _root.missile;
delete this.onEnterFrame;
delete _root.youBgr[activeChar].onEnterFrame;
this.onEnterFrame = standBy;
_root.youBgr[activeChar].gotoAndStop(1);
_root.line.removeMovieClip();
_root.playSoundBgr("_brosok");
gotoAndStop (1);
Symbol 113 MovieClip [char1] Frame 104
play();
Symbol 113 MovieClip [char1] Frame 157
_root.deathDelay--;
removeMovieClip(this);
Symbol 135 MovieClip [char2] Frame 1
stop();
Symbol 135 MovieClip [char2] Frame 2
play();
Symbol 135 MovieClip [char2] Frame 14
if (this._currentframe != 15) {
gotoAndPlay ("move");
}
Symbol 135 MovieClip [char2] Frame 15
play();
Symbol 135 MovieClip [char2] Frame 46
stop();
Symbol 135 MovieClip [char2] Frame 47
stop();
Symbol 135 MovieClip [char2] Frame 49
play();
Symbol 135 MovieClip [char2] Frame 61
gotoAndStop (1);
Symbol 135 MovieClip [char2] Frame 63
_root.missile.i = 0;
if (this.enemy == true) {
play();
}
this.onEnterFrame = _root.throwMissile;
_root.missile.onEnterFrame = _root.missileRotate;
Symbol 135 MovieClip [char2] Frame 102
_root.missile._x = _root.missile.oldX;
_root.missile._y = _root.missile.oldY;
_root.missile.onEnterFrame = throwBall;
_root.focusingObj = _root.missile;
delete this.onEnterFrame;
delete _root.youBgr[activeChar].onEnterFrame;
this.onEnterFrame = standBy;
_root.youBgr[activeChar].gotoAndStop(1);
_root.line.removeMovieClip();
_root.playSoundBgr("_brosok");
gotoAndStop (1);
Symbol 135 MovieClip [char2] Frame 104
play();
Symbol 135 MovieClip [char2] Frame 157
_root.deathDelay--;
removeMovieClip(this);
Symbol 139 MovieClip Frame 1
stop();
Symbol 140 MovieClip [m22] Frame 1
stop();
Symbol 140 MovieClip [m22] Frame 2
flame.onEnterFrame = _root.burningMissile;
Symbol 146 MovieClip [m2] Frame 1
stop();
Symbol 177 MovieClip [damage] Frame 1
damage = -Math.abs(damage);
Symbol 177 MovieClip [damage] Frame 56
removeMovieClip(this);
Symbol 184 MovieClip [ukus] Frame 7
removeMovieClip(this);
this.removeMovieClip();
Symbol 191 MovieClip [lyaps] Frame 13
this.removeMovieClip();
Symbol 196 MovieClip [shadowInOut] Frame 40
removeMovieClip(this);
this.removeMovieClip();
Symbol 198 MovieClip [shadowOut] Frame 30
removeMovieClip(this);
this.removeMovieClip();
Symbol 201 MovieClip [msgObj] Frame 110
this.removeMovieClip;
removeMovieClip(this);
Symbol 202 MovieClip [flame] Frame 14
this.removeMovieClip();
removeMovieClip(this);
Symbol 215 Button
on (release) {
getURL ("mailto:slingwars@madfatcat.com", "_blank");
}
Symbol 237 MovieClip Frame 1
stop();
Instance of Symbol 256 MovieClip in Symbol 259 MovieClip [credits] Frame 1
on (release) {
getURL ("http://madfatcat.com", "_blank");
}
Symbol 259 MovieClip [credits] Frame 153
removeMovieClip(this);
Symbol 285 MovieClip [skills] Frame 1
msg = "";
Symbol 285 MovieClip [skills] Frame 13
stop();
strength.onRollOver = function () {
msg = "Increases the damage your troops can inflict.";
};
defense.onRollOver = function () {
msg = "Reduces the damage of enemy missiles.";
};
dexterity.onRollOver = function () {
msg = "Gives a chance to catch enemy missile and throw it back";
};
fire.onRollOver = function () {
msg = "1st level allows to burn up the stocks, 3rd level allows to burn up empty nests. Each next level increases explosion damage.";
};
fire.onRollOut = (strength.onRollOut = (defense.onRollOut = (dexterity.onRollOut = function () {
msg = "";
})));
busy = false;
strength.onRelease = function () {
if (busy == false) {
busy = true;
_root.strengthFactor++;
var _local3 = new Sound(this);
_local3.attachSound("_click");
_local3.start();
play();
}
};
defense.onRelease = function () {
if (busy == false) {
busy = true;
_root.defenseFactor++;
var _local3 = new Sound(this);
_local3.attachSound("_click");
_local3.start();
play();
}
};
dexterity.onRelease = function () {
if (busy == false) {
busy = true;
_root.dexterityFactor++;
var _local3 = new Sound(this);
_local3.attachSound("_click");
_local3.start();
play();
}
};
fire.onRelease = function () {
if (busy == false) {
busy = true;
_root.fireFactor++;
var _local3 = new Sound(this);
_local3.attachSound("_click");
_local3.start();
play();
}
};
Symbol 285 MovieClip [skills] Frame 30
removeMovieClip(this);
Symbol 291 MovieClip Frame 1
stop();
Symbol 293 MovieClip [healthBar] Frame 1
healthBar.gotoAndStop(_root.healthChar.health);
Symbol 321 MovieClip [char0] Frame 1
stop();
Symbol 321 MovieClip [char0] Frame 2
play();
Symbol 321 MovieClip [char0] Frame 14
if (this.jumping != true) {
gotoAndPlay ("move");
}
Symbol 321 MovieClip [char0] Frame 15
play();
Symbol 321 MovieClip [char0] Frame 46
stop();
Symbol 321 MovieClip [char0] Frame 47
stop();
Symbol 321 MovieClip [char0] Frame 49
play();
Symbol 321 MovieClip [char0] Frame 61
gotoAndStop (1);
Symbol 321 MovieClip [char0] Frame 63
_root.missile.i = 0;
if (this.enemy == true) {
play();
}
this.onEnterFrame = _root.throwMissile;
_root.missile.onEnterFrame = _root.missileRotate;
Symbol 321 MovieClip [char0] Frame 102
_root.missile._x = _root.missile.oldX;
_root.missile._y = _root.missile.oldY;
_root.missile.onEnterFrame = throwBall;
_root.focusingObj = _root.missile;
delete this.onEnterFrame;
delete _root.youBgr[activeChar].onEnterFrame;
this.onEnterFrame = standBy;
_root.youBgr[activeChar].gotoAndStop(1);
_root.line.removeMovieClip();
_root.playSoundBgr("_brosok");
gotoAndStop (1);
Symbol 321 MovieClip [char0] Frame 104
play();
Symbol 321 MovieClip [char0] Frame 157
_root.deathDelay--;
removeMovieClip(this);
Symbol 323 MovieClip [m0] Frame 1
stop();
Symbol 323 MovieClip [m0] Frame 2
flame.onEnterFrame = _root.burningMissile;
Symbol 768 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.4.1");
}
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;
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) {
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) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
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) {
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;
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) {
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 _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
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;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_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);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
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);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
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);
}
}
Symbol 354 MovieClip Frame 1
stop();
Symbol 497 MovieClip Frame 1
stop();
Symbol 550 MovieClip Frame 22
stop();
Symbol 564 MovieClip Frame 16
stop();
Symbol 584 MovieClip Frame 1
stop();
Symbol 589 MovieClip Frame 1
stop();
Symbol 594 MovieClip Frame 1
stop();
Symbol 599 MovieClip Frame 1
stop();
Symbol 604 MovieClip Frame 1
stop();
Symbol 609 MovieClip Frame 1
stop();
Symbol 614 MovieClip Frame 1
stop();
Symbol 619 MovieClip Frame 1
stop();
Symbol 624 MovieClip Frame 1
stop();
Symbol 629 MovieClip Frame 1
stop();
Symbol 634 MovieClip Frame 1
stop();
Symbol 639 MovieClip Frame 1
stop();
Symbol 704 MovieClip Frame 1
stop();
_root._quality = "BEST";
_root.q = 1;
Symbol 704 MovieClip Frame 2
stop();
_root._quality = "LOW";
_root.q = 2;
Symbol 704 MovieClip Frame 3
stop();
_root._quality = "MEDIUM";
_root.q = 3;
Symbol 704 MovieClip Frame 4
stop();
_root._quality = "HIGH";
_root.q = 4;
Symbol 704 MovieClip Frame 5
stop();
Symbol 709 MovieClip Frame 1
bgrr.cacheAsBitmap = true;
Symbol 713 MovieClip Frame 1
stop();
Instance of Symbol 704 MovieClip in Symbol 716 MovieClip Frame 1
onClipEvent (load) {
var thisSound = new Sound(this);
}
on (release) {
if (this._currentframe == 4) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(this._currentframe + 1);
}
thisSound.stop();
thisSound.attachSound("_click");
thisSound.setVolume(100);
thisSound.start();
}
Instance of Symbol 713 MovieClip in Symbol 716 MovieClip Frame 1
onClipEvent (load) {
var thisSound = new Sound(this);
}
on (release) {
_root.pauseOn = !_root.pauseOn;
if (_root.pauseOn == true) {
_root.bgrSound.stop();
_root.attachMovie("pauseShadow", "pauseShadow", _root.getNextHighestDepth());
this.gotoAndStop(2);
_root.t00 = getTimer();
_root.you[_root.activeChar].stop();
_root.topLayer.fontanchik.stop();
_root.youBgr[_root.activeChar].stop();
} else {
_root.pauseShadow.removeMovieClip();
if (_root.you[_root.activeChar]._currentframe != 1) {
_root.you[_root.activeChar].play();
}
_root.topLayer.fontanchik.play();
_root.water.play();
if (_root.youBgr[_root.activeChar]._currentframe != 1) {
_root.youBgr[_root.activeChar].play();
}
this.gotoAndStop(1);
_root.t0 = _root.t0 + (getTimer() - _root.t00);
}
thisSound.stop();
thisSound.attachSound("_click");
thisSound.setVolume(100);
thisSound.start();
}
Instance of Symbol 715 MovieClip in Symbol 716 MovieClip Frame 1
onClipEvent (load) {
var thisSound = new Sound(this);
}
on (release) {
_root.endOfRound();
_root.gotoAndPlay("mainMenu");
}
Instance of Symbol 354 MovieClip in Symbol 716 MovieClip Frame 1
onClipEvent (load) {
zvuk = true;
}
on (release) {
zvuk = !zvuk;
if (zvuk == true) {
_root.mySound.setVolume(100);
this.gotoAndStop(1);
} else {
_root.mySound.setVolume(0);
this.gotoAndStop(2);
}
}
Symbol 719 MovieClip Frame 1
fadeSpeed = 1;
floatUpSpeed = 2;
this.onEnterFrame = function () {
d = this.getNextHighestDepth();
aPuff = attachMovie("aPuff", "aPuff" + d, d);
aPuff._xscale = (aPuff._yscale = 10);
aPuff._x = Math.random() * 5;
aPuff.gotoAndPlay(Math.round(Math.random() * 20));
aPuff.onEnterFrame = function () {
this._xscale = (this._yscale = this._yscale + fadeSpeed);
this._alpha = this._alpha - fadeSpeed;
this._y = this._y - floatUpSpeed;
if (this._xscale >= 100) {
this.removeMovieClip();
}
};
};
Symbol 736 MovieClip Frame 1
stop();
Symbol 756 Button
on (release) {
if (((_root.nickName != undefined) && (_root.nickName != "")) && (_root.nickName != " ")) {
if (_root.nickName.length > 20) {
_root.nickName = _root.nickName.substr(0, 20);
}
_root.checksum = (((_root.id + _root.score) * 431) ^ 34327) >> 2;
trace(_root.checksum);
var forServer = new LoadVars();
var result_lv = new LoadVars();
forServer.nickName = _root.nickName;
forServer.checksum = _root.checksum;
forServer.score = _root.score;
forServer.id = _root.id;
forServer.sendAndLoad("http://www.madfatcat.com/highscores.php", result_lv, "POST");
}
this.onEnterFrame = function () {
if (result_lv.status == "ok") {
gotoAndPlay ("success");
result_lv.status = undefined;
} else if (result_lv.status == "error") {
gotoAndPlay ("error");
result_lv.status = undefined;
}
};
}
Symbol 761 MovieClip Frame 1
stop();
Symbol 761 MovieClip Frame 79
getURL ("http://www.madfatcat.com/highscores/" + _root.id, "_blank");
gotoAndStop (1);
Symbol 761 MovieClip Frame 144
gotoAndStop (1);