[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Combined Code (33.73 KiB) ● ● ● ●
// unknown tag 255 length 1
movieClip 4 {
}
movieClip 5 crack {
// unknown tag 253 length 102
frame 1 {
if (random(2) == 0) {
_xscale = -100;
}
if (random(2) == 0) {
_yscale = -100;
}
}
frame 21 {
this.removeMovieClip();
}
}
movieClip 8 tree_s {
frame 1 {
stop();
}
}
movieClip 19 {
}
movieClip 20 tree {
// unknown tag 253 length 349
frame 1 {
if (img._currentframe == 1) {
hp = 50;
} else {
hp = 10;
}
w1 = -75;
w2 = 75;
h1 = -160;
h2 = -30;
act = 0;
scale = 20;
onEnterFrame = function () {
if (img._currentframe < 6) {
if (act > 0) {
if (_yscale < 100) {
_yscale += scale;
} else {
_yscale -= scale;
}
if (scale < 1) {
act = 0;
_yscale = 100;
}
--scale;
}
}
};
}
}
movieClip 23 pero {
// unknown tag 253 length 438
frame 1 {
dir = random(360);
speed = (3 + random(4)) * 4;
vspeed = (1 + random(2)) / 2;
rot = 5 - random(10);
timer = 20 + random(20);
_rotation = random(360);
onEnterFrame = function () {
_Y += vspeed;
_rotation += rot;
if (speed > 2) {
_X += lengthdir_x(speed, dir);
_Y += lengthdir_y(speed, dir);
speed -= 4;
}
if (timer > 0) {
--timer;
if (timer < 10) {
_alpha -= 10;
}
} else {
this.removeMovieClip();
}
};
}
}
movieClip 30 {
frame 1 {
gotoAndStop(1 + random(3));
}
}
movieClip 31 list {
// unknown tag 253 length 438
frame 1 {
dir = random(360);
speed = (4 + random(5)) * 4;
vspeed = (1 + random(2)) / 2;
rot = 5 - random(10);
timer = 10 + random(15);
_rotation = random(360);
onEnterFrame = function () {
_Y += vspeed;
_rotation += rot;
if (speed > 2) {
_X += lengthdir_x(speed, dir);
_Y += lengthdir_y(speed, dir);
speed -= 4;
}
if (timer > 0) {
--timer;
if (timer < 10) {
_alpha -= 10;
}
} else {
this.removeMovieClip();
}
};
}
}
movieClip 38 hulk1 {
// unknown tag 253 length 491
frame 1 {
dir = 45 + random(90);
vspeed = 0;
speed = 5 + random(9);
rot = 20 - random(40);
vrot = random(10);
timer = 20 + random(20);
_rotation = random(360);
gotoAndStop(2 + random(3));
onEnterFrame = function () {
_rotation += rot;
_X += lengthdir_x(speed, dir);
_Y += lengthdir_y(speed, dir) + vspeed;
vspeed += 0.5;
if (_yscale > 90) {
_yscale = -100;
} else {
_yscale += vrot;
}
if (timer > 0) {
--timer;
if (timer < 10) {
_alpha -= 10;
}
} else {
this.removeMovieClip();
}
};
}
}
movieClip 45 chip {
// unknown tag 253 length 406
frame 1 {
dir = 45 + random(90);
vspeed = 0;
speed = 5 + random(9);
rot = 20 - random(40);
timer = 20 + random(20);
_rotation = random(360);
gotoAndStop(2 + random(3));
onEnterFrame = function () {
_rotation += rot;
_X += lengthdir_x(speed, dir);
_Y += lengthdir_y(speed, dir) + vspeed;
vspeed += 0.5;
if (timer > 0) {
--timer;
if (timer < 10) {
_alpha -= 10;
}
} else {
this.removeMovieClip();
}
};
}
}
movieClip 52 hulk2 {
// unknown tag 253 length 406
frame 1 {
dir = 45 + random(90);
vspeed = 0;
speed = 5 + random(9);
rot = 40 - random(80);
timer = 20 + random(20);
_rotation = random(360);
gotoAndStop(2 + random(3));
onEnterFrame = function () {
_rotation += rot;
_X += lengthdir_x(speed, dir);
_Y += lengthdir_y(speed, dir) + vspeed;
vspeed += 0.5;
if (timer > 0) {
--timer;
if (timer < 10) {
_alpha -= 10;
}
} else {
this.removeMovieClip();
}
};
}
}
movieClip 55 star1 {
// unknown tag 253 length 280
frame 1 {
stop();
rot = 7 + random(5);
_alpha = 0;
timer = 20 + random(10);
onEnterFrame = function () {
_rotation += rot;
if (timer > 0) {
--timer;
if (timer < 10) {
_alpha -= 10;
} else {
if (_alpha < 100) {
_alpha += 10;
}
}
} else {
this.removeMovieClip();
}
};
}
}
movieClip 56 star2 {
// unknown tag 253 length 324
frame 1 {
stop();
vspeed = 1 + random(3);
rot = 7 + random(5);
_alpha = 0;
timer = 20 + random(10);
onEnterFrame = function () {
_rotation += rot;
_Y -= vspeed;
if (timer > 0) {
--timer;
if (timer < 10) {
_alpha -= 10;
} else {
if (_alpha < 100) {
_alpha += 10;
}
}
} else {
this.removeMovieClip();
}
};
}
}
movieClip 59 hulk3 {
// unknown tag 253 length 436
frame 1 {
stop();
vspeed = 0;
speed = 4 + random(6);
if (random(10) < 5) {
dir = 90 + random(30);
rot = -5 - random(5);
} else {
dir = 60 + random(30);
rot = 5 + random(5);
}
timer = 15 + random(15);
onEnterFrame = function () {
_rotation += rot;
_X += lengthdir_x(speed, dir);
_Y += lengthdir_y(speed, dir) + vspeed;
vspeed += 0.5;
if (timer > 0) {
--timer;
if (timer < 10) {
_alpha -= 10;
}
} else {
this.removeMovieClip();
}
};
}
}
movieClip 72 {
frame 1 {
stop();
}
}
movieClip 97 {
}
movieClip 122 {
}
movieClip 147 {
}
movieClip 172 {
}
movieClip 173 {
frame 1 {
stop();
}
}
movieClip 190 {
}
movieClip 191 {
frame 14 {
gotoAndPlay(1);
}
}
movieClip 192 enemy3 {
// unknown tag 253 length 1927
frame 1 {
stop();
hp = 100;
shad._alpha = 25;
shad._yscale = 75;
shad._xscale = 75;
w1 = -30;
w2 = 30;
h1 = bird._y - 30;
h2 = bird._y + 30;
moving = 1;
if (_x < 300) {
_x = 24;
path = -1;
bird._xscale *= -1;
shad._xscale *= -1;
} else {
_x = 748;
path = 1;
}
if (info == 0) {
bird.weap._visible = false;
shad.weap._visible = false;
if (_root.minigame == 0 || _root.minigame == 6) {
huntVor(this);
}
} else {
bird.weap.gotoAndStop(info);
shad.weap.gotoAndStop(info);
_y = 200 + random(260);
}
cargo = false;
bird.grib._visible = false;
shad.grib._visible = false;
if (_root.minigame == 0 || _root.minigame == 6) {
speed = (-4 - random(4)) * path;
} else {
if (_root.minigame == 2) {
speed = 5;
} else {
speed = 4 + _root.mini_diff / 10 + random(4);
}
}
this.swapDepths(_y * 10000 + id);
onEnterFrame = function () {
if (_root.paused == false) {
if (moving == 1) {
if (_root.minigame == 0 || _root.minigame == 6) {
_X += speed;
if (info == 0) {
h1 = bird._y - 30;
h2 = bird._y + 30;
dist = Math.abs(_X - food._x - 24);
if (dist < 100) {
shad._alpha = 50 - dist / 4;
shad._xscale = (100 - dist / 4) * path;
shad._yscale = shad._xscale * path;
bird._y = -dist;
if (dist < 5) {
if (cargo == false) {
if (food.count > 0) {
bird.grib._visible = true;
cargo = bird.grib._visible;
bird.grib.gotoAndStop(food.type);
bird.grib.grib.stop();
food['grib' + food.count]._visible = false;
--food.count;
createScore(food._x, food._y, 2);
}
}
}
}
}
}
} else {
++moving;
}
if (_root.minigame == 0 || _root.minigame == 6) {
if (_X < 24) {
if (cargo == true) {
dieFood(this);
} else {
dieBird(this);
}
}
if (_X > 748) {
if (cargo == true) {
dieFood(this);
} else {
dieBird(this);
}
}
} else {
if (_root.minigame == 2) {
_X += speed;
if (_X > 768) {
dieBird(this);
}
} else {
_X -= speed;
if (_X < 0) {
--_root.life;
_root.mini_diff -= 10;
dieBird(this);
}
}
}
}
};
}
}
// unknown tag 88 length 138
movieClip 195 {
frame 21 {
_parent.removeMovieClip();
}
}
movieClip 197 {
frame 21 {
_parent.removeMovieClip();
}
}
movieClip 199 {
frame 35 {
_parent.removeMovieClip();
}
}
movieClip 203 {
}
movieClip 205 {
frame 26 {
_parent.removeMovieClip();
}
}
movieClip 206 scoreobj {
}
movieClip 231 {
}
movieClip 233 {
}
movieClip 235 {
}
movieClip 237 {
}
movieClip 262 {
}
movieClip 287 {
}
movieClip 300 {
}
movieClip 313 {
}
movieClip 338 {
}
movieClip 363 {
}
movieClip 376 {
}
movieClip 395 {
}
movieClip 434 {
frame 39 {
gotoAndPlay(15);
}
}
movieClip 445 enemy2 {
// unknown tag 253 length 1487
frame 1 {
stop();
hp = 100;
speed = 0.5;
w1 = -6;
w2 = 56;
h1 = -46;
h2 = 43;
xtile = _x / 48;
xstart = xtile;
ytile = _y / 36;
ystart = ytile;
hplow = hp;
hpgui = 0;
moving = 1;
eating = 0;
act = 0;
vspeed = 0;
killgrib = false;
cargo = false;
path = new Array();
if (_root.minigame != 2) {
huntEnemy(this);
} else {
path = findPath(_root.colmap, xtile, ytile, 0, ystart);
}
onEnterFrame = function () {
if (_root.paused == false) {
if (moving == 1 && eating == 0) {
moveMedved(this);
if (_root.minigame != 2) {
if (_Y != ypre) {
this.swapDepths(_Y * 10000 + id);
}
ypre = _Y;
} else {
if (_X < 30) {
--_root.life;
_root.mini_diff -= 15;
if (_root.life > 0) {
j = 0;
while (j < bankEnemy.length) {
attackEnemy(bankEnemy[j], 0, 4);
++j;
}
}
dieEnemy(this);
}
}
} else {
if (moving < 1) {
++moving;
if (moving == 1) {
if (eating > 5) {
eating = 43;
gotoAndStop(10);
} else {
trace(last);
gotoAndStop(last);
}
}
} else {
if (eating > 0) {
--eating;
if (eating == 5) {
if (food.count > 1) {
playSound('beareat');
food['grib' + food.count]._visible = false;
--food.count;
createScore(_X, _Y, 2);
} else {
if (food.count == 1) {
playSound('beareat');
food.grib1._visible = false;
food.count = 0;
dieFood(this);
}
}
food = undefined;
huntEnemy(this);
}
}
}
}
if (hp < hplow) {
hplow -= 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else {
if (hpgui > 0) {
hpgui -= 10;
}
}
if (hpbar._visible == true) {
if (hpgui > 0) {
var v3 = hpgui;
hpbor._alpha = v3;
hplowbar._alpha = v3;
hpbar._alpha = hplowbar._alpha;
} else {
var v3 = false;
hpbor._visible = v3;
hplowbar._visible = v3;
hpbar._visible = hplowbar._visible;
}
}
}
};
}
// unknown tag 253 length 103
frame 13 {
onEnterFrame = function () {
_alpha -= 2;
if (_alpha < 2) {
this.removeMovieClip();
}
};
}
frame 21 {
stop();
}
}
movieClip 447 {
}
movieClip 466 explo {
frame 19 {
this.removeMovieClip();
}
}
movieClip 468 {
}
movieClip 489 dirt {
frame 1 {
gotoAndPlay(1 + random(3));
}
frame 28 {
this.removeMovieClip();
}
}
movieClip 514 kap {
frame 23 {
stop();
}
}
movieClip 523 {
}
movieClip 532 {
}
movieClip 541 {
}
movieClip 546 {
}
movieClip 551 {
}
movieClip 560 {
}
movieClip 569 {
}
movieClip 574 {
}
movieClip 586 enemy4 {
// unknown tag 253 length 622
frame 1 {
var = 816;
stop();
speed = 2;
w1 = 0;
w2 = 50;
h1 = -15;
h2 = 35;
if (_root.minigame != 3) {
xtile = _x / 48;
xstart = xtile;
} else {
xstart = 0;
}
ytile = _y / 36;
ystart = ytile;
moving = 1;
act = 0;
path = new Array();
huntSpider(this);
onEnterFrame = function () {
if (_root.paused == false) {
if (moving == 1) {
moveSpider(this);
if (_Y != ypre) {
this.swapDepths(_Y * 10000 + id);
}
ypre = _Y;
} else {
if (moving == 0) {
huntSpider(this);
spid.play();
}
++moving;
}
if (_X < 20) {
if (_root.minigame == 3) {
--_root.life;
_root.mini_diff -= 5;
bankEnemy.splice(i, 1);
this.removeMovieClip();
}
}
}
};
}
// unknown tag 253 length 102
frame 20 {
if (_root.minigame == 0 || _root.minigame == 6) {
_root.rain.gotoAndPlay(2);
}
}
// unknown tag 253 length 104
frame 36 {
stop();
onEnterFrame = function () {
_alpha -= 2;
if (_alpha < 2) {
this.removeMovieClip();
}
};
}
}
movieClip 595 {
frame 1 {
stop();
}
}
movieClip 604 {
frame 1 {
stop();
}
}
movieClip 631 {
}
movieClip 632 {
// unknown tag 253 length 130
frame 1 {
stop();
timer = 30;
key._visible = false;
onEnterFrame = function () {
if (key._visible == true) {
--timer;
if (timer == 0) {
dieChest(_parent);
}
}
};
}
}
movieClip 633 chest {
frame 1 {
hp = 100;
w1 = -12;
w2 = 58;
h1 = -35;
h2 = 40;
}
}
movieClip 644 flow {
}
movieClip 667 boom {
frame 12 {
this.removeMovieClip();
}
}
movieClip 684 {
}
movieClip 701 {
}
movieClip 725 {
}
movieClip 757 {
}
movieClip 758 {
// unknown tag 253 length 295
frame 1 {
if (_parent.blue == true) {
gotoAndStop(1);
} else {
gotoAndStop(1 + random(4));
}
img.gotoAndPlay(1 + random(30));
timer = 20;
onEnterFrame = function () {
if (_root.effect == true) {
if (timer > 0) {
--timer;
} else {
createPart(_parent._x - 15 + random(30), _parent._y - 15 + random(30), 'star1', _root.levelmap.getNextHighestDepth(), 1);
timer = 20;
}
}
};
}
frame 2 {
img.gotoAndPlay(1 + random(30));
}
frame 3 {
img.gotoAndPlay(1 + random(30));
}
frame 4 {
img.gotoAndPlay(1 + random(30));
}
}
movieClip 759 prize {
// unknown tag 253 length 2824
frame 1 {
kill = false;
timer = 250 + random(50);
act = 1;
vspeed = 8 + random(4);
limit = vspeed;
speed = vspeed / 2;
w1 = -25;
w2 = 25;
h1 = -25;
h2 = 25;
if (info == 0) {
limit += 10;
speed += 2;
}
if (_x < 128 || _x > 640 || _y < 112 || _y > 464) {
dir = point_direction(_x, _y, 384, 288) + 45 - random(90);
} else {
dir = random(360);
}
switch (_currentframe) {
case 1:
img.gotoAndPlay(1 + random(12));
w1 = -20;
w2 = 20;
h1 = -20;
h2 = 20;
x = 94;
y = 78;
info = undefined;
break;
case 2:
x = 94;
y = 78;
info = undefined;
break;
case 3:
case 4:
case 5:
case 6:
x = info._x + 24;
y = info._y + 18;
break;
case 7:
x = 94;
y = 98;
info = undefined;
break;
case 8:
x = 94;
y = 78;
if (info == 0) {
blue = true;
}
info = undefined;
}
onEnterFrame = function () {
if (_root.paused == false || _root.win == true) {
if (kill == false) {
if (timer == 0) {
if (_xscale == 0) {
if (info.count == 0) {
food = info;
dieFood(this);
}
this.removeMovieClip();
} else {
_yscale -= 5;
_xscale = _yscale - 5;
}
} else {
--timer;
}
if (act > 0) {
if (speed > 0) {
_X += lengthdir_x(speed, dir);
_Y -= lengthdir_y(speed, dir);
speed -= 0.2;
}
var v3 = act;
switch (v3) {
case 1:
if (vspeed > 0) {
_Y -= vspeed;
vspeed -= 2;
} else {
act = 2;
}
break;
case 2:
if (limit > -1 * vspeed) {
_Y -= vspeed;
vspeed -= 2;
} else {
if (limit == -1 * vspeed) {
vspeed = -1 * (vspeed + 4);
limit = vspeed;
} else {
act = 0;
speed = 2;
dir = -1 * point_direction(_X, _Y, x, y);
if (_root.magnit == true) {
kill = true;
if (_currentframe < 7) {
playSound('coin1', 'coin2', 'coin3', 'coin4');
} else {
playSound('almaz1', 'almaz2');
break;
}
}
}
}
}
} else {
if (_root.magnit == true) {
kill = true;
_yscale = 100;
_xscale = 100;
if (_currentframe < 7) {
playSound('coin1', 'coin2', 'coin3', 'coin4');
} else {
playSound('almaz1', 'almaz2');
}
}
}
} else {
dist = point_distance(_X, _Y, x, y);
if (dist > speed) {
_X += lengthdir_x(speed, dir);
_Y += lengthdir_y(speed, dir);
speed = Math.max(dist / 10, 20);
} else {
var v4 = _currentframe;
switch (v4) {
case 1:
++_root.curr_money;
++_root.achi[5];
if (_root.effect == true) {
createInterPart(10 + random(25), 10 + random(25), 'star1');
}
this.removeMovieClip();
break;
case 2:
_root.curr_money += 3;
_root.achi[5] += 3;
if (_root.effect == true) {
createInterPart(10 + random(25), 10 + random(25), 'star1');
}
this.removeMovieClip();
break;
case 3:
case 4:
case 5:
case 6:
if (info.count < 5) {
++info.count;
z = info['grib' + info.count];
z._visible = true;
var v5 = 10;
_loc0_ = v5;
z._yscale = v5;
z._xscale = _loc0_;
}
createScore(info._x, info._y, 1);
this.removeMovieClip();
break;
case 7:
++_root.key;
this.removeMovieClip();
break;
case 8:
_root.curr_money += 15;
_root.achi[5] += 15;
this.removeMovieClip();
}
}
}
}
};
}
frame 2 {
img.gotoAndPlay(1 + random(12));
}
}
movieClip 782 {
}
movieClip 806 {
}
movieClip 830 {
}
movieClip 854 {
}
movieClip 855 weap {
// unknown tag 253 length 516
frame 1 {
act = 1;
vspeed = 8 + random(4);
limit = vspeed;
w1 = -25;
w2 = 25;
h1 = -25;
h2 = 25;
if (info == 0) {
limit += 10;
}
wait = 15;
onEnterFrame = function () {
if (wait > 0) {
--wait;
}
if (act > 0) {
switch (act) {
case 1:
if (vspeed > 0) {
_Y -= vspeed;
vspeed -= 2;
} else {
act = 2;
}
break;
case 2:
if (limit > -1 * vspeed) {
_Y -= vspeed;
vspeed -= 2;
} else {
if (limit == -1 * vspeed) {
vspeed = -1 * (vspeed + 4);
limit = vspeed;
} else {
act = 0;
}
}
}
}
};
}
}
movieClip 872 {
}
movieClip 889 {
}
movieClip 906 {
}
movieClip 915 {
}
movieClip 924 {
}
movieClip 941 {
}
movieClip 958 {
}
movieClip 967 {
}
movieClip 969 {
}
movieClip 986 {
}
movieClip 995 {
}
movieClip 1004 {
}
movieClip 1009 {
}
movieClip 1014 {
}
movieClip 1023 {
}
movieClip 1032 {
}
movieClip 1037 {
}
movieClip 1038 enemy1 {
// unknown tag 253 length 1759
frame 1 {
stop();
hp = 100;
if (_root.minigame != 1) {
speed = 0.5;
} else {
speed = (15 + _root.mini_diff * 3 + random(15)) / 10;
gotoAndStop(6);
}
w1 = -6;
w2 = 54;
h1 = -10;
h2 = 46;
xtile = _x / 48;
xstart = xtile;
ytile = _y / 36;
ystart = ytile;
hplow = hp;
hpgui = 0;
moving = 1;
act = 0;
vspeed = 0;
sleep = false;
grib._visible = false;
cargo = grib._visible;
path = new Array();
huntEnemy(this);
onEnterFrame = function () {
xx.text = _X;
if (_root.paused == false) {
if (moving == 1) {
if (_root.minigame != 1) {
moveEnemy(this);
if (_Y != ypre) {
this.swapDepths(_Y * 10000 + id);
}
ypre = _Y;
} else {
if (_X > 30) {
_X -= speed;
} else {
--_root.life;
_root.mini_diff -= 5;
if (_root.life > 0) {
j = 0;
while (j < bankEnemy.length) {
attackEnemy(bankEnemy[j], 0, 1);
++j;
}
}
dieEnemy(this);
}
}
if (sleep == true) {
gotoAndStop(_currentframe - 16);
sleep = false;
}
} else {
++moving;
if (act > 0) {
switch (act) {
case 1:
if (vspeed > 0) {
_Y -= vspeed;
vspeed -= 2;
} else {
act = 2;
}
break;
case 2:
if (_Y < y + vspeed) {
_Y -= vspeed;
vspeed -= 2;
} else {
act = 0;
_Y = y;
if (sleep == false) {
gotoAndStop(_currentframe - 8);
moving = 1;
} else {}
}
}
z = (y - _Y) / 2;
shad._alpha = 30 - z;
var v3 = 100 - z;
_loc0_ = v3;
shad._yscale = v3;
shad._xscale = _loc0_;
shad._y = 32 + y - _Y;
}
}
if (hp < hplow) {
hplow -= 2;
hplowbar._xscale = hplow;
hpgui = 200;
} else {
if (hpgui > 0) {
hpgui -= 10;
}
}
if (hpbar._visible == true) {
if (hpgui > 0) {
v3 = hpgui;
_loc0_ = v3;
hpbor._alpha = v3;
hplowbar._alpha = _loc0_;
hpbar._alpha = _loc0_;
} else {
v3 = false;
_loc0_ = v3;
hpbor._visible = v3;
hplowbar._visible = _loc0_;
hpbar._visible = _loc0_;
}
}
if (grib._xscale != 100) {
if (grib._xscale < 100) {
grib._yscale += 20;
grib._xscale = _loc0_;
} else {
grib._yscale -= 30;
grib._xscale = _loc0_;
}
}
}
};
}
}
movieClip 1055 wall {
}
movieClip 1098 {
// unknown tag 253 length 248
frame 1 {
gotoAndStop(5 * (_parent.type - 1) + 2 + random(5));
onEnterFrame = function () {
if (_xscale != 100) {
if (_xscale < 100) {
_yscale += 20;
_xscale = _yscale + 20;
} else {
_yscale -= 30;
_xscale = _yscale - 30;
}
}
};
}
}
movieClip 1099 food {
// unknown tag 253 length 404
frame 1 {
kill = false;
xtile = _x / 48;
ytile = _y / 36;
i = 1;
while (i <= 5) {
x = this['grib' + i];
y = this['grib' + (1 + random(5))];
z = x._name;
x._name = y._name;
y._name = z;
++i;
}
i = count + 1;
while (i <= 5) {
this['grib' + i]._visible = false;
++i;
}
onEnterFrame = function () {
if (kill == true) {
_alpha -= 5;
if (_alpha < 1) {
this.removeMovieClip();
}
}
};
}
}
movieClip 1101 mcDragon {
frame 80 {
_root.fireFire();
}
frame 119 {
stop();
}
}
movieClip 1104 libGlow {
}
// unknown tag 253 length 6078
frame 1 {
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = '__mochibot__';
mbc = 'mochibot.com';
g = _global ? _global : _level0._root;
if (g[mb + swfid]) {
return g[mb + swfid];
}
s = System.security;
x = mc._root.getSWFVersion;
fv = x ? mc.getSWFVersion() : (_global ? 6 : 5);
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == 'localWithFile') {
return null;
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = (fv == 5) ? /:$version : System.capabilities.version;
u = 'http://' + mbc + '/my/core.swf?mv=8&fv=' + fv + '&v=' + escape(pv) + '&swfid=' + escape(swfid) + '&l=' + lv + '&f=' + mc + (sb ? '&sb=' + sb : '') + (trk ? '&t=1' : '');
lv = fv > 6 ? mc.getNextHighestDepth() : (g[mb + 'level'] ? g[mb + 'level'] + 1 : lv);
g[mb + 'level'] = lv;
if (fv == 5) {
res = '_level' + lv;
if (!eval(res)) {
loadMovieNum(u, lv);
}
return res;
}
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
return res;
}
function initLoader() {
var v2 = (result_lv.b == undefined) ? 'false' : result_lv.b;
trace('b ::' + v2 + '::');
trace('result_lv.h ::' + result_lv.h + '::');
if (result_lv.h == 'true') {
isHome = true;
}
if (v2 == 'true') {
bannedSign._alpha = 100;
} else {
this.onEnterFrame = function () {
createNewParticle();
mcLoadLogoBg.bar._xscale = 100 * (1 - getBytesLoaded() / getBytesTotal());
emitter._x = mcLoadLogoBg._x + (96 - mcLoadLogoBg.bar._width) + 15;
emitter._y = mcLoadLogoBg._y + 44;
if (getBytesLoaded() == getBytesTotal()) {
kill();
this.onEnterFrame = undefined;
if (isHome) {
this.gotoAndStop(3);
} else {
this.gotoAndStop(3);
}
}
};
bannedSign.onRelease = function () {
if (!isHome) {
openKingPage(LINK_TYPE_LOADER_PROGRESS);
}
};
}
}
function openKingPage(type, page) {
trace(type);
var v4 = _root._url;
var v5 = 'game=' + GAME_NAME + '&from=' + v4 + '&type=' + type + '&session=' + sessionID;
if (page != undefined) {
v5 += '&redirect=' + page;
}
var v6 = '_blank';
if (isHome) {
v6 = '_top';
}
getURL(bounceURL + '?' + v5, v6);
}
function openOtherGamesLink() {
getURL('http://www.4399pk.com/', '_blank');
}
function openHighscoresLink() {
openKingPage(LINK_TYPE_HIGHSCORES, 'game/' + GAME_NAME + '/highscores');
}
function openSignLink() {
if (!isHome) {
openKingPage(LINK_TYPE_SIGN);
}
}
function openAddToWebsiteLink() {
openKingPage(LINK_TYPE_ADD_GAME, 'website_content.jsp');
}
function openLoaderMovieLink() {
openKingPage(LINK_TYPE_LOADER_MOVIE);
}
function openRightClickLink() {
openKingPage(LINK_TYPE_RIGHT_CLICK);
}
function openOfflineProtectionLink() {
openKingPage(LINK_TYPE_PROTECT);
}
function addScore(points) {
checkScore();
var v2 = (iscore - 123) / 2;
v2 += points;
iscore = v2 * 2 + 123;
var v3 = new md5();
checkStr = v3.hash(iscore + ':' + GAME_NAME + ':' + SK);
return v2;
}
function resetScore() {
iscore = 123;
checkStr = null;
}
function submitInternalScore() {
checkScore();
var _loc1_ = (iscore - 123) / 2;
submitScore(_loc1_);
}
function checkScore() {
if (checkStr != null) {
var _loc1_ = new md5();
if (checkStr != _loc1_.hash(iscore + ':' + GAME_NAME + ':' + SK)) {
SSK = 'ng41ui54hy35tdsnd6f54rews';
}
}
}
function submitScore(score) {
var v2 = new md5();
var v3 = v2.hash(score + ':' + GAME_NAME + ':' + SSK);
try {
if (isHome) {
flash.external.ExternalInterface.call('submitScore', score, v3);
} else {
openKingPage(LINK_TYPE_HIGHSCORES, 'game/' + GAME_NAME + '/submit/' + score + ':' + v3);
}
}
}
function submitLevel(level) {
var v2 = new md5();
var v3 = v2.hash(level + ':' + GAME_NAME + ':' + SSK);
try {
if (isHome) {
flash.external.ExternalInterface.call('submitLevel', level, v3);
}
}
}
function submitAchievement(achievement) {
var v2 = new md5();
var v3 = v2.hash(achievement + ':' + GAME_NAME + ':' + SAK);
try {
if (isHome) {
flash.external.ExternalInterface.call('submitAchievement', achievement, v3);
}
}
}
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = '__mochibot__';
mbc = 'mochibot.com';
g = _global ? _global : _level0._root;
if (g[mb + swfid]) {
return g[mb + swfid];
}
s = System.security;
x = mc._root.getSWFVersion;
fv = x ? mc.getSWFVersion() : (_global ? 6 : 5);
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == 'localWithFile') {
return null;
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = 'http://' + mbc + '/my/core.swf?mv=7&fv=' + fv + '&v=' + escape(/:$version) + '&swfid=' + escape(swfid) + '&l=' + lv + '&f=' + mc + (sb ? '&sb=' + sb : '') + (trk ? '&t=1' : '');
lv = fv > 6 ? mc.getNextHighestDepth() : (g[mb + 'level'] ? g[mb + 'level'] + 1 : lv);
g[mb + 'level'] = lv;
if (fv == 5) {
res = '_level' + lv;
if (!eval(res)) {
loadMovieNum(u, lv);
}
return res;
}
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
return res;
}
function createNewParticle() {
var v2 = emitter.attachMovie('libGlow', 'newLibGlow', emitter.getNextHighestDepth());
var v3 = new Particle(v2, -10, -7, _root._width, _root._height);
v3.setVel(randRange(minXVel, maxXVel), randRange(minYVel, maxYVel));
v3.setSize(randRange(minSize, maxSize));
particles.push(v3);
while (particles.length > numParticles) {
v3 = particles.shift();
v3.destroy();
}
var v4 = 0;
while (v4 < particles.length) {
particles[v4].update();
v4 += 1;
}
}
function kill() {
var _loc1_ = 0;
while (_loc1_ < particles.length) {
particles[_loc1_].destroy();
_loc1_ += 1;
}
}
function randRange(min, max) {
var v3 = Math.random() * (max - min) + min;
return v3;
}
__com_mochibot__('a690a888', this, 10301, true);
initLoader();
stop();
urlStart = _url.indexOf('://') + 3;
urlEnd = _url.indexOf('/', urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf('.') - 1;
domEnd = domain.lastIndexOf('.', LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain == 'king.com' || domain == 'midasplayer.com' || domain == 'newgrounds.com' || domain == 'kongregate.com') {
surv_allow = true;
} else {
surv_allow = false;
}
var GAME_NAME = 'mushroom-madness';
var MOCHI_SIGNATURE = '';
var loadHomeParametersURL = 'http://www.king.com/servlet/FreeGameServlet?action=load';
var LINK_TYPE_LOADER_MOVIE = 'loader_movie';
var LINK_TYPE_LOADER_PROGRESS = 'loader_progress';
var LINK_TYPE_PROTECT = 'protect';
var LINK_TYPE_OTHER_GAMES = 'other_games';
var LINK_TYPE_HIGHSCORES = 'highscores';
var LINK_TYPE_SIGN = 'sign';
var LINK_TYPE_ADD_GAME = 'add_game';
var LINK_TYPE_RIGHT_CLICK = 'rightclick';
var LINK_TYPE_RIGHT_CLICK = 'rightclick';
var SSK = 'ng43ui54hy35tdsnd6f54rews';
var SAK = 'ggfd7sday923mdsfd8csfds34';
var SK = 'vf78hxcsjak77cxzhjkwad87s';
var iscore = 123;
var checkStr = null;
var USER_TYPE_UNREGISTERED = 0;
var USER_TYPE_REGISTERED = 1;
var USER_TYPE_GOLD = 2;
var USER_TYPE_SUBSCRIPTION = 3;
var SessionID = '';
var gameWidth = Stage.width;
var gameHeight = Stage.height;
var isHome = false;
bannedSign._alpha = 0;
bannedSign._y = 0;
bannedSign._x = 0;
bannedSign.bg._width = gameWidth;
bannedSign.bg._height = gameHeight;
mcLoadLogoBg._x = gameWidth / 2 - mcLoadLogoBg._width / 2;
mcLoadLogoBg._y = gameHeight / 2 - mcLoadLogoBg._height / 2;
var result_lv = new LoadVars();
result_lv.onLoad = function (success) {
_root.initLoader();
};
var my_lv = new LoadVars();
my_lv.game = GAME_NAME;
my_lv.from = _root._url;
var so = SharedObject.getLocal('session');
if (so.data.sessionID == null) {
var rnd1 = Math.floor(Math.random() * 4294967000.0);
var rnd2 = Math.floor(Math.random() * 4294967000.0);
so.data.sessionID = rnd1.toString(16) + rnd2.toString(16);
so.flush();
}
sessionID = so.data.sessionID;
my_lv.session = sessionID;
if (MOCHI_SIGNATURE != '') {
__com_mochibot__(MOCHI_SIGNATURE, this, 10301, true);
}
var numParticles = 20;
var minXVel = -1;
var maxXVel = 1;
var minYVel = -1;
var maxYVel = 1;
var minSize = 12;
var maxSize = 29;
var minAlpha = 10;
var maxAlpha = 20;
var particles = new Array();
var emitter = _root.createEmptyMovieClip('p_holder', _root.getNextHighestDepth());
var webURL_array = new Array('http://s7.4399.com:8080', 'http://s1.4399.com:8080', 'http://nitrome.com.4399.com:8080', 'http://s8.4399.com:8080', 'http://s5.4399.com:8080', 'http://www.freeworldgroup.com.ff130.com:8080', 'http://www.miniclip.com.4399pk.com:8080', 'http://flashs1.4399.com:8080', 'http://s2.4399.com:8080', 'http://s6.4399.com:8080', 'http://s4.4399.com:8080', 'http://sbig.4399.com:8080', 'http://testswf.4399.com:8080', 'http://lenfen.4399.com:8080');
var url_lock = true;
for (var i in webURL_array) {
var l_url = webURL_array[i];
if (_url.substr(0, l_url.length) == l_url) {
url_lock = false;
}
}
if (url_lock) {
}
}
movieClip 1106 {
}
// unknown tag 88 length 78
movieClip 1109 {
}
movieClip 1113 {
}
movieClip 1114 {
}
movieClip 1770 __Packages.md5 {
#initclip
label -28371:
function () {
= (1530 % 511) * true;
if (!'') {
} else {}
return ;
}
var = 250 + ();
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
for (;;) {
if ( == 758) {
-= 732;
true;
}
if ( == 253) {
+= 281;
'';