Combined Code
movieClip 27 {
}
movieClip 30 {
}
movieClip 33 {
}
movieClip 36 {
}
movieClip 39 {
}
movieClip 42 {
}
movieClip 45 {
}
movieClip 48 {
}
movieClip 51 {
}
movieClip 54 {
}
movieClip 57 {
}
movieClip 60 {
}
movieClip 63 {
}
movieClip 66 {
}
movieClip 69 {
}
movieClip 72 {
}
movieClip 75 {
}
// unknown tag 88 length 118
movieClip 80 {
}
movieClip 83 {
}
movieClip 86 {
}
movieClip 99 {
frame 1 {
function f5(t) {
if (t) {
gotoAndStop(Number(t));
} else {
if (_parent.n) {
gotoAndStop(_parent.n);
} else {
if (n) {
gotoAndStop(n);
} else {
gotoAndStop(_name.substr(1, 1));
}
}
}
}
f5();
stop();
}
}
movieClip 102 {
}
button 104 {
on (release) {
if (m && _root.money >= _parent.radiusP[_parent['t' + m].t][_parent['t' + m].rad]) {
_parent['t' + m].cost += int(_parent.radiusP[_parent['t' + m].t][_parent['t' + m].rad] * 0.75);
_parent.money -= _parent.radiusP[_parent['t' + m].t][_parent['t' + m].rad];
++_parent['t' + m].rad;
_parent['t' + m].r5();
_parent['t' + m].ind.q3.gotoAndStop(_parent['t' + m].rad + 1);
f5(m);
}
}
}
button 105 {
on (release) {
if (m && _root.money >= _parent.rateP[_parent['t' + m].t][_parent['t' + m].rat]) {
_parent['t' + m].cost += int(_parent.rateP[_parent['t' + m].t][_parent['t' + m].rat] * 0.75);
_parent.money -= _parent.rateP[_parent['t' + m].t][_parent['t' + m].rat];
++_parent['t' + m].rat;
_parent['t' + m].lod0 = _parent.rate[_parent['t' + m].t][_parent['t' + m].rat];
if (_parent['t' + m].t == 2) {
_parent['t' + m].w2();
} else {
if (_parent['t' + m].t == 4) {
_parent['t' + m].w4();
}
}
_parent['t' + m].ind.q2.gotoAndStop(_parent['t' + m].rat + 1);
f5(m);
}
}
}
button 106 {
on (release) {
if (m && _root.money >= _parent.damageP[_parent['t' + m].t][_parent['t' + m].dam]) {
_parent['t' + m].cost += int(_parent.damageP[_parent['t' + m].t][_parent['t' + m].dam] * 0.75);
_parent.money -= _parent.damageP[_parent['t' + m].t][_parent['t' + m].dam];
++_parent['t' + m].dam;
_parent['t' + m].ind.q1.gotoAndStop(_parent['t' + m].dam + 1);
f5(m);
}
}
}
button 107 {
on (release) {
if (_root.startbuttunpressed) {
_root.attachMovie('msg', 'mm', 15002, {'_x': 500, '_y': 380, 'n': 1});
}
}
}
button 108 {
on (release) {
_root.attachMovie('msg', 'mm', 15002, {'_x': 500, '_y': 380, 'n': 3});
}
}
button 109 {
on (release) {
_root.attachMovie('msg', 'mm', 15002, {'_x': 500, '_y': 380, 'n': 2});
}
}
button 110 {
on (release) {
_parent.take(1);
P.visible = true;
P.gotoAndStop(7);
}
on (rollOver) {
if (P._currentframe !== 7) {
f7(1);
}
}
}
button 111 {
on (press) {
_parent.take(2);
P.visible = true;
P.gotoAndStop(7);
}
on (rollOver) {
if (P._currentframe !== 7) {
f7(2);
}
}
}
button 112 {
on (press) {
_parent.take(3);
P.visible = true;
P.gotoAndStop(7);
}
on (rollOver) {
if (P._currentframe !== 7) {
f7(3);
}
}
}
button 113 {
on (press) {
_parent.take(4);
P.visible = true;
P.gotoAndStop(7);
}
on (rollOver) {
if (P._currentframe !== 7) {
f7(4);
}
}
}
button 114 {
on (press) {
_parent.take(5);
P.visible = true;
P.gotoAndStop(7);
}
on (rollOver) {
if (P._currentframe !== 7) {
f7(5);
}
}
}
button 128 {
on (release) {
if (m) {
_root.money += _parent['t' + m].cost;
_parent['t' + m].w0();
_parent['t' + m].removeMovieClip();
_parent.rdss['r' + m].removeMovieClip();
_parent.mask['mp' + m].removeMovieClip();
_root.s_bc.start();
_parent.show(0);
}
}
on (rollOver) {
_root.s_bh.start();
}
}
// unknown tag 88 length 43
movieClip 135 {
frame 1 {
stop();
}
}
movieClip 139 {
}
button 140 {
on (release) {
_root.startbuttunpressed = true;
_root.gameOn();
_x = 2000;
}
}
movieClip 141 {
}
button 142 {
on (release) {
_root.attachMovie('msg', 'mm', 15002, {'_x': 500, '_y': 380, 'n': 6});
}
}
movieClip 158 {
}
movieClip 162 {
}
movieClip 163 {
}
movieClip 165 {
frame 1 {
function f5(n) {
i = 1;
while (i <= 5) {
if (1 + n >= i) {
this['q' + i]._visible = false;
} else {
this['q' + i]._visible = true;
}
++i;
}
if (n == 4) {
q6._visible = true;
} else {
q6._visible = false;
}
}
}
}
movieClip 173 {
}
movieClip 185 {
}
movieClip 186 {
}
// unknown tag 88 length 135
movieClip 189 {
}
movieClip 192 {
}
button 194 {
on (press) {
_root.hand_target2 = 0;
_root.target_par = _root.number_bot;
_root.hand_target2 = 1;
}
}
movieClip 199 {
}
movieClip 203 {
}
// unknown tag 88 length 156
movieClip 215 {
}
movieClip 227 {
}
movieClip 238 {
}
movieClip 250 {
}
movieClip 259 {
}
movieClip 263 {
}
movieClip 266 {
}
movieClip 269 {
}
movieClip 272 {
}
movieClip 275 {
}
movieClip 278 {
}
movieClip 281 {
}
movieClip 284 {
}
movieClip 287 {
}
movieClip 290 {
}
movieClip 293 {
}
movieClip 296 {
}
movieClip 299 {
}
movieClip 302 {
}
movieClip 305 {
}
movieClip 308 {
}
movieClip 311 {
}
movieClip 314 {
}
movieClip 317 {
}
movieClip 320 {
}
movieClip 323 {
}
movieClip 324 {
frame 1 {
stop();
}
}
movieClip 326 {
}
movieClip 329 {
}
movieClip 332 {
}
movieClip 333 {
}
movieClip 342 {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 8 {
kadr1 = 'u' + _root.next_unit[0];
kadr2 = 'u' + _root.next_unit[1];
kadr3 = 'u' + _root.next_unit[2];
kadr4 = 'u' + _root.next_unit[3];
tu1 = _root.next_unit[0];
tu2 = _root.next_unit[1];
tu3 = _root.next_unit[2];
tu4 = _root.next_unit[3];
next_unit1_mc.gotoAndStop(kadr1);
next_unit2_mc.gotoAndStop(kadr2);
next_unit3_mc.gotoAndStop(kadr3);
next_unit4_mc.gotoAndStop(kadr4);
if (_root.kolvo_unit[0] !== 0) {
next_kol1_txt.text = _root.kolvo_unit[0];
this.cl = 0;
if (tu1 > 10) {
tu1 -= 10;
cl = 1;
}
if (tu1 > 10) {
tu1 -= 10;
++cl;
}
next_life1_txt.text = _root.nrg[tu1 - 2 + cl * 8];
}
if (_root.kolvo_unit[1] !== 0) {
next_kol2_txt.text = _root.kolvo_unit[1];
this.cl = 0;
if (tu2 > 10) {
tu2 -= 10;
cl = 1;
}
if (tu2 > 10) {
tu2 -= 10;
++cl;
}
next_life2_txt.text = _root.nrg[tu2 - 2 + cl * 8];
}
if (_root.kolvo_unit[2] !== 0) {
next_kol3_txt.text = _root.kolvo_unit[2];
this.cl = 0;
if (tu3 > 10) {
tu3 -= 10;
cl = 1;
}
if (tu3 > 10) {
tu3 -= 10;
++cl;
}
next_life3_txt.text = _root.nrg[tu3 - 2 + cl * 8];
}
if (_root.kolvo_unit[3] !== 0) {
next_kol4_txt.text = _root.kolvo_unit[3];
this.cl = 0;
if (tu4 > 10) {
tu4 -= 10;
cl = 1;
}
if (tu4 > 10) {
tu4 -= 10;
++cl;
}
next_life4_txt.text = _root.nrg[tu4 - 2 + cl * 8];
}
}
}
movieClip 409 {
}
movieClip 410 {
}
movieClip 423 mmenu {
frame 1 {
function f7(t) {
U._visible = false;
P._visible = true;
P.gotoAndStop(t + 1);
Q.f5(t);
nam = _parent.towers[t];
}
function f4() {
i = 1;
while (i < 6) {
this['c' + i] = _root.cost[i];
++i;
}
P._visible = false;
U._visible = P._visible;
}
function f6(n) {
sll._y = 1000;
P._visible = true;
U._visible = P._visible;
P.gotoAndStop(1);
t = _parent.ee['bot' + n].t;
trace('bot = ' + n);
_root.number_bot = n;
timer = 500;
if (getTimer() - qwer < timer and _root.target_par2 == _root.number_bot and clik_1 == 1) {
clik_1 = 0;
_root.hand_target2 = 0;
_root.target_par = _root.number_bot;
_root.hand_target2 = 1;
} else {
qwer = getTimer();
clik_1 = 1;
}
_root.target_par2 = _root.number_bot;
U.gotoAndStop(1);
U.U.gotoAndStop(t + 10 * _parent.ee['bot' + n].cl);
U.U.p = _parent.ee['bot' + n].nrg;
P.p = _parent.ee['bot' + n].nrg0;
switch (t) {
case 2:
case 3:
case 5:
case 6:
P.skor = 'NORMAL';
break;
case 7:
P.skor = 'FAST';
break;
case 4:
case 8:
P.skor = 'SLOW';
}
switch (t) {
case 2:
case 7:
P.bron = 'LIGHT';
break;
case 4:
case 8:
P.bron = 'HEAVY';
break;
case 3:
case 5:
case 6:
P.bron = 'MEDIUM';
}
onEnterFrame = function () {
U.gotoAndStop(_parent.ee['bot' + n].prc);
U.U.p = _parent.ee['bot' + n].nrg;
if (_parent.ee['bot' + n].nrg <= 0) {
_parent.show(0);
}
};
}
function f5(n) {
delete onEnterFrame;
P.gotoAndStop(1);
sll._y = -37;
P._visible = false;
U._visible = P._visible;
m = n;
if (m) {
t = _parent['t' + n].t;
Q.f5(t);
nam = _parent.towers[t];
n1 = 'DAMAGE';
n2 = 'FIRE RATE';
n3 = 'RANGE';
if (t == 4) {
n1 = 'SLOW RATIO';
}
if (t == 2 || t == 4) {
n2 = 'TARGETS';
}
v1 = _parent.damage[_parent['t' + n].t][_parent['t' + n].dam];
v2 = _parent.rate[_parent['t' + n].t][_parent['t' + n].rat];
v3 = _parent.radius[_parent['t' + n].t][_parent['t' + n].rad];
switch (t) {
case 1:
v2 = int(240 / v2) / 10;
break;
case 2:
v1 = Math.round(24 * v1);
break;
case 3:
v1 *= 2;
v2 = int(240 / v2) / 10;
break;
case 4:
v1 = 100 - v1 * 100;
v1 += '%';
break;
case 5:
v2 = int(240 / v2) / 10;
}
p1 = _parent.damageP[_parent['t' + n].t][_parent['t' + n].dam];
p2 = _parent.rateP[_parent['t' + n].t][_parent['t' + n].rat];
p3 = _parent.radiusP[_parent['t' + n].t][_parent['t' + n].rad];
cs = _parent['t' + n].cost;
l1.f5(_parent['t' + n].dam);
l2.f5(_parent['t' + n].rat);
l3.f5(_parent['t' + n].rad);
} else {
cs = '-';
p1 = '-';
p2 = '-';
p3 = '-';
v3 = '-';
v2 = '-';
v1 = '-';
l1.f5(-1);
l2.f5(-1);
l3.f5(-1);
}
}
var m;
f4();
}
}
button 424 {
on (release) {
trace('start');
_parent.play();
if (_root.startbuttunpressed) {
_root.gameOn();
}
}
}
button 432 {
on (release) {
_root.attachMovie('end', 'mm', 15002);
}
}
button 436 {
on (release) {
trace('start');
_parent.play();
if (_root.startbuttunpressed) {
_root.gameOn();
}
}
}
movieClip 440 {
}
movieClip 450 {
frame 1 {
stop();
gotoAndStop(Number(_parent._name.substr(1, 1)));
}
}
button 451 {
on (rollOver) {
if (_parent._currentframe == 30 || _parent._currentframe == 80 || _parent._name == 'msg' || _parent._parent._name == 'sett') {
_root.s_bh.start();
if (_currentframe > 10) {
gotoAndPlay(20 - _currentframe);
} else {
play();
}
}
}
on (rollOut) {
gotoAndPlay(20 - _currentframe);
}
on (releaseOutside) {
gotoAndPlay(20 - _currentframe);
}
on (release) {
_root.s_bc.start();
switch (_name) {
case 'q5':
trace('start');
_parent._parent.play();
if (_root.startbuttunpressed) {
_root.gameOn();
}
break;
case 'q3':
_parent.gotoAndStop(5);
break;
case 'w3':
trace('help');
_parent.helps.play();
break;
case 'q2':
trace('settings');
_parent._parent.n = 4;
_parent._parent.play();
break;
case 'w2':
trace('settings');
_parent.sett.play();
break;
case 's9':
trace('Apply settings');
_parent._parent.play();
break;
case 'q9':
trace('Apply settings');
_parent._parent.n = 5;
_parent._parent.play();
trace('start');
if (_root.startbuttunpressed) {
_root.gameOn();
}
break;
case 'q4':
trace('top 100');
break;
case 'w1':
trace('start');
_parent.gotoAndPlay(62);
break;
case 'w6':
trace('easy');
_root.diff = 0;
_root.play();
_parent.play();
break;
case 'w7':
trace('normal');
_root.diff = 1;
_root.play();
_parent.play();
break;
case 'w8':
trace('hard');
_root.diff = 2;
_root.play();
_parent.play();
}
}
}
movieClip 452 {
frame 1 {
stop();
}
frame 10 {
stop();
}
}
movieClip 458 {
}
button 459 {
on (release) {
rr._y = r1._y;
_root._quality = 'BEST';
}
}
button 460 {
on (release) {
rr._y = r2._y;
_root._quality = 'HIGH';
}
}
button 461 {
on (release) {
rr._y = r3._y;
_root._quality = 'MEDIUM';
}
}
button 462 {
on (release) {
rr._y = r0._y;
_root._quality = 'LOW';
}
}
movieClip 465 {
}
button 467 {
on (press) {
startDrag('', false, left, top, right, bottom);
}
on (release) {
stopDrag();
corr();
}
on (dragOut) {
stopDrag();
corr();
}
on (press) {
_x = _parent._xmouse;
}
}
movieClip 468 {
frame 1 {
function corr() {
p._y = 60 + _x;
vol = int((_x + 160) / 2);
_root.theme.setVolume(vol);
}
_x = _root.theme.getVolume() * 2 - 160;
corr();
}
}
button 471 {
on (press) {
var si = setInterval(function () {
if (p._x <= 35) {
p._x += 5;
p.corr();
} else {
p._x = 40;
p.corr();
}
}, 50);
}
on (release) {
clearInterval(si);
}
on (releaseOutside) {
clearInterval(si);
}
}
button 472 {
on (press) {
var si = setInterval(function () {
if (p._x >= -155) {
p._x -= 5;
p.corr();
} else {
p._x = -160;
p.corr();
}
}, 50);
}
on (release) {
clearInterval(si);
}
on (releaseOutside) {
clearInterval(si);
}
}
movieClip 473 {
instance p of movieClip 468 {
onClipEvent (load) {
inity = _x;
left = _x - 160;
right = _x + 40;
top = _y;
bottom = _y;
}
}
}
movieClip 476 {
}
button 477 {
on (press) {
_parent.play();
if (_root.startbuttunpressed) {
_root.gameOn();
}
}
}
movieClip 480 {
frame 1 {
bt.useHandCursor = false;
stop();
}
frame 4 {
switch (_quality) {
case 'BEST':
rr._y = r1._y;
break;
case 'HIGH':
rr._y = r2._y;
break;
case 'MEDIUM':
rr._y = r3._y;
break;
case 'LOW':
rr._y = r0._y;
}
}
frame 6 {
stop();
}
}
movieClip 481 msg {
frame 1 {
if (n == 5) {
n = 3;
}
msg.gotoAndStop(n);
delete _root.onEnterFrame;
_root.gameOff = true;
}
frame 10 {
stop();
}
frame 20 {
if (n !== 4) {
this.removeMovieClip();
}
}
}
movieClip 520 _bang_m {
frame 5 {
trace(n);
_root.ee['k' + n].removeMovieClip();
}
frame 100 {
this.removeMovieClip();
}
}
movieClip 639 _bang {
frame 1 {
_rotation = Math.round(Math.random() * 360);
}
frame 13 {
trace(n);
_root.ee['k' + n].removeMovieClip();
}
frame 60 {
this.removeMovieClip();
}
}
movieClip 686 {
}
movieClip 691 {
frame 1 {
stop();
}
}
movieClip 692 {
}
movieClip 694 radius {
}
button 695 {
on (press) {
_root.s_bc.start();
_root.show(n);
}
}
movieClip 742 {
}
movieClip 743 {
}
movieClip 744 sr {
}
movieClip 791 {
}
movieClip 838 {
}
movieClip 843 {
frame 1 {
n = 0;
stop();
}
frame 3 {
++n;
if (n > 5) {
gotoAndPlay(1);
} else {
if (Math.random() > 0.5) {
gotoAndPlay(2);
} else {
gotoAndPlay(4);
}
}
}
frame 5 {
++n;
if (n > 5) {
gotoAndPlay(1);
} else {
if (Math.random() > 0.5) {
gotoAndPlay(2);
} else {
gotoAndPlay(4);
}
}
}
}
movieClip 890 {
}
movieClip 891 tower {
frame 1 {
function f5(n) {
r5();
if (t) {
gotoAndStop(t);
} else {
if (n) {
gotoAndStop(n);
} else {
gotoAndStop(_name.substr(1, 1));
}
}
}
function r5() {
radius._yscale = _parent.radius[t][rad];
radius._xscale = radius._yscale;
_parent.rdss['r' + n]._yscale = radius._yscale;
_parent.rdss['r' + n]._xscale = radius._yscale;
}
function w2() {
_parent.attachMovie('laser2', 'l' + rat + _name, 8600 + _parent.nl++, {'_x': _x, '_y': _y - 48, 'par': _name});
}
function w4() {
_parent.attachMovie('laser4', 'l' + rat + _name, 8600 + _parent.nl++, {'_x': _x, '_y': _y - 48, 'par': _name});
}
function w0() {
i = 0;
while (i <= rat) {
_parent['l' + i + _name].removeMovieClip();
++i;
}
}
f5();
attack = false;
target = 0;
lod = 0;
sik = 0;
stop();
if (t == 1 || t == 3 || t == 5) {
tw.stop();
} else {
if (t == 2) {
w2();
} else {
if (t == 4) {
w4();
}
}
}
}
}
movieClip 893 {
}
movieClip 896 {
frame 1 {
if (!_parent.bull) {
stop();
}
}
frame 9 {
stop();
_parent.removeMovieClip();
}
}
movieClip 897 beng_r {
frame 1 {
stop();
}
frame 24 {
_parent.removeMovieClip();
}
}
movieClip 898 sniper {
frame 1 {
r._visible = false;
s1._visible = false;
r1._visible = false;
qwer = 15;
_root.s_mis.start();
onEnterFrame = function () {
if (!_parent[par]) {
trace('delete SNYPER BULLET');
delete this.onEnterFrame;
trg = 0;
this.removeMovieClip();
}
if (!_root.gameOff) {
if (sp > 0) {
r._visible = true;
r._y = r._y + sp + qwer;
++sp;
++qwer;
if (trg) {
if (!_root.ee['bot' + trg]) {
s1._y = _parent[secrok].r._y;
r._visible = false;
s1._visible = true;
s1.play();
delete onEnterFrame;
}
_rotation = -Math.atan2(_root.ee['bot' + trg]._x - _x, _root.ee['bot' + trg]._y - _y) * 180 / Math.PI;
if (this.hitTest(_root.ee['bot' + trg].rr)) {
_root.s_exp.start();
r._visible = false;
if (_root.ee['bot' + trg].t > 2) {
r1._y = r._y;
r1._rotation = int(Math.random() * 360);
r1._visible = true;
r1.play();
} else {
s1._y = r._y;
s1._visible = true;
s1.play();
}
delete onEnterFrame;
_root.ee['bot' + trg].nrg -= int(dam * _root.armor[4][_root.ee['bot' + trg].t - 2]);
if (_root.ee['bot' + trg].nrg <= 0) {
_root.ee['bot' + trg].kill();
}
i = 1;
while (i < _root.n) {
if (trg !== i && Math.abs(_root.ee['bot' + trg]._x - _root.ee['bot' + i]._x) < 60 && Math.abs(_root.ee['bot' + trg]._y - _root.ee['bot' + i]._y) < 60) {
_root.ee['bot' + i].nrg -= int(dam * _root.armor[1][_root.ee['bot' + trg].t - 2] / 2);
if (_root.ee['bot' + i].nrg <= 0) {
_root.ee['bot' + i].kill();
}
}
++i;
}
}
}
if (sp > 36) {
trace('sp>36 for rocket');
delete onEnterFrame;
this.removeMovieClip();
}
} else {
if (!_root.ee['bot' + trg]._x) {
trace('no trg for rocket');
delete onEnterFrame;
this.removeMovieClip();
}
r._visible = false;
++sp;
if (sp == 0) {
}
}
}
};
}
}
movieClip 905 {
}
movieClip 906 rocket {
frame 1 {
r._visible = false;
s1._visible = false;
r1._visible = false;
_root.s_mis.start();
onEnterFrame = function () {
if (!_parent[par]) {
trace('delete rocket');
delete this.onEnterFrame;
trg = 0;
this.removeMovieClip();
}
if (!_root.gameOff) {
if (sp > 0) {
r._visible = true;
r._y += sp;
++sp;
if (trg) {
if (!_root.ee['bot' + trg]) {
s1._y = _parent[secrok].r._y;
r._visible = false;
s1._visible = true;
s1.play();
delete onEnterFrame;
}
_rotation = -Math.atan2(_root.ee['bot' + trg]._x - _x, _root.ee['bot' + trg]._y - _y) * 180 / Math.PI;
if (this.hitTest(_root.ee['bot' + trg].rr)) {
_root.s_exp.start();
r._visible = false;
if (_root.ee['bot' + trg].t > 2) {
r1._y = r._y;
r1._rotation = int(Math.random() * 360);
r1._visible = true;
r1.play();
} else {
s1._y = r._y;
s1._visible = true;
s1.play();
}
delete onEnterFrame;
_root.ee['bot' + trg].nrg -= int(dam * _root.armor[1][_root.ee['bot' + trg].t - 2]);
if (_root.ee['bot' + trg].nrg <= 0) {
_root.ee['bot' + trg].kill();
}
i = 1;
while (i < _root.n) {
if (trg !== i && Math.abs(_root.ee['bot' + trg]._x - _root.ee['bot' + i]._x) < 60 && Math.abs(_root.ee['bot' + trg]._y - _root.ee['bot' + i]._y) < 60) {
_root.ee['bot' + i].nrg -= int(dam * _root.armor[1][_root.ee['bot' + trg].t - 2] / 2);
if (_root.ee['bot' + i].nrg <= 0) {
_root.ee['bot' + i].kill();
}
}
++i;
}
}
}
if (sp > 36) {
trace('sp>36 for rocket');
delete onEnterFrame;
this.removeMovieClip();
}
} else {
if (!_root.ee['bot' + trg]._x) {
trace('no trg for rocket');
delete onEnterFrame;
this.removeMovieClip();
}
r._visible = false;
++sp;
if (sp == 0) {
}
}
}
};
}
}
movieClip 909 msk {
}
movieClip 911 mp {
}
movieClip 913 {
}
movieClip 914 laser4 {
frame 1 {
function off() {
malp = true;
}
function fullOff(trg) {
delete this.onEnterFrame;
trg = 0;
ll._visible = false;
}
function kill(trg) {
malp = false;
delete this.onEnterFrame;
this.onEnterFrame = function () {
if (!_parent[par]) {
trace('delete lazer');
delete this.onEnterFrame;
trg = 0;
ll._visible = false;
this.removeMovieClip();
}
xx = _root.ee['bot' + trg]._x - _x - _parent._x;
yy = _root.ee['bot' + trg]._y - _y - _parent._y;
if (_root.ee['bot' + trg].t == 6) {
yy -= 20;
}
if (_root.ee['bot' + trg].t == 8) {
yy -= 30;
}
ll._yscale = Math.sqrt(xx * xx + yy * yy);
if (malp || !_root.kl) {
if (ll._alpha <= 10) {
fullOff(trg);
}
ll._alpha -= 10;
} else {
if (ll._alpha < 100) {
ll._alpha += 10;
}
}
_rotation = -Math.atan2(xx, yy) * 180 / Math.PI;
_root.ee['bot' + trg].sp = Math.round(_root.ee['bot' + trg].ms * _root.damage[_root[prnt].t][_root[prnt].dam]);
};
_root.ee['bot' + trg].freeze(true);
ll._visible = true;
}
off();
prnt = _name.substr(2, 4);
ll._alpha = 0;
}
}
movieClip 916 {
}
movieClip 922 {
frame 1 {
gotoAndPlay(Math.round(Math.random() * 7));
}
}
movieClip 923 laser2 {
frame 1 {
function off() {
rr._x = 900;
malp = true;
}
function fullOff() {
delete this.onEnterFrame;
rr._x = 900;
trg = 0;
ll._visible = false;
}
function kill(trg) {
malp = false;
delete this.onEnterFrame;
this.onEnterFrame = function () {
if (!_parent[par]) {
trace('delete lazer');
delete this.onEnterFrame;
trg = 0;
ll._visible = false;
this.removeMovieClip();
}
xx = _root.ee['bot' + trg]._x - _x - _parent._x;
yy = _root.ee['bot' + trg]._y - _y - _parent._y;
if (_root.ee['bot' + trg].t == 6) {
yy -= 20;
}
if (_root.ee['bot' + trg].t == 8) {
yy -= 30;
}
rr._x = xx;
rr._y = yy;
ll._yscale = Math.sqrt(xx * xx + yy * yy);
if (malp || !_root.kl) {
if (ll._alpha <= 10) {
fullOff();
}
ll._alpha -= 10;
} else {
if (ll._alpha < 100) {
ll._alpha += 10;
}
}
ll._rotation = -Math.atan2(xx, yy) * 180 / Math.PI;
if (!_root.gameOff) {
_root.ee['bot' + trg].nrg -= Math.round(_root.damage[_root[prnt].t][_root[prnt].dam] * _root.armor[3][_root.ee['bot' + trg].t - 2]);
}
if (_root.ee['bot' + trg].nrg <= 0) {
_root.ee['bot' + trg].kill();
off();
}
};
ll._visible = true;
}
off();
prnt = _name.substr(2, 4);
ll._alpha = 0;
trace('lzr: ' + _name);
}
}
button 924 {
on (release) {
_parent.put();
}
}
movieClip 925 drag {
frame 1 {
function f5() {
q.f5(t);
}
stop();
}
}
movieClip 926 bullet {
frame 1 {
_root.s_b.start();
_x = _root.ee['bot' + trg]._x;
_y = _root.ee['bot' + trg]._y;
_root.ee['bot' + trg].nrg -= int(dam * _root.armor[2][_root.ee['bot' + trg].t - 2]);
if (_root.ee['bot' + trg].nrg <= 0) {
_root.ee['bot' + trg].kill();
}
bull = true;
}
frame 11 {
this.removeMovieClip();
}
}
movieClip 928 {
}
movieClip 929 {
}
movieClip 930 bullet++ {
frame 1 {
_root.s_1b.start();
_rotation = -Math.atan2(_root.ee['bot' + trg]._x - _x, _root.ee['bot' + trg]._y - _y) * 180 / Math.PI;
onEnterFrame = function () {
if (r._y > 500 || kill) {
gotoAndStop(2);
}
r._y += 8;
if (trg) {
if (this.hitTest(_root.ee['bot' + trg].rr)) {
_root.ee['bot' + trg].nrg -= dam;
if (_root.ee['bot' + trg].nrg <= 0) {
_root.ee['bot' + trg].kill();
}
kill = r._y;
}
}
};
stop();
}
}
button 933 {
on (release) {
_root.menu.f6(n);
}
}
movieClip 982 {
}
movieClip 1031 {
}
movieClip 1080 {
}
movieClip 1129 {
}
movieClip 1178 {
}
movieClip 1227 {
}
movieClip 1276 {
}
movieClip 1325 {
}
movieClip 1374 {
}
movieClip 1423 {
}
movieClip 1472 {
}
movieClip 1521 {
}
movieClip 1570 {
}
movieClip 1619 {
}
movieClip 1620 {
frame 1 {
stop();
}
}
movieClip 1622 {
}
movieClip 1628 {
frame 1 {
stop();
}
}
movieClip 1677 {
}
movieClip 1726 {
}
movieClip 1775 {
}
movieClip 1824 {
}
movieClip 1873 {
}
movieClip 1922 {
}
movieClip 1971 {
}
movieClip 2020 {
}
movieClip 2069 {
}
movieClip 2118 {
}
movieClip 2167 {
}
movieClip 2216 {
}
movieClip 2265 {
}
movieClip 2314 {
}
movieClip 2315 {
frame 1 {
stop();
}
}
movieClip 2364 {
}
movieClip 2413 {
}
movieClip 2462 {
}
movieClip 2511 {
}
movieClip 2560 {
}
movieClip 2609 {
}
movieClip 2658 {
}
movieClip 2707 {
}
movieClip 2756 {
}
movieClip 2805 {
}
movieClip 2854 {
}
movieClip 2903 {
}
movieClip 2952 {
}
movieClip 3001 {
}
movieClip 3050 {
}
movieClip 3099 {
}
movieClip 3148 {
}
movieClip 3197 {
}
movieClip 3246 {
}
movieClip 3295 {
}
movieClip 3344 {
}
movieClip 3393 {
}
movieClip 3442 {
}
movieClip 3491 {
}
movieClip 3540 {
}
movieClip 3589 {
}
movieClip 3638 {
}
movieClip 3687 {
}
movieClip 3688 {
frame 1 {
stop();
}
}
movieClip 3701 {
}
movieClip 3714 {
}
movieClip 3727 {
}
movieClip 3740 {
}
movieClip 3753 {
}
movieClip 3766 {
}
movieClip 3779 {
}
movieClip 3792 {
}
movieClip 3805 {
}
movieClip 3818 {
}
movieClip 3831 {
}
movieClip 3844 {
}
movieClip 3857 {
}
movieClip 3870 {
}
movieClip 3883 {
}
movieClip 3896 {
}
movieClip 3909 {
}
movieClip 3922 {
}
movieClip 3935 {
}
movieClip 3948 {
}
movieClip 3961 {
}
movieClip 3974 {
}
movieClip 3987 {
}
movieClip 4000 {
}
movieClip 4013 {
}
movieClip 4026 {
}
movieClip 4039 {
}
movieClip 4052 {
}
movieClip 4053 {
frame 1 {
stop();
}
}
movieClip 4058 {
}
movieClip 4063 {
}
movieClip 4068 {
}
movieClip 4073 {
}
movieClip 4078 {
}
movieClip 4083 {
}
movieClip 4088 {
}
movieClip 4093 {
}
movieClip 4098 {
}
movieClip 4103 {
}
movieClip 4108 {
}
movieClip 4113 {
}
movieClip 4118 {
}
movieClip 4123 {
}
movieClip 4128 {
}
movieClip 4133 {
}
movieClip 4138 {
}
movieClip 4143 {
}
movieClip 4148 {
}
movieClip 4153 {
}
movieClip 4158 {
}
movieClip 4163 {
}
movieClip 4168 {
}
movieClip 4173 {
}
movieClip 4178 {
}
movieClip 4183 {
}
movieClip 4188 {
}
movieClip 4193 {
}
movieClip 4194 {
frame 1 {
stop();
}
}
movieClip 4199 {
}
movieClip 4204 {
}
movieClip 4209 {
}
movieClip 4214 {
}
movieClip 4219 {
}
movieClip 4224 {
}
movieClip 4229 {
}
movieClip 4234 {
}
movieClip 4239 {
}
movieClip 4244 {
}
movieClip 4249 {
}
movieClip 4254 {
}
movieClip 4259 {
}
movieClip 4264 {
}
movieClip 4269 {
}
movieClip 4274 {
}
movieClip 4279 {
}
movieClip 4284 {
}
movieClip 4289 {
}
movieClip 4294 {
}
movieClip 4299 {
}
movieClip 4304 {
}
movieClip 4309 {
}
movieClip 4314 {
}
movieClip 4319 {
}
movieClip 4324 {
}
movieClip 4329 {
}
movieClip 4334 {
}
movieClip 4335 {
frame 1 {
stop();
}
}
movieClip 4346 {
frame 1 {
stop();
}
}
movieClip 4347 {
frame 1 {
stop();
}
}
movieClip 4348 bot2 {
frame 1 {
function freeze(v) {
if (v) {
Freeze.setTransform(freezeColor);
} else {
Freeze.setTransform(normalColor);
}
}
function ind() {
nrgs.gotoAndStop(50 - nrg / 2);
}
function kill() {
if (_root.hand_target2 == 1 and _root.target_par == n) {
_root.hand_target2 = 0;
}
trace('Ñмерть');
delete onEnterFrame;
_root.money += killmoney;
_root.score += killmoney;
--_root.kl;
if (_root.kl == 0) {
_root.gotoAndStop('next');
}
switch (t) {
case 2:
_parent._parent.attachMovie('_bang_m', 'b' + _parent._parent.nr, 50 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n});
rn = Math.random();
if (rn < 0.33) {
_root.s_md1.start();
} else {
if (rn < 0.66) {
_root.s_md2.start();
} else {
_root.s_md3.start();
}
}
break;
case 3:
_root.s_vd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n, '_xscale': 50, '_yscale': 50});
break;
case 4:
_root.s_tnd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n});
_root.vibra(5);
break;
case 5:
_root.s_tnd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n, '_xscale': 80, '_yscale': 80});
break;
case 7:
_root.s_hd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n, '_xscale': 80, '_yscale': 80});
break;
case 6:
_root.s_bnd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n});
break;
case 8:
_root.s_btd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y - 30, 'n': n, '_xscale': 120, '_yscale': 120});
_root.vibra(7);
}
_name = 'k' + n;
++_root.killed;
}
gotoAndStop(t);
var Freeze = new Color(vik);
var freezeColor = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 50, 'ba': 100, 'bb': 150, 'aa': 100, 'ab': 0};
var normalColor = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0};
prc = 0;
onEnterFrame = function () {
prc = Math.round(100 - nrg * 100 / nrg0);
nrgs.gotoAndStop(prc);
freeze(false);
};
stop();
}
}
movieClip 4350 bot1 {
frame 1 {
function freeze(v) {
if (v) {
Freeze.setTransform(freezeColor);
} else {
Freeze.setTransform(normalColor);
}
}
function ind() {
nrgs.gotoAndStop(50 - nrg / 2);
}
function kill() {
if (_root.hand_target2 == 1 and _root.target_par == n) {
_root.hand_target2 = 0;
}
trace('Ñмерть');
delete onEnterFrame;
_root.money += killmoney;
_root.score += killmoney;
--_root.kl;
if (_root.kl == 0) {
_root.gotoAndStop('next');
}
switch (t) {
case 2:
_parent._parent.attachMovie('_bang_m', 'b' + _parent._parent.nr, 50 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n});
rn = Math.random();
if (rn < 0.33) {
_root.s_md1.start();
} else {
if (rn < 0.66) {
_root.s_md2.start();
} else {
_root.s_md3.start();
}
}
break;
case 3:
_root.s_vd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n, '_xscale': 50, '_yscale': 50});
break;
case 4:
_root.s_tnd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n});
_root.vibra(5);
break;
case 5:
_root.s_tnd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n, '_xscale': 80, '_yscale': 80});
break;
case 7:
_root.s_hd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n, '_xscale': 80, '_yscale': 80});
break;
case 6:
_root.s_bnd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n});
break;
case 8:
_root.s_btd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y - 30, 'n': n, '_xscale': 120, '_yscale': 120});
_root.vibra(7);
}
_name = 'k' + n;
++_root.killed;
}
gotoAndStop(t);
var Freeze = new Color(vik);
var freezeColor = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 50, 'ba': 100, 'bb': 150, 'aa': 100, 'ab': 0};
var normalColor = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0};
prc = 0;
onEnterFrame = function () {
prc = Math.round(100 - nrg * 100 / nrg0);
nrgs.gotoAndStop(prc);
freeze(false);
};
stop();
}
}
button 4352 {
on (release) {
_root.menu.f6(n);
}
}
movieClip 4353 bot0 {
frame 1 {
function freeze(v) {
if (v) {
Freeze.setTransform(freezeColor);
} else {
Freeze.setTransform(normalColor);
}
}
function ind() {
nrgs.gotoAndStop(50 - nrg / 2);
}
function kill() {
if (_root.hand_target2 == 1 and _root.target_par == n) {
_root.hand_target2 = 0;
}
trace('Ñмерть');
delete onEnterFrame;
_root.money += killmoney;
_root.score += killmoney;
--_root.kl;
if (_root.kl == 0) {
_root.gotoAndStop('next');
}
switch (t) {
case 2:
_parent._parent.attachMovie('_bang_m', 'b' + _parent._parent.nr, 50 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n});
rn = Math.random();
if (rn < 0.33) {
_root.s_md1.start();
} else {
if (rn < 0.66) {
_root.s_md2.start();
} else {
_root.s_md3.start();
}
}
break;
case 3:
_root.s_vd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n, '_xscale': 50, '_yscale': 50});
break;
case 4:
_root.s_tnd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n});
_root.vibra(5);
break;
case 5:
_root.s_tnd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n, '_xscale': 80, '_yscale': 80});
break;
case 7:
_root.s_hd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n, '_xscale': 80, '_yscale': 80});
break;
case 6:
_root.s_bnd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y, 'n': n});
break;
case 8:
_root.s_btd.start();
_parent._parent.attachMovie('_bang', 'b' + _parent._parent.nr, 6000 + _parent._parent.nr++, {'_x': _x, '_y': _y - 30, 'n': n, '_xscale': 120, '_yscale': 120});
_root.vibra(7);
}
_name = 'k' + n;
++_root.killed;
}
gotoAndStop(t);
var Freeze = new Color(vik);
var freezeColor = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 50, 'ba': 100, 'bb': 150, 'aa': 100, 'ab': 0};
var normalColor = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0};
prc = 0;
onEnterFrame = function () {
prc = Math.round(100 - nrg * 100 / nrg0);
nrgs.gotoAndStop(prc);
freeze(false);
};
stop();
}
}
// unknown tag 88 length 62
// unknown tag 88 length 79
movieClip 4364 {
}
movieClip 4367 {
frame 1 {
stop();
if (_root.level >= _root.LASTLEVEL && _root.loss < 40) {
gotoAndStop(2);
}
}
}
movieClip 4370 {
}
movieClip 4373 {
frame 1 {
stop();
if (_root.level >= _root.LASTLEVEL && _root.loss < 40) {
gotoAndStop(2);
}
}
}
movieClip 4376 {
frame 1 {
stop();
if (_root.level >= _root.LASTLEVEL && _root.loss < 40) {
gotoAndStop(2);
}
}
}
movieClip 4379 {
frame 1 {
stop();
if (_root.level >= _root.LASTLEVEL && _root.loss < 40) {
gotoAndStop(2);
}
}
}
movieClip 4382 {
frame 1 {
stop();
if (_root.level >= _root.LASTLEVEL && _root.loss < 40) {
gotoAndStop(2);
}
}
}
button 4383 {
on (release) {
_root.s_bc.start();
play();
_root.gotoAndPlay(1);
_root.theme.stop();
}
on (rollOver) {
_root.s_bh.start();
}
}
movieClip 4384 end {
frame 30 {
stop();
_parent.gotoAndStop('end');
}
frame 40 {
stop();
}
}
movieClip 4387 {
frame 1 {
switch (_quality) {
case 'BEST':
rr._y = r1._y;
break;
case 'HIGH':
rr._y = r2._y;
break;
case 'MEDIUM':
rr._y = r3._y;
break;
case 'LOW':
rr._y = r0._y;
}
bt.useHandCursor = false;
}
}
movieClip 4388 {
frame 1 {
stop();
}
frame 10 {
stop();
}
}
movieClip 4389 {
}
button 4390 {
on (press) {
play();
}
}
movieClip 4391 {
frame 1 {
stop();
}
frame 10 {
_root.mm.helps.qwert.useHandCursor = false;
}
frame 10 {
stop();
}
instance qwert of movieClip 4389 {
onClipEvent (rollOver) {
useHandCursor = false;
}
}
}
movieClip 4392 mm {
frame 30 {
_parent.ee.msk._visible = true;
_parent.menu._visible = true;
stop();
}
frame 60 {
gotoAndStop(1);
}
frame 80 {
stop();
}
frame 120 {
stop();
}
}
frame 1 {
mochi.as2.MochiAd.showPreGameAd({'id': '8d6708bb98a5c99e', 'res': '980x800'});
}
movieClip 4397 __Packages.mochi.as2.MochiAd {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiAd) {
var v1 = function () {};
mochi.as2.MochiAd = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.showPreGameAd = function (options) {
var v26 = {'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 = mochi.as2.MochiAd._parseOptions(options, v26);
if ('c862232051e0a94e1c3609b3916ddb17'.substr(0) == 'dfeada81ac97cde83665f81c12da7def') {
options.ad_started();
options.ad_finished();
return undefined;
}
var clip = options.clip;
var v23 = 11000;
var v19 = options.ad_timeout;
if (options.skip) {
v19 = 0;
}
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!mochi.as2.MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var v14 = mochi.as2.MochiAd._getRes(options);
var v4 = v14[0];
var v13 = v14[1];
mc._x = v4 * 0.5;
mc._y = v13 * 0.5;
var chk = mc.createEmptyMovieClip('_mochiad_wait', 3);
chk._x = v4 * -0.5;
chk._y = v13 * -0.5;
var v6 = chk.createEmptyMovieClip('_mochiad_bar', 4);
if (options.no_progress_bar) {
v6._visible = false;
delete options.no_progress_bar;
} else {
v6._x = 10;
v6._y = v13 - 20;
}
var v22 = options.color;
delete options.color;
var v20 = options.background;
delete options.background;
var v24 = options.outline;
delete options.outline;
var v5 = v6.createEmptyMovieClip('_outline', 1);
v5.beginFill(v20);
v5.moveTo(0, 0);
v5.lineTo(v4 - 20, 0);
v5.lineTo(v4 - 20, 10);
v5.lineTo(0, 10);
v5.lineTo(0, 0);
v5.endFill();
var v3 = v6.createEmptyMovieClip('_inside', 2);
v3.beginFill(v22);
v3.moveTo(0, 0);
v3.lineTo(v4 - 20, 0);
v3.lineTo(v4 - 20, 10);
v3.lineTo(0, 10);
v3.lineTo(0, 0);
v3.endFill();
v3._xscale = 0;
var v7 = v6.createEmptyMovieClip('_outline', 3);
v7.lineStyle(0, v24, 100);
v7.moveTo(0, 0);
v7.lineTo(v4 - 20, 0);
v7.lineTo(v4 - 20, 10);
v7.lineTo(0, 10);
v7.lineTo(0, 0);
chk.ad_msec = v23;
chk.ad_timeout = v19;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var v2 = 100 * (1 - (getTimer() - this.fadeout_start) / this.fadeout_time);
if (v2 > 0) {
this._parent._alpha = v2;
} else {
var v3 = this._parent._parent;
mochi.as2.MochiAd.unload(v3);
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 v2 = this.mc._mochiad_wait;
v2.server_control = true;
v2.started = getTimer();
v2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
chk.onEnterFrame = function () {
var v6 = this._parent._parent;
var v11 = this._parent._mochiad_ctr;
var v5 = getTimer() - this.started;
var v3 = false;
var v4 = v6.getBytesTotal();
var v8 = v6.getBytesLoaded();
var v2 = 100 * v8 / v4;
var v10 = 100 * v5 / chk.ad_msec;
var v9 = this._mochiad_bar._inside;
var v13 = Math.min(100, Math.min(v2 || 0, v10));
v13 = Math.max(this.last_pcnt, v13);
this.last_pcnt = v13;
v9._xscale = v13;
options.ad_progress(v13);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {'id': 'hostLoadPcnt', 'pcnt': v2}, clip._mochiad._containerLCName);
if (v2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var v7 = v11.getBytesTotal();
if (v7 > 0 || typeof v7 == 'undefined') {
chk.showing = true;
chk.started = getTimer();
} else {
if (v5 > chk.ad_timeout && v2 == 100) {
options.ad_failed();
v3 = true;
}
}
}
if (v5 > chk.ad_msec) {
v3 = true;
}
if (v4 > 0 && v8 >= v4 && v3) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
};
v1.showClickAwayAd = function (options) {
var v9 = {'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 = mochi.as2.MochiAd._parseOptions(options, v9);
var clip = options.clip;
var v8 = options.ad_timeout;
delete options.ad_timeout;
if (!mochi.as2.MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var v4 = mochi.as2.MochiAd._getRes(options);
var v10 = v4[0];
var v7 = v4[1];
mc._x = v10 * 0.5;
mc._y = v7 * 0.5;
var chk = mc.createEmptyMovieClip('_mochiad_wait', 3);
chk.ad_timeout = v8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
var v20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var v5 = this._parent._mochiad_ctr;
var v4 = getTimer() - this.started;
var v2 = false;
if (!chk.showing) {
var v3 = v5.getBytesTotal();
if (v3 > 0 || typeof v3 == 'undefined') {
v2 = true;
chk.showing = true;
chk.started = getTimer();
} else {
if (v4 > chk.ad_timeout) {
options.ad_failed();
v2 = true;
}
}
}
if (v2) {
delete this.onEnterFrame;
}
};
};
v1.showInterLevelAd = function (options) {
var v13 = {'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 = mochi.as2.MochiAd._parseOptions(options, v13);
var clip = options.clip;
var v10 = 11000;
var v12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!mochi.as2.MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var v5 = mochi.as2.MochiAd._getRes(options);
var v14 = v5[0];
var v11 = v5[1];
mc._x = v14 * 0.5;
mc._y = v11 * 0.5;
var chk = mc.createEmptyMovieClip('_mochiad_wait', 3);
chk.ad_msec = v10;
chk.ad_timeout = v12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var v2 = 100 * (1 - (getTimer() - this.fadeout_start) / this.fadeout_time);
if (v2 > 0) {
this._parent._alpha = v2;
} else {
var v3 = this._parent._parent;
mochi.as2.MochiAd.unload(v3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var v2 = this.mc._mochiad_wait;
v2.server_control = true;
v2.started = getTimer();
v2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
chk.onEnterFrame = function () {
var v5 = this._parent._mochiad_ctr;
var v4 = getTimer() - this.started;
var v2 = false;
if (!chk.showing) {
var v3 = v5.getBytesTotal();
if (v3 > 0 || typeof v3 == 'undefined') {
chk.showing = true;
chk.started = getTimer();
} else {
if (v4 > chk.ad_timeout) {
options.ad_failed();
v2 = true;
}
}
}
if (v4 > chk.ad_msec) {
v2 = true;
}
if (v2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
};
v1.showPreloaderAd = function (options) {
trace('[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0');
mochi.as2.MochiAd.showPreGameAd(options);
};
v1.showTimedAd = function (options) {
trace('[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0');
mochi.as2.MochiAd.showInterLevelAd(options);
};
v1._allowDomains = function (server) {
var v1 = ((server.split('/'))[2].split(':'))[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain('*');
System.security.allowDomain(v1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain('*');
System.security.allowInsecureDomain(v1);
}
}
return v1;
};
v1.load = function (options) {
var v13 = {'clip': _root, 'server': 'http://x.mochiads.com/srv/1/', 'method': 'load', 'depth': 10333, 'id': '_UNKNOWN_'};
options = mochi.as2.MochiAd._parseOptions(options, v13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = mochi.as2.MochiAd.getVersion();
var v7 = options.clip;
if (!mochi.as2.MochiAd._isNetworkAvailable()) {
return null;
}
if (v7._mochiad_loaded) {
return null;
}
var v12 = options.depth;
delete options.depth;
var v6 = v7.createEmptyMovieClip('_mochiad', v12);
var v11 = mochi.as2.MochiAd._getRes(options);
options.res = v11[0] + 'x' + v11[1];
options.server += options.id;
delete options.id;
v7._mochiad_loaded = true;
if (v7._url.indexOf('http') != 0) {
trace('[MochiAd] NOTE: Security Sandbox Violation errors below are normal');
}
var v4 = v6.createEmptyMovieClip('_mochiad_ctr', 1);
for (var v8 in options) {
v4[v8] = options[v8];
}
var v10 = v4.server;
delete v4.server;
var v14 = mochi.as2.MochiAd._allowDomains(v10);
v6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var v5 = new Object();
var v9 = ['', Math.floor((new Date()).getTime()), random(999999)].join('_');
v5.mc = v6;
v5.name = v9;
v5.hostname = v14;
v5.allowDomain = function (d) {
return true;
};
v5.allowInsecureDomain = v5.allowDomain;
v5.connect(v9);
v6.lc = v5;
v4.lc = v9;
v4.st = getTimer();
if (!options.skip) {
v4.loadMovie(v10 + '.swf', 'POST');
}
return v6;
};
v1.unload = function (clip) {
if (typeof clip == 'undefined') {
clip = _root;
}
if (clip.clip && clip.clip._mochiad) {
clip = clip.clip;
}
if (!clip._mochiad) {
return false;
}
mochi.as2.MochiAd.containerNotify(clip, {'id': 'unload'}, clip._mochiad._containerLCName);
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return true;
};
v1._isNetworkAvailable = function () {
if (System.security) {
var v1 = System.security;
if (v1.sandboxType == 'localWithFile') {
return false;
}
}
return true;
};
v1._getRes = function (options) {
var v3 = options.clip.getBounds();
var v2 = 0;
var v1 = 0;
if (typeof options.res != 'undefined') {
var v4 = options.res.split('x');
v2 = parseFloat(v4[0]);
v1 = parseFloat(v4[1]);
} else {
v2 = v3.xMax - v3.xMin;
v1 = v3.yMax - v3.yMin;
}
if (v2 == 0 || v1 == 0) {
v2 = Stage.width;
v1 = Stage.height;
}
return [v2, v1];
};
v1._parseOptions = function (options, defaults) {
var v4 = {};
for (var v8 in defaults) {
v4[v8] = defaults[v8];
}
if (options) {
for (v8 in options) {
v4[v8] = options[v8];
}
}
if (_root.mochiad_options) {
var v5 = _root.mochiad_options.split('&');
var v2 = 0;
while (v2 < v5.length) {
var v3 = v5[v2].split('=');
v4[unescape(v3[0])] = unescape(v3[1]);
++v2;
}
}
if (v4.id == 'test') {
trace('[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!');
}
return v4;
};
v1.rpc = function (clip, callbackID, arg) {
switch (arg.id) {
case 'setValue':
mochi.as2.MochiAd.setValue(clip, arg.objectName, arg.value);
break;
case 'getValue':
var v4 = mochi.as2.MochiAd.getValue(clip, arg.objectName);
mochi.as2.MochiAd.containerRpcResult(clip, callbackID, v4, clip._mochiad._containerLCName);
break;
case 'runMethod':
var v3 = mochi.as2.MochiAd.runMethod(clip, arg.method, arg.args);
mochi.as2.MochiAd.containerRpcResult(clip, callbackID, v3, clip._mochiad._containerLCName);
break;
default:
trace('[mochiads rpc] unknown rpc id: ' + arg.id);
}
};
v1.setValue = function (base, objectName, value) {
var v2 = objectName.split('.');
var v1;
v1 = 0;
while (v1 < v2.length - 1) {
if (base[v2[v1]] == undefined || base[v2[v1]] == null) {
return undefined;
}
base = base[v2[v1]];
++v1;
}
base[v2[v1]] = value;
};
v1.getValue = function (base, objectName) {
var v2 = objectName.split('.');
var v1;
v1 = 0;
while (v1 < v2.length - 1) {
if (base[v2[v1]] == undefined || base[v2[v1]] == null) {
return undefined;
}
base = base[v2[v1]];
++v1;
}
return base[v2[v1]];
};
v1.runMethod = function (base, methodName, argsArray) {
var v2 = methodName.split('.');
var v1;
v1 = 0;
while (v1 < v2.length - 1) {
if (base[v2[v1]] == undefined || base[v2[v1]] == null) {
return undefined;
}
base = base[v2[v1]];
++v1;
}
if (typeof base[v2[v1]] == 'function') {
return base[v2[v1]].apply(base, argsArray);
} else {
return undefined;
}
};
v1.containerNotify = function (clip, args, lcName) {
var v1 = clip._mochiad._mochiad_ctr.ad.app;
if (v1.notify) {
v1.notify(args);
} else {
(new LocalConnection()).send(lcName, 'notify', args);
}
};
v1.containerRpcResult = function (clip, callbackID, val, lcName) {
var v1 = clip._mochiad._mochiad_ctr.ad.app;
if (v1.rpcResult) {
v1.rpcResult(callbackID, val);
} else {
(new LocalConnection()).send(lcName, 'rpcResult', callbackID, val);
}
};
ASSetPropFlags(mochi.as2.MochiAd.prototype, null, 1);
}
#endinitclip
}
movieClip 4398 __Packages.mochi.as2.MochiSync {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiSync) {
var v1 = function () {
this._syncContainer = {};
};
mochi.as2.MochiSync = v1;
var v2 = v1.prototype;
v2.getProp = function (name) {
return this._syncContainer[name];
};
v2.setProp = function (name, value) {
if (this._syncContainer[name] == value) {
return undefined;
}
this._syncContainer[name] = value;
mochi.as2.MochiServices.send('sync_propUpdate', {'name': name, 'value': value});
};
v2.triggerEvent = function (eventType, args) {
switch (eventType) {
case mochi.as2.MochiSync.SYNC_REQUEST:
mochi.as2.MochiServices.send('sync_syncronize', this._syncContainer);
break;
case mochi.as2.MochiSync.SYNC_PROPERTY:
this._syncContainer[args.name] = args.value;
}
};
v1.SYNC_REQUEST = 'SyncRequest';
v1.SYNC_PROPERTY = 'UpdateProperty';
ASSetPropFlags(mochi.as2.MochiSync.prototype, null, 1);
}
#endinitclip
}
movieClip 4399 __Packages.mochi.as2.MochiServices {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiServices) {
var v1 = function () {};
mochi.as2.MochiServices = v1;
var v2 = v1.prototype;
v1.__get__id = function () {
return mochi.as2.MochiServices._id;
};
v1.__get__clip = function () {
return mochi.as2.MochiServices._container;
};
v1.__get__childClip = function () {
return mochi.as2.MochiServices._clip;
};
v1.getVersion = function () {
return '3.7 as2';
};
v1.allowDomains = function (server) {
var v1 = ((server.split('/'))[2].split(':'))[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain('*');
System.security.allowDomain(v1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain('*');
System.security.allowInsecureDomain(v1);
}
}
return v1;
};
v1.__get__isNetworkAvailable = function () {
if (System.security) {
var v1 = System.security;
if (v1.sandboxType == 'localWithFile') {
return false;
}
}
return true;
};
v1.__set__comChannelName = function (val) {
if (val != undefined) {
if (val.length > 3) {
mochi.as2.MochiServices._sendChannelName = val + '_fromgame';
mochi.as2.MochiServices.initComChannels();
}
}
return mochi.as2.MochiServices.__get__comChannelName();
};
v1.__get__connected = function () {
return mochi.as2.MochiServices._connected;
};
v1.connect = function (id, clip, onError) {
mochi.as2.MochiServices.warnID(id, false);
if (!mochi.as2.MochiServices._connected && mochi.as2.MochiServices._clip == undefined) {
trace('MochiServices Connecting...');
mochi.as2.MochiServices._connecting = true;
mochi.as2.MochiServices.init(id, clip);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else {
if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
};
v1.disconnect = function () {
if (mochi.as2.MochiServices._connected || mochi.as2.MochiServices._connecting) {
mochi.as2.MochiServices._connected = false;
mochi.as2.MochiServices._connecting = mochi.as2.MochiServices._connected;
mochi.as2.MochiServices.flush(true);
if (mochi.as2.MochiServices._clip != undefined) {
mochi.as2.MochiServices._clip.removeMovieClip();
delete mochi.as2.MochiServices._clip;
}
mochi.as2.MochiServices._listenChannel.close();
}
};
v1.init = function (id, clip) {
mochi.as2.MochiServices._id = id;
if (clip != undefined) {
mochi.as2.MochiServices._container = clip;
} else {
mochi.as2.MochiServices._container = _root;
}
mochi.as2.MochiServices.loadCommunicator(id, mochi.as2.MochiServices._container);
};
v1.loadCommunicator = function (id, clip) {
var v6 = '_mochiservices_com_' + id;
var v5 = new MovieClipLoader();
var v3 = {};
if (mochi.as2.MochiServices._clip != null) {
return mochi.as2.MochiServices._clip;
}
if (!mochi.as2.MochiServices.__get__isNetworkAvailable()) {
return null;
}
if ((mochi.as2.MochiServices.urlOptions()).servURL) {
mochi.as2.MochiServices._servURL = (mochi.as2.MochiServices.urlOptions()).servURL;
}
var v4 = mochi.as2.MochiServices._servURL + mochi.as2.MochiServices._services;
if ((mochi.as2.MochiServices.urlOptions()).servicesURL) {
v4 = (mochi.as2.MochiServices.urlOptions()).servicesURL;
}
mochi.as2.MochiServices.allowDomains(v4);
mochi.as2.MochiServices._clip = clip.createEmptyMovieClip(v6, 10336, false);
mochi.as2.MochiServices._listenChannelName += Math.floor((new Date()).getTime()) + '_' + Math.floor(Math.random() * 99999);
mochi.as2.MochiServices.listen();
if (v3.waitInterval != null) {
clearInterval(v3.waitInterval);
}
v3.onLoadError = mochi.as2.MochiServices.loadError;
v3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
v3.onLoadComplete = function (target_mc) {
target_mc.MochiServices = mochi.as2.MochiServices;
};
v3.startTime = getTimer();
v3.wait = function () {
if (getTimer() - this.startTime > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ['IOError']);
}
clearInterval(this.waitInterval);
}
};
v3.waitInterval = setInterval(v3, 'wait', 1000);
v5.addListener(v3);
v5.loadClip(v4 + '?listenLC=' + mochi.as2.MochiServices._listenChannelName + '&mochiad_options=' + escape(_root.mochiad_options) + '&api_version=' + mochi.as2.MochiServices.getVersion(), mochi.as2.MochiServices._clip);
mochi.as2.MochiServices._sendChannel = new LocalConnection();
mochi.as2.MochiServices._sendChannel._queue = [];
return mochi.as2.MochiServices._clip;
};
v1.loadError = function (target_mc, errorCode, httpStatus) {
trace('MochiServices could not load.');
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, [errorCode]);
};
v1.onStatus = function (infoObject) {
if (infoObject.level !== 'error') {
} else {
mochi.as2.MochiServices._connected = false;
mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName);
}
};
v1.listen = function () {
mochi.as2.MochiServices._listenChannel = new LocalConnection();
mochi.as2.MochiServices._listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
mochi.as2.MochiServices._listenChannel.allowDomain = function (d) {
return true;
};
mochi.as2.MochiServices._listenChannel.allowInsecureDomain = mochi.as2.MochiServices._listenChannel.allowDomain;
mochi.as2.MochiServices._listenChannel._nextcallbackID = 0;
mochi.as2.MochiServices._listenChannel._callbacks = {};
mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName);
trace('Waiting for MochiAds services to connect...');
};
v1.initComChannels = function () {
if (!mochi.as2.MochiServices._connected) {
mochi.as2.MochiServices._sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'handshakeDone'});
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'registerGame', 'id': mochi.as2.MochiServices._id, 'version': mochi.as2.MochiServices.getVersion()});
mochi.as2.MochiServices._listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
mochi.as2.MochiServices._listenChannel.onReceive = function (pkg) {
var v5 = pkg.callbackID;
var v4 = this._callbacks[v5];
if (!v4) {
return undefined;
}
var v2 = v4.callbackMethod;
var v3 = v4.callbackObject;
if (v3 && typeof v2 == 'string') {
v2 = v3[v2];
}
if (v2 != undefined) {
v2.apply(v3, pkg.args);
}
delete this._callbacks[v5];
};
mochi.as2.MochiServices._listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case 'events':
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case 'coins':
mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args);
break;
case 'sync':
mochi.as2.MochiServices.servicesSync.triggerEvent(pkg.event, pkg.args);
}
};
mochi.as2.MochiServices._listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ['IOError']);
};
trace('[SERVICES_API] connected!');
mochi.as2.MochiServices._connecting = false;
mochi.as2.MochiServices._connected = true;
while (mochi.as2.MochiServices._sendChannel._queue.length > 0) {
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', mochi.as2.MochiServices._sendChannel._queue.shift());
}
}
};
v1.flush = function (error) {
var v1;
var v2;
while (mochi.as2.MochiServices._sendChannel._queue.length > 0) {
v1 = mochi.as2.MochiServices._sendChannel._queue.shift();
false;
if (v1.callbackID != null) {
v2 = mochi.as2.MochiServices._listenChannel._callbacks[v1.callbackID];
}
delete mochi.as2.MochiServices._listenChannel._callbacks[v1.callbackID];
if (error) {
mochi.as2.MochiServices.handleError(v1.args, v2.callbackObject, v2.callbackMethod);
}
}
};
v1.handleError = function (args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ['NotConnected']);
}
if (args.options != null && args.options.onError != null) {
args.options.onError.apply(null, ['NotConnected']);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = 'NotConnected';
if (callbackObject != null && typeof callbackMethod == 'string') {
callbackObject[callbackMethod](args);
} else {
if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
};
v1.send = function (methodName, args, callbackObject, callbackMethod) {
if (mochi.as2.MochiServices._connected) {
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': methodName, 'args': args, 'callbackID': mochi.as2.MochiServices._listenChannel._nextcallbackID});
} else {
if (mochi.as2.MochiServices._clip == undefined || !mochi.as2.MochiServices._connecting) {
trace('Error: MochiServices not connected. Please call MochiServices.connect(). Function: ' + methodName);
mochi.as2.MochiServices.handleError(args, callbackObject, callbackMethod);
mochi.as2.MochiServices.flush(true);
return undefined;
} else {
mochi.as2.MochiServices._sendChannel._queue.push({'methodName': methodName, 'args': args, 'callbackID': mochi.as2.MochiServices._listenChannel._nextcallbackID});
}
}
mochi.as2.MochiServices._listenChannel._callbacks[mochi.as2.MochiServices._listenChannel._nextcallbackID] = {'callbackObject': callbackObject, 'callbackMethod': callbackMethod};
++mochi.as2.MochiServices._listenChannel._nextcallbackID;
};
v1.urlOptions = function () {
var v5 = {};
var v6;
if (_root._url.indexOf('mochiad_options') != -1) {
var v2 = _root._url.indexOf('mochiad_options') + 'mochiad_options'.length + 1;
v6 = _root._url.substr(v2, _root._url.length);
} else {
if (_root.mochiad_options) {
v6 = _root.mochiad_options;
}
}
if (v6) {
var v4 = _root.mochiad_options.split('&');
var v2 = 0;
while (v2 < v4.length) {
var v3 = v4[v2].split('=');
v5[unescape(v3[0])] = unescape(v3[1]);
++v2;
}
}
return v5;
};
v1.warnID = function (bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace('WARNING: ' + (leaderboard ? 'board' : 'game') + ' ID is not the appropriate length');
return undefined;
} else {
if (bid == '1e113c7239048b3f') {
if (leaderboard) {
trace('WARNING: Using testing board ID');
} else {
trace('WARNING: Using testing board ID as game ID');
}
return undefined;
} else {
if (bid == '84993a1de4031cd8') {
if (leaderboard) {
trace('WARNING: Using testing game ID as board ID');
} else {
trace('WARNING: Using testing game ID');
}
return undefined;
}
}
}
var v1 = 0;
while (v1 < bid.length) {
switch (bid.charAt(v1)) {
if (bid.charAt(v1) !== 'f') {
} else {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
break;
case '8':
case '9':
case 'a':
case 'b':
case 'c':
case 'd':
case 'e':
}
default:
trace('WARNING: Board ID contains illegal characters: ' + bid);
return undefined;
}
++v1;
}
};
v1.addLinkEvent = function (url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var v2 = new Object();
v2.mav = mochi.as2.MochiServices.getVersion();
v2.swfv = btn.getSWFVersion() || 6;
v2.swfurl = btn._url;
v2.fv = System.capabilities.version;
v2.os = System.capabilities.os;
v2.lang = System.capabilities.language;
v2.scres = System.capabilities.screenResolutionX + 'x' + System.capabilities.screenResolutionY;
var s = '?';
var v3 = 0;
for (var v6 in v2) {
if (v3 != 0) {
s += '&';
}
++v3;
s = s + v6 + '=' + escape(v2[v6]);
}
if (!(mochi.as2.MochiServices.netupAttempted || mochi.as2.MochiServices._connected)) {
var ping = btn.createEmptyMovieClip('ping', 777);
var v7 = btn.createEmptyMovieClip('nettest', 778);
mochi.as2.MochiServices.netupAttempted = true;
ping.loadMovie('http://x.mochiads.com/linkping.swf?t=' + getTimer());
v7.onEnterFrame = function () {
if (ping._totalframes > 0 && ping._totalframes == ping._framesloaded) {
delete this.onEnterFrame;
} else {
if (getTimer() - t0 > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
}
};
}
var v4 = btn.createEmptyMovieClip('clk', 1001);
v4._alpha = 0;
v4.beginFill(1044735);
v4.moveTo(0, 0);
v4.lineTo(0, btn._height);
v4.lineTo(btn._width, btn._height);
v4.lineTo(btn._width, 0);
v4.lineTo(0, 0);
v4.endFill();
v4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL(url + s, '_blank');
} else {
getURL(burl, '_blank');
}
if (onClick != undefined) {
onClick();
}
};
};
v1.setContainer = function (clip) {};
v1.stayOnTop = function (clip) {};
v1._servURL = 'http://www.mochiads.com/static/lib/services/';
v1._services = 'services.swf';
v1._mochiLC = 'MochiLC.swf';
v1._listenChannelName = '__ms_';
v1._connecting = false;
v1._connected = false;
v1.netup = true;
v1.netupAttempted = false;
v1.servicesSync = new mochi.as2.MochiSync();
v1.addProperty('childClip', v1.__get__childClip, function () {});
v1.addProperty('clip', v1.__get__clip, function () {});
v1.addProperty('comChannelName', function () {}, v1.__set__comChannelName);
v1.addProperty('connected', v1.__get__connected, function () {});
v1.addProperty('id', v1.__get__id, function () {});
v1.addProperty('isNetworkAvailable', v1.__get__isNetworkAvailable, function () {});
ASSetPropFlags(mochi.as2.MochiServices.prototype, null, 1);
}
#endinitclip
}
movieClip 4400 __Packages.mochi.as2.MochiEventDispatcher {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiEventDispatcher) {
var v1 = function () {
this.eventTable = {};
};
mochi.as2.MochiEventDispatcher = v1;
var v2 = v1.prototype;
v2.buildDelegate = function (thisObject, thatObject) {
var v2 = {'thisObject': thisObject, 'thatObject': thatObject};
if (thatObject != undefined) {
var funct = (typeof thatObject == 'string') ? thisObject[thatObject] : thatObject;
v2.delegate = function (args) {
funct.call(thisObject, args);
};
return v2;
}
v2.delegate = thisObject;
return v2;
};
v2.compareDelegate = function (d_A, d_B) {
if (d_A.thisObject != d_B.thisObject || d_A.thatObject != d_B.thatObject) {
return false;
}
return true;
};
v2.addEventListener = function (event, thisObject, thatObject) {
this.removeEventListener(event, thisObject, thatObject);
this.eventTable[event].push(this.buildDelegate(thisObject, thatObject));
};
v2.removeEventListener = function (event, thisObject, thatObject) {
var v3 = this.buildDelegate(thisObject, thatObject);
if (this.eventTable[event] == undefined) {
this.eventTable[event] = [];
return undefined;
}
for (var v4 in this.eventTable[event]) {
if (!this.compareDelegate(this.eventTable[event][v4], v3)) {
continue;
}
this.eventTable[event].splice(Number(v4), 1);
}
};
v2.triggerEvent = function (event, args) {
if (this.eventTable[event] == undefined) {
return undefined;
}
for (var v4 in this.eventTable[event]) {
this.eventTable[event][v4].delegate(args);
}
};
ASSetPropFlags(mochi.as2.MochiEventDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 4401 __Packages.mochi.as2.MochiEvents {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiEvents) {
var v1 = function () {};
mochi.as2.MochiEvents = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.startSession = function (achievementID) {
mochi.as2.MochiServices.send('events_beginSession', {'achievementID': achievementID}, null, null);
};
v1.trigger = function (kind, obj) {
if (obj == undefined) {
obj = {};
} else {
if (obj.kind != undefined) {
trace('WARNING: optional arguements package contains key \'id\', it will be overwritten');
obj.kind = kind;
}
}
mochi.as2.MochiServices.send('events_triggerEvent', {'eventObject': obj}, null, null);
};
v1.setNotifications = function (clip, style) {
var v2 = {};
for (var v3 in style) {
v2[v3] = style[v3];
}
v2.clip = clip;
mochi.as2.MochiServices.send('events_setNotifications', v2, null, null);
};
v1.addEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiEvents._dispatcher.addEventListener(eventType, thisObject, thatObject);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiEvents._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiEvents._dispatcher.removeEventListener(eventType, thisObject, thatObject);
};
v1.startGame = function () {
mochi.as2.MochiEvents.gameStart = (new Date()).getTime();
mochi.as2.MochiEvents.trigger('start_game');
};
v1.endGame = function () {
var v1 = (new Date()).getTime() - mochi.as2.MochiEvents.gameStart;
mochi.as2.MochiEvents.trigger('end_game', {'time': v1});
};
v1.startLevel = function () {
mochi.as2.MochiEvents.levelStart = (new Date()).getTime();
mochi.as2.MochiEvents.trigger('start_level');
};
v1.endLevel = function () {
var v1 = (new Date()).getTime() - mochi.as2.MochiEvents.levelStart;
mochi.as2.MochiEvents.trigger('end_level', {'time': v1});
};
v1.ACHIEVEMENT_RECEIVED = 'AchievementReceived';
v1.ALIGN_TOP_LEFT = 'ALIGN_TL';
v1.ALIGN_TOP = 'ALIGN_T';
v1.ALIGN_TOP_RIGHT = 'ALIGN_TR';
v1.ALIGN_LEFT = 'ALIGN_L';
v1.ALIGN_CENTER = 'ALIGN_C';
v1.ALIGN_RIGHT = 'ALIGN_R';
v1.ALIGN_BOTTOM_LEFT = 'ALIGN_BL';
v1.ALIGN_BOTTOM = 'ALIGN_B';
v1.ALIGN_BOTTOM_RIGHT = 'ALIGN_BR';
v1.FORMAT_SHORT = 'ShortForm';
v1.FORMAT_LONG = 'LongForm';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiEvents.prototype, null, 1);
}
#endinitclip
}
movieClip 4402 __Packages.mochi.as2.MochiSocial {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiSocial) {
var v1 = function () {};
mochi.as2.MochiSocial = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.showLoginWidget = function (options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send('coins_showLoginWidget', {'options': options});
};
v1.hideLoginWidget = function () {
mochi.as2.MochiServices.send('coins_hideLoginWidget');
};
v1.requestLogin = function () {
mochi.as2.MochiServices.send('coins_requestLogin');
};
v1.getUserInfo = function () {
mochi.as2.MochiServices.send('coins_getUserInfo');
};
v1.saveUserProperties = function (properties) {
mochi.as2.MochiServices.send('coins_saveUserProperties', properties);
};
v1.addEventListener = function (eventType, delegate) {
mochi.as2.MochiSocial._dispatcher.addEventListener(eventType, delegate);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiSocial._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, delegate) {
mochi.as2.MochiSocial._dispatcher.removeEventListener(eventType, delegate);
};
v1.LOGGED_IN = 'LoggedIn';
v1.LOGGED_OUT = 'LoggedOut';
v1.LOGIN_SHOW = 'LoginShow';
v1.LOGIN_HIDE = 'LoginHide';
v1.LOGIN_SHOWN = 'LoginShown';
v1.PROFILE_SHOW = 'ProfileShow';
v1.PROFILE_HIDE = 'ProfileHide';
v1.PROPERTIES_SAVED = 'PropertySaved';
v1.WIDGET_LOADED = 'WidgetLoaded';
v1.USER_INFO = 'UserInfo';
v1.ERROR = 'Error';
v1.IO_ERROR = 'IOError';
v1.NO_USER = 'NoUser';
v1.PROPERTIES_SIZE = 'PropertiesSize';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiSocial.prototype, null, 1);
}
#endinitclip
}
frame 2 {
this._lockroot = true;
var theme = new Sound();
theme.attachSound('theme');
var s_exp = new Sound();
s_exp.attachSound('s_exp');
var s_mis = new Sound();
s_mis.attachSound('s_mis');
var s_md1 = new Sound();
s_md1.attachSound('s_md1');
var s_md2 = new Sound();
s_md2.attachSound('s_md2');
var s_md3 = new Sound();
s_md3.attachSound('s_md3');
var s_bnd = new Sound();
s_bnd.attachSound('s_bnd');
var s_btd = new Sound();
s_btd.attachSound('s_btd');
var s_hd = new Sound();
s_hd.attachSound('s_hd');
var s_tnd = new Sound();
s_tnd.attachSound('s_tnd');
var s_vd = new Sound();
s_vd.attachSound('s_vd');
var s_tp = new Sound();
s_tp.attachSound('s_tp');
var s_wp = new Sound();
s_wp.attachSound('s_wp');
var s_b = new Sound();
s_b.attachSound('s_b');
var s_bc = new Sound();
s_bc.attachSound('s_bc');
var s_bh = new Sound();
s_bh.attachSound('s_bh');
var s_up = new Sound();
s_up.attachSound('s_up');
var s_ed = new Sound();
s_ed.attachSound('s_ed');
var s_lt = new Sound();
s_lt.attachSound('s_lt');
var s_1b = new Sound();
s_1b.attachSound('s_1b');
var s_l3 = new Sound();
s_l3.attachSound('s_l3');
u = _url;
domain = 0;
domains = ['http://starcraft2.pro', 'http://www.starcraft2.pro', 'http://sc2armory.com', 'http://www.sc2armory.com', 'AMT2', 'MEE', 'mee', 'ru'];
i = 0;
while (i < domains.length) {
ar = u.split(domains[i]);
if (ar.length == 2) {
++domain;
trace('>> ' + domains[i]);
}
++i;
}
if (domain == 0) {
this.attachMovie('mm', 'mm', 15001);
mm.play();
} else {
this.attachMovie('mm', 'mm', 15001);
mm.play();
}
stop();
}
frame 3 {
x0m = [-22, -5, 12, 29, 46, 63, 80, 96, 113, 130, 147, 164, 181, 198, 215, 232, 250, 268, 286, 304, 322, 340, 358, 376, 394, 412, 430, 448, 466, 484, 501, 520, 539, 559, 579, 599, 619, 639, 658, 677, 696, 713, 729, 742, 751, 757, 757, 750, 738, 723, 707, 691, 673, 655, 637, 619, 601, 583, 565, 547, 529, 511, 493, 475, 457, 439, 421, 403, 385, 367, 351, 339, 331, 330, 335, 347, 363, 381, 400, 420, 440, 460, 480, 500, 520, 540, 560, 580, 600, 619, 638, 656, 674, 692, 709, 726, 743, 760, 778, 797, 817, 837, 856, 874, 892, 909, 926, 943, 961, 979, 997, 1015, 1033];
y0m = [236, 247, 258, 269, 280, 291, 302, 313, 323, 333, 343, 353, 363, 373, 383, 393, 403, 413, 423, 433, 443, 453, 462, 472, 481, 491, 501, 511, 520, 529, 539, 546, 551, 554, 556, 555, 553, 549, 543, 537, 530, 519, 507, 492, 474, 455, 435, 416, 400, 387, 376, 365, 356, 347, 338, 329, 321, 312, 304, 295, 287, 279, 270, 262, 253, 245, 236, 228, 218, 209, 198, 182, 164, 144, 125, 109, 97, 88, 82, 78, 76, 73, 71, 71, 73, 76, 79, 82, 86, 92, 99, 108, 117, 126, 136, 146, 157, 167, 176, 181, 182, 180, 176, 168, 158, 148, 138, 128, 118, 108, 98, 88, 78];
xa0m = [-12, 6, 23, 40, 57, 74, 91, 108, 123, 140, 157, 174, 192, 208, 225, 242, 260, 278, 296, 314, 332, 349, 368, 385, 404, 422, 440, 457, 476, 493, 511, 527, 544, 563, 580, 599, 617, 635, 653, 671, 689, 703, 716, 727, 733, 738, 737, 731, 723, 709, 696, 679, 664, 646, 628, 611, 592, 575, 556, 539, 521, 502, 485, 466, 449, 430, 413, 394, 375, 358, 340, 324, 313, 310, 316, 330, 351, 373, 394, 416, 437, 458, 479, 500, 522, 543, 563, 583, 604, 625, 646, 665, 683, 701, 719, 736, 754, 770, 786, 803, 817, 835, 851, 866, 882, 899, 916, 933, 951, 969, 987, 1005, 1024];
ya0m = [219, 230, 241, 252, 263, 274, 286, 297, 306, 316, 326, 336, 346, 356, 366, 375, 385, 395, 405, 415, 425, 435, 444, 454, 463, 473, 483, 493, 503, 511, 522, 527, 532, 534, 536, 535, 533, 529, 524, 518, 511, 502, 492, 479, 465, 449, 436, 423, 413, 402, 392, 381, 374, 365, 356, 347, 339, 330, 322, 313, 305, 297, 288, 280, 271, 263, 254, 246, 236, 227, 214, 195, 173, 145, 120, 98, 81, 70, 63, 58, 56, 53, 51, 51, 53, 56, 59, 62, 66, 73, 80, 90, 99, 108, 118, 129, 140, 150, 158, 162, 162, 160, 157, 150, 140, 131, 121, 110, 100, 90, 80, 70, 60];
xb0m = [-16, -16, 1, 18, 35, 52, 69, 84, 103, 120, 137, 154, 170, 188, 205, 222, 240, 258, 276, 294, 312, 331, 348, 367, 384, 402, 420, 439, 456, 475, 491, 513, 534, 555, 578, 599, 621, 643, 663, 683, 703, 723, 742, 757, 769, 776, 777, 769, 753, 737, 718, 703, 682, 664, 646, 627, 610, 591, 574, 555, 537, 520, 501, 484, 465, 448, 429, 412, 395, 376, 362, 354, 349, 350, 354, 364, 375, 389, 406, 424, 443, 462, 481, 500, 518, 537, 557, 577, 596, 613, 630, 647, 665, 683, 699, 716, 732, 750, 770, 791, 817, 839, 861, 882, 902, 919, 936, 953, 971, 989, 1007, 1025, 1042];
yb0m = [253, 253, 264, 275, 286, 297, 308, 318, 329, 340, 350, 360, 370, 380, 390, 400, 411, 421, 431, 441, 451, 461, 471, 480, 490, 499, 509, 519, 529, 537, 547, 556, 565, 570, 574, 576, 575, 573, 569, 562, 556, 549, 536, 522, 505, 483, 461, 434, 409, 387, 372, 360, 349, 338, 329, 320, 311, 303, 294, 286, 277, 269, 261, 252, 244, 235, 227, 218, 210, 200, 191, 182, 169, 155, 143, 130, 120, 113, 106, 101, 98, 96, 93, 91, 91, 93, 96, 99, 102, 106, 111, 118, 126, 135, 144, 154, 163, 174, 184, 194, 200, 202, 200, 195, 186, 176, 165, 155, 146, 136, 126, 116, 106, 96];
xbtc = [-91, -73, -55, -37, -19, 0, 19, 38, 56, 74, 92, 110, 128, 146, 164, 182, 200, 219, 238, 257, 276, 295, 315, 335, 355, 375, 395, 415, 435, 455, 475, 495, 515, 535, 555, 575, 595, 615, 635, 655, 675, 695, 714, 733, 752, 770, 788, 806, 824, 841, 858, 875, 892, 909, 926, 943, 960, 977, 994, 1011, 1028, 1044, 1062, 1080, 1098, 1116];
ybtc = [446, 438, 430, 422, 414, 406, 399, 392, 384, 375, 367, 359, 350, 342, 333, 325, 316, 309, 302, 295, 289, 284, 281, 279, 278, 277, 276, 275, 274, 274, 273, 273, 272, 272, 271, 271, 270, 270, 268, 265, 262, 258, 253, 246, 239, 231, 223, 214, 204, 194, 184, 174, 163, 152, 141, 130, 119, 108, 97, 86, 75, 64, 53, 42, 31, 20];
x0 = [-56, -38, -20, -1, 18, 37, 56, 76, 96, 116, 136, 156, 176, 196, 215, 234, 253, 270, 287, 304, 322, 340, 358, 376, 394, 412, 430, 448, 466, 484, 501, 520, 539, 559, 579, 599, 619, 639, 658, 677, 696, 713, 729, 742, 751, 757, 757, 750, 738, 723, 707, 691, 673, 655, 637, 619, 601, 583, 565, 547, 529, 511, 493, 475, 457, 439, 421, 403, 385, 367, 351, 339, 331, 330, 335, 347, 363, 381, 400, 420, 440, 460, 480, 500, 520, 540, 560, 580, 600, 619, 638, 656, 674, 692, 709, 726, 743, 760, 778, 797, 817, 837, 856, 874, 892, 909, 926, 943, 961, 979, 997, 1015, 1033];
y0 = [430, 421, 412, 407, 401, 396, 391, 387, 384, 382, 381, 381, 382, 386, 392, 397, 404, 414, 424, 433, 443, 453, 462, 472, 481, 491, 501, 511, 520, 529, 539, 546, 551, 554, 556, 555, 553, 549, 543, 537, 530, 519, 507, 492, 474, 455, 435, 416, 400, 387, 376, 365, 356, 347, 338, 329, 321, 312, 304, 295, 287, 279, 270, 262, 253, 245, 236, 228, 218, 209, 198, 182, 164, 144, 125, 109, 97, 88, 82, 78, 76, 73, 71, 71, 73, 76, 79, 82, 86, 92, 99, 108, 117, 126, 136, 146, 157, 167, 176, 181, 182, 180, 176, 168, 158, 148, 138, 128, 118, 108, 98, 88, 78];
xa0 = [-47, -47, -28, -6, 12, 31, 51, 72, 93, 114, 135, 156, 177, 200, 220, 240, 260, 280, 297, 314, 332, 349, 368, 385, 404, 422, 440, 457, 476, 493, 511, 527, 544, 563, 580, 599, 617, 635, 653, 671, 689, 703, 716, 727, 733, 738, 737, 731, 723, 709, 696, 679, 664, 646, 628, 611, 592, 575, 556, 539, 521, 502, 485, 466, 449, 430, 413, 394, 375, 358, 340, 324, 313, 310, 316, 330, 351, 373, 394, 416, 437, 458, 479, 500, 522, 543, 563, 583, 604, 625, 646, 665, 683, 701, 719, 736, 754, 770, 786, 803, 817, 835, 851, 866, 882, 899, 916, 933, 951, 969, 987, 1005, 1024];
ya0 = [403, 403, 394, 388, 382, 377, 372, 367, 364, 362, 361, 361, 362, 366, 373, 378, 385, 397, 406, 415, 425, 435, 444, 454, 463, 473, 483, 493, 503, 511, 522, 527, 532, 534, 536, 535, 533, 529, 524, 518, 511, 502, 492, 479, 465, 449, 436, 423, 413, 402, 392, 381, 374, 365, 356, 347, 339, 330, 322, 313, 305, 297, 288, 280, 271, 263, 254, 246, 236, 227, 214, 195, 173, 145, 120, 98, 81, 70, 63, 58, 56, 53, 51, 51, 53, 56, 59, 62, 66, 73, 80, 90, 99, 108, 118, 129, 140, 150, 158, 162, 162, 160, 157, 150, 140, 131, 121, 110, 100, 90, 80, 70, 60];
xb0 = [-29, -29, -12, 4, 24, 43, 61, 80, 99, 118, 137, 156, 175, 192, 210, 228, 246, 260, 277, 294, 312, 331, 348, 367, 384, 402, 420, 439, 456, 475, 491, 513, 534, 555, 578, 599, 621, 643, 663, 683, 703, 723, 742, 757, 769, 776, 777, 769, 753, 737, 718, 703, 682, 664, 646, 627, 610, 591, 574, 555, 537, 520, 501, 484, 465, 448, 429, 412, 395, 376, 362, 354, 349, 350, 354, 364, 375, 389, 406, 424, 443, 462, 481, 500, 518, 537, 557, 577, 596, 613, 630, 647, 665, 683, 699, 716, 732, 750, 770, 791, 817, 839, 861, 882, 902, 919, 936, 953, 971, 989, 1007, 1025, 1042];
yb0 = [439, 439, 430, 426, 420, 415, 410, 407, 404, 402, 401, 401, 402, 406, 411, 416, 423, 431, 442, 451, 461, 471, 480, 490, 499, 509, 519, 529, 537, 547, 556, 565, 570, 574, 576, 575, 573, 569, 562, 556, 549, 536, 522, 505, 483, 461, 434, 409, 387, 372, 360, 349, 338, 329, 320, 311, 303, 294, 286, 277, 269, 261, 252, 244, 235, 227, 218, 210, 200, 191, 182, 169, 155, 143, 130, 120, 113, 106, 101, 98, 96, 93, 91, 91, 93, 96, 99, 102, 106, 111, 118, 126, 135, 144, 154, 163, 174, 184, 194, 200, 202, 200, 195, 186, 176, 165, 155, 146, 136, 126, 116, 106, 96];
r24 = [7, 23, 23, 24, 24, 24, 24, 24, 24, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 24, 24, 24, 24, 23, 23, 22, 21, 20, 19, 18, 17, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 17, 18, 19, 20, 21, 22, 23, 24, 24, 24, 24, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 1, 24, 24, 23, 23, 23, 23, 23, 23, 23, 23, 23];
r48 = [14, 45, 45, 46, 47, 47, 47, 47, 48, 48, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 4, 3, 2, 1, 1, 48, 47, 46, 45, 44, 43, 42, 41, 39, 37, 35, 33, 31, 30, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 30, 31, 33, 35, 37, 39, 41, 43, 45, 47, 47, 48, 48, 48, 1, 1, 2, 2, 2, 3, 3, 4, 4, 5, 5, 5, 5, 5, 4, 3, 2, 1, 48, 47, 46, 45, 45, 45, 45, 45, 45, 45, 45, 45];
r24m = [3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 2, 1, 1, 1, 24, 24, 24, 24, 23, 23, 22, 21, 20, 19, 18, 17, 16, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 24, 24, 24, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 2, 2, 1, 1, 24, 24, 23, 23, 23, 23, 23, 23, 23, 23, 23];
rbtc = [45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 46, 46, 47, 47, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 47, 47, 47, 46, 46, 46, 45, 45, 45, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44];
x0mm = x0m;
y0mm = y0m;
x0amm = x0am;
y0amm = y0am;
x0bmm = x0bm;
y0bmm = y0bm;
stop();
towers = ['0', 'SNIPER TOWER', 'LASER TURRET', 'MISSILE TURRET', 'FREEZE TURRET', 'GATLING TURRET'];
switch (diff) {
case 0:
_root.level = 0;
_root.money = 350;
killmoney = [4, 12, 120, 45, 30, 8, 150, 0, 10, 35, 160, 110, 90, 25, 200, 0, 24, 60, 240, 180, 120, 42, 240];
speed = [10, 12, 9, 11, 18, 25, 9, 0, 10, 12, 9, 11, 21, 32, 9, 0, 12, 16, 13, 15, 22, 36, 11];
nrg = [200, 1000, 15000, 4000, 2500, 600, 15000, 0, 1800, 3500, 50000, 13000, 9000, 3000, 60000, 0, 20000, 25000, 240000, 95000, 42000, 10500, 275000];
cost = [0, 200, 300, 250, 150, 90];
damage = [[], [800, 1500, 2800, 6500, 12000], [3.3, 6.6, 13.3, 29.1, 62.5], [230, 350, 675, 1250, 2000], [0.8, 0.72, 0.65, 0.59, 0.55], [65, 150, 300, 600, 1200]];
damageP = [[], [150, 350, 850, 1500], [200, 350, 800, 1350], [200, 450, 900, 2000], [100, 260, 650, 1150], [80, 220, 430, 1000]];
rate = [[], [240, 160, 120, 96, 80], [1, 2, 3, 4, 5], [45, 36, 30, 25, 18], [1, 2, 3, 4, 5], [20, 17.5, 15, 12.5, 10]];
rateP = [[], [60, 120, 250, 500], [160, 300, 650, 1300], [80, 170, 350, 600], [200, 475, 950, 1675], [30, 45, 120, 250]];
radius = [[], [600, 700, 900, 1300, 2000], [200, 250, 300, 450, 550], [200, 250, 325, 450, 600], [200, 250, 300, 375, 475], [200, 225, 250, 275, 325]];
radiusP = [[], [25, 80, 175, 400], [80, 170, 440, 550], [35, 130, 320, 800], [55, 220, 420, 820], [20, 45, 120, 250]];
armor = [[], [0.3, 0.8, 1.4, 1.6, 1.1, 0.8, 2], [1, 1.8, 0.6, 0.6, 1, 1.2, 1.7], [2, 1, 1, 0.8, 1.5, 1.2, 3.2], [0.3, 0.8, 1.4, 1.6, 1.1, 0.8, 2]];
break;
case 1:
_root.level = 0;
_root.money = 250;
killmoney = [3, 12, 120, 45, 30, 8, 150, 0, 10, 35, 160, 110, 90, 25, 200, 0, 20, 50, 200, 150, 100, 35, 200];
speed = [10, 12, 9, 11, 18, 25, 9, 0, 10, 12, 9, 11, 21, 32, 9, 0, 12, 16, 13, 15, 22, 36, 11];
nrg = [200, 1000, 15000, 4000, 2500, 600, 15000, 0, 1800, 3500, 50000, 13000, 9000, 3000, 60000, 0, 20000, 25000, 240000, 95000, 42000, 10500, 275000];
cost = [0, 200, 300, 250, 150, 90];
damage = [[], [800, 1500, 2800, 6500, 12000], [3.3, 6.6, 13.3, 29.1, 62.5], [230, 350, 675, 1250, 2000], [0.8, 0.72, 0.65, 0.59, 0.55], [65, 150, 300, 600, 1200]];
damageP = [[], [150, 350, 850, 1500], [200, 350, 800, 1350], [200, 450, 900, 2000], [100, 260, 650, 1150], [80, 220, 430, 1000]];
rate = [[], [240, 160, 120, 96, 80], [1, 2, 3, 4, 5], [45, 36, 30, 25, 18], [1, 2, 3, 4, 5], [20, 17.5, 15, 12.5, 10]];
rateP = [[], [60, 120, 250, 500], [160, 300, 650, 1300], [80, 170, 350, 600], [200, 475, 950, 1675], [30, 45, 120, 250]];
radius = [[], [600, 700, 900, 1300, 2000], [200, 250, 300, 450, 550], [200, 250, 325, 450, 600], [200, 250, 300, 375, 475], [200, 225, 250, 275, 325]];
radiusP = [[], [25, 80, 175, 400], [80, 170, 440, 550], [35, 130, 320, 800], [55, 220, 420, 820], [20, 45, 120, 250]];
armor = [[], [0.3, 0.8, 1.4, 1.6, 1.1, 0.8, 2], [1, 1.8, 0.6, 0.6, 1, 1.2, 1.7], [2, 1, 1, 0.8, 1.5, 1.2, 3.2], [0.3, 0.8, 1.4, 1.6, 1.1, 0.8, 2]];
break;
case 2:
_root.level = 0;
_root.money = 250;
killmoney = [3, 12, 120, 45, 30, 8, 150, 0, 10, 35, 160, 110, 90, 25, 200, 0, 20, 50, 200, 150, 100, 35, 200];
speed = [10, 12, 9, 11, 18, 25, 9, 0, 10, 12, 9, 11, 21, 32, 9, 0, 12, 16, 13, 15, 22, 36, 11];
nrg = [220, 1100, 16500, 4400, 2750, 660, 16500, 0, 2000, 3850, 55000, 14500, 10000, 3300, 65000, 0, 23000, 27500, 260000, 110000, 46000, 11500, 300000];
cost = [0, 200, 300, 250, 150, 90];
damage = [[], [800, 1500, 2800, 6500, 12000], [3.3, 6.6, 13.3, 29.1, 62.5], [230, 350, 675, 1250, 2000], [0.8, 0.72, 0.65, 0.59, 0.55], [65, 150, 300, 600, 1200]];
damageP = [[], [150, 350, 850, 1500], [200, 350, 800, 1350], [200, 450, 900, 2000], [100, 260, 650, 1150], [80, 220, 430, 1000]];
rate = [[], [240, 160, 120, 96, 80], [1, 2, 3, 4, 5], [45, 36, 30, 25, 18], [1, 2, 3, 4, 5], [20, 17.5, 15, 12.5, 10]];
rateP = [[], [60, 120, 250, 500], [160, 300, 650, 1300], [80, 170, 350, 600], [200, 475, 950, 1675], [30, 45, 120, 250]];
radius = [[], [600, 700, 900, 1300, 2000], [200, 250, 300, 450, 550], [200, 250, 325, 450, 600], [200, 250, 300, 375, 475], [200, 225, 250, 275, 325]];
radiusP = [[], [25, 80, 175, 400], [80, 170, 440, 550], [35, 130, 320, 800], [55, 220, 420, 820], [20, 45, 120, 250]];
armor = [[], [0.3, 0.8, 1.4, 1.6, 1.1, 0.8, 2], [1, 1.8, 0.6, 0.6, 1, 1.2, 1.7], [2, 1, 1, 0.8, 1.5, 1.2, 3.2], [0.3, 0.8, 1.4, 1.6, 1.1, 0.8, 2]];
}
_root.spd = speed;
_root.killmoney = killmoney;
_root.nrg = nrg;
_root.cost = cost;
_root.towers = towers;
_root.damage = damage;
_root.damageP = damageP;
_root.rate = rate;
_root.rateP = rateP;
_root.radius = radius;
_root.radiusP = radiusP;
_root.armor = armor;
play();
}
frame 4 {
function bot_add(t, pos, way, sp, nrg) {
this.cl = 0;
if (t > 10) {
t -= 10;
cl = 1;
}
if (t > 10) {
t -= 10;
++cl;
}
if (!nrg) {
nrg = _root.nrg[t - 2 + cl * 8];
}
if (!sp) {
sp = _root.spd[t - 2 + cl * 8];
}
ms = sp;
this.km = _root.killmoney[t - 2 + cl * 8];
pos = -pos;
switch (way) {
case 0:
w = '0';
break;
case 1:
w = 'a0';
break;
case 2:
w = 'b0';
}
if (t == 2) {
w += 'm';
}
if (t == 8) {
w = 'btc';
ee.attachMovie('bot' + cl, 'bot' + n, n + 2000, {'t': t, 'ms': ms, 'sp': sp, 'nrg': nrg, 'nrg0': nrg, 'n': n, 'killmoney': km, 'cl': cl, '_x': -500, '_y': -500});
} else {
ee.attachMovie('bot' + cl, 'bot' + n, n, {'t': t, 'ms': ms, 'sp': sp, 'nrg': nrg, 'nrg0': nrg, 'n': n, 'killmoney': km, 'cl': cl, '_x': -500, '_y': -500});
}
ee['bot' + n].gotoAndStop(2);
_root.pos[_root.n] = pos;
_root.tr[_root.n++] = w;
}
_root.stopAllSounds();
_root.theme.start();
_root.theme.onSoundComplete = function () {
_root.theme.start();
};
_root.theme.setVolume(80);
loss = 0;
score = 0;
killed = 0;
built = 0;
nl = 0;
tt = [];
gameOff = true;
startbuttunpressed = false;
this.attachMovie('mmenu', 'menu', 14999, {'_x': 0, '_y': 800});
this.createEmptyMovieClip('ee', 4996);
this.createEmptyMovieClip('rdss', 4997);
ee.attachMovie('msk', 'msk', 8999);
msk._visible = false;
attachMovie('drag', 'drag', 4999, {'_x': -100, '_y': -100, '_alpha': 50});
mask.n = 1;
time = getTimer();
timerx = 0;
timer = 0;
setInterval(function () {
++timerx;
timer += getTimer() - time - 300;
timert = Math.round(timer / timerx) + '%';
time = getTimer();
}, 300);
}
movieClip 4395 {
frame 1 {
n = 1;
}
}
frame 6 {
LASTLEVEL = 45;
++level;
if (level > LASTLEVEL) {
this.attachMovie('end', 'mm', 15002);
}
msk._visible = true;
lastlevel = 10;
pos = [];
tr = [];
p = [];
n = 1;
switch (level) {
case 0:
bot_add(2, 0, 0, 10);
bot_add(2, 2, 1, 10);
bot_add(2, 2, 2, 10);
bot_add(12, 4, 0, 10);
bot_add(12, 6, 1, 10);
bot_add(12, 6, 2, 10);
bot_add(22, 8, 0, 10);
bot_add(22, 10, 1, 10);
bot_add(22, 10, 2, 10);
bot_add(3, 12, 1, 10);
bot_add(3, 14, 2, 10);
bot_add(13, 16, 1, 10);
bot_add(13, 18, 2, 10);
bot_add(23, 20, 1, 10);
bot_add(23, 22, 2, 10);
bot_add(7, 26, 0, 10);
bot_add(17, 30, 0, 10);
bot_add(27, 34, 0, 10);
bot_add(5, 40, 0, 10);
bot_add(15, 46, 0, 10);
bot_add(25, 52, 0, 10);
bot_add(4, 56, 0, 10);
bot_add(14, 60, 0, 10);
bot_add(24, 64, 0, 10);
bot_add(6, 100, 0, 15);
bot_add(16, 106, 0, 15);
bot_add(26, 112, 0, 15);
break;
case 1:
bot_add(2, 0, 1);
bot_add(2, 0, 2);
bot_add(2, 2, 0);
bot_add(2, 4, 1);
bot_add(2, 4, 2);
next_unit = [2, 0, 0, 0];
kolvo_unit = [8, 0, 0, 0];
break;
case 2:
bot_add(2, 0, 1);
bot_add(2, 0, 2);
bot_add(2, 2, 0);
bot_add(2, 4, 1);
bot_add(2, 4, 2);
bot_add(2, 6, 0);
bot_add(2, 8, 1);
bot_add(2, 8, 2);
next_unit = [2, 0, 0, 0];
kolvo_unit = [14, 0, 0, 0];
break;
case 3:
bot_add(2, 0, 1);
bot_add(2, 0, 2);
bot_add(2, 2, 0);
bot_add(2, 4, 1);
bot_add(2, 4, 2);
bot_add(2, 6, 0);
bot_add(2, 8, 1);
bot_add(2, 8, 2);
bot_add(2, 10, 0);
bot_add(2, 12, 1);
bot_add(2, 12, 2);
bot_add(2, 14, 0);
bot_add(2, 16, 1);
bot_add(2, 16, 2);
next_unit = [2, 0, 0, 0];
kolvo_unit = [24, 0, 0, 0];
break;
case 4:
bot_add(2, -2, 0);
bot_add(2, 0, 1);
bot_add(2, 0, 2);
bot_add(2, 2, 0);
bot_add(2, 4, 1);
bot_add(2, 4, 2);
bot_add(2, 6, 0);
bot_add(2, 8, 1);
bot_add(2, 8, 2);
bot_add(2, 10, 0);
bot_add(2, 12, 1);
bot_add(2, 12, 2);
bot_add(2, 14, 0);
bot_add(2, 16, 1);
bot_add(2, 16, 2);
bot_add(2, 18, 0);
bot_add(2, 20, 1);
bot_add(2, 20, 2);
bot_add(2, 22, 0);
bot_add(2, 24, 1);
bot_add(2, 24, 2);
bot_add(2, 26, 0);
bot_add(2, 28, 1);
bot_add(2, 28, 2);
next_unit = [3, 2, 0, 0];
kolvo_unit = [6, 10, 0, 0];
break;
case 5:
bot_add(3, 0, 0);
bot_add(3, 3, 1);
bot_add(3, 3, 2);
bot_add(3, 6, 0);
bot_add(3, 9, 1);
bot_add(3, 9, 2);
bot_add(2, 8, 1);
bot_add(2, 8, 2);
bot_add(2, 10, 0);
bot_add(2, 12, 1);
bot_add(2, 12, 2);
bot_add(2, 14, 1);
bot_add(2, 14, 2);
bot_add(2, 16, 0);
bot_add(2, 18, 1);
bot_add(2, 18, 2);
next_unit = [7, 3, 0, 0];
kolvo_unit = [6, 6, 0, 0];
break;
case 6:
bot_add(7, 0, 1);
bot_add(7, 4, 2);
bot_add(7, 8, 1);
bot_add(7, 12, 2);
bot_add(7, 16, 1);
bot_add(7, 20, 2);
bot_add(3, 20, 1);
bot_add(3, 22, 2);
bot_add(3, 24, 1);
bot_add(3, 26, 2);
bot_add(3, 28, 1);
bot_add(3, 30, 2);
next_unit = [3, 2, 0, 0];
kolvo_unit = [8, 61, 0, 0];
break;
case 7:
bot_add(3, 0, 1);
bot_add(3, 2, 2);
bot_add(3, 4, 1);
bot_add(3, 6, 2);
bot_add(3, 8, 1);
bot_add(3, 10, 2);
bot_add(3, 12, 1);
bot_add(3, 14, 2);
bot_add(2, 12, 0);
i = 0;
while (i < 40) {
bot_add(2, 14 + i * 2, 0);
bot_add(2, 16 + i * 2, 1);
bot_add(2, 16 + i * 2, 2);
i += 2;
}
next_unit = [7, 0, 0, 0];
kolvo_unit = [16, 0, 0, 0];
break;
case 8:
i = 0;
while (i < 8) {
bot_add(7, i * 8, 1);
bot_add(7, i * 8 + 4, 2);
++i;
}
next_unit = [3, 2, 0, 0];
kolvo_unit = [14, 40, 0, 0];
break;
case 9:
bot_add(3, 0, 1);
bot_add(3, 2, 2);
bot_add(3, 4, 1);
bot_add(3, 6, 2);
bot_add(3, 8, 1);
bot_add(3, 10, 2);
bot_add(3, 12, 1);
bot_add(3, 14, 2);
bot_add(3, 16, 1);
bot_add(3, 18, 2);
bot_add(3, 20, 1);
bot_add(3, 22, 2);
bot_add(3, 24, 1);
bot_add(3, 26, 2);
bot_add(2, 26, 0);
i = 0;
while (i < 26) {
bot_add(2, 28 + i * 2, 0);
bot_add(2, 30 + i * 2, 1);
bot_add(2, 30 + i * 2, 2);
i += 2;
}
next_unit = [3, 0, 0, 0];
kolvo_unit = [22, 0, 0, 0];
break;
case 10:
i = 0;
while (i < 22) {
bot_add(3, i * 2, 1);
bot_add(3, i * 2 + 2, 2);
i += 2;
}
next_unit = [7, 5, 0, 0];
kolvo_unit = [2, 6, 0, 0];
break;
case 11:
bot_add(7, 0, 0);
bot_add(7, 6, 0);
bot_add(5, 8, 0);
bot_add(5, 14, 0);
bot_add(5, 20, 0);
bot_add(5, 26, 0);
bot_add(5, 32, 0);
bot_add(5, 38, 0);
next_unit = [6, 0, 0, 0];
kolvo_unit = [8, 0, 0, 0];
break;
case 12:
i = 0;
while (i < 8) {
bot_add(6, i * 6, 0);
++i;
}
next_unit = [6, 3, 0, 0];
kolvo_unit = [3, 20, 0, 0];
break;
case 13:
bot_add(6, 0, 0);
bot_add(6, 6, 0);
bot_add(6, 12, 0);
i = 0;
while (i < 20) {
bot_add(3, 10 + i * 2, 1);
bot_add(3, i * 2 + 12, 2);
i += 2;
}
next_unit = [5, 0, 0, 0];
kolvo_unit = [9, 0, 0, 0];
break;
case 14:
i = 0;
while (i < 9) {
bot_add(5, i * 6, 0);
++i;
}
next_unit = [8, 0, 0, 0];
kolvo_unit = [3, 0, 0, 0];
break;
case 15:
bot_add(8, 0, 0);
bot_add(8, 12, 0);
bot_add(8, 24, 0);
next_unit = [4, 0, 0, 0];
kolvo_unit = [4, 0, 0, 0];
break;
case 16:
bot_add(4, 0, 0);
bot_add(4, 6, 0);
bot_add(4, 12, 0);
bot_add(4, 18, 0);
next_unit = [12, 0, 0, 0];
kolvo_unit = [36, 0, 0, 0];
break;
case 17:
i = 0;
while (i < 24) {
bot_add(12, 2 + i * 2, 0);
bot_add(12, 4 + i * 2, 1);
bot_add(12, 4 + i * 2, 2);
i += 2;
}
next_unit = [13, 5, 0, 0];
kolvo_unit = [8, 9, 0, 0];
break;
case 18:
i = 0;
while (i < 4) {
bot_add(13, i * 4, 1);
bot_add(13, i * 4 + 2, 2);
++i;
}
i = 0;
while (i < 9) {
bot_add(5, 17 + i * 6, 0);
++i;
}
next_unit = [13, 0, 0, 0];
kolvo_unit = [21, 0, 0, 0];
break;
case 19:
bot_add(13, 0, 0);
i = 0;
while (i < 5) {
bot_add(13, i * 12 + 3, 1);
bot_add(13, i * 12 + 6, 0);
bot_add(13, i * 12 + 9, 2);
bot_add(13, i * 12 + 12, 0);
++i;
}
next_unit = [17, 0, 0, 0];
kolvo_unit = [13, 0, 0, 0];
break;
case 20:
bot_add(17, 0, 1);
i = 0;
while (i < 6) {
bot_add(17, i * 8 + 4, 2);
bot_add(17, i * 8 + 8, 1);
++i;
}
next_unit = [15, 12, 0, 0];
kolvo_unit = [8, 30, 0, 0];
break;
case 21:
i = 0;
while (i < 8) {
bot_add(15, i * 6, 0);
++i;
}
i = 0;
while (i < 20) {
bot_add(12, 42 + i * 2, 0);
bot_add(12, 44 + i * 2, 1);
bot_add(12, 44 + i * 2, 2);
i += 2;
}
next_unit = [16, 0, 0, 0];
kolvo_unit = [11, 0, 0, 0];
break;
case 22:
i = 0;
while (i < 11) {
bot_add(16, i * 6, 0);
++i;
}
next_unit = [13, 15, 0, 0];
kolvo_unit = [30, 9, 0, 0];
break;
case 23:
i = 0;
while (i < 15) {
bot_add(13, i * 4, 1);
bot_add(13, i * 4 + 2, 2);
++i;
}
i = 0;
while (i < 9) {
bot_add(15, 60 + i * 6, 0);
++i;
}
next_unit = [17, 16, 0, 0];
kolvo_unit = [12, 10, 0, 0];
break;
case 24:
i = 0;
while (i < 6) {
bot_add(17, i * 8, 2);
bot_add(17, i * 8 + 4, 1);
++i;
}
i = 0;
while (i < 10) {
bot_add(16, i * 6, 0);
++i;
}
next_unit = [13, 12, 16, 0];
kolvo_unit = [10, 28, 13, 0];
break;
case 25:
i = 0;
while (i < 5) {
bot_add(13, i * 4, 1);
bot_add(13, i * 4 + 2, 2);
++i;
}
bot_add(12, 6 + i * 4, 0);
i = 0;
while (i < 9) {
bot_add(12, 18 + i * 4, 0);
bot_add(12, 20 + i * 4, 1);
bot_add(12, 20 + i * 4, 2);
++i;
}
i = 0;
while (i < 13) {
bot_add(16, 15 + i * 6, 0);
++i;
}
next_unit = [12, 17, 16, 0];
kolvo_unit = [30, 12, 10, 0];
break;
case 26:
i = 0;
while (i < 10) {
bot_add(12, 12 + i * 4, 0);
bot_add(12, 14 + i * 4, 1);
bot_add(12, 14 + i * 4, 2);
++i;
}
i = 0;
while (i < 6) {
bot_add(17, i * 8, 2);
bot_add(17, i * 8 + 4, 1);
++i;
}
i = 0;
while (i < 10) {
bot_add(16, i * 6, 0);
++i;
}
next_unit = [13, 16, 0, 0];
kolvo_unit = [24, 15, 0, 0];
break;
case 27:
i = 0;
while (i < 12) {
bot_add(13, i * 4, 1);
bot_add(13, i * 4 + 2, 2);
++i;
}
i = 0;
while (i < 15) {
bot_add(16, 45 + i * 6, 0);
++i;
}
next_unit = [17, 18, 0, 0];
kolvo_unit = [20, 4, 0, 0];
break;
case 28:
i = 0;
while (i < 10) {
bot_add(17, i * 8, 2);
bot_add(17, i * 8 + 4, 1);
++i;
}
bot_add(18, 0, 0);
bot_add(18, 12, 0);
bot_add(18, 24, 0);
bot_add(18, 36, 0);
next_unit = [14, 0, 0, 0];
kolvo_unit = [10, 0, 0, 0];
break;
case 29:
i = 0;
while (i < 10) {
bot_add(14, i * 5, 0);
++i;
}
next_unit = [18, 0, 0, 0];
kolvo_unit = [10, 0, 0, 0];
break;
case 30:
i = 0;
while (i < 10) {
bot_add(18, i * 12, 0);
++i;
}
next_unit = [18, 14, 0, 0];
kolvo_unit = [4, 9, 0, 0];
break;
case 31:
i = 0;
while (i < 4) {
bot_add(18, i * 12, 0);
++i;
}
i = 0;
while (i < 9) {
bot_add(14, i * 5, 0);
++i;
}
next_unit = [23, 22, 0, 0];
kolvo_unit = [20, 30, 0, 0];
break;
case 32:
i = 0;
while (i < 10) {
bot_add(23, i * 4, 1);
bot_add(23, i * 4 + 2, 2);
++i;
}
i = 0;
while (i < 20) {
bot_add(22, 30 + i * 2, 0);
bot_add(22, 32 + i * 2, 1);
bot_add(22, 32 + i * 2, 2);
i += 2;
}
next_unit = [27, 23, 0, 0];
kolvo_unit = [30, 16, 0, 0];
break;
case 33:
i = 0;
while (i < 30) {
bot_add(27, i * 4, 0);
++i;
}
i = 0;
while (i < 8) {
bot_add(23, 52 + i * 4, 1);
bot_add(23, 52 + i * 4 + 2, 2);
++i;
}
next_unit = [23, 0, 0, 0];
kolvo_unit = [50, 0, 0, 0];
break;
case 34:
i = 0;
while (i < 25) {
bot_add(23, i * 4, 1);
bot_add(23, i * 4 + 2, 2);
++i;
}
next_unit = [22, 0, 0, 0];
kolvo_unit = [99, 0, 0, 0];
break;
case 35:
i = 0;
while (i < 33) {
bot_add(22, 2 + i * 4, 0);
bot_add(22, 4 + i * 4, 1);
bot_add(22, 4 + i * 4, 2);
++i;
}
next_unit = [27, 0, 0, 0];
kolvo_unit = [70, 0, 0, 0];
break;
case 36:
i = 0;
while (i < 35) {
bot_add(27, i * 8, 1);
bot_add(27, i * 8 + 4, 2);
++i;
}
next_unit = [23, 26, 0, 0];
kolvo_unit = [30, 18, 0, 0];
break;
case 37:
i = 0;
while (i < 15) {
bot_add(23, i * 4, 1);
bot_add(23, i * 4 + 2, 2);
++i;
}
i = 0;
while (i < 18) {
bot_add(26, 100 + i * 6, 0);
100 + i++;
}
next_unit = [22, 26, 0, 0];
kolvo_unit = [60, 19, 0, 0];
break;
case 38:
i = 0;
while (i < 20) {
bot_add(22, 2 + i * 4, 0);
bot_add(22, 4 + i * 4, 1);
bot_add(22, 4 + i * 4, 2);
++i;
}
i = 0;
while (i < 19) {
bot_add(26, 80 + i * 6, 0);
80 + i++;
}
next_unit = [25, 0, 0, 0];
kolvo_unit = [24, 0, 0, 0];
break;
case 39:
i = 0;
while (i < 24) {
bot_add(25, i * 6, 0);
++i;
}
next_unit = [27, 28, 23, 0];
kolvo_unit = [40, 1, 80, 0];
break;
case 40:
i = 0;
while (i < 20) {
bot_add(27, i * 8, 1);
bot_add(27, i * 8 + 4, 2);
++i;
}
bot_add(28, 0, 0);
i = 0;
while (i < 40) {
bot_add(23, 70 + i * 4, 1);
bot_add(23, 70 + i * 4 + 2, 2);
++i;
}
next_unit = [23, 26, 28, 0];
kolvo_unit = [20, 20, 5, 0];
break;
case 41:
i = 0;
while (i < 10) {
bot_add(23, i * 4, 1);
bot_add(23, i * 4 + 2, 2);
++i;
}
i = 0;
while (i < 20) {
bot_add(26, i * 6, 0);
++i;
}
i = 0;
while (i < 5) {
bot_add(28, 26 + i * 12, 0);
++i;
}
next_unit = [23, 25, 24, 0];
kolvo_unit = [30, 10, 6, 0];
break;
case 42:
i = 0;
while (i < 15) {
bot_add(23, i * 4, 1);
bot_add(23, i * 4 + 2, 2);
++i;
}
i = 0;
while (i < 10) {
bot_add(25, 40 + i * 6, 0);
++i;
}
i = 0;
while (i < 6) {
bot_add(24, 80 + i * 6, 0);
++i;
}
next_unit = [25, 26, 0, 0];
kolvo_unit = [20, 20, 0, 0];
break;
case 43:
i = 0;
while (i < 20) {
bot_add(25, i * 6, 0);
++i;
}
i = 0;
while (i < 20) {
bot_add(26, 20 + i * 6, 0);
++i;
}
next_unit = [28, 0, 0, 0];
kolvo_unit = [25, 0, 0, 0];
break;
case 44:
i = 0;
while (i < 25) {
bot_add(28, i * 12, 0);
++i;
}
next_unit = [24, 0, 0, 0];
kolvo_unit = [30, 0, 0, 0];
break;
case 45:
i = 0;
while (i < 30) {
bot_add(24, i * 6, 0);
++i;
}
next_unit = [0, 0, 0, 0];
kolvo_unit = [0, 0, 0, 0];
}
}
frame 7 {
function gameOn() {
gameOff = false;
onEnterFrame = function () {
++step;
if (step > 24) {
step = 1;
}
i = 1;
while (i < n) {
if (ee['bot' + i]) {
pos[i] += ee['bot' + i].sp / 100;
p = Math.floor(pos[i]);
d = Math.round(pos[i] * 10 - p * 10) / 10;
if (ee['bot' + i].t == 3) {
ee['bot' + i].vik.gotoAndStop(r24[p]);
} else {
if (ee['bot' + i].t == 2) {
ee['bot' + i].vik.gotoAndStop(r24m[p]);
} else {
if (ee['bot' + i].t == 8) {
ee['bot' + i].vik.gotoAndStop(rbtc[p]);
ee['bot' + i].fir.gotoAndStop(rbtc[p]);
if (pos[i] > 63) {
s_up.start();
ee['bot' + i].removeMovieClip();
++killed;
--kl;
if (kl == 0) {
gotoAndStop('next');
}
++loss;
if (loss >= 40) {
this.attachMovie('end', 'mm', 15002);
}
}
} else {
ee['bot' + i].vik.gotoAndStop(r48[p]);
}
}
}
ee['bot' + i].vik.r.gotoAndStop(step);
ee['bot' + i]._x = _root['x' + tr[i]][p] + (_root['x' + tr[i]][p + 1] - _root['x' + tr[i]][p]) * d;
ee['bot' + i]._y = _root['y' + tr[i]][p] + (_root['y' + tr[i]][p + 1] - _root['y' + tr[i]][p]) * d;
if (ee['bot' + i].sp !== ee['bot' + i].ms) {
ee['bot' + i].sp = ee['bot' + i].ms;
}
if (pos[i] > 112) {
s_up.start();
ee['bot' + i].removeMovieClip();
++killed;
--kl;
if (kl == 0) {
gotoAndStop('next');
}
++loss;
if (loss >= 40) {
loss = 0;
this.attachMovie('end', 'mm', 15002);
}
}
}
++i;
}
for (i in tt) {
if (this['t' + tt[i]].lod > 0) {
--this['t' + tt[i]].lod;
} else {
this['t' + tt[i]].lod = 0;
if (this['t' + tt[i]].target) {
this['t' + tt[i]].lod = this['t' + tt[i]].lod0;
switch (this['t' + tt[i]].t) {
case 1:
attachMovie('sniper', 'r' + nr, 9000 + nr, {'dam': damage[this['t' + tt[i]].t][this['t' + tt[i]].dam], 'sp': 0, '_x': this['t' + tt[i]]._x, '_y': this['t' + tt[i]]._y - 30, 'trg': this['t' + tt[i]].target, '_rotation': -Math.atan2(_root.ee['bot' + trg]._x - _x, _root.ee['bot' + trg]._y - _y) * 180 / Math.PI, 'par': 't' + tt[i]});
this['r' + nr].r._y += 15;
trace(this['r' + nr].r._y);
++nr;
break;
case 3:
attachMovie('rocket', 'r' + nr, 9000 + nr++, {'dam': damage[this['t' + tt[i]].t][this['t' + tt[i]].dam], 'sp': 0, '_x': this['t' + tt[i]]._x + this['t' + tt[i]].tw.l._x - 49, '_y': this['t' + tt[i]]._y + this['t' + tt[i]].tw.l._y - 57, 'trg': this['t' + tt[i]].target, '_rotation': -Math.atan2(_root.ee['bot' + trg]._x - _x, _root.ee['bot' + trg]._y - _y) * 180 / Math.PI, 'secrok': 'r' + (nr + 2), 'par': 't' + tt[i]});
attachMovie('rocket', 'r' + nr, 9000 + nr++, {'dam': damage[this['t' + tt[i]].t][this['t' + tt[i]].dam], 'sp': -5, '_x': this['t' + tt[i]]._x + this['t' + tt[i]].tw.r._x - 49, '_y': this['t' + tt[i]]._y + this['t' + tt[i]].tw.r._y - 57, 'trg': this['t' + tt[i]].target, '_rotation': -Math.atan2(_root.ee['bot' + trg]._x - _x, _root.ee['bot' + trg]._y - _y) * 180 / Math.PI, 'par': 't' + tt[i]});
this['t' + tt[i]].target = 0;
break;
case 5:
this['t' + tt[i]].tw.l.play();
this['t' + tt[i]].tw.r.play();
attachMovie('bullet', 'r' + nr, 9000 + nr++, {'dam': damage[this['t' + tt[i]].t][this['t' + tt[i]].dam], 'trg': this['t' + tt[i]].target, 'tt': i});
}
if (nr == 7000) {
trace('"nr" value changed from 7000 to 6000');
nr = 6000;
}
}
}
}
search();
};
}
function search() {
lls = false;
for (i in tt) {
target = 0;
if ((this['t' + tt[i]].lod == 0 || this['t' + tt[i]].t == 2 || this['t' + tt[i]].t == 4) && this['t' + tt[i]].hitTest(ee)) {
nn = 1;
if (this['t' + tt[i]].t == 2) {
target = [];
do {
if (Math.sqrt((this['t' + tt[i]]._x - ee['bot' + nn]._x) * (this['t' + tt[i]]._x - ee['bot' + nn]._x) + (this['t' + tt[i]]._y - ee['bot' + nn]._y) * (this['t' + tt[i]]._y - ee['bot' + nn]._y)) - ee['bot' + nn].rr._width / 2 - this['t' + tt[i]].radius._width / 2 < 0) {
target.push(nn);
lls = true;
}
++nn;
} while (target.length < this['t' + tt[i]].rat + 1 && nn <= n);
this['t' + tt[i]].target = target;
if (hand_target2 == 1 and Math.sqrt((this['t' + tt[i]]._x - ee['bot' + target_par]._x) * (this['t' + tt[i]]._x - ee['bot' + target_par]._x) + (this['t' + tt[i]]._y - ee['bot' + target_par]._y) * (this['t' + tt[i]]._y - ee['bot' + target_par]._y)) - ee['bot' + target_par].rr._width / 2 - this['t' + tt[i]].radius._width / 2 < 0) {
if (target[0] > 0) {
this['t' + tt[i]].target[0] = target_par;
}
}
t1 = 0;
while (t1 < 6) {
if (target[t1]) {
this['l' + t1 + 't' + tt[i]].kill(target[t1]);
} else {
this['l' + t1 + 't' + tt[i]].off();
}
++t1;
}
} else {
if (this['t' + tt[i]].t == 4) {
nn = nb;
target = [];
do {
if (Math.sqrt((this['t' + tt[i]]._x - ee['bot' + nn]._x) * (this['t' + tt[i]]._x - ee['bot' + nn]._x) + (this['t' + tt[i]]._y - ee['bot' + nn]._y) * (this['t' + tt[i]]._y - ee['bot' + nn]._y)) - ee['bot' + nn].rr._width / 2 - this['t' + tt[i]].radius._width / 2 < 0) {
target.push(nn);
}
--nn;
} while (target.length < this['t' + tt[i]].rat + 1 && nn > 0);
this['t' + tt[i]].target = target;
t1 = 0;
while (t1 < 6) {
if (target[t1]) {
this['l' + t1 + 't' + tt[i]].kill(target[t1]);
} else {
this['l' + t1 + 't' + tt[i]].off();
}
++t1;
}
} else {
target = 0;
do {
if (Math.sqrt((this['t' + tt[i]]._x - ee['bot' + nn]._x) * (this['t' + tt[i]]._x - ee['bot' + nn]._x) + (this['t' + tt[i]]._y - ee['bot' + nn]._y) * (this['t' + tt[i]]._y - ee['bot' + nn]._y)) - ee['bot' + nn].rr._width / 2 - this['t' + tt[i]].radius._width / 2 < 0) {
target = nn;
this['t' + tt[i]].target = nn;
if (hand_target2 == 1 and Math.sqrt((this['t' + tt[i]]._x - ee['bot' + target_par]._x) * (this['t' + tt[i]]._x - ee['bot' + target_par]._x) + (this['t' + tt[i]]._y - ee['bot' + target_par]._y) * (this['t' + tt[i]]._y - ee['bot' + target_par]._y)) - ee['bot' + target_par].rr._width / 2 - this['t' + tt[i]].radius._width / 2 < 0) {
if (target > 0) {
this['t' + tt[i]].target = target_par;
target = target_par;
}
}
} else {
++nn;
}
} while (!target && nn <= n);
}
}
if (this['t' + tt[i]].t == 1 || this['t' + tt[i]].t == 3 || this['t' + tt[i]].t == 5) {
rr = -Math.atan2(ee['bot' + target]._x - this['t' + tt[i]]._x, ee['bot' + target]._y - this['t' + tt[i]]._y + 30) * 180 / Math.PI;
rr = Math.round(rr / 3.75) + 25;
if (rr < 0) {
rr += 96;
}
if (rr > 128) {
rr -= 96;
}
this['t' + tt[i]].tw.gotoAndStop(rr);
}
} else {
this['t' + tt[i]].target = 0;
this['l0t' + tt[i]].off();
}
}
}
function take(t) {
if (money >= cost[t]) {
trace(cost[t]);
drag._x = _xmouse;
drag._y = _ymouse;
drag.t = t;
drag.f5();
drag.radius._yscale = radius[t][0];
drag.radius._xscale = drag.radius._yscale;
drag.startDrag('');
drag.onEnterFrame = function () {
if (mask.hitTest(_xmouse, _ymouse, true)) {
putt = 0;
} else {
putt = 1;
}
drag.gotoAndStop(2 - putt);
};
}
}
function put() {
if (putt) {
drag._x = -100;
drag._y = -100;
drag.stopDrag('');
nt = _ymouse + 10;
while (this['t' + nt]) {
++nt;
}
money -= cost[drag.t];
s_tp.start();
attachMovie('tower', 't' + nt, 3000 + nt, {'lod0': rate[drag.t][0], 'cost': int(cost[drag.t] * 0.75), '_x': _xmouse, '_y': nt, 't': drag.t, 'n': nt, 'dam': 0, 'rat': 0, 'rad': 0});
rdss.attachMovie('radius', 'r' + nt, 9000 + nt, {'_x': _xmouse, '_y': nt});
tt.push(nt);
mask.attachMovie('mp', 'mp' + nt, mask.n++, {'_x': _xmouse, '_y': _ymouse});
show(nt);
++built;
delete drag.onEnterFrame;
} else {
s_wp.start();
}
}
function vibra(k) {
clearInterval(vib);
_root._x = 0;
_root._y = 0;
ki = 0;
vib = setInterval(function () {
_root._x = int(Math.random() * k - k / 2);
_root._y = int(Math.random() * k - k / 2);
if (ki > 1) {
ki = 0;
trace(k + '--');
--k;
} else {
++ki;
if (k == 0) {
clearInterval(vib);
_root._x = 0;
_root._y = 0;
}
}
}, 50);
}
function show(t) {
i = 0;
while (i < tt.length) {
rdss['r' + tt[i]]._alpha = 0;
++i;
}
rdss['r' + t]._alpha = 100;
menu.f5(t);
}
var p;
step = 1;
gameOff = false;
stop();
show(0);
kl = n - 1;
nb = n - 1;
nt = 0;
nr = 0;
speed = 10;
lls = 0;
ffs = 0;
bbs = 0;
if (startbuttunpressed) {
gameOn();
}
onMouseDown = function () {
if (_ymouse < 640) {
rdss['r' + menu.m]._alpha = 0;
show(0);
}
};
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (Key.getCode() == 27) {
drag._x = -100;
drag._y = -100;
drag.stopDrag('');
}
};
Key.addListener(keyListener);
}
frame 8 {
delete onEnterFrame;
clearInterval(sis);
delete drag.onEnterFrame;
drag.stopDrag('');
drag._x = -100;
drag._y = -100;
menu.P.gotoAndStop(8);
menu.P._visible = true;
trace('next');
_root.hand_target2 = 0;
_root.target_par = 0;
menu.nxt.gotoAndStop(2);
stop();
}
button 4396 {
on (release) {
menu.nxt.gotoAndStop(1);
gotoAndPlay('level');
}
}
frame 9 {
delete onEnterFrame;
clearInterval(sis);
delete drag.onEnterFrame;
drag.stopDrag('');
drag._x = -100;
drag._y = -100;
trace('end');
i = 0;
while (i <= 900) {
this['t' + i].removeMovieClip();
rdss['r' + i].removeMovieClip();
mask['mp' + i].removeMovieClip();
++i;
}
i = 0;
while (i <= 100) {
ee['bot' + i].removeMovieClip();
++i;
}
stop();
}