Frame 1
Frame 3
gotoAndStop ("start");
Frame 19
stop();
if (game_mask == undefined) {
_root.attachMovie("game_mask", "game_mask", 1000);
_root.setMask(game_mask);
}
btns.btn01.onPress = function () {
play_sound("button_sound");
};
btns.btn01.onRelease = function () {
next_round();
};
btns.btn02.onPress = function () {
play_sound("button_sound");
};
btns.btn02.onRelease = function () {
help.play();
};
play_music("music_op", true);
snow_down(bg);
function next_game() {
game_paused = true;
this.attachMovie("next_stage", "next_stage", 3);
}
function next_round() {
if ((game_time > 0) and (game_life > 0)) {
if (game_stage < 5) {
game_stage++;
} else {
game_level++;
game_stage = 1;
}
trace((("game_level " + game_level) + " ") + game_stage);
if (game_level <= 4) {
_root.gotoAndStop("initial");
} else {
win_game();
}
if (game_level <= 4) {
play_music("music_bg" + game_level, true);
}
} else {
lose_game();
}
}
function create_stage() {
bg.removeMovieClip();
game_ui.removeMovieClip();
var _local2 = this.attachMovie("bg", "bg", 1);
_local2.bg.gotoAndStop(game_level);
_local2.step.gotoAndStop(((game_level - 1) * 5) + game_stage);
mission_end_count = 100;
var _local3 = this.attachMovie("Ui_infer", "game_ui", 2);
gotoAndStop ("gaming");
}
function create_monsters(type, x, y) {
var _local5 = this.bg.getNextHighestDepth();
var _local4 = this.bg.createEmptyMovieClip("snow_shine" + _local5, _local5);
_local4._x = x;
_local4._y = y - 20;
var i = 1;
while (i <= 4) {
var _local3 = _local4.attachMovie("snow", "snow" + i, i);
_local3.gotoAndStop(4);
_local3.angle = (i * 90) * 0.01745;
_local3._x = 30 * Math.sin(_local3.angle);
_local3._y = 30 * Math.cos(_local3.angle);
i++;
}
_local4.distance = 30;
_local4.onEnterFrame = function () {
if (!_root.game_paused) {
this.distance = this.distance - 2;
for (i in this) {
this[i]._rotation = this[i]._rotation + 20;
this[i]._x = this.distance * Math.sin(this[i].angle);
this[i]._y = this.distance * Math.cos(this[i].angle);
}
if (this.distance == 10) {
var _local3 = this._parent.getNextHighestDepth();
var monster_mc = this._parent.attachMovie("monster" + type, (("monster_" + type) + "_") + _local3, _local3);
monster_mc._x = this._x;
monster_mc._y = this._y + 20;
monster_mc.swapDepths(this);
monster_mc.stop();
monster_mc.mc.stop();
monster_mc.count = 0;
monster_mc._xscale = 2.5;
monster_mc._yscale = 2.5;
monster_mc.type = type;
var _local4 = new Color(monster_mc);
_local4.setTransform(shine_Transform2);
if (this.cross_step != undefined) {
monster_mc.cross_step = this.cross_step;
}
monster_mc.onEnterFrame = function () {
if (!_root.game_paused) {
this.count = this.count + 2;
monster_mc._xscale = 2.5 * this.count;
monster_mc._yscale = 2.5 * this.count;
if (this.count == 40) {
var _local3 = new Color(this);
_local3.setTransform(_root.shine_Transform1);
this.mc.play();
delete this.onEnterFrame;
if (this.typ == "land") {
land_monsterAI(this);
} else if (this.typ == "fly") {
fly_monsterAI(this);
} else {
_root["bossAI" + game_level](this);
}
}
}
};
} else if (this.distance < 0) {
this._alpha = Math.round(((40 + this.distance) / 40) * 100);
if (this.distance == -10) {
for (i in this) {
this[i].gotoAndStop(3);
}
} else if (this.distance == -20) {
for (i in this) {
this[i].gotoAndStop(2);
}
} else if (this.distance == -30) {
for (i in this) {
this[i].gotoAndStop(1);
}
} else if (this.distance == -40) {
this.removeMovieClip();
}
}
}
};
return(_local4);
}
function create_big_snow(where, what, small, large) {
this.bg.hit_snow.removeMovieClip();
var _local7 = this.bg.getNextHighestDepth();
var _local4 = this.bg.createEmptyMovieClip("hit_snow" + _local7, _local7);
_local4._x = where._x;
_local4._y = where._y;
_local4.distance = small;
var i = 1;
while (i <= 4) {
var _local3 = _local4.attachMovie("snow", "snow" + i, i);
_local3.gotoAndStop(what);
_local3.angle = (i * 90) * 0.01745;
_local3._x = small * Math.sin(_local3.angle);
_local3._y = small * Math.cos(_local3.angle);
i++;
}
_local4.onEnterFrame = function () {
if (!_root.game_paused) {
for (i in this) {
this[i]._rotation = this[i]._rotation + 20;
this[i]._x = this.distance * Math.sin(this[i].angle);
this[i]._y = this.distance * Math.cos(this[i].angle);
}
this._alpha = Math.round((1 - (this.distance / large)) * 100);
this.distance = this.distance + 3;
if (this.distance > large) {
for (i in this) {
this[i].removeMovieClip();
}
if (this.myMission != undefined) {
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((--mission_end_count) < 0) {
this.myMission();
this.removeMovieClip();
}
}
};
} else {
this.removeMovieClip();
}
}
}
};
return(_local4);
}
function create_land_snow(where) {
var _local2 = bg.getNextHighestDepth();
var _local1 = bg.attachMovie("land_snow", "land_snow" + _local2, _local2);
_local1._x = where._x;
_local1._y = where._y;
}
function snow_down(where) {
where.wind_dir = 1;
var _local4 = 0;
while (_local4 <= 25) {
var _local3 = where.getNextHighestDepth();
var _local2 = where.attachMovie("snow", "snow" + _local3, _local3);
_local2.speed = random(3) + 3;
_local2._x = random(600) - 50;
_local2._y = random(400);
_local2.gotoAndStop(random(4) + 1);
_local2.onEnterFrame = function () {
this._x = this._x + 1;
this._y = this._y + this.speed;
this._rotation = this._rotation + this.speed;
if ((this._x > 580) or (this._y > 420)) {
this.gotoAndStop(random(4) + 1);
this.speed = random(3) + 3;
this._x = random(600) - 50;
this._y = -random(-100);
}
};
_local4++;
}
}
function add_presents(where, typ, num) {
var _local4 = bg.getNextHighestDepth();
var _local3 = bg.attachMovie("presents", "presents" + _local4, _local4);
_local3.living = true;
_local3.typ = typ;
_local3._x = Math.round(where._x);
_local3._y = Math.round(where._y);
_local3.special_array = ["power", "range", "life", "speed", "cchest"];
_local3.come_out = function () {
if (typ == "fromChest") {
this.typ = "presents";
this.gotoAndStop(num);
} else if ((typ == "presents") and random(3)) {
this.gotoAndStop(num);
} else {
this.typ = this.special_array[random(5)];
this.gotoAndStop(this.typ);
}
play_sound("present_out");
var xspeed = (random(20) - random(20));
this.onEnterFrame = function () {
if (!_root.game_paused) {
moveAction(this, xspeed, -11 - random(this._y / 35));
if (this.states == "stand") {
this.find_player();
if (this.typ == "cchest") {
this.health = 10;
this.to_die = function () {
if (this.health > 0) {
this.gotoAndStop("ochest");
this.health--;
if (this.health > 0) {
add_presents(this, "fromChest", random(10) + 1);
} else {
this.onEnterFrame = function () {
if (!_root.game_paused) {
this._alpha = this._alpha - 5;
if (this._alpha < 5) {
this.removeMovieClip();
}
}
};
}
}
};
}
}
}
};
};
_local3.find_player = function () {
this.exist_count = 0;
this.find_count = 0;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.exist_count) > 80) {
var _local3 = this.exist_count % 2;
if (_local3) {
this._alpha = 50;
} else {
this._alpha = 100;
}
if (this.exist_count > 130) {
this.removeMovieClip();
}
}
if (this.hitTest(bg.santa.g)) {
this._alpha = 100;
if (this.typ == "presents") {
game_score = game_score + Number(this.score);
adjust_score(_root.game_ui);
this.gotoAndStop("score");
play_sound("bonus_sound");
} else if (this.typ == "power") {
if (game_power < 2) {
game_power = 2;
this.gotoAndStop(this.typ + "_out");
play_sound("upgrade");
} else {
game_score = game_score + Number(this.score);
adjust_score(_root.game_ui);
this.gotoAndStop("score");
play_sound("bonus_sound");
}
} else if (this.typ == "range") {
if (game_range < 20) {
game_range = 20;
this.gotoAndStop(this.typ + "_out");
play_sound("upgrade");
} else {
game_score = game_score + Number(this.score);
adjust_score(_root.game_ui);
this.gotoAndStop("score");
play_sound("bonus_sound");
}
} else if (this.typ == "life") {
if (game_life < 10) {
game_life++;
adjust_life(_root.game_ui);
this.gotoAndStop(this.typ + "_out");
play_sound("upgrade");
} else {
game_score = game_score + Number(this.score);
adjust_score(_root.game_ui);
this.gotoAndStop("score");
play_sound("bonus_sound");
}
} else if (this.typ == "speed") {
if (game_speed < 6) {
game_speed = 6;
this.gotoAndStop(this.typ + "_out");
play_sound("upgrade");
} else {
game_score = game_score + Number(this.score);
adjust_score(_root.game_ui);
this.gotoAndStop("score");
play_sound("bonus_sound");
}
} else if (this.typ == "cchest") {
game_score = game_score + Number(this.score);
adjust_score(_root.game_ui);
this.gotoAndStop("score");
play_sound("bonus_sound");
}
this._x = bg.santa._x;
this.onEnterFrame = function () {
if (!_root.game_paused) {
this._y = this._y - 2;
if ((++this.find_count) == 20) {
this.removeMovieClip();
}
}
};
}
}
};
};
_local3.show_score = function (which) {
var _local5 = 100000 + this.score;
var _local4 = this.score.toString().length;
if (which > _local4) {
this["num" + which]._visible = 0;
} else {
var _local3 = Number(_local5.toString().slice(6 - which, 7 - which));
this["num" + which].gotoAndStop(_local3 + 1);
}
};
_local3.come_out();
return(_local3);
}
function adjust_life(where) {
if (game_life > 10) {
where.life.gotoAndStop(10);
} else if ((game_life > 0) and (game_life <= 10)) {
where.life.gotoAndStop(game_life);
} else {
where.life._visible = 0;
}
}
function adjust_score(where) {
var _local1 = 100000000 + game_score;
var _local10 = Number(_local1.toString().slice(8, 9)) + 1;
var _local9 = Number(_local1.toString().slice(7, 8)) + 1;
var _local8 = Number(_local1.toString().slice(6, 7)) + 1;
var _local7 = Number(_local1.toString().slice(5, 6)) + 1;
var _local6 = Number(_local1.toString().slice(4, 5)) + 1;
var _local5 = Number(_local1.toString().slice(3, 4)) + 1;
var _local4 = Number(_local1.toString().slice(2, 3)) + 1;
var _local3 = Number(_local1.toString().slice(1, 2)) + 1;
where.num1.gotoAndStop(_local10);
where.num10.gotoAndStop(_local9);
where.num100.gotoAndStop(_local8);
where.num1000.gotoAndStop(_local7);
where.num10000.gotoAndStop(_local6);
where.num100000.gotoAndStop(_local5);
where.num1000000.gotoAndStop(_local4);
where.num10000000.gotoAndStop(_local3);
}
function adjust_boss(where) {
if (game_stage <= 4) {
where.boss.swapDepths(1000);
where.boss.removeMovieClip();
} else {
var _local3 = this[("game_boss" + game_level) + "_health"];
if (_local3 > 0) {
where.boss.gotoAndStop(this[("game_boss" + game_level) + "_health"]);
} else {
where.boss._visible = 0;
}
}
}
function adjust_time(where) {
if (game_stage <= 4) {
game_time = 60;
} else {
game_time = 99;
}
where.time10.gotoAndStop(Math.floor(game_time / 10) + 1);
where.time1.gotoAndStop((game_time - (Math.floor(game_time / 10) * 10)) + 1);
where.time_count = 0;
where.onEnterFrame = function () {
if (!_root.game_paused) {
if (monsters_exist > 0) {
if ((++this.time_count) == 80) {
this.time_count = 0;
if (game_time > 0) {
game_time--;
if (game_time >= 0) {
this.time10.gotoAndStop(Math.floor(game_time / 10) + 1);
this.time1.gotoAndStop((game_time - (Math.floor(game_time / 10) * 10)) + 1);
}
if (game_time == 0) {
create_big_snow(bg.santa, 4, 8, 100);
bg.santa.gotoAndStop("hit");
bg.santa.onEnterFrame = function () {
if (!_root.game_paused) {
this._alpha = this._alpha - 1;
if (this._alpha <= 0) {
next_game();
delete this.onEnterFrame;
}
}
};
}
}
} else if (game_time < 10) {
var _local3 = new Color(this.time10);
var _local4 = new Color(this.time1);
if ((this.time_count % 2) == 0) {
_local3.setTransform(shine_Transform2);
_local4.setTransform(shine_Transform2);
} else {
_local3.setTransform(shine_Transform1);
_local4.setTransform(shine_Transform1);
}
}
}
}
};
}
function win_game() {
bg.removeMovieClip();
game_ui.removeMovieClip();
play_music("music_win", true);
gotoAndStop ("win");
}
function lose_game() {
bg.removeMovieClip();
game_ui.removeMovieClip();
play_music("music_lose", false);
music_lose.onSoundComplete = function () {
play_music("music_op", true);
};
gotoAndStop ("lose");
}
function init_control_btns(where) {
where.play_btn.gotoAndStop(1);
where.play_btn.onPress = function () {
play_sound("button_sound");
this._y++;
if (monsters_exist > 0) {
if (game_paused) {
for (var _local2 in bg) {
if (bg[_local2].living) {
if (bg[_local2].attack != undefined) {
bg[_local2].mc.play();
}
}
}
game_paused = false;
this.gotoAndStop(1);
} else {
for (var _local2 in bg) {
if (bg[_local2].living) {
if (bg[_local2].attack != undefined) {
bg[_local2].mc.stop();
}
}
}
game_paused = true;
this.gotoAndStop(2);
}
}
};
where.play_btn.onRelease = (where.play_btn.onReleaseOutside = function () {
this._y--;
});
if (game_music) {
where.sound_btn.gotoAndStop(1);
} else {
where.sound_btn.gotoAndStop(2);
}
where.sound_btn.onPress = function () {
play_sound("button_sound");
this._y++;
if (game_music) {
game_music = false;
stopAllSounds();
this.gotoAndStop(2);
} else {
game_music = true;
music_resume = true;
play_music(now_music, true);
this.gotoAndStop(1);
}
};
where.sound_btn.onRelease = (where.sound_btn.onReleaseOutside = function () {
this._y--;
});
where.play_btn.enabled = false;
where.sound_btn.enabled = false;
}
function moveAction(who, xspeed, yspeed) {
if (who.yspeed == undefined) {
who.yspeed = yspeed;
}
var _local3 = false;
if (who.yspeed >= 0) {
if (who.cross_step > 0) {
who.cross_step--;
} else if (who.living) {
if (bg.step.hitTest(who._x, who._y + 15, true)) {
if (!bg.step.hitTest(who._x, who._y - 15, true)) {
_local3 = true;
adjustY(who, bg.step);
}
}
} else if (bg.step.hitTest(who._x, who._y + 45, true)) {
if (!bg.step.hitTest(who._x, who._y + 15, true)) {
_local3 = true;
adjustY(who, bg.step);
}
}
}
if (_local3 and (who.yspeed >= 0)) {
who.states = "stand";
delete who.yspeed;
}
if ((!_local3) or (who.yspeed < 0)) {
if (who.yspeed < 10) {
who.yspeed = who.yspeed + 0.75;
}
who._y = who._y + who.yspeed;
if (who._y > (400 + who._height)) {
who._y = 0;
}
who.states = "jump";
}
who.hit_ground = _local3;
var _local4 = false;
if (who.attack != undefined) {
if (who.living) {
if (bg.step.hitTest(who._x + xspeed, who._y - 15, true)) {
_local4 = true;
}
} else if (bg.step.hitTest(who._x + xspeed, who._y, true)) {
_local4 = true;
}
}
if (_local4) {
who.get_blocked();
} else if (who.states == "stand") {
if (((who._x + xspeed) > 20) and ((who._x + xspeed) < 530)) {
who._x = who._x + xspeed;
}
} else if (((who._x + (xspeed / 2)) > 20) and ((who._x + (xspeed / 2)) < 530)) {
who._x = who._x + (xspeed / 2);
}
who.hit_blocks = _local4;
if (who.living) {
var _local6 = false;
if (bg.step.hitTest(who._x, who._y - 65, true)) {
if (!bg.step.hitTest(who._x, who._y - 85, true)) {
_local6 = true;
}
}
who.can_jump = _local6;
var _local5 = false;
if (bg.step.hitTest(who._x, who._y + 15, true)) {
if (!bg.step.hitTest(who._x, who._y + 30, true)) {
_local5 = true;
}
}
if (who._y < stage_down_max) {
who.can_down = _local5;
}
var _local7 = false;
if (!bg.step.hitTest(who._x + xspeed, who._y + 15, true)) {
_local7 = true;
}
who.ahead_down = _local7;
}
if (who.attack != undefined) {
if (who.living) {
if (who.g.hitTest(bg.santa.g)) {
bg.santa.to_die();
}
}
}
}
function adjustY(who, where) {
if (who.living) {
var _local4 = 0;
} else {
var _local4 = 30;
}
var _local3 = 5;
while (_local3 >= 1) {
if (!where.hitTest(who._x, ((who._y + _local4) + _local3) - 1, true)) {
who._y = who._y + _local3;
} else {
_local3--;
}
}
var _local2 = 5;
while (_local2 >= 1) {
if (where.hitTest(who._x, (who._y + _local4) - _local2, true)) {
who._y = who._y - _local2;
} else {
_local2--;
}
}
}
function land_monsterAI(who) {
who.speed = -2;
who.states = "stand";
who.living = true;
who.turn = function () {
if (this.states == "stand") {
this.gotoAndStop("turn");
this.onEnterFrame = function () {
if (!_root.game_paused) {
if (this.mc._currentframe == this.mc._totalframes) {
this._xscale = this._xscale * -1;
this.move_me();
}
}
};
}
};
who.get_blocked = function () {
if (this.living) {
if (random(2)) {
this.jump(1);
} else {
this.turn();
}
}
};
who.jump = function (how) {
this.gotoAndStop("jump");
if (how == -1) {
this.onEnterFrame = function () {
if (!_root.game_paused) {
moveAction(this, 0, -12);
if (who.states == "stand") {
create_land_snow(this);
this.move_me();
}
}
};
} else if (how == 1) {
this.cross_step = 5;
this.onEnterFrame = function () {
if (!_root.game_paused) {
moveAction(this, 0, 1);
if (who.states == "stand") {
create_land_snow(this);
this.move_me();
}
}
};
}
};
who.move_me = function () {
this.gotoAndStop("walk");
if (!this.init) {
this.init = true;
this._xscale = (1 - (random(2) * 2)) * 100;
}
this.onEnterFrame = function () {
if (!_root.game_paused) {
moveAction(this, (this.speed * this._xscale) / 100, 0);
if ((who._x + ((this.speed * this._xscale) / 100)) > stage_max) {
who.turn();
} else if ((who._x + ((this.speed * this._xscale) / 100)) < stage_min) {
who.turn();
} else if (who.hit_blocks) {
who.turn();
} else if (who.ahead_down) {
if (random(3)) {
who.turn();
}
}
if (who.states == "stand") {
if (!random(80)) {
if (who.can_jump) {
who.jump(-1);
}
} else if (!random(120)) {
if (who.can_down) {
who.jump(1);
}
} else if (!random(60)) {
if (this.attack) {
who.attacking();
}
}
}
}
};
};
who.attacking = function () {
this.gotoAndStop("attack");
this.action_count = 0;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) > 35) {
this.move_me();
} else if (who.mc.weapon.hitTest(bg.santa.g)) {
bg.santa.to_die();
}
}
};
};
who.to_die = function () {
if (this.living) {
who.gotoAndStop("hit");
who.freeze_count = 0;
if (who.iceball == undefined) {
who.attachMovie("iceball", "iceball", this.getNextHighestDepth());
who.iceball.gotoAndStop(1);
who.onEnterFrame = function () {
if (!_root.game_paused) {
if (this.living) {
this.freeze_count++;
if (this.freeze_count == 100) {
this.freeze_count = 0;
if (this.iceball._currentframe > 1) {
this.iceball.prevFrame();
this.mc.play();
} else {
this.iceball.removeMovieClip();
this.move_me();
}
}
}
}
};
} else if (game_power == 1) {
if (who.iceball._currentframe < 5) {
who.iceball.nextFrame();
} else {
who.iceball.gotoAndStop(6);
who.mc.stop();
}
} else if (game_power == 2) {
if (who.iceball._currentframe < 4) {
who.iceball.gotoAndStop(who.iceball._currentframe + 3);
} else {
who.iceball.gotoAndStop(6);
who.mc.stop();
}
}
}
};
who.monster_dead = function () {
monsters_exist--;
var _local5 = bg.getNextHighestDepth();
var _local4 = bg.attachMovie("hit_dead_snow", "hit_dead_snow" + _local5, _local5);
_local4._x = this._x;
_local4._y = this._y;
create_big_snow(this, 3, 10, 80)._y = create_big_snow(this, 3, 10, 80)._y - 30;
var _local3 = random(this.type + 2) + 1;
if (_local3 > 8) {
_local3 = 8;
}
game_score = game_score + (100 * this.type);
adjust_score(_root.game_ui);
if (this.living) {
add_presents(this, "presents", _local3);
}
this.removeMovieClip();
};
who.move_me();
}
function fly_monsterAI(who) {
who.speed = 1;
who.states = "stand";
who.living = true;
who.turn = function () {
this.gotoAndStop("turn");
this.onEnterFrame = function () {
if (!_root.game_paused) {
if (this.mc._currentframe == this.mc._totalframes) {
this._xscale = this._xscale * -1;
this.move_me();
}
}
};
};
who.move_me = function () {
this.gotoAndStop("walk");
if (!this.init) {
this.init = true;
this._xscale = (1 - (random(2) * 2)) * 100;
}
this.onEnterFrame = function () {
if (!_root.game_paused) {
this._x = this._x + ((this.speed * (bg.santa._x - this._x)) / Math.abs(bg.santa._x - this._x));
this._y = this._y + ((this.speed * (bg.santa._y - this._y)) / Math.abs(bg.santa._y - this._y));
if (this._xscale == 100) {
if ((bg.santa._x - this._x) > 5) {
this.turn();
}
} else if (this._xscale == -100) {
if ((bg.santa._x - this._x) < 5) {
this.turn();
}
}
if (this.g.hitTest(bg.santa.g)) {
bg.santa.to_die();
}
if (!random(60)) {
this.attacking();
}
}
};
};
who.attacking = function () {
this.gotoAndStop("attack");
this.action_count = 0;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) > 35) {
this.move_me();
} else if (who.mc.weapon.hitTest(bg.santa.g)) {
bg.santa.to_die();
}
}
};
};
who.to_die = function () {
if (this.living) {
who.gotoAndStop("hit");
who.freeze_count = 0;
if (who.iceball == undefined) {
who.attachMovie("iceball", "iceball", this.getNextHighestDepth());
who.iceball.gotoAndStop(1);
who.onEnterFrame = function () {
if (!_root.game_paused) {
if (this.living) {
this.freeze_count++;
if (this.freeze_count == 100) {
this.freeze_count = 0;
if (this.iceball._currentframe > 1) {
this.iceball.prevFrame();
this.mc.play();
} else {
this.iceball.removeMovieClip();
this.move_me();
}
}
}
}
};
} else if (game_power == 1) {
if (who.iceball._currentframe < 5) {
who.iceball.nextFrame();
} else {
who.iceball.gotoAndStop(6);
who.mc.stop();
}
} else if (game_power == 2) {
if (who.iceball._currentframe < 4) {
who.iceball.gotoAndStop(who.iceball._currentframe + 3);
} else {
who.iceball.gotoAndStop(6);
who.mc.stop();
}
}
}
};
who.monster_dead = function () {
monsters_exist--;
var _local5 = bg.getNextHighestDepth();
var _local4 = bg.attachMovie("hit_dead_snow", "hit_dead_snow" + _local5, _local5);
_local4._x = this._x;
_local4._y = this._y;
create_big_snow(this, 3, 10, 80)._y = create_big_snow(this, 3, 10, 80)._y - 30;
var _local3 = random(this.type + 2) + 1;
if (_local3 > 8) {
_local3 = 8;
}
game_score = game_score + (100 * this.type);
adjust_score(_root.game_ui);
if (this.living) {
add_presents(this, "presents", _local3);
}
this.removeMovieClip();
};
who.move_me();
}
function create_player() {
var _local8 = bg.getNextHighestDepth();
var _local5 = bg.attachMovie("santa", "santa", _local8);
_local5._x = 75;
_local5._y = 375;
_local5.speed_rate = 0;
_local5.living = true;
_local5.unbreak = false;
_local5.attack = true;
_local5.to_die = function () {
if (!this.unbreak) {
game_life--;
adjust_life(_root.game_ui);
game_power = org_game_power;
game_range = org_game_range;
game_speed = org_game_speed;
play_sound("santa_hit" + random(2));
this.gotoAndStop("hit");
unbreakAction(this);
this.die_count = 0;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.die_count) >= 20) {
this.die_count = 0;
if (game_life > 0) {
this.gotoAndStop("stand");
this.doing = false;
this.gaming();
} else {
create_big_snow(this, 4, 8, 100);
this.onEnterFrame = function () {
if (!_root.game_paused) {
this._alpha = this._alpha - 3;
if (this._alpha <= 0) {
next_game();
delete this.onEnterFrame;
}
}
};
}
}
}
};
}
};
_local5.gaming = function () {
this.onEnterFrame = function () {
if (!_root.game_paused) {
gameControl(this);
}
};
};
_local5.gaming();
var _local4 = bg.step.Ma;
var _local6 = _local4.length;
monsters_exist = _local6;
monster_all = monsters_exist;
var _local3 = 0;
while (_local3 < _local6) {
create_monsters(_local4[_local3][0], _local4[_local3][1], _local4[_local3][2]);
_local3++;
}
_local8 = bg.getNextHighestDepth();
var _local7 = bg.attachMovie("show_levels", "show_levels", _local8);
_local7.stop();
_local7.onEnterFrame = function () {
if (next_stage == undefined) {
this.play();
delete this.onEnterFrame;
}
};
}
function unbreakAction(who) {
who.unbreak = true;
if (game_life > 0) {
var _local3 = who.createEmptyMovieClip("unbreakMC", who.getNextHighestDepth());
_local3.unbreak_start = 0;
_local3.onEnterFrame = function () {
if (!_root.game_paused) {
this.unbreak_start++;
var _local3 = this.unbreak_start % 10;
if (_local3 < 5) {
this._parent._alpha = 60;
} else {
this._parent._alpha = 100;
}
if (this.unbreak_start > 150) {
this._parent._alpha = 100;
this._parent.unbreak = false;
this.removeMovieClip();
}
}
};
}
}
function gameControl(who) {
if (!who.get_hit) {
if (Key.isDown(Acode)) {
key_AD_Action(who, -1);
} else if (Key.isDown(Dcode)) {
key_AD_Action(who, 1);
} else {
normalAction_AD(who);
}
if (Key.isDown(Jcode)) {
if (!Jcode_pressed) {
Jcode_pressed = true;
key_J_Action(who);
}
} else {
Jcode_pressed = false;
}
if (Key.isDown(Wcode)) {
if (!Wcode_pressed) {
Wcode_pressed = true;
key_W_Action(who);
}
} else {
Wcode_pressed = false;
if (Key.isDown(Scode)) {
if (!Scode_pressed) {
Scode_pressed = true;
key_S_Action(who);
}
} else {
Scode_pressed = false;
}
}
}
playerMove(who, game_speed * who.speed_rate, 0);
}
function playerMove(who, xspeed, yspeed) {
if (who.yspeed == undefined) {
who.yspeed = yspeed;
}
var _local3 = false;
if (who.yspeed >= 0) {
if (who.cross_step > 0) {
who.cross_step--;
} else if (bg.step.hitTest(who._x, who._y + 15, true)) {
if (!bg.step.hitTest(who._x, who._y - 15, true)) {
_local3 = true;
adjustY(who, bg.step);
}
}
}
if (_local3 and (who.yspeed >= 0)) {
who.states = "stand";
delete who.yspeed;
}
if ((!_local3) or (who.yspeed < 0)) {
who.states = "jump";
if (who.yspeed < 10) {
who.yspeed = who.yspeed + 0.75;
}
who._y = who._y + who.yspeed;
if (who._y > (400 + who._height)) {
who._y = 0;
}
}
var _local4 = false;
if (bg.step.hitTest(who._x + (xspeed * 2), who._y, true)) {
if (bg.step.hitTest(who._x + xspeed, who._y - 30, true)) {
_local4 = true;
}
}
if (!_local4) {
if (((who._x + xspeed) > 10) and ((who._x + xspeed) < 540)) {
who._x = who._x + xspeed;
}
}
}
function key_W_Action(who) {
if (who.states == "stand") {
if (who._currentframe != 25) {
who.doing = true;
who.yspeed = -11;
who.gotoAndStop("jump");
play_sound("jump");
}
}
}
function key_S_Action(who) {
if (who._y < stage_down_max) {
if (who.states == "stand") {
if (who._currentframe != 25) {
who.doing = true;
who.cross_step = 5;
who.yspeed = 1;
who.gotoAndStop("jump");
play_sound("jump");
}
}
}
}
function key_AD_Action(who, dir) {
who._xscale = dir * 100;
who.speed_rate = dir;
if (!who.doing) {
if (who.states == "stand") {
if (who._currentframe != 9) {
who.gotoAndStop("move");
}
} else if (who.states == "jump") {
if (who._currentframe != 25) {
who.gotoAndStop("jump");
}
}
}
}
function normalAction_AD(who) {
who.speed_rate = 0;
if (!who.doing) {
if (who.states == "stand") {
if (who._currentframe != 1) {
create_land_snow(who, 2);
who.gotoAndStop("stand");
}
} else if (who.states == "jump") {
if (who._currentframe != 25) {
who.gotoAndStop("jump");
}
}
}
}
function key_J_Action(who) {
var _local2 = false;
for (var _local3 in bg) {
if (bg[_local3].living) {
if (bg[_local3].iceball._currentframe == 6) {
if (bg[_local3].iceball.hitTest(who.g)) {
who.doing = true;
who.gotoAndStop("kick");
play_sound("santa_kick");
create_big_snow(who, 2, 8, 80);
rollAction(bg[_local3], who._xscale / 100);
_local2 = true;
break;
}
}
}
}
if (!_local2) {
if (who._currentframe != 17) {
who.doing = true;
who.gotoAndStop("shoot");
} else if (who.ready) {
who.mc.gotoAndPlay(2);
}
}
}
function shootAction(where, point) {
play_sound("shoot_sound");
var _local5 = bg.getNextHighestDepth();
var _local3 = bg.attachMovie("shoot", "shoot", _local5);
_local3._xscale = where._xscale;
_local3._x = get_map_point(point)[0];
_local3._y = get_map_point(point)[1];
if (game_power > 1) {
_local3._xscale = _local3._xscale * 1.5;
_local3._yscale = _local3._yscale * 1.5;
}
_local3.shoot_count = 0;
_local3.xspeed = game_range;
_local3.yspeed = 0;
_local3.onEnterFrame = function () {
if (!_root.game_paused) {
if (this.can_go) {
if ((this._x < 0) or (this._x > 550)) {
this.removeMovieClip();
} else if ((++this.shoot_count) > 7) {
if (this.shined) {
this.play();
} else {
this.shined = true;
var _local4 = new Color(this);
_local4.setTransform(shine_Transform2);
}
} else {
this.yspeed = this.yspeed + 0.75;
this._x = this._x + ((this.xspeed * this._xscale) / 100);
this._y = this._y + this.yspeed;
this._rotation = this._rotation + (this._xscale / 20);
for (var _local3 in bg) {
if (bg[_local3].g.hitTest(this._x, this._y, true)) {
if (bg[_local3]._name != "santa") {
bg[_local3].to_die();
create_big_snow(this, 1, 8, 40);
this.removeMovieClip();
break;
}
}
}
}
}
}
};
}
function rollAction(who, dir) {
if (who.living) {
who.living = false;
who.mc.stop();
who.dir = dir;
who.speed = 12;
who.mc._y = who.mc._y + 30;
who.iceball._y = who.iceball._y + 30;
who._y = who._y - 30;
who.hit_count = 0;
who.kill_count = 0;
who.explode = function () {
this.mc._visible = 0;
this.iceball.play();
var _local5 = create_big_snow(this, 4, 10, 80);
if (monsters_exist <= 1) {
_local5.myMission = function () {
next_game();
};
}
delete this.onEnterFrame;
if (game_stage <= 4) {
add_presents(this, "presents", 8 + this.kill_count);
if (this.kill_count >= (monster_all - 1)) {
var _local4 = bg.attachMovie("presents", "level_presents", bg.getNextHighestDepth());
_local4._x = 275;
_local4._y = -10;
_local4.gotoAndStop("cbox");
_local4.yspeed = 3;
_local4.find_count = 0;
_local4.show_score = function (which) {
var _local5 = 100000 + this.score;
var _local4 = this.score.toString().length;
if (which > _local4) {
this["num" + which]._visible = 0;
} else {
var _local3 = Number(_local5.toString().slice(6 - which, 7 - which));
this["num" + which].gotoAndStop(_local3 + 1);
}
};
_local4.onEnterFrame = function () {
if (!_root.game_paused) {
if (this.hitTest(bg.santa.g)) {
game_score = game_score + Number(this.score);
adjust_score(_root.game_ui);
this.gotoAndStop("score");
play_sound("bonus_sound");
this.onEnterFrame = function () {
if (!_root.game_paused) {
this._y = this._y - 2;
if ((++this.find_count) == 20) {
this.removeMovieClip();
}
}
};
} else {
this.yspeed = this.yspeed + 1;
this._y = this._y + this.yspeed;
if (this._y > 275) {
this.gotoAndStop("obox");
create_big_snow(this, 2, 5, 50);
mission_end_count = mission_end_count + 50;
var _local3 = 0;
while (_local3 <= 10) {
add_presents(this, "presents", random(13) + 1);
_local3++;
}
this.onEnterFrame = function () {
if ((--this._alpha) < 5) {
this.removeMovieClip();
}
};
}
}
}
};
}
} else {
add_presents(this, "presents", random(8) + 1);
}
};
who.onEnterFrame = function () {
if (!_root.game_paused) {
moveAction(this, this.dir * this.speed, 0);
this._rotation = this._rotation + (this.dir * 30);
var _local4 = false;
if (this.hit_blocks) {
_local4 = true;
} else if ((this._x + (this.dir * this.speed)) < 30) {
_local4 = true;
} else if ((this._x + (this.dir * this.speed)) > 520) {
_local4 = true;
}
if (_local4) {
this.dir = this.dir * -1;
if (this._y > stage_down_max) {
this.hit_count = this.hit_count + 3;
} else {
this.hit_count++;
}
play_sound("ball_hit");
}
if (this.hit_count >= 5) {
this.explode();
} else {
for (var _local3 in bg) {
if ((bg[_local3].attack != undefined) and bg[_local3].living) {
if ((bg[_local3]._name != this._name) and (bg[_local3]._name != "santa")) {
if (bg[_local3].g.hitTest(this.iceball)) {
bg[_local3].monster_dead();
play_sound("ball_crash");
if (bg[_local3].typ != "boss") {
this.kill_count++;
} else {
this.explode();
}
break;
}
}
}
}
}
}
};
}
}
function get_map_point(which) {
if (which != undefined) {
var _local1 = new Object();
_local1.x = which._x;
_local1.y = which._y;
which._parent.localToGlobal(_local1);
var _local2 = [];
_local2[0] = _local1.x;
_local2[1] = _local1.y;
return(_local2);
}
}
function bossAI1(who) {
who.states = "stand";
who.living = true;
who.xspeed = -6;
who.blood = game_boss1_health;
who.attack = true;
who.typ = "boss";
who.turn = function () {
this.xspeed = this.xspeed * -1;
};
who.get_blocked = function () {
if (this.living) {
this.turn();
}
};
who.stand = function () {
this.gotoAndStop("stand");
this.action_count = 0;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) == 30) {
if (monsters_exist <= 1) {
this.summon();
} else if (!random(2)) {
this.move_me();
} else {
this.jump();
}
}
}
};
};
who.jump = function () {
this.gotoAndStop("jump");
this.cross_step = 25;
this.onEnterFrame = function () {
if (!_root.game_paused) {
moveAction(this, 0, -20);
if (this.states == "stand") {
create_land_snow(this);
if (!random(2)) {
this.move_me();
} else {
this.stand();
}
}
}
};
};
who.move_me = function () {
this.gotoAndStop("walk");
this.action_count = 0;
this.onEnterFrame = function () {
if (!_root.game_paused) {
moveAction(this, this.xspeed, 0);
if ((this._x + this.xspeed) > stage_max) {
this.turn();
} else if ((this._x + this.xspeed) < stage_min) {
this.turn();
} else if (this.hit_blocks) {
this.turn();
}
if (this.states == "stand") {
if ((++this.action_count) == 150) {
this.stand();
}
}
}
};
};
who.summon = function () {
this.gotoAndStop("summon");
this.action_count = 0;
create_monsters(random(3) + 1, 90, -100 - random(100));
create_monsters(random(3) + 1, 270, -100 - random(100));
create_monsters(random(3) + 1, 450, -100 - random(100));
monsters_exist = monsters_exist + 3;
monster_all = monsters_exist;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) > 50) {
if (!random(2)) {
this.move_me();
} else {
this.jump();
}
}
}
};
};
who.monster_dead = function () {
delete this.onEnterFrame;
if ((--this.blood) > 0) {
this.action_count = 0;
this.gotoAndStop("hit");
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) > 30) {
this.move_me();
}
}
};
} else {
monsters_exist--;
boss_all_kill();
mission_end_count = mission_end_count + 50;
var _local3 = 0;
while (_local3 <= 10) {
add_presents(this, "presents", random(13) + 1);
_local3++;
}
this.gotoAndStop("die");
}
_root[("game_boss" + game_level) + "_health"] = this.blood;
adjust_boss(_root.game_ui);
};
who.stand();
}
function boss_all_kill() {
play_music("music_win", true);
for (var _local1 in bg) {
if (bg[_local1].typ != "boss") {
if (bg[_local1]._name != "santa") {
if (bg[_local1].attack != undefined) {
if (bg[_local1].living) {
bg[_local1].monster_dead();
}
}
}
}
}
}
function bossAI2(who) {
who.states = "stand";
who.living = true;
who.xspeed = -3;
who.blood = game_boss2_health;
who.attack = true;
who.typ = "boss";
who.turn = function () {
this.xspeed = this.xspeed * -1;
};
who.get_blocked = function () {
if (this.living) {
this.turn();
}
};
who.stand = function () {
this.gotoAndStop("stand");
this.action_count = 0;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) == 30) {
if (monsters_exist <= 1) {
this.summon();
} else if (!random(2)) {
this.move_me();
} else {
this.attacking();
}
}
}
};
};
who.move_me = function () {
this.gotoAndStop("walk");
this.onEnterFrame = function () {
if (!_root.game_paused) {
moveAction(this, this.xspeed, 0);
if ((this._x + this.xspeed) > (stage_max - 50)) {
this.turn();
} else if ((this._x + this.xspeed) < (stage_min + 50)) {
this.turn();
} else if (this.hit_blocks) {
this.turn();
}
if (this.states == "stand") {
if (Math.abs(this._x - bg.santa._x) < 20) {
this.attacking();
} else if (!random(250)) {
this.stand();
}
}
}
};
};
who.attacking = function () {
this.gotoAndStop("attack");
this.action_count = 0;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) > 43) {
this.stand();
}
}
};
};
who.attackAction = function () {
var _local4 = bg.getNextHighestDepth();
var _local3 = bg.attachMovie("iceball", "boss2iceball_" + _local4, _local4);
_local3._x = this._x;
_local3._y = this._y - 80;
_local3.gotoAndStop(4);
_local3.onEnterFrame = function () {
if (!_root.game_paused) {
if (this.hitTest(bg.santa.g)) {
bg.santa.to_die();
this.gotoAndPlay(7);
delete this.onEnterFrame;
}
this._y = this._y + 25;
if (this._y > 500) {
this.removeMovieClip();
}
}
};
};
who.summon = function () {
this.gotoAndStop("summon");
this.action_count = 0;
create_monsters(random(5) + 1, 34, 58);
create_monsters(random(5) + 1, 516, 58);
create_monsters(random(5) + 1, 108, 130);
create_monsters(random(5) + 1, 443, 130);
monsters_exist = monsters_exist + 4;
monster_all = monsters_exist;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) > 44) {
this.stand();
}
}
};
};
who.monster_dead = function () {
delete this.onEnterFrame;
if ((--this.blood) > 0) {
this.action_count = 0;
this.gotoAndStop("hit");
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) > 30) {
this.move_me();
}
}
};
} else {
monsters_exist--;
boss_all_kill();
mission_end_count = mission_end_count + 50;
var _local3 = 0;
while (_local3 <= 10) {
add_presents(this, "presents", random(13) + 1);
_local3++;
}
this.gotoAndStop("die");
}
_root[("game_boss" + game_level) + "_health"] = this.blood;
adjust_boss(_root.game_ui);
};
who.stand();
}
function bossAI3(who) {
who.states = "stand";
who.living = true;
who.blood = game_boss3_health;
who.attack = true;
who.typ = "boss";
who.stand_array = [[275, 123], [72, 103], [485, 103]];
who.stand = function () {
this.gotoAndStop("stand");
this.action_count = 0;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) == 50) {
if (monsters_exist <= 1) {
this.summon();
} else {
this.kiss();
}
}
}
};
};
who.kiss = function () {
this.gotoAndStop("attack");
this.action_count = 0;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if (this.g.hitTest(bg.santa.g)) {
bg.santa.to_die();
}
if ((++this.action_count) > 35) {
this.move_me();
}
}
};
};
who.move_me = function () {
this.gotoAndStop("fly");
if (this.attack) {
this.target_x = bg.santa._x;
this.target_y = bg.santa._y + 15;
this.onEnterFrame = function () {
if (!_root.game_paused) {
this._x = this._x + ((this.target_x - this._x) / 20);
this._y = this._y + ((this.target_y - this._y) / 20);
if (this.g.hitTest(bg.santa.g)) {
bg.santa.to_die();
}
if (Math.abs(this.target_y - this._y) < 5) {
this.attack = false;
this.move_me();
}
}
};
} else {
var _local3 = this.stand_array[random(3)];
this.target_x = _local3[0];
this.target_y = _local3[1];
this.onEnterFrame = function () {
if (!_root.game_paused) {
this._x = this._x + ((this.target_x - this._x) / 20);
this._y = this._y + ((this.target_y - this._y) / 20);
if (this.g.hitTest(bg.santa.g)) {
bg.santa.to_die();
}
if (Math.abs(this.target_x - this._x) < 5) {
if (Math.abs(this.target_y - this._y) < 5) {
this.attack = true;
this.stand();
}
}
}
};
}
};
who.summon = function () {
this.gotoAndStop("summon");
this.action_count = 0;
create_monsters(random(6) + 1, 90, 230 + random(120));
create_monsters(random(6) + 1, 180, 230 + random(120));
create_monsters(random(6) + 1, 270, 230 + random(120));
create_monsters(random(6) + 1, 360, 230 + random(120));
create_monsters(random(6) + 1, 450, 230 + random(120));
monsters_exist = monsters_exist + 5;
monster_all = monsters_exist;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) > 50) {
this.stand();
}
}
};
};
who.monster_dead = function () {
delete this.onEnterFrame;
if ((--this.blood) > 0) {
this.action_count = 0;
this.gotoAndStop("hit");
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) > 30) {
this.attack = false;
this.move_me();
}
}
};
} else {
monsters_exist--;
boss_all_kill();
mission_end_count = mission_end_count + 50;
var _local3 = 0;
while (_local3 <= 10) {
add_presents(this, "presents", random(13) + 1);
_local3++;
}
this.gotoAndStop("die");
}
_root[("game_boss" + game_level) + "_health"] = this.blood;
adjust_boss(_root.game_ui);
};
who.stand();
}
function bossAI4(who) {
who.states = "stand";
who.living = true;
who.blood = game_boss4_health;
who.attack = true;
who.typ = "boss";
who.stand = function () {
this.gotoAndStop("stand");
this.action_count = 0;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) == 50) {
if (monsters_exist <= 1) {
this.summon();
} else if (!random(2)) {
this.move_me();
} else {
this.tracing();
}
}
}
};
};
who.move_me = function () {
this.gotoAndStop("move");
this.action_count = 0;
this.onEnterFrame = function () {
if (!_root.game_paused) {
this.action_count++;
if (this.action_count == 5) {
this._alpha = 40;
} else if (this.action_count == 15) {
this._alpha = 0;
this._x = random(450) + 50;
this._y = random(200) + 150;
} else if (this.action_count == 20) {
this._alpha = 40;
} else if (this.action_count == 30) {
this._alpha = 100;
this.stand();
}
}
};
};
who.tracing = function () {
this.gotoAndStop("trace");
this.onEnterFrame = function () {
if (!_root.game_paused) {
if (this.g.hitTest(bg.santa.g)) {
bg.santa.to_die();
}
this._x = this._x + ((bg.santa._x - this._x) / 20);
this._y = this._y + (((bg.santa._y - 120) - this._y) / 20);
if (Math.abs(bg.santa._x - this._x) < 5) {
this.attacking();
}
}
};
};
who.attacking = function () {
this.gotoAndStop("attack");
this.action_count = 0;
var _local3 = bg.getNextHighestDepth();
this.mother_mc = bg.createEmptyMovieClip("boss4iceball", _local3);
this.mother_mc._x = this._x;
this.mother_mc._y = this._y - 100;
this.mother_mc.attachMovie("iceball", "iceball_1", 1);
this.mother_mc.iceball_1._x = -50;
this.mother_mc.iceball_1.gotoAndStop(5);
this.mother_mc.attachMovie("iceball", "iceball_2", 2);
this.mother_mc.iceball_2._x = 50;
this.mother_mc.iceball_2.gotoAndStop(5);
var _local4 = new Color(this.mother_mc);
_local4.setTransform(shine_Transform2);
this.mother_mc._xscale = 10;
this.mother_mc._yscale = 10;
this.mother_mc.onEnterFrame = function () {
if (!_root.game_paused) {
if (this._xscale > 100) {
this._xscale = 100;
var _local3 = new Color(this);
_local3.setTransform(shine_Transform1);
this.onEnterFrame = function () {
if (!_root.game_paused) {
if (this.hitTest(bg.santa.g)) {
bg.santa.to_die();
this.iceball_1.gotoAndPlay(7);
this.iceball_2.gotoAndPlay(7);
this.onEnterFrame = function () {
if (!_root.game_paused) {
if (this.iceball_1 == undefined) {
this.removeMovieClip();
}
}
};
}
}
this._y = this._y + 10;
if (this._y > 500) {
this.removeMovieClip();
}
};
}
this._xscale = this._xscale + 10;
this._yscale = this._yscale + 10;
}
};
this.onEnterFrame = function () {
if (!_root.game_paused) {
this.action_count++;
if (this.action_count > 32) {
this.stand();
}
}
};
};
who.summon = function () {
this.gotoAndStop("summon");
this.action_count = 0;
create_monsters(random(8) + 1, 60 + random(160), 225);
create_monsters(random(8) + 1, 340 + random(160), 225);
monsters_exist = monsters_exist + 2;
monster_all = monsters_exist;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) > 25) {
this.stand();
}
}
};
};
who.revenge = function () {
this.gotoAndStop("revenge");
this.action_count = 0;
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) > 81) {
this.stand();
}
}
};
};
who.revenging = function () {
if (random(2)) {
var _local7 = 110;
var _local8 = 0;
var _local6 = 5;
} else {
var _local7 = 50;
var _local8 = 1;
var _local6 = 10;
}
var _local4 = _local8;
while (_local4 <= _local6) {
var _local5 = bg.getNextHighestDepth();
var _local3 = bg.attachMovie("monsterboss4_weapon", "monsterboss4_weapon" + _local5, _local5);
_local3._x = _local7 * _local4;
_local3._y = -80 - random(150);
_local3.gotoAndStop(4);
_local3.onEnterFrame = function () {
if (!_root.game_paused) {
if (!this.attacked) {
if (this.hitTest(bg.santa.g)) {
this.attacked = true;
bg.santa.to_die();
}
}
this._y = this._y + 15;
if (this._y > 500) {
this.removeMovieClip();
}
}
};
_local4++;
}
};
who.monster_dead = function () {
this._alpha = 100;
delete this.onEnterFrame;
if ((--this.blood) > 0) {
this.action_count = 0;
this.gotoAndStop("hit");
this.onEnterFrame = function () {
if (!_root.game_paused) {
if ((++this.action_count) > 30) {
this.revenge();
}
}
};
} else {
monsters_exist--;
boss_all_kill();
mission_end_count = mission_end_count + 50;
var _local3 = 0;
while (_local3 <= 30) {
add_presents(this, "presents", random(13) + 1);
_local3++;
}
this.gotoAndStop("die");
}
_root[("game_boss" + game_level) + "_health"] = this.blood;
adjust_boss(_root.game_ui);
};
who.stand();
}
function play_music(what, cyc) {
if (this[what] == undefined) {
this[what] = new Sound();
this[what].attachSound(what);
}
if (game_music) {
if ((now_music != what) or music_resume) {
now_music = what;
music_resume = false;
stopAllSounds();
if (!cyc) {
this[what].start();
} else {
this[what].start(0, 999999);
}
}
}
}
function play_sound(what) {
if (this[what] == undefined) {
this[what] = new Sound();
this[what].attachSound(what);
}
if (game_music) {
this[what].stop(what);
this[what].start();
}
}
_root.score = 0;
game_score = 0;
Stage.scaleMode = "noScale";
myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;
fscommand ("trapallkeys", true);
game_paused = true;
game_music = true;
music_resume = false;
game_level = 1;
game_stage = 0;
stage_max = 525;
stage_min = 25;
stage_down_max = 325;
monsters_exist = 0;
monster_all = 0;
game_score = 0;
game_life = 10;
game_power = (org_game_power = 1);
game_range = (org_game_range = 12);
game_speed = (org_game_speed = 4);
game_boss1_health = 5;
game_boss2_health = 8;
game_boss3_health = 8;
game_boss4_health = 10;
game_time = 60;
shine_Transform1 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
shine_Transform2 = {ra:0, rb:255, ga:0, gb:255, ba:0, bb:255, aa:100, ab:0};
Acode = (org_Acode = 37);
Dcode = (org_Dcode = 39);
Wcode = (org_Wcode = 38);
Scode = (org_Scode = 40);
Jcode = (org_Jcode = 32);
Frame 27
create_stage();
Frame 34
create_player();
Frame 43
stop();
btn1.onPress = function () {
play_sound("button_sound");
};
btn1.onPress = function () {
gotoAndStop ("saveScore");
};
btn2.onPress = function () {
play_sound("button_sound");
};
btn2.onRelease = function () {
gotoAndStop ("start");
};
snow_down(bg);
Frame 51
stop();
btn1.onPress = function () {
play_sound("button_sound");
};
btn1.onPress = function () {
gotoAndStop ("saveScore");
};
btn2.onPress = function () {
play_sound("button_sound");
};
btn2.onRelease = function () {
gotoAndStop ("start");
};
snow_down(bg);
Frame 59
btn1.onRelease = function () {
gotoAndStop ("start");
};
stop();
Instance of Symbol 921 MovieClip "comHighscores" in Frame 59
//component parameters
onClipEvent (construct) {
scoreLocation = "_root.game_score";
gamename = "deepfreeze";
saveScore = true;
scoreIsTime = false;
scoreReversed = false;
negativeScoreAllowed = false;
}
Symbol 4 Button
on (release) {
getURL ("http://www.miniclip.com/", "_blank");
}
Symbol 5 MovieClip Frame 2
_parent.mcAnimation.play();
stop();
Symbol 5 MovieClip Frame 13
_parent.gotoAndPlay("preload");
stop();
Symbol 21 MovieClip Frame 1
stop();
Symbol 21 MovieClip Frame 60
Symbol 21 MovieClip Frame 121
_parent.mcBackground.play();
stop();
Symbol 26 MovieClip Frame 1
this._visible = false;
Symbol 32 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 37 MovieClip Frame 2
if (_url.indexOf("http") > -1) {
if (_parent._parent._parent.loadAdNow) {
cacheBuster = getTimer() + random(999999);
showAd = "http://www.miniclip.com/swfcontent/push/didyouknow.swf?cacheBuster" + cacheBuster;
trace("Loading ad: " + showAd);
mcAd.loadMovie(showAd);
} else {
gotoAndPlay(_currentframe - 1);
}
}
Symbol 37 MovieClip Frame 4
if ((mcAd.getBytesTotal() != 0) && (mcAd.getBytesLoaded() == mcAd.getBytesTotal())) {
gotoAndStop ("showAd");
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 37 MovieClip Frame 12
stop();
Symbol 47 MovieClip Frame 1
stop();
Symbol 47 MovieClip Frame 100
stop();
Symbol 49 MovieClip Frame 1
stop();
Symbol 49 MovieClip Frame 12
_root.play();
_root.isFinished = true;
_parent.stop();
stop();
Symbol 50 MovieClip Frame 1
loadAdNow = false;
_root.stop();
play();
Instance of Symbol 26 MovieClip "mcIntro" in Symbol 50 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 50 MovieClip Frame 2
xPos = _x;
yPos = _y;
mcBackground._x = mcBackground._x - xPos;
mcBackground._y = mcBackground._y - yPos;
mcAnimation._x = mcAnimation._x - xPos;
mcAnimation._y = mcAnimation._y - yPos;
var stageWidth = Stage.width;
var stageHeight = Stage.height;
var centerStageX = (stageWidth / 2);
var centerStageY = (stageHeight / 2);
mcBackground._width = stageWidth;
mcBackground._height = stageHeight;
mcAnimation._x = mcAnimation._x + centerStageX;
mcAnimation._y = mcAnimation._y + (centerStageY - (stageHeight / 10));
stop();
Instance of Symbol 49 MovieClip "mcLoadingAnimated" in Symbol 50 MovieClip Frame 2
onClipEvent (load) {
_visible = false;
}
Symbol 50 MovieClip Frame 3
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent == 100) {
_root.play();
stop();
} else {
loadAdNow = true;
mcLoadingAnimated._visible = true;
}
Symbol 50 MovieClip Frame 5
var loadedPercent = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (loadedPercent < 100) {
mcLoadingAnimated.mcLoading.gotoAndStop(loadedPercent);
mcLoadingAnimated.mcLoading.txtPercentLoaded1 = ("The game is loading (" + loadedPercent) + "%)";
mcLoadingAnimated.mcLoading.txtPercentLoaded2 = ("The game is loading (" + loadedPercent) + "%)";
_root.gotoAndStop(2);
gotoAndPlay(_currentframe - 1);
} else {
mcLoadingAnimated.play();
stop();
}
Symbol 68 MovieClip Frame 1
Ma = [];
Ma[0] = [1, 75, 75];
Ma[1] = [1, 468, 75];
Ma[2] = [1, 40, 225];
Ma[3] = [1, 500, 225];
Symbol 68 MovieClip Frame 2
Ma = [];
Ma[0] = [2, 275, 75];
Ma[1] = [1, 30, 150];
Ma[2] = [1, 510, 150];
Ma[3] = [1, 150, 225];
Ma[4] = [1, 510, 300];
Symbol 68 MovieClip Frame 3
Ma = [];
Ma[0] = [3, 275, 75];
Ma[1] = [2, 75, 150];
Ma[2] = [1, 475, 150];
Ma[3] = [1, 20, 225];
Ma[4] = [1, 530, 225];
Symbol 68 MovieClip Frame 4
Ma = [];
Ma[0] = [3, 205, 75];
Ma[1] = [3, 475, 75];
Ma[2] = [2, 45, 225];
Ma[3] = [2, 365, 150];
Ma[4] = [2, 445, 300];
Ma[5] = [2, 300, 375];
Symbol 68 MovieClip Frame 5
Ma = [];
Ma[0] = ["boss1", 420, 375];
Symbol 68 MovieClip Frame 6
Ma = [];
Ma[0] = [4, 165, 75];
Ma[1] = [3, 475, 75];
Ma[2] = [2, 100, 228];
Ma[3] = [2, 425, 150];
Ma[4] = [1, 300, 300];
Ma[5] = [1, 455, 375];
Symbol 68 MovieClip Frame 7
Ma = [];
Ma[0] = [4, 75, 75];
Ma[1] = [4, 475, 75];
Ma[2] = [3, 208, 150];
Ma[3] = [3, 435, 150];
Ma[4] = [1, 35, 300];
Ma[5] = [1, 500, 300];
Symbol 68 MovieClip Frame 8
Ma = [];
Ma[0] = [4, 75, 75];
Ma[1] = [4, 475, 75];
Ma[2] = [3, 250, 150];
Ma[3] = [3, 50, 225];
Ma[4] = [1, 230, 225];
Ma[5] = [1, 480, 225];
Ma[6] = [1, 410, 375];
Symbol 68 MovieClip Frame 9
Ma = [];
Ma[0] = [5, 75, 75];
Ma[1] = [4, 475, 75];
Ma[2] = [4, 250, 150];
Ma[3] = [2, 50, 225];
Ma[4] = [2, 230, 225];
Ma[5] = [1, 480, 225];
Ma[6] = [1, 480, 225];
Symbol 68 MovieClip Frame 10
Ma = [];
Ma[0] = ["boss2", 275, 205];
Symbol 68 MovieClip Frame 11
Ma = [];
Ma[0] = [6, 75, 75];
Ma[1] = [5, 475, 75];
Ma[2] = [4, 200, 150];
Ma[3] = [3, 50, 225];
Ma[4] = [2, 230, 225];
Ma[5] = [1, 515, 225];
Ma[6] = [1, 410, 375];
Symbol 68 MovieClip Frame 12
Ma = [];
Ma[0] = [6, 28, 145];
Ma[1] = [6, 228, 75];
Ma[2] = [4, 490, 75];
Ma[3] = [3, 375, 150];
Ma[4] = [2, 250, 225];
Ma[5] = [1, 188, 300];
Ma[6] = [1, 515, 375];
Symbol 68 MovieClip Frame 13
Ma = [];
Ma[0] = [6, 34, 68];
Ma[1] = [6, 515, 68];
Ma[2] = [5, 185, 175];
Ma[3] = [5, 360, 175];
Ma[4] = [2, 140, 300];
Ma[5] = [2, 495, 300];
Ma[6] = [1, 275, 375];
Symbol 68 MovieClip Frame 14
Ma = [];
Ma[0] = [6, 99, 71];
Ma[1] = [6, 475, 66];
Ma[2] = [5, 436, 325];
Ma[3] = [4, 488, 158];
Ma[4] = [3, 335, 224];
Ma[5] = [2, 222, 302];
Ma[6] = [1, 232, 150];
Symbol 68 MovieClip Frame 15
Ma = [];
Ma[0] = ["boss3", 275, 123];
Symbol 68 MovieClip Frame 16
Ma = [];
Ma[0] = [6, 75, 75];
Ma[1] = [5, 475, 75];
Ma[2] = [7, 275, 150];
Ma[3] = [7, 275, 300];
Ma[4] = [7, 107, 225];
Ma[5] = [7, 442, 225];
Symbol 68 MovieClip Frame 17
Ma = [];
Ma[0] = [2, 130, 75];
Ma[1] = [2, 255, 75];
Ma[2] = [3, 390, 75];
Ma[3] = [4, 275, 150];
Ma[4] = [4, 275, 300];
Ma[5] = [1, 150, 225];
Ma[6] = [1, 370, 225];
Ma[7] = [1, 450, 375];
Symbol 68 MovieClip Frame 18
Ma = [];
Ma[0] = [7, 66, 75];
Ma[1] = [7, 400, 75];
Ma[2] = [3, 110, 150];
Ma[3] = [4, 460, 150];
Ma[4] = [4, 165, 225];
Ma[5] = [8, 475, 225];
Ma[6] = [5, 145, 300];
Ma[7] = [5, 410, 375];
Symbol 68 MovieClip Frame 19
Ma = [];
Ma[0] = [8, 158, 45];
Ma[1] = [8, 388, 45];
Ma[2] = [3, 225, 150];
Ma[3] = [3, 350, 150];
Ma[4] = [5, 220, 250];
Ma[5] = [5, 335, 250];
Ma[6] = [7, 275, 375];
Ma[7] = [7, 487, 375];
Symbol 68 MovieClip Frame 20
Ma = [];
Ma[0] = ["boss4", 275, 130];
Symbol 110 MovieClip [monster1] Frame 1
stop();
g._visible = 0;
typ = "land";
attack = false;
speed = -2;
Symbol 139 MovieClip [monster2] Frame 1
stop();
g._visible = 0;
typ = "land";
attack = false;
speed = -3;
Symbol 182 MovieClip [monster3] Frame 1
stop();
g._visible = 0;
typ = "land";
attack = true;
Symbol 221 MovieClip Frame 6
weapon._visible = 0;
Symbol 221 MovieClip Frame 24
weapon._visible = 0;
Symbol 222 MovieClip [monster4] Frame 1
stop();
g._visible = 0;
typ = "land";
attack = true;
speed = -3;
Symbol 239 MovieClip [monster5] Frame 1
stop();
g._visible = 0;
typ = "fly";
attack = false;
Symbol 274 MovieClip Frame 11
weapon._visible = 0;
Symbol 275 MovieClip [monster6] Frame 1
stop();
g._visible = 0;
typ = "fly";
attack = true;
speed = random(2) + 1;
Symbol 323 MovieClip Frame 9
weapon._visible = 0;
Symbol 324 MovieClip [monster7] Frame 1
stop();
g._visible = 0;
typ = "land";
attack = true;
Symbol 343 MovieClip [monster8] Frame 1
stop();
g._visible = 0;
typ = "fly";
attack = false;
speed = 2;
Symbol 377 MovieClip Frame 1
_parent.ready = false;
Symbol 377 MovieClip Frame 2
_root.shootAction(_parent, point);
Symbol 377 MovieClip Frame 10
_parent.ready = true;
Symbol 377 MovieClip Frame 14
_parent.doing = false;
Symbol 384 MovieClip Frame 17
_parent.doing = false;
stop();
Symbol 385 MovieClip Frame 17
_parent.doing = false;
Symbol 389 MovieClip [santa] Frame 1
stop();
g._visible = 0;
Symbol 389 MovieClip [santa] Frame 9
g._visible = 0;
Symbol 389 MovieClip [santa] Frame 17
g._visible = 0;
Symbol 389 MovieClip [santa] Frame 25
g._visible = 0;
Symbol 389 MovieClip [santa] Frame 33
g._visible = 0;
Symbol 425 MovieClip [iceball] Frame 19
if (_parent.monster_dead != undefined) {
_parent.monster_dead();
} else {
this.removeMovieClip();
}
Symbol 446 MovieClip [shoot] Frame 2
can_go = true;
Symbol 446 MovieClip [shoot] Frame 4
stop();
Symbol 446 MovieClip [shoot] Frame 17
this.removeMovieClip();
Symbol 461 MovieClip [hit_dead_snow] Frame 15
this.removeMovieClip();
Symbol 470 MovieClip [land_snow] Frame 9
this.removeMovieClip();
Symbol 511 MovieClip Frame 85
_parent.removeMovieClip();
Symbol 512 MovieClip [monsterboss1] Frame 1
stop();
g._visible = 0;
Symbol 553 MovieClip Frame 61
_parent.revenging();
Symbol 559 MovieClip Frame 100
_parent.removeMovieClip();
Symbol 560 MovieClip [monsterboss4] Frame 1
stop();
g._visible = 0;
Symbol 584 MovieClip Frame 1
stop();
Symbol 585 MovieClip Frame 1
mc1.gotoAndStop(_root.game_level + 1);
mc2.gotoAndStop(_root.game_stage + 1);
Symbol 586 MovieClip [show_levels] Frame 1
_root.game_paused = true;
Symbol 586 MovieClip [show_levels] Frame 57
_root.game_paused = false;
_root.game_ui.play_btn.enabled = true;
_root.game_ui.sound_btn.enabled = true;
this.removeMovieClip();
Symbol 590 MovieClip [next_stage] Frame 1
_root.game_paused = true;
_root.game_ui.play_btn.enabled = false;
_root.game_ui.sound_btn.enabled = false;
Symbol 590 MovieClip [next_stage] Frame 39
_root.next_round();
Symbol 590 MovieClip [next_stage] Frame 75
this.removeMovieClip();
Symbol 660 MovieClip [presents] Frame 1
score = 100;
Symbol 660 MovieClip [presents] Frame 2
score = 200;
Symbol 660 MovieClip [presents] Frame 3
score = 300;
Symbol 660 MovieClip [presents] Frame 4
score = 400;
Symbol 660 MovieClip [presents] Frame 5
score = 500;
Symbol 660 MovieClip [presents] Frame 6
score = 600;
Symbol 660 MovieClip [presents] Frame 7
score = 700;
Symbol 660 MovieClip [presents] Frame 8
score = 800;
Symbol 660 MovieClip [presents] Frame 9
score = 5000;
Symbol 660 MovieClip [presents] Frame 10
score = 10000;
Symbol 660 MovieClip [presents] Frame 11
score = 15000;
Symbol 660 MovieClip [presents] Frame 12
score = 20000;
Symbol 660 MovieClip [presents] Frame 13
score = 50000;
Symbol 660 MovieClip [presents] Frame 17
this.show_score(5);
this.show_score(4);
this.show_score(3);
this.show_score(2);
this.show_score(1);
Symbol 660 MovieClip [presents] Frame 27
score = 1000;
Symbol 660 MovieClip [presents] Frame 33
score = 1000;
Symbol 660 MovieClip [presents] Frame 39
score = 1000;
Symbol 660 MovieClip [presents] Frame 44
score = 1000;
Symbol 660 MovieClip [presents] Frame 91
score = 1000;
Symbol 660 MovieClip [presents] Frame 106
score = 1000;
g._visible = 0;
Symbol 696 MovieClip Frame 36
_parent.attackAction();
Symbol 702 MovieClip Frame 85
_parent.removeMovieClip();
Symbol 703 MovieClip [monsterboss2] Frame 1
stop();
g._visible = 0;
Symbol 741 MovieClip Frame 94
_parent.removeMovieClip();
Symbol 742 MovieClip [monsterboss3] Frame 1
stop();
g._visible = 0;
Symbol 768 MovieClip Frame 1
stop();
Symbol 826 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 827 MovieClip [Ui_infer] Frame 1
_root.adjust_life(this);
_root.adjust_score(this);
_root.adjust_boss(this);
_root.adjust_time(this);
_root.init_control_btns(this);
Symbol 849 MovieClip Frame 1
stop();
Symbol 863 MovieClip Frame 1
stop();
Symbol 863 MovieClip Frame 14
stop();
Symbol 870 MovieClip Frame 20
stop();
Symbol 872 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 904 MovieClip Frame 1
stop();
Symbol 905 MovieClip Frame 1
_root.adjust_score(this);
Symbol 907 Button
on (release) {
getURL ("http://www.miniclip.com", "_blank");
}
Symbol 919 Button
on (release) {
gameURL = "http://www.miniclip.com/games/deep-freeze/en/";
getURL (gameURL, "_blank");
}
Symbol 921 MovieClip Frame 1
stop();