Frame 1
function CN_Game_Object() {
this.timedScreenArray = new Array();
this.depth_i = 0;
this.offScreenOffset = 700;
this.curScreen = null;
}
function CN_Timer(screen, parent, endTime) {
this.screen = screen;
this.mc = screen.mc.timer;
this.parent = parent;
this.mc.caller = this;
this.endTime = endTime * 1000;
this.active = false;
}
CN_Game_Object.prototype.Continue = function () {
if (this.curScreen != null) {
this.RemoveScreen(this.curScreen);
}
if (this.timedScreenArray.length == 0) {
gotoAndStop (7);
} else {
this.curScreen = this.timedScreenArray.shift();
this.ShowScreen(this.curScreen);
gotoAndStop (6);
}
};
CN_Game_Object.prototype.ExternalGraphicsAreLoaded = function () {
var allLoaded = true;
var i = 0;
while (i < this.timedScreenArray.length) {
if (!this.timedScreenArray[i].isLoaded) {
allLoaded = false;
break;
}
i++;
}
return(allLoaded);
};
CN_Game_Object.prototype.GetExternalParameters = function () {
if (_root.sw1 != null) {
this.timedScreenArray[0] = new Object();
this.timedScreenArray[0].path = _root.sw1;
this.timedScreenArray[0].duration = _root.sw2;
this.timedScreenArray[0].link = _root.sw4;
}
if (_root.sw5 == 1) {
var array_i = this.timedScreenArray.length;
this.timedScreenArray[array_i] = new Object();
if (_root.sw5 != 1) {
this.timedScreenArray[array_i].path = _root.sw5;
} else {
this.timedScreenArray[array_i].path = "orbitPowered/orbitPowered.swf";
}
if (_root.sw6 != null) {
this.timedScreenArray[array_i].duration = _root.sw6;
} else {
this.timedScreenArray[array_i].duration = "3";
}
if (_root.sw7 != null) {
this.timedScreenArray[array_i].link = _root.sw7;
} else {
this.timedScreenArray[array_i].link = null;
}
}
var array_i = this.timedScreenArray.length;
var next_i = 8;
while (_root["sw" + next_i] != null) {
this.timedScreenArray[array_i] = new Object();
this.timedScreenArray[array_i].path = _root["sw" + next_i];
if (_root.sw6 != null) {
this.timedScreenArray[array_i].duration = _root["sw" + (++next_i)];
} else {
this.timedScreenArray[array_i].duration = "5";
}
if (_root.sw7 != null) {
this.timedScreenArray[array_i].link = _root["sw" + (++next_i)];
} else {
this.timedScreenArray[array_i].link = null;
}
array_i++;
next_i++;
}
};
CN_Game_Object.prototype.LaunchOrbitPopup = function () {
if (_root.sw5 == 1) {
getURL ("javascript:popupOrbitCode( )");
}
};
CN_Game_Object.prototype.LoadExternalGraphic = function (screen, depth) {
_root.attachMovie("externalFileHolder", "holder" + depth, depth);
screen.mc = _root["holder" + depth];
screen.mc.caller = screen;
screen.mc.slot.loadMovie(screen.path);
};
CN_Game_Object.prototype.MainMovieIsLoaded = function () {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
return(true);
}
return(false);
};
CN_Game_Object.prototype.PreloadExternalGraphics = function () {
var i = 0;
while (i < this.timedScreenArray.length) {
this.LoadExternalGraphic(this.timedScreenArray[i], i + 1);
this.timedScreenArray[i].mc._x = this.offScreenOffset;
i++;
}
};
CN_Game_Object.prototype.RemoveScreen = function (screen) {
screen.mc.slot.unloadMovie();
screen.mc.removeMovieClip();
delete screen;
};
CN_Game_Object.prototype.ShowScreen = function (screen) {
screen.mc._x = 0;
screen.mc._y = 0;
screen.timer = new CN_Timer(screen, this, screen.duration);
screen.timer.Start();
};
CN_Game_Object.prototype.toString = function () {
return("CN_Game_Object");
};
CN_Timer.prototype.Start = function () {
this.active = true;
this.startTime = getTimer();
};
CN_Timer.prototype.Tick = function () {
if ((getTimer() - this.startTime) >= this.endTime) {
_root.EndTimerAdapter(this.parent);
this.active = false;
}
};
CN_Timer.prototype.toString = function () {
return("CN_Timer");
};
EndTimerAdapter = function (parent) {
parent.Continue();
};
myGameObject = new CN_Game_Object();
this.onEnterFrame = function () {
if (!done1) {
total = this.getBytesTotal();
loads = this.getBytesLoaded();
percent = int(loads / (total / 19));
if (loads >= total) {
} else {
(me.pic.gotoAndStop(percent));// not popped
}
((((loads == total) && (myGameObject.ExternalGraphicsAreLoaded())) && (!done1)) ? (me.pic.gotoAndPlay(20)(done1 = true)) : 0);
}
};
Frame 2
play();
Frame 3
if (myGameObject.MainMovieIsLoaded()) {
myGameObject.GetExternalParameters();
myGameObject.PreloadExternalGraphics();
play();
} else {
prevFrame();
}
Frame 4
play();
Frame 5
if (myGameObject.ExternalGraphicsAreLoaded() && (cn_ready)) {
_root.myGameObject.Continue();
} else {
prevFrame();
}
Frame 6
this._quality = "high";
Frame 7
this.gotoAndStop("instructions", 1);
this._quality = "high";
Frame 8
stop();
my_score = 0;
this._quality = "low";
Instance of Symbol 68 MovieClip in Frame 8
onClipEvent (load) {
this.holder.loadMovie((_root.trackerPath + "?id=") + new Date().valueOf());
}
Frame 10
function reset_vars() {
ground_level = new Array();
boss_dead = false;
firing_tnt = false;
firing_toilet = false;
swing = false;
firing_glue = false;
firing_banana = false;
firing_egg = false;
vel_y = 0;
jump = false;
jumping = false;
}
function create_world() {
firing_tnt = false;
firing_toilet = 0;
firing_glue = false;
firing_banana = 0;
firing_egg = false;
load_size = 0;
hero._alpha = 100;
follow._alpha = 100;
if ((level == 1) && (!load_sounds1)) {
this.createEmptyMovieClip("sounds", 1987);
loadMovie ("include/bm_sounds.swf", "sounds");
this.createEmptyMovieClip("music1", 1988);
loadMovie ("include/music1.swf", "music1");
tune = 1;
load_size = load_size + snd_sizes;
load_size = load_size + msc_sizes[0];
}
if (level == 4) {
this.createEmptyMovieClip("music2", 1989);
loadMovie ("include/music2.swf", "music2");
tune = 2;
load_size = load_size + msc_sizes[1];
}
if (level == 7) {
this.createEmptyMovieClip("music3", 1990);
loadMovie ("include/music3.swf", "music3");
tune = 3;
load_size = load_size + msc_sizes[2];
}
if (level == 1) {
my_health = 21;
interface.interface.health.gotoAndStop(my_health);
tune = 1;
}
if (level == 4) {
my_health = 21;
interface.interface.health.gotoAndStop(my_health);
tune = 2;
}
if (level == 7) {
my_health = 21;
interface.interface.health.gotoAndStop(my_health);
tune = 3;
}
if (((level == 3) || (level == 6)) || (level == 9)) {
w_crate_pos = this["w_crates" + level][this["w_crates" + level].length - 1] - 1;
}
blocks = this["composition" + level].length;
x_end = (blocks * 10) - 9;
sections = 10;
i = 0;
while (i < blocks) {
j = 0;
while (j < sections) {
ground_level.push(this[("block" + l_part[level - 1]) + this["composition" + level][i]][j]);
j++;
}
i++;
}
camera_drop = (blocks * 10) - 25;
this.createEmptyMovieClip("back_ground", 100);
back_ground.createEmptyMovieClip("back", 1);
loadMovie (("include/back" + l_part[level - 1]) + ".swf", "back_ground.back");
back = back_ground.back;
back._x = 0;
back._y = 16;
load_size = load_size + back_sizes[l_part[level - 1] - 1];
this.createEmptyMovieClip("mid_ground", 200);
mid_ground.createEmptyMovieClip("terrain", 1);
mid_ground.createEmptyMovieClip("crates", 2);
mid_ground.createEmptyMovieClip("pumpkins", 3);
mid_ground.createEmptyMovieClip("missiles", 4);
terrain = mid_ground.terrain;
pumpkins = mid_ground.pumpkins;
crates = mid_ground.crates;
missiles = mid_ground.missiles;
terrain._y = 330;
lightColour = new Color(back_ground);
lightTransform = new Object();
darkColour = new Color(mid_ground);
darkTransform = new Object();
i = 0;
while (i < blocks) {
terrain.createEmptyMovieClip("ground" + (i + 1), i + 1);
loadMovie ((("include/ground" + l_part[level - 1]) + this["composition" + level][i]) + ".swf", terrain["ground" + (i + 1)]);
terrain["ground" + (i + 1)]._x = 600 * i;
terrain["ground" + (i + 1)]._y = -330;
load_size = load_size + this["mid_sizes" + l_part[level - 1]][this["composition" + level][i] - 1];
i++;
}
if ((((((level == 1) || (level == 2)) || (level == 4)) || (level == 5)) || (level == 7)) || (level == 8)) {
terrain.attachMovie("sign", "sign", 100);
terrain.sign._y = -330 + ground_level[x_end - 1];
terrain.sign._x = x_end * grid_size;
}
this.createEmptyMovieClip("fore_ground", 1000);
fore_ground.createEmptyMovieClip("obstruction", 1);
obstruction = fore_ground.obstruction;
obstruction.createEmptyMovieClip("piece1", 1);
loadMovie ((("include/fore_ground" + l_part[level - 1]) + 1) + ".swf", obstruction.piece1);
obstruction.piece1._x = 1500;
obstruction.piece1._y = -330;
obstruction.createEmptyMovieClip("piece2", 2);
loadMovie ((("include/fore_ground" + l_part[level - 1]) + 2) + ".swf", obstruction.piece2);
obstruction.piece2._x = 3000;
obstruction.piece2._y = -330;
temp_int = (l_part[level - 1] - 1) * 2;
load_size = load_size + fore_sizes[temp_int];
load_size = load_size + fore_sizes[temp_int + 1];
mid_ground.createEmptyMovieClip("billy", 299);
billy = mid_ground.billy;
billy._x = 216;
billy._y = ground_level[3];
mid_ground.createEmptyMovieClip("mandy", 300);
mandy = mid_ground.mandy;
mandy._x = 216;
mandy._y = ground_level[3];
pumpkin_amount = this["pumpkins" + level].length;
pumpkin_info = new Array();
p = 1;
while (p <= pumpkin_amount) {
p_type = this["pumpkins" + level][p - 1][0];
p_position = this["pumpkins" + level][p - 1][1];
pumpkins.attachMovie("pumpkin" + p_type, "pumpkin" + p, p);
pumpkins["pumpkin" + p]._x = (p_position * grid_size) - (grid_size * 0.5);
pumpkins["pumpkin" + p]._y = -100;
pumpkins["pumpkin" + p].id = p;
p++;
}
crate_amount = this["w_crates" + level].length;
crate_positions = new Array();
cr_lev = 0;
c = 1;
while (c <= crate_amount) {
cr_lev++;
cx_position = this["w_crates" + level][c - 1];
cy_position = ground_level[cx_position - 1];
crates.attachMovie("crate", "crate" + cr_lev, cr_lev);
crates["crate" + cr_lev]._x = ((cx_position - 1) * grid_size) + (grid_size * 0.5);
crates["crate" + cr_lev]._y = cy_position;
crate_positions[cr_lev - 1] = [crates["crate" + cr_lev]._x, crates["crate" + cr_lev]._y, 1];
c++;
}
crate_amount = this["h_crates" + level].length;
c = 1;
while (c <= crate_amount) {
cr_lev++;
cx_position = this["h_crates" + level][c - 1];
cy_position = ground_level[cx_position - 1];
crates.attachMovie("crate", "crate" + cr_lev, cr_lev);
crates["crate" + cr_lev]._x = ((cx_position - 1) * grid_size) + (grid_size * 0.5);
crates["crate" + cr_lev]._y = cy_position;
crates["crate" + cr_lev].gotoAndStop(2);
crate_positions[cr_lev - 1] = [crates["crate" + cr_lev]._x, crates["crate" + cr_lev]._y, 2];
c++;
}
stop_play = false;
if ((level > 1) && (!lost_life)) {
((me_id == "billy") ? (billy.swapDepths(mandy.getDepth())) : 0);
this[me_id + "_weapon"] = temp_me_weapon;
this[you_id + "_weapon"] = temp_you_weapon;
mandy._y = ground_level[3];
billy._y = ground_level[3];
hero.attachMovie(me_id + "_walk", "body", 1);
follow.attachMovie(you_id + "_walk", "body", 1);
follow.body.stop();
y_speed = 0;
}
if ((level == 1) && (!lost_life)) {
lives = 3;
follow = billy;
hero = mandy;
you_id = "billy";
me_id = "mandy";
hero.attachMovie(me_id + "_walk", "body", 1);
follow.attachMovie(you_id + "_walk", "body", 1);
follow.body.stop();
this[me_id + "_weapon"] = weapons[0];
this[you_id + "_weapon"] = weapons[3];
interface.interface.weapon.mandy.gotoAndStop(mandy_weapon);
interface.interface.weapon.billy.gotoAndStop(billy_weapon);
interface.interface.health.gotoAndStop(21);
y_speed = 0;
}
if (lost_life) {
my_health = 21;
((me_id == "billy") ? (billy.swapDepths(mandy.getDepth())) : 0);
this[me_id + "_weapon"] = temp_me_weapon;
this[you_id + "_weapon"] = temp_you_weapon;
interface.interface.health.gotoAndStop(21);
hero.attachMovie(me_id + "_walk", "body", 1);
follow.attachMovie(you_id + "_walk", "body", 1);
follow.body.stop();
lost_life = false;
}
drop_c = 0;
}
function start_up() {
create_world();
walk_frame = 1;
siythe_adj = 20 * (this[me_id + "_weapon"] == "siythe");
level_ended = false;
history_x = new Array(history_time);
history_y = new Array(history_time);
history_ani = new Array(history_time);
history_frame = new Array(history_time);
}
function snd(name) {
sounds.play_sound(name);
}
function msc(option) {
this["music" + tune].gotoAndStop(option + 1);
}
function play_again() {
tune = 1;
interface.removeMovieClip();
delete_mcs();
_root.gotoAndStop("instructions", 1);
}
function delete_mcs() {
screen_over.removeMovieClip();
back_ground.removeMovieClip();
mid_ground.removeMovieClip();
fore_ground.removeMovieClip();
}
function level_end() {
temp_me_weapon = this[me_id + "_weapon"];
temp_you_weapon = this[you_id + "_weapon"];
stop_play = true;
level++;
this.createEmptyMovieClip("loader", 10002);
loader.attachMovie("loader", "loader", 1);
loader.loader.gotoAndStop(level);
delete_mcs();
reset_vars();
}
function health(h_amount, bash) {
if ((((stun > 0) && (my_health > 1)) && (!swap_ani)) && (!stop_play)) {
my_health = my_health - h_amount;
interface.interface.health.gotoAndStop(my_health);
if (bash != undefined) {
snd("hit");
potential = -bash;
x_speed = -bash;
jump = true;
vel_y = spring * 0.2;
stun = -31;
}
}
if (((my_health <= 1) && (lives > 1)) && (!stop_play)) {
interface.interface.health.gotoAndStop(1);
new_life();
}
if (((my_health <= 1) && (lives == 1)) && (!stop_play)) {
interface.interface.health.gotoAndStop(1);
game_over();
}
}
function new_life() {
if (!stop_play) {
snd("life");
this.attachMovie("fade", "fade", 2000);
fade.fnct = "new_life";
fade._alpha = 0;
swing = false;
hero.body.gotoAndStop(1);
stop_play = true;
potential = 0;
x_speed = 0;
lives--;
interface.interface.lives.nextFrame();
temp_me_weapon = this[me_id + "_weapon"];
temp_you_weapon = this[you_id + "_weapon"];
lost_life = true;
}
}
function game_over() {
if (!stop_play) {
this.attachMovie("fade", "fade", 2000);
fade.fnct = "game_over";
fade._alpha = 0;
swing = false;
hero.body.gotoAndStop(1);
stop_play = true;
potential = 0;
x_speed = 0;
lives--;
interface.interface.lives.nextFrame();
lost_life = true;
}
}
function y_trim() {
vel_y = 0;
jump = false;
jumping = false;
y_speed = 0;
hero._y = my_level;
if (swing && (!lost_life)) {
swing = false;
hero.attachMovie(me_id + "_jump", "body", 1);
stop_play = false;
}
}
function fire() {
fire_key_down = true;
if ((this[me_id + "_weapon"] == "tnt") && (!firing_tnt)) {
snd("throw");
missile_level++;
firing_tnt = true;
missiles.attachMovie("tnt", "tnt" + missile_level, missile_level);
missiles["tnt" + missile_level]._x = (-terrain._x) + hero._x;
missiles["tnt" + missile_level]._y = hero._y - 20;
}
if ((this[me_id + "_weapon"] == "toilet") && (firing_toilet < 4)) {
snd("throw");
missile_level++;
firing_toilet++;
missiles.attachMovie("toilet", "toilet" + missile_level, missile_level);
missiles["toilet" + missile_level]._x = (-terrain._x) + hero._x;
missiles["toilet" + missile_level]._y = hero._y - 20;
}
if (((this[me_id + "_weapon"] == "siythe") && (!swing)) && (hero_ani == "walk")) {
snd("siythe");
hero.attachMovie(me_id + "_swing", "body", 1);
swing = true;
stop_play = true;
hero.body.s_type = "walk";
key_left = (key_right = 0);
}
if (((this[me_id + "_weapon"] == "siythe") && (!swing)) && (hero_ani == "jump")) {
snd("siythe");
hero.attachMovie(me_id + "_swing", "body", 1);
swing = true;
stop_play = true;
hero.body.s_type = "jump";
}
if ((this[me_id + "_weapon"] == "glue") && (!firing_glue)) {
snd("throw");
missile_level++;
firing_glue = true;
missiles.attachMovie("glue", "glue" + missile_level, missile_level);
missiles["glue" + missile_level]._x = (-terrain._x) + hero._x;
missiles["glue" + missile_level]._y = hero._y - 20;
}
if ((this[me_id + "_weapon"] == "banana") && (firing_banana < 4)) {
snd("throw");
missile_level++;
firing_banana++;
missiles.attachMovie("banana", "banana" + missile_level, missile_level);
missiles["banana" + missile_level]._x = (-terrain._x) + hero._x;
missiles["banana" + missile_level]._y = hero._y - 20;
}
if ((this[me_id + "_weapon"] == "egg") && (!firing_egg)) {
snd("throw");
missile_level++;
firing_egg = true;
missiles.attachMovie("egg", "egg" + missile_level, missile_level);
missiles["egg" + missile_level]._x = (-terrain._x) + hero._x;
missiles["egg" + missile_level]._y = hero._y - 20;
}
}
function from_swing(s_type) {
if (s_type == "walk") {
swing = false;
hero.attachMovie(me_id + "_walk", "body", 1);
stop_play = false;
}
if (s_type == "jump") {
swing = false;
hero.attachMovie(me_id + "_jump", "body", 1);
stop_play = false;
}
}
function glue_explode(e_x, e_y, e_d) {
missiles.attachMovie("glue_explode", "glue_explode" + e_d, e_d);
missiles["glue_explode" + e_d]._x = e_x;
missiles["glue_explode" + e_d]._y = e_y;
}
function banana_split(e_x, e_y, e_d) {
missiles.attachMovie("banana_split", "banana_split" + e_d, e_d);
missiles["banana_split" + e_d]._x = e_x;
missiles["banana_split" + e_d]._y = e_y;
}
function make_explosion(e_x, e_y, e_d) {
missiles.attachMovie("explosion", "explosion" + e_d, e_d);
missiles["explosion" + e_d]._x = e_x;
missiles["explosion" + e_d]._y = e_y;
}
function smash_egg(e_x, e_y, e_d) {
missiles.attachMovie("egg_explode", "egg_explode" + e_d, e_d);
missiles["egg_explode" + e_d]._x = e_x;
missiles["egg_explode" + e_d]._y = e_y;
}
function blow_up_pumpkin(b_x, b_y, b_d, scr) {
pumpkins["pumpkin" + b_d].removeMovieClip();
if (!boss_dead) {
pumpkins.attachMovie("smash", "smash" + b_d, b_d);
} else {
pumpkins.attachMovie("boss_smash", "smash" + b_d, b_d);
}
pumpkins["smash" + b_d]._x = b_x;
pumpkins["smash" + b_d]._y = b_y;
pumpkin_info[b_d - 1] = "dead";
pumpkin_info[b_d - 1] = "dead";
add_score(scr);
}
function swap_weapons() {
w_count = w_count + ((w_count < weapons.length) - ((weapons.length - 1) * (w_count == weapons.length)));
weapon = weapons[w_count - 1];
w_swapped = true;
}
function toggle_camera() {
((camera_on == true) ? ((camera_on = false)) : ((camera_on = true)));
}
function swap() {
snd("switch");
if (hero == billy) {
hero = mandy;
follow = billy;
me_id = "mandy";
you_id = "billy";
} else {
hero = billy;
follow = mandy;
me_id = "billy";
you_id = "mandy";
}
billy.swapDepths(mandy.getDepth());
interface.interface.player.play();
interface.interface.weapon.play();
swapped = true;
ticky.stop();
}
function found_item(s_cr) {
if ((s_cr == 1) && (((((level == 3) || (level == 6)) || (level == 9)) && (my_cord < w_crate_pos)) || (((level != 3) && (level != 7)) && (level != 7)))) {
new_weapon = this[me_id + "_weapon"];
w_select = false;
while (!w_select) {
rnd = int(Math.random() * 6);
new_weapon = weapons[rnd];
if ((this[me_id + "_weapon"] != new_weapon) && (this[you_id + "_weapon"] != new_weapon)) {
w_select = true;
}
}
this[me_id + "_weapon"] = new_weapon;
interface.interface.weapon.mandy.gotoAndStop(mandy_weapon);
interface.interface.weapon.billy.gotoAndStop(billy_weapon);
}
special_weapon = end_weapons[level];
if (((((level == 3) || (level == 6)) || (level == 9)) && (s_cr == 1)) && (my_cord == w_crate_pos)) {
if ((this[me_id + "_weapon"] != special_weapon) && (this[you_id + "_weapon"] != special_weapon)) {
this[me_id + "_weapon"] = special_weapon;
} else {
new_weapon = this[me_id + "_weapon"];
w_select = false;
while (!w_select) {
rnd = int(Math.random() * 6);
new_weapon = weapons[rnd];
if ((this[me_id + "_weapon"] != new_weapon) && (this[you_id + "_weapon"] != new_weapon)) {
w_select = true;
}
}
this[me_id + "_weapon"] = new_weapon;
}
interface.interface.weapon.mandy.gotoAndStop(mandy_weapon);
interface.interface.weapon.billy.gotoAndStop(billy_weapon);
}
if (s_cr == 2) {
my_health = my_health + 12;
my_health = Math.min(21, my_health);
interface.interface.health.gotoAndStop(my_health);
}
}
function pumpkin_bits(pb_x, pb_y, pb_d) {
pumpkins.attachMovie("pumpkinbits", "bits", 100);
pumpkins.bits._x = pb_x;
pumpkins.bits._y = pb_y;
pumpkins.bits._xscale = (100 * (pb_d > 0)) - (100 * (pb_d <= 0));
}
function flash(tr, tg, tb) {
r = tr;
g = tg;
b = tb;
sr = r * 0.05;
sg = g * 0.05;
sb = b * 0.05;
flasher = true;
}
function l_light(lr, lg, lb) {
lightTransform = {ra:"100", rb:lr, ga:"100", gb:lg, ba:"100", bb:lb, aa:"100", ab:"0"};
lightColour.setTransform(lightTransform);
darkTransform = {ra:"100", rb:-lr, ga:"100", gb:-lg, ba:"100", bb:-lb, aa:"100", ab:"0"};
darkColour.setTransform(darkTransform);
}
function win_dance() {
stop_play = true;
key_left = false;
key_right = false;
potential = 0;
x_speed = 0;
mid_ground.createEmptyMovieClip("win", 301);
mid_ground.win.attachMovie("win", "win", 1);
if (me_id == "billy") {
mid_ground.win.win.gotoAndPlay(2);
} else {
mid_ground.win.win.gotoAndPlay(10);
}
mid_ground.win._x = hero._x;
mid_ground.win._y = hero._y;
hero._alpha = 0;
follow._alpha = 0;
}
function add_score(scr) {
my_score = my_score + scr;
score_length = my_score.toString().length;
((score_length == 5) ? ((score_zeros = "")) : (((score_length == 4) ? ((score_zeros = "0")) : (((score_length == 3) ? ((score_zeros = "00")) : (((score_length == 2) ? ((score_zeros = "000")) : (((score_length == 1) ? ((score_zeros = "0000")) : ((score_zeros = "00000")))))))))));
full_score = score_zeros + my_score;
s = 0;
while (s < 5) {
to = full_score.substr(s, 1);
interface.interface["s" + s].gotoAndStop(Number(to) + 1);
s++;
}
}
function skip_level() {
stop_play = true;
level_end();
}
spring = 24;
gravity = 2;
max_speed = 8;
grid_size = 60;
hero_half = 20;
camera_on = true;
level = 1;
history_time = 12;
l_part = new Array(1, 1, 1, 2, 2, 2, 3, 3, 3);
this.createEmptyMovieClip("tick", 2089);
ticky = new Sound("tick");
ticky.attachSound("tock");
reset_vars();
this.createEmptyMovieClip("loader", 10002);
loader.attachMovie("loader", "loader", 1);
loader.loader.gotoAndStop(level);
weapons = new Array("siythe", "tnt", "toilet", "banana", "glue", "egg");
block11 = new Array(-120, -120, -120, 240, 240, 240, 200, 200, 150, 150);
block12 = new Array(150, 150, 240, 240, 240, 240, 200, 200, 150, 150);
block13 = new Array(150, 150, 600, 600, 240, 240, 150, 150, 150, 150);
block14 = new Array(150, 150, 250, 150, 150, 250, 250, 150, 150, 150);
block15 = new Array(150, 150, 150, 150, 600, 230, 150, 150, 150, 150);
block16 = new Array(150, 150, 100, 100, 200, 200, 600, 150, 150, 150);
block17 = new Array(150, 150, 200, 200, 150, 150, 600, 600, 150, 150);
block18 = new Array(150, 50, -40, 150, 150, 150, 150, 150, 150, 150);
block19 = new Array(150, 150, 150, 150, 150, 150, 150, 150, 150, -140);
block110 = new Array(-140, 140);
block21 = new Array(-120, -120, -120, 250, 250, 190, 190, 190, 190, 120);
block22 = new Array(170, 170, 250, 250, 250, 190, 190, 190, 190, 120);
block23 = new Array(120, 120, 120, 170, 250, 250, 200, 200, 160, 160);
block24 = new Array(160, 160, 160, 160, 160, 160, 160, 160, 160, 160);
block25 = new Array(160, 160, 120, 120, 120, 180, 250, 250, 210, 210);
block26 = new Array(210, 260, 260, 200, 160, 160, 600, 160, 160, 210);
block27 = new Array(210, 240, 240, 170, 170, 170, 170, 170, 120, 120);
block28 = new Array(210, 110, 20, 20, 190, 190, 190, 190, 190, 190);
block29 = new Array(190, 190, 190, 190, 190, 190, 190, 190, 190, 190);
block210 = new Array(-110, -110);
block31 = new Array(-120, -120, -120, 140, 200, 200, 200, 100, 100, 200);
block32 = new Array(200, 200, 90, 140, 200, 200, 200, 100, 100, 200);
block33 = new Array(200, 220, 220, 170, 90, 200, 600, 600, 90, 200);
block34 = new Array(200, 180, 130, 130, 130, 180, 180, 180, 150, 150);
block35 = new Array(150, 150, 100, 190, 600, 250, 250, 140, 90, 150);
block36 = new Array(150, 150, 600, 200, 600, 600, 200, 150, 150, 150);
block37 = new Array(150, 600, 600, 150, 150, 600, 600, 170, 170, 200);
block38 = new Array(150, 50, 0, 0, -50, 140, 200, 200, 200, 200, 200);
block39 = new Array(200, 200, 200, 200, 200, 200, 50, 50, 50, 50);
block310 = new Array(50, 50, 50, 50, 50, 50, 50, 50, 50, 50);
mid_sizes1 = new Array(63774, 50475, 41076, 50908, 45494, 42622, 44966, 110033);
mid_sizes2 = new Array(66865, 49395, 55335, 50029, 45975, 49333, 49844, 95697);
mid_sizes3 = new Array(79298, 63700, 46369, 54305, 60690, 48673, 46209, 133208);
fore_sizes = new Array(12600, 9195, 10173, 15832, 32367, 10682);
back_sizes = new Array(41366, 42481, 57084);
snd_sizes = 77196 /* 0x012D8C */;
msc_sizes = new Array(35194, 39034, 36538);
composition1 = new Array(1, 3, 5, 6, 7, 2, 4);
pumpkins1 = new Array([2, 10], [4, 15], [2, 20], [4, 27], [3, 32], [2, 39], [3, 43], [4, 53], [4, 59]);
w_crates1 = new Array(22, 53);
h_crates1 = new Array(34, 43);
composition2 = new Array(1, 5, 7, 2, 4, 6, 3, 2);
pumpkins2 = new Array([3, 12], [2, 16], [3, 20], [4, 24], [4, 25], [2, 32], [3, 36], [4, 42], [4, 44], [2, 42], [3, 52], [3, 60], [2, 70]);
w_crates2 = new Array(24, 47);
h_crates2 = new Array(8, 43);
composition3 = new Array(1, 7, 6, 5, 2, 3, 4, 3, 8, 9, 10);
pumpkins3 = new Array([3, 10], [3, 13], [2, 20], [2, 22], [4, 28], [4, 30], [4, 32], [4, 34], [3, 39], [3, 45], [4, 49], [4, 50], [4, 51], [3, 59], [2, 65], [3, 79], [10, 100]);
w_crates3 = new Array(36, 64, 85);
h_crates3 = new Array(25, 56, 98);
composition4 = new Array(1, 3, 4, 5, 6, 7, 3, 5);
pumpkins4 = new Array([4, 13], [4, 17], [5, 26], [4, 32], [4, 35], [2, 40], [5, 54], [4, 59], [4, 62], [2, 65]);
w_crates4 = new Array(9, 44);
h_crates4 = new Array(28, 62);
composition5 = new Array(1, 3, 4, 4, 5, 6, 6, 7, 3);
pumpkins5 = new Array([5, 14], [4, 20], [4, 21], [2, 24], [2, 27], [5, 30], [5, 38], [2, 44], [4, 50], [4, 52], [2, 56], [5, 62], [5, 78]);
w_crates5 = new Array(6, 33, 65);
h_crates5 = new Array(18, 31);
composition6 = new Array(1, 3, 5, 7, 3, 5, 7, 3, 5, 8, 9, 10);
pumpkins6 = new Array([2, 7], [2, 10], [5, 16], [5, 23], [4, 29], [4, 32], [5, 39], [5, 42], [5, 52], [2, 56], [2, 61], [5, 71], [4, 82], [2, 82], [20, 110]);
w_crates6 = new Array(36, 59, 97);
h_crates6 = new Array(24, 48, 108);
composition7 = new Array(1, 3, 4, 5, 6, 7, 4, 6, 5);
pumpkins7 = new Array([2, 9], [2, 15], [3, 22], [4, 25], [4, 28], [2, 33], [5, 40], [5, 49], [1, 63], [5, 69]);
w_crates7 = new Array(12, 60);
h_crates7 = new Array(27, 37, 54);
composition8 = new Array(1, 3, 2, 4, 6, 7, 2, 3, 4, 5);
pumpkins8 = new Array([3, 12], [4, 15], [5, 25], [1, 34], [2, 44], [4, 54], [4, 58], [1, 68], [2, 76], [1, 88]);
w_crates8 = new Array(38, 65);
h_crates8 = new Array(14, 62);
composition9 = new Array(1, 2, 3, 2, 4, 6, 5, 6, 7, 4, 8, 9, 10);
pumpkins9 = new Array([4, 10], [4, 12], [4, 14], [1, 18], [4, 24], [1, 39], [4, 33], [3, 43], [3, 48], [5, 60], [5, 69], [2, 78], [2, 85], [4, 81], [1, 97], [30, 124]);
w_crates9 = new Array(30, 47, 90, 108);
h_crates9 = new Array(17, 35, 62, 115);
this.createEmptyMovieClip("interface", 10001);
interface.attachMovie("interface", "interface", 1);
end_weapons = new Array("", "", "", "toilet", "", "", "egg", "", "", "tnt");
flashColour = new Color(this);
flashTransform = new Object();
l_a = new Array([120, 120, 120], [0, 0, 0], [120, 120, 120], [0, 0, 0], [120, 120, 120], [0, 0, 0], [120, 120, 120], [0, 0, 0], [120, 120, 120], [0, 0, 0]);
this.onEnterFrame = function () {
stun++;
if (stun < 0) {
inv++;
inv = inv % 2;
hero._visible = inv;
} else {
hero._visible = 1;
}
if ((((((level == 1) || (level == 2)) || (level == 4)) || (level == 5)) || (level == 7)) || (level == 8)) {
if (((my_cord == x_end) && (x_end > 0)) && (!stop_play)) {
stop_play = true;
key_left = false;
key_right = false;
potential = 0;
x_speed = 0;
this.attachMovie("fade", "fade", 2000);
fade.fnct = "level_end";
fade._alpha = 0;
}
}
if ((((((swap_request && (x_speed == 0)) && (y_speed == 0)) && (follow._x == hero._x)) && (follow._y == hero._y)) && (!swap_ani)) && (stun > 0)) {
if (hero._xscale == 100) {
follow._xscale = 100;
} else {
follow._xscale = -100;
}
swap_ani = true;
}
if (swap_ani) {
history_frame = new Array(history_time);
frame_error = true;
stop_play = true;
temp_x = int(6 * Math.sin((float++) * 0.5));
billy.body._x = billy.body._x + temp_x;
mandy.body._x = mandy.body._x - temp_x;
temp_c++;
if (temp_c == 6) {
swap();
siythe_adj = 20 * (this[me_id + "_weapon"] == "siythe");
}
if (temp_c == 12) {
siythe_adj = 20 * (this[me_id + "_weapon"] == "siythe");
billy.body._x = 0;
mandy.body._x = 0;
swap_ani = false;
temp_c = 0;
float = 0;
stop_play = false;
swap_request = false;
frame_error = false;
}
}
history_x.push(x_speed);
history_x.shift();
history_y.push(hero._y);
history_y.shift();
history_ani.push(hero_ani);
history_ani.shift();
follow_adj = hero.body._currentframe;
if (this[me_id + "_weapon"] == "siythe") {
follow_adj = hero.body._currentframe - 20;
}
if (this[you_id + "_weapon"] == "siythe") {
follow_adj = hero.body._currentframe + 20;
}
history_frame.push(follow_adj);
history_frame.shift();
follow._x = follow._x + (history_x[0] - x_speed);
follow._y = history_y[0];
if ((history_ani[0] == "walk") && (follow_ani != "walk")) {
follow.attachMovie(you_id + "_walk", "body", 1);
follow_ani = "walk";
}
if ((history_ani[0] == "jump") && (follow_ani != "jump")) {
follow.attachMovie(you_id + "_jump", "body", 1);
follow_ani = "jump";
}
if (!frame_error) {
follow.body.gotoAndStop(history_frame[0]);
}
(((follow._xscale == 100) && (history_x[0] < 0)) ? ((follow._xscale = -100)) : 0);
(((follow._xscale == -100) && (history_x[0] > 0)) ? ((follow._xscale = 100)) : 0);
if (swing) {
i = 0;
while (i < pumpkin_amount) {
e_w = pumpkin_info[i][2] * 1.3;
e_h = pumpkin_info[i][3] * 0.54;
e_x = Math.abs(Math.abs(mid_ground.terrain._x - 216) - _root.pumpkin_info[i][0]);
e_y = Math.abs((hero._y - 30) - (_root.pumpkin_info[i][1] - e_h));
if ((((e_x < e_w) && (e_y < e_h)) && (pumpkin_positions[i] != "dead")) && (!swung_done)) {
pumpkins["pumpkin" + (i + 1)].hit(hero._xscale * 0.2, 4, 1);
swung_done = true;
}
i++;
}
}
if (!stop_play) {
key_left = Key.isDown(37) * (!left_stopper);
key_right = Key.isDown(39) * (!right_stopper);
(((Key.isDown(38) && (jumping != true)) && (!jump_pressed)) ? ((jump_pressed = true)(jump = true)(vel_y = spring)snd("jump")) : 0);
((((!Key.isDown(38)) && (!jump)) && (!jumping)) ? ((jump_pressed = false)) : 0);
}
((Key.isDown(88) && (!swapped)) ? ((swap_request = true)) : 0);
((!Key.isDown(88)) ? ((swapped = false)) : 0);
((Key.isDown(81) && (!stop_play)) ? (skip_level()) : 0);
if (swap_request && (!on_tock)) {
ticky.start(0, 9999);
on_tock = true;
}
(((Key.isDown(32) && (!fire_key_down)) && (!lost_life)) ? (fire()) : 0);
((!Key.isDown(32)) ? ((fire_key_down = false)) : 0);
i = 0;
while (i < crate_positions.length) {
my_crate_y = hero._y;
crate_xdistance = my_position - crate_positions[i][0];
crate_ydistance = my_crate_y - crate_positions[i][1];
if (((Math.abs(crate_ydistance) < 20) && (Math.abs(crate_xdistance) < 30)) && (crate_positions[i][0] != "x")) {
crates["crate" + (i + 1)].box.play();
crate_positions[i][0] = "x";
crate_positions[i][1] = "x";
found_item(crate_positions[i][2]);
crate_positions[i][2] = "x";
}
i++;
}
my_position = hero._x - terrain._x;
my_cord = Math.floor(my_position / grid_size);
left_position = (my_position + x_speed) - hero_half;
left_cord = Math.floor(left_position / grid_size);
right_position = (my_position + x_speed) + hero_half;
right_cord = Math.floor(right_position / grid_size);
my_level = ground_level[my_cord];
right_level = ground_level[right_cord];
left_level = ground_level[left_cord];
if ((my_level > left_level) && (hero._y > left_level)) {
left_stopper = true;
x_speed = 0;
potential = 0;
next_ledge = ground_level[left_cord];
}
if ((my_level > right_level) && (hero._y > right_level)) {
right_stopper = true;
x_speed = 0;
potential = 0;
next_ledge = ground_level[right_cord];
}
if (((left_stopper && (key_right)) && (!key_left)) || (left_stopper && (hero._y < next_ledge))) {
left_stopper = false;
}
if (((right_stopper && (key_left)) && (!key_right)) || (right_stopper && (hero._y < next_ledge))) {
right_stopper = false;
}
if (!lost_life) {
potential = max_speed * (key_right - key_left);
x_speed = x_speed + ((x_speed < potential) - (x_speed > potential));
}
if (key_left && (terrain._x >= 0)) {
x_speed = 0;
}
obstruction._x = obstruction._x - (x_speed * 2);
terrain._x = terrain._x - x_speed;
crates._x = (missiles._x = (pumpkins._x = terrain._x));
back._x = back._x - (x_speed * 0.025);
hero._y = hero._y - y_speed;
if (jump) {
jumping = true;
vel_y = vel_y - gravity;
y_speed = vel_y;
((((y_speed + hero._y) > (my_level + vel_y)) && (vel_y < 0)) ? (y_trim()) : 0);
}
if ((hero._y >= 600) && (!stop_play)) {
health(100, 0);
}
if ((right_level > hero._y) && (left_level > hero._y)) {
jump = true;
}
(((hero._xscale == 100) && (key_left)) ? ((hero._xscale = -100)) : 0);
(((hero._xscale == -100) && (key_right)) ? ((hero._xscale = 100)) : 0);
siythe_adj = 20 * (this[me_id + "_weapon"] == "siythe");
if (!(((x_speed == 0) && (hero_ani == "walk")) && (!swing))) {
} else {
(hero.body.gotoAndStop((walk_frame + 1) + siythe_adj));// not popped
}
if (((x_speed != 0) && (hero_ani == "walk")) && (!swing)) {
walk_frame++;
walk_frame = walk_frame % 16;
hero.body.gotoAndStop((walk_frame + 1) + siythe_adj);
}
if (((vel_y == 0) && (hero_ani != "walk")) && (!jump)) {
hero.attachMovie(me_id + "_walk", "body", 1);
hero_ani = "walk";
if (!frame_error) {
hero.body.gotoAndStop((walk_frame + 1) + siythe_adj);
}
}
if ((jump && (hero_ani != "jump")) && (!swing)) {
hero.attachMovie(me_id + "_jump", "body", 1);
hero_ani = "jump";
hero.body.gotoAndStop(1 + siythe_adj);
}
if (jump && (!swing)) {
if (vel_y < -4) {
hero.body.gotoAndStop(6 + siythe_adj);
}
}
if (camera_on) {
fore_ground_x = (-hero._xscale) * 1.2;
fore_ground_adjx = int(fore_ground_x - fore_ground._x);
((fore_ground._x < fore_ground_x) ? ((fore_ground._x = fore_ground._x + Math.abs(fore_ground_adjx * 0.05))) : ((fore_ground._x = fore_ground._x - Math.abs(fore_ground_adjx * 0.05))));
mid_ground_x = (-hero._xscale) * 0.8;
mid_ground_adjx = int(mid_ground_x - mid_ground._x);
((mid_ground._x < mid_ground_x) ? ((mid_ground._x = mid_ground._x + Math.abs(mid_ground_adjx * 0.05))) : ((mid_ground._x = mid_ground._x - Math.abs(mid_ground_adjx * 0.05))));
back_ground_x = ((-hero._xscale) * 0.1) - 40;
back_ground_adjx = int(back_ground_x - back_ground._x);
((back_ground._x < back_ground_x) ? ((back_ground._x = back_ground._x + Math.abs(back_ground_adjx * 0.05))) : ((back_ground._x = back_ground._x - Math.abs(back_ground_adjx * 0.05))));
fore_ground_y = (-(hero._y * 0.8)) + (570 + (drop_c * 0.8));
fore_ground_adjy = int(fore_ground_y - fore_ground._y);
((fore_ground._y < fore_ground_y) ? ((fore_ground._y = fore_ground._y + (4 * Math.abs(fore_ground_adjy * 0.05)))) : ((fore_ground._y = fore_ground._y - (4 * Math.abs(fore_ground_adjy * 0.05)))));
mid_ground_y = (-(hero._y * 0.4)) + (106 + (drop_c * 0.4));
mid_ground_adjy = int(mid_ground_y - mid_ground._y);
((mid_ground._y < mid_ground_y) ? ((mid_ground._y = mid_ground._y + (4 * Math.abs(mid_ground_adjy * 0.075)))) : ((mid_ground._y = mid_ground._y - (4 * Math.abs(mid_ground_adjy * 0.075)))));
back_ground_y = (-(hero._y * 0.025)) + (36 + (drop_c * 0.025));
back_ground_adjy = int(back_ground_y - back_ground._y);
((back_ground._y < back_ground_y) ? ((back_ground._y = back_ground._y + (4 * Math.abs(back_ground_adjy * 0.075)))) : ((back_ground._y = back_ground._y - (4 * Math.abs(back_ground_adjy * 0.075)))));
mid_ground._y = Math.max(0, mid_ground._y);
back_ground._y = Math.max(18, back_ground._y);
fore_ground._y = Math.max(378, fore_ground._y);
drop_adj = 180 * (((my_cord >= camera_drop) && (my_cord > 10)) && (((level == 3) || (level == 6)) || (level == 9)));
drop_c = drop_c + (3 * (drop_c < drop_adj));
}
if (flasher) {
flashTransform = {ra:"100", rb:r, ga:"100", gb:g, ba:"100", bb:b, aa:"100", ab:"0"};
flashColour.setTransform(flashTransform);
r = r - sr;
g = g - sg;
b = b - sb;
if ((r < 0) || (stop_play)) {
r = 0;
g = 0;
b = 0;
flashTransform = {ra:"100", rb:r, ga:"100", gb:g, ba:"100", bb:b, aa:"100", ab:"0"};
flashColour.setTransform(flashTransform);
flasher = false;
}
}
if ((!stop_play) && (!light_on)) {
t_rnd = int(Math.random() * 1000);
if (t_rnd == 0) {
snd("lightning");
light_on = true;
l_num = 0;
l = 0;
}
}
if (light_on) {
l++;
if (l == 2) {
l_light(l_a[l_num][0], l_a[l_num][1], l_a[l_num][2]);
l = 0;
l_num++;
}
if (l_num == 6) {
light_on = false;
}
}
};
Instance of Symbol 81 MovieClip "console" in Frame 10
onClipEvent (load) {
this.swapDepths(10000);
}
Symbol 4 MovieClip [externalFileHolder] Frame 1
stop();
Instance of Symbol 2 MovieClip "slot" in Symbol 4 MovieClip [externalFileHolder] Frame 1
onClipEvent (data) {
_parent.caller.isLoaded = true;
}
onClipEvent (mouseUp) {
if ((_parent.caller.link != null) && (this.hitTest(_xmouse, _ymouse, false))) {
getURL (_parent.caller.link, "_blank");
}
}
Instance of Symbol 3 MovieClip "timer" in Symbol 4 MovieClip [externalFileHolder] Frame 1
onClipEvent (enterFrame) {
if (caller.active) {
caller.Tick();
}
}
Symbol 15 Button
on (release) {
_root.cn_ready = true;
}
Symbol 16 MovieClip Frame 1
stop();
Symbol 16 MovieClip Frame 21
stop();
Symbol 55 MovieClip Frame 45
stop();
Symbol 64 MovieClip Frame 65
gotoAndPlay (1);
Symbol 65 Button
on (release) {
_root.nextFrame();
}
Symbol 66 MovieClip Frame 4
stop();
Symbol 74 MovieClip Frame 45
stop();
Symbol 76 Button
on (release) {
_root.gotoAndStop("game", 1);
}
Symbol 77 MovieClip Frame 3
stop();
Symbol 94 MovieClip Frame 5
gotoAndPlay (1);
Symbol 99 MovieClip Frame 45
stop();
Symbol 122 MovieClip Frame 1
my_score = _root.my_score;
score_length = my_score.toString().length;
((score_length == 5) ? ((score_zeros = "")) : (((score_length == 4) ? ((score_zeros = "0")) : (((score_length == 3) ? ((score_zeros = "00")) : (((score_length == 2) ? ((score_zeros = "000")) : (((score_length == 1) ? ((score_zeros = "0000")) : ((score_zeros = "00000")))))))))));
full_score = score_zeros + my_score;
s = 0;
while (s < 5) {
to = full_score.substr(s, 1);
this["s" + s].gotoAndStop(Number(to) + 1);
s++;
}
Symbol 123 Button
on (release) {
_root.play_again();
}
Symbol 210 MovieClip Frame 5
gotoAndPlay (1);
Symbol 316 MovieClip [screen_over] Frame 1
_root.snd("game_over");
_root.msc(0);
_root.back_ground.removeMovieClip();
_root.mid_ground.removeMovieClip();
_root.fore_ground.removeMovieClip();
Symbol 316 MovieClip [screen_over] Frame 90
stop();
Symbol 341 MovieClip [smash] Frame 1
_root.snd("ghost");
Symbol 341 MovieClip [smash] Frame 39
this.removeMovieClip();
Symbol 366 MovieClip Frame 1
angle = int(Math.random() * 360);
trans = (Math.PI/180);
x_dir = Math.cos(angle * 0.0174);
y_dir = Math.sin(angle * 0.0174);
rot = (Math.random() * 100) - 50;
part.gotoAndStop(id);
vel = 18 + int(Math.random() * 10);
this.onEnterFrame = function () {
this._rotation = this._rotation + rot;
gravity++;
vel = vel * 0.9;
this._x = this._x + (x_dir * vel);
this._y = this._y + ((y_dir * vel) + gravity);
(((_parent._y + this._y) >= 400) ? (_parent.count++this.removeMovieClip()) : 0);
};
Symbol 416 MovieClip [mandy_swing] Frame 15
_root.swung_done = false;
_root.from_swing(s_type);
Symbol 427 MovieClip [mandy_jump] Frame 5
stop();
Symbol 427 MovieClip [mandy_jump] Frame 25
stop();
Symbol 433 MovieClip [fade] Frame 1
function start_new() {
_root.createEmptyMovieClip("loader", 10002);
_root.loader.attachMovie("loader", "loader", 1);
_root.loader.loader.gotoAndStop(_root.level);
_root.delete_mcs();
_root.reset_vars();
}
function game_over() {
_root.lost_life = false;
_root.createEmptyMovieClip("screen_over", 10002);
_root.screen_over.attachMovie("screen_over", "clip", 1);
_root.interface.removeMovieClip();
}
this.onEnterFrame = function () {
if (fnct == "level_end") {
((this._alpha >= 100) ? (_root.level_end()this.removeMovieClip()) : ((this._alpha = this._alpha + 10)));
}
if (fnct == "begin_level") {
((this._alpha <= 0) ? (this.removeMovieClip()) : ((this._alpha = this._alpha - 10)));
}
if (fnct == "new_life") {
t++;
if (t >= 31) {
((this._alpha >= 100) ? (start_new()this.removeMovieClip()) : ((this._alpha = this._alpha + 10)));
}
}
if (fnct == "game_over") {
t++;
if (t >= 31) {
((this._alpha >= 100) ? (game_over()this.removeMovieClip()) : ((this._alpha = this._alpha + 10)));
}
}
};
Symbol 511 MovieClip Frame 1
stop();
Symbol 512 MovieClip Frame 63
stop();
_root.start_up();
Instance of Symbol 511 MovieClip in Symbol 512 MovieClip Frame 63
onClipEvent (enterFrame) {
load_progress = 0;
i = 0;
while (i < _root.blocks) {
load_progress = load_progress + _root.mid_ground.terrain["ground" + (i + 1)].getBytesLoaded();
i++;
}
load_progress = load_progress + _root.back_ground.back.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece1.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece2.getBytesLoaded();
if (!_root.load_sounds1) {
load_progress = load_progress + _root.sounds.getBytesLoaded();
load_progress = load_progress + _root.music1.getBytesLoaded();
}
percent = int(load_progress / (_root.load_size / 28));
if ((_root.load_size == load_progress) && (_root.load_size > 0)) {
_root.load_sounds1 = true;
_root.attachMovie("fade", "fade", 2000);
_root.fade.fnct = "begin_level";
_root.msc(1);
_parent._parent.removeMovieClip();
}
this.gotoAndStop(percent);
}
Symbol 516 MovieClip Frame 63
_root.start_up();
stop();
Instance of Symbol 511 MovieClip in Symbol 516 MovieClip Frame 63
onClipEvent (enterFrame) {
load_progress = 0;
i = 0;
while (i < _root.blocks) {
load_progress = load_progress + _root.mid_ground.terrain["ground" + (i + 1)].getBytesLoaded();
i++;
}
load_progress = load_progress + _root.back_ground.back.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece1.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece2.getBytesLoaded();
percent = int(load_progress / (_root.load_size / 28));
if ((_root.load_size == load_progress) && (_root.load_size > 0)) {
_root.attachMovie("fade", "fade", 2000);
_root.fade.fnct = "begin_level";
_root.msc(1);
_parent._parent.removeMovieClip();
}
this.gotoAndStop(percent);
}
Symbol 519 MovieClip Frame 63
_root.start_up();
stop();
Instance of Symbol 511 MovieClip in Symbol 519 MovieClip Frame 63
onClipEvent (enterFrame) {
load_progress = 0;
i = 0;
while (i < _root.blocks) {
load_progress = load_progress + _root.mid_ground.terrain["ground" + (i + 1)].getBytesLoaded();
i++;
}
load_progress = load_progress + _root.back_ground.back.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece1.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece2.getBytesLoaded();
percent = int(load_progress / (_root.load_size / 28));
if ((_root.load_size == load_progress) && (_root.load_size > 0)) {
_root.attachMovie("fade", "fade", 2000);
_root.fade.fnct = "begin_level";
_root.msc(2);
_parent._parent.removeMovieClip();
}
this.gotoAndStop(percent);
}
Symbol 524 MovieClip Frame 63
_root.start_up();
stop();
Instance of Symbol 511 MovieClip in Symbol 524 MovieClip Frame 63
onClipEvent (enterFrame) {
load_progress = 0;
i = 0;
while (i < _root.blocks) {
load_progress = load_progress + _root.mid_ground.terrain["ground" + (i + 1)].getBytesLoaded();
i++;
}
load_progress = load_progress + _root.back_ground.back.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece1.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece2.getBytesLoaded();
load_progress = load_progress + _root.music2.getBytesLoaded();
percent = int(load_progress / (_root.load_size / 28));
if ((_root.load_size == load_progress) && (_root.load_size > 0)) {
_root.load_sounds2 = true;
_root.attachMovie("fade", "fade", 2000);
_root.fade.fnct = "begin_level";
_root.msc(1);
_parent._parent.removeMovieClip();
}
this.gotoAndStop(percent);
trace("load progress = " + load_progress);
trace("load size = " + _root.load_size);
}
Symbol 525 MovieClip Frame 63
_root.start_up();
stop();
Instance of Symbol 511 MovieClip in Symbol 525 MovieClip Frame 63
onClipEvent (enterFrame) {
load_progress = 0;
i = 0;
while (i < _root.blocks) {
load_progress = load_progress + _root.mid_ground.terrain["ground" + (i + 1)].getBytesLoaded();
i++;
}
load_progress = load_progress + _root.back_ground.back.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece1.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece2.getBytesLoaded();
percent = int(load_progress / (_root.load_size / 28));
if ((_root.load_size == load_progress) && (_root.load_size > 0)) {
_root.attachMovie("fade", "fade", 2000);
_root.fade.fnct = "begin_level";
_root.msc(1);
_parent._parent.removeMovieClip();
}
this.gotoAndStop(percent);
}
Symbol 526 MovieClip Frame 63
_root.start_up();
stop();
Instance of Symbol 511 MovieClip in Symbol 526 MovieClip Frame 63
onClipEvent (enterFrame) {
load_progress = 0;
i = 0;
while (i < _root.blocks) {
load_progress = load_progress + _root.mid_ground.terrain["ground" + (i + 1)].getBytesLoaded();
i++;
}
load_progress = load_progress + _root.back_ground.back.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece1.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece2.getBytesLoaded();
percent = int(load_progress / (_root.load_size / 28));
if ((_root.load_size == load_progress) && (_root.load_size > 0)) {
_root.attachMovie("fade", "fade", 2000);
_root.fade.fnct = "begin_level";
_root.msc(2);
_parent._parent.removeMovieClip();
}
this.gotoAndStop(percent);
}
Symbol 531 MovieClip Frame 63
_root.start_up();
stop();
Instance of Symbol 511 MovieClip in Symbol 531 MovieClip Frame 63
onClipEvent (enterFrame) {
load_progress = 0;
i = 0;
while (i < _root.blocks) {
load_progress = load_progress + _root.mid_ground.terrain["ground" + (i + 1)].getBytesLoaded();
i++;
}
load_progress = load_progress + _root.back_ground.back.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece1.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece2.getBytesLoaded();
load_progress = load_progress + _root.music3.getBytesLoaded();
percent = int(load_progress / (_root.load_size / 28));
if ((_root.load_size == load_progress) && (_root.load_size > 0)) {
_root.load_sounds3 = true;
_root.attachMovie("fade", "fade", 2000);
_root.fade.fnct = "begin_level";
_root.msc(1);
_parent._parent.removeMovieClip();
}
this.gotoAndStop(percent);
}
Symbol 532 MovieClip Frame 63
_root.start_up();
stop();
Instance of Symbol 511 MovieClip in Symbol 532 MovieClip Frame 63
onClipEvent (enterFrame) {
load_progress = 0;
i = 0;
while (i < _root.blocks) {
load_progress = load_progress + _root.mid_ground.terrain["ground" + (i + 1)].getBytesLoaded();
i++;
}
load_progress = load_progress + _root.back_ground.back.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece1.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece2.getBytesLoaded();
percent = int(load_progress / (_root.load_size / 28));
if ((_root.load_size == load_progress) && (_root.load_size > 0)) {
_root.attachMovie("fade", "fade", 2000);
_root.fade.fnct = "begin_level";
_root.msc(1);
_parent._parent.removeMovieClip();
}
this.gotoAndStop(percent);
}
Symbol 533 MovieClip Frame 63
_root.start_up();
stop();
Instance of Symbol 511 MovieClip in Symbol 533 MovieClip Frame 63
onClipEvent (enterFrame) {
load_progress = 0;
i = 0;
while (i < _root.blocks) {
load_progress = load_progress + _root.mid_ground.terrain["ground" + (i + 1)].getBytesLoaded();
i++;
}
load_progress = load_progress + _root.back_ground.back.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece1.getBytesLoaded();
load_progress = load_progress + _root.fore_ground.obstruction.piece2.getBytesLoaded();
percent = int(load_progress / (_root.load_size / 28));
if ((_root.load_size == load_progress) && (_root.load_size > 0)) {
_root.attachMovie("fade", "fade", 2000);
_root.fade.fnct = "begin_level";
_root.msc(2);
_parent._parent.removeMovieClip();
}
this.gotoAndStop(percent);
}
Symbol 536 Button
on (release) {
_root.play_again();
_parent.removeMovieClip();
}
Symbol 537 MovieClip [loader] Frame 1
stop();
Instance of Symbol 513 MovieClip in Symbol 537 MovieClip [loader] Frame 1
onClipEvent (load) {
_root.snd("level_end");
_root.msc(0);
}
Symbol 537 MovieClip [loader] Frame 10
_root.interface.removeMovieClip();
_root.myGameObject.LaunchOrbitPopup();
Symbol 542 MovieClip Frame 1
stop();
Symbol 545 MovieClip Frame 1
stop();
Symbol 553 MovieClip Frame 1
stop();
_root.on_tock = false;
Symbol 553 MovieClip Frame 8
stop();
_root.on_tock = false;
Symbol 567 MovieClip Frame 1
stop();
Instance of Symbol 566 MovieClip "billy" in Symbol 567 MovieClip Frame 1
onClipEvent (load) {
this.gotoAndStop(_root.billy_weapon);
}
Symbol 567 MovieClip Frame 8
stop();
Instance of Symbol 566 MovieClip "billy" in Symbol 567 MovieClip Frame 8
onClipEvent (load) {
this.gotoAndStop(_root.billy_weapon);
}
Symbol 590 MovieClip Frame 1
stop();
Symbol 605 MovieClip Frame 1
stop();
Symbol 605 MovieClip Frame 2
_root.snd("break");
Symbol 605 MovieClip Frame 23
_parent.removeMovieClip();
Symbol 614 MovieClip Frame 1
stop();
Symbol 614 MovieClip Frame 2
_root.snd("break");
Symbol 614 MovieClip Frame 3
_root.snd("health");
Symbol 614 MovieClip Frame 22
_parent.removeMovieClip();
Symbol 615 MovieClip [crate] Frame 1
stop();
Symbol 666 MovieClip [billy_swing] Frame 15
_root.swung_done = false;
_root.from_swing(s_type);
Symbol 677 MovieClip [billy_jump] Frame 5
stop();
Symbol 677 MovieClip [billy_jump] Frame 25
stop();
Symbol 678 MovieClip [pumpkin3] Frame 1
function y_trim() {
jump = false;
jumping = false;
y_speed = 0;
this._y = my_level;
}
function hit(temp_potential, dm, sy) {
_root.snd("pumpkin1");
if (sy) {
_root.pumpkin_bits(this._x, _root.hero._y, enemy_x);
}
colour = -10;
colour = Math.max(-10, colour);
vel_y = spring * 0.3;
jump = true;
chase = false;
stun = true;
force = temp_potential * 0.7;
damage = damage + dm;
if (damage >= 4) {
_root.blow_up_pumpkin(this._x, this._y, id, 50);
}
}
function glue(temp_potential) {
route = false;
glue_mode = true;
potential = 0;
x_speed = 0;
temp_colour = glue_colour;
gc = 120;
myColor.setTransform(temp_colour);
}
function banana(temp_potential) {
route = false;
chase = false;
stun = false;
banana_mode = true;
}
this.onEnterFrame = function () {
enemy_x = (this._x + _root.pumpkins._x) - 220;
enemy_y = this._y - _root.hero._y;
if (Math.abs(enemy_x) < 400) {
my_position = this._x;
my_cord = Math.floor(my_position / grid_size);
left_position = (my_position + x_speed) - my_half;
left_cord = Math.floor(left_position / grid_size);
right_position = (my_position + x_speed) + my_half;
right_cord = Math.floor(right_position / grid_size);
my_level = ground_level[my_cord];
right_level = ground_level[right_cord];
left_level = ground_level[left_cord];
if (!banana_mode) {
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
my_y = my_level;
if (glue_mode) {
velocity = 0;
} else {
velocity = int(-(velocity * elastic));
}
}
this._y = my_y;
}
if (route && (!banana_mode)) {
max_speed = 4;
if (this._x >= (ideal + range)) {
potential = -max_speed;
this._xscale = 100;
}
if (this._x < (ideal - range)) {
potential = max_speed;
this._xscale = -100;
}
}
if (stun) {
stun_t++;
force = force * 0.7;
((((x_speed <= 0) && (my_level > left_level)) || ((x_speed >= 0) && (my_level > right_level))) ? ((force = 0)) : 0);
x_speed = force;
if (stun_t == 10) {
stun = false;
stun_t = 0;
route = true;
}
if (!glue_mode) {
temp_colour = normal_colour;
}
}
if (((left_stopper && (key_right)) && (!key_left)) || (left_stopper && (this._y < next_ledge))) {
left_stopper = false;
}
if (((right_stopper && (key_left)) && (!key_right)) || (right_stopper && (this._y < next_ledge))) {
right_stopper = false;
}
if (((my_level > left_level) && (x_speed < 0)) && (Math.abs(my_level - this._y) < 20)) {
velocity = spring;
}
if (((my_level > right_level) && (x_speed > 0)) && (Math.abs(my_level - this._y) < 20)) {
velocity = spring;
}
if (((left_level == 600) && (x_speed < 0)) && (my_level == this._y)) {
velocity = spring;
}
if (((right_level == 600) && (x_speed > 0)) && (my_level == this._y)) {
velocity = spring;
}
if (!stun) {
x_speed = x_speed + (potential > x_speed);
x_speed = x_speed - (potential < x_speed);
}
this._x = this._x + x_speed;
this._y = this._y + y_speed;
_root.pumpkin_info[id - 1][0] = this._x;
_root.pumpkin_info[id - 1][1] = this._y;
if (colour < 0) {
myColor.setTransform(hit_colour);
}
if (colour == 0) {
myColor.setTransform(temp_colour);
}
colour++;
if (glue_mode) {
glue_colour = new Object();
glue_colour = {ra:"100", rb:gc, ga:"100", gb:gc, ba:"100", bb:gc, aa:"100", ab:"0"};
gc = gc - 2;
myColor.setTransform(glue_colour);
if (gc <= 0) {
temp_colour = normal_colour;
glue_mode = false;
route = true;
if (this._xscale == -100) {
potential = max_speed;
} else {
potential = -max_speed;
}
}
}
if (banana_mode) {
if (!banana_action) {
_root.snd("banana");
vel = 16;
banana_action = true;
}
parts._rotation = parts._rotation + 10;
x_speed = 0;
vel = vel - gra;
if (this._y > 400) {
_root.blow_up_pumpkin(this._x, this._y, id);
}
this._y = this._y - vel;
}
if (((my_level == this._y) && (x_speed != 0)) && (!stun)) {
swap_image++;
swap_image = swap_image % 8;
parts.attachMovie(mode + (swap_image + 1), "chicken", 1);
}
if ((((Math.abs(enemy_x) <= 60) && (!glue_mode)) && (!stun)) && (!glue_mode)) {
mode = "c_attack";
if (!fire_on) {
this.attachMovie("c_fire", "fire", 2);
f_c = 0;
fire_on = true;
}
}
if ((Math.abs(enemy_x) > 60) || (glue_mode)) {
if (fire_on) {
fire.removeMovieClip();
fire_on = false;
}
mode = "chicken";
}
f_c++;
if ((fire_on && (!stun)) && (f_c >= 6)) {
if ((((this._xscale == 100) && (enemy_x < 60)) && (enemy_x > 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(2, 12);
}
if ((((this._xscale == -100) && (enemy_x > -60)) && (enemy_x <= 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(2, -12);
}
}
if (this._y > 400) {
_root.blow_up_pumpkin(this._x, this._y, p);
}
}
};
route = true;
myColor = new Color(this);
hit_colour = new Object();
hit_colour = {ra:"35", rb:"166", ga:"35", gb:"166", ba:"35", bb:"66", aa:"100", ab:"0"};
normal_colour = new Object();
normal_colour = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
temp_colour = normal_colour;
my_info = new Array(this._x, this._y, 70, 55);
_root.pumpkin_info[id - 1] = my_info;
gra = 2;
ideal = this._x;
range = 100;
a_n = 4;
mode = "chicken";
ground_level = _root.ground_level;
grid_size = _root.grid_size;
my_half = 26;
gravity = 200;
spring = -200;
elastic = 0.7;
max_speed = 2;
potential = -max_speed;
route = true;
this.createEmptyMovieClip("parts", 1);
parts._y = parts._y - 28;
parts.attachMovie("chicken1", "chicken", 1);
stop();
Symbol 678 MovieClip [pumpkin3] Frame 2
function y_trim() {
jump = false;
jumping = false;
y_speed = 0;
this._y = my_level;
}
function hit(temp_potential, dm, sy) {
if (sy) {
_root.pumpkin_bits(this._x, this._y, enemy_x);
}
colour = -10;
colour = Math.max(-10, colour);
vel_y = spring * 0.3;
jump = true;
chase = false;
stun = true;
force = temp_potential * 0.7;
damage = damage + dm;
if (damage >= 4) {
_root.blow_up_pumpkin(this._x, this._y, id);
}
}
function glue(temp_potential) {
route = false;
glue_mode = true;
potential = 0;
x_speed = 0;
temp_colour = glue_colour;
gc = 120;
myColor.setTransform(temp_colour);
}
function banana(temp_potential) {
route = false;
chase = false;
stun = false;
banana_mode = true;
}
this.onEnterFrame = function () {
enemy_x = (this._x + _root.pumpkins._x) - 220;
enemy_y = this._y - _root.hero._y;
my_position = this._x;
my_cord = Math.floor(my_position / grid_size);
left_position = (my_position + x_speed) - my_half;
left_cord = Math.floor(left_position / grid_size);
right_position = (my_position + x_speed) + my_half;
right_cord = Math.floor(right_position / grid_size);
my_level = ground_level[my_cord];
right_level = ground_level[right_cord];
left_level = ground_level[left_cord];
if (!banana_mode) {
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
my_y = my_level;
if (glue_mode) {
velocity = 0;
} else {
velocity = int(-(velocity * elastic));
}
}
this._y = my_y;
}
if (route && (!banana_mode)) {
max_speed = 4;
if ((my_level < left_level) && (x_speed > 0)) {
potential = -max_speed;
this._xscale = 100;
}
if ((my_level < right_level) && (x_speed < 0)) {
potential = max_speed;
this._xscale = -100;
}
}
if (stun) {
stun_t++;
force = force * 0.7;
((((x_speed <= 0) && (my_level > left_level)) || ((x_speed >= 0) && (my_level > right_level))) ? ((force = 0)) : 0);
x_speed = force;
if (stun_t == 10) {
stun = false;
stun_t = 0;
route = true;
}
if (!glue_mode) {
temp_colour = normal_colour;
}
}
if (((left_stopper && (key_right)) && (!key_left)) || (left_stopper && (this._y < next_ledge))) {
left_stopper = false;
}
if (((right_stopper && (key_left)) && (!key_right)) || (right_stopper && (this._y < next_ledge))) {
right_stopper = false;
}
if (((my_level > left_level) && (x_speed < 0)) && (Math.abs(my_level - this._y) < 20)) {
}
if (((my_level > right_level) && (x_speed > 0)) && (Math.abs(my_level - this._y) < 20)) {
}
if (((left_level == 600) && (x_speed < 0)) && (my_level == this._y)) {
velocity = spring;
}
if (((right_level == 600) && (x_speed > 0)) && (my_level == this._y)) {
velocity = spring;
}
if (!stun) {
x_speed = x_speed + (potential > x_speed);
x_speed = x_speed - (potential < x_speed);
}
this._x = this._x + x_speed;
this._y = this._y + y_speed;
_root.pumpkin_info[id - 1][0] = this._x;
_root.pumpkin_info[id - 1][1] = this._y;
if (colour < 0) {
myColor.setTransform(hit_colour);
}
if (colour == 0) {
myColor.setTransform(temp_colour);
}
colour++;
if (glue_mode) {
glue_colour = new Object();
glue_colour = {ra:"100", rb:gc, ga:"100", gb:gc, ba:"100", bb:gc, aa:"100", ab:"0"};
gc = gc - 3;
myColor.setTransform(glue_colour);
if (gc <= 0) {
temp_colour = normal_colour;
glue_mode = false;
route = true;
if (this._xscale == -100) {
potential = max_speed;
} else {
potential = -max_speed;
}
}
}
if (banana_mode) {
if (!banana_action) {
vel = 16;
banana_action = true;
}
parts._rotation = parts._rotation + 10;
x_speed = 0;
vel = vel - gra;
if (this._y > 400) {
_root.blow_up_pumpkin(this._x, this._y, id);
}
this._y = this._y - vel;
}
if (((my_level == this._y) && (x_speed != 0)) && (!stun)) {
swap_image++;
swap_image = swap_image % 8;
parts.attachMovie(mode + (swap_image + 1), "chicken", 1);
}
if ((((Math.abs(enemy_x) <= 60) && (!glue_mode)) && (!stun)) && (!glue_mode)) {
mode = "c_attack";
if (!fire_on) {
this.attachMovie("c_fire", "fire", 2);
f_c = 0;
fire_on = true;
}
}
if ((Math.abs(enemy_x) > 60) || (glue_mode)) {
if (fire_on) {
fire.removeMovieClip();
fire_on = false;
}
mode = "chicken";
}
f_c++;
if ((fire_on && (!stun)) && (f_c >= 6)) {
if ((((this._xscale == 100) && (enemy_x < 60)) && (enemy_x > 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(2, 12);
}
if ((((this._xscale == -100) && (enemy_x > -60)) && (enemy_x <= 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(2, -12);
}
}
};
route = true;
myColor = new Color(this);
hit_colour = new Object();
hit_colour = {ra:"35", rb:"166", ga:"35", gb:"166", ba:"35", bb:"66", aa:"100", ab:"0"};
normal_colour = new Object();
normal_colour = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
temp_colour = normal_colour;
my_info = new Array(this._x, this._y, 70, 55);
_root.pumpkin_info[id - 1] = my_info;
gra = 2;
ideal = this._x;
range = 100;
a_n = 4;
mode = "chicken";
ground_level = _root.ground_level;
grid_size = _root.grid_size;
my_half = 26;
gravity = 200;
spring = -200;
elastic = 0.7;
max_speed = 4;
potential = -max_speed;
route = true;
this.createEmptyMovieClip("parts", 1);
parts._y = parts._y - 28;
parts.attachMovie("chicken1", "chicken", 1);
stop();
Symbol 734 MovieClip [pumpkin4] Frame 1
function hit(temp_potential, dm, sy) {
_root.snd("pumpkin1");
if (sy) {
_root.pumpkin_bits(this._x, _root.hero._y, enemy_x);
}
colour = -10;
colour = Math.max(-10, colour);
damage = damage + dm;
if (damage >= 4) {
_root.blow_up_pumpkin(this._x, this._y, id, 100);
}
}
function glue(temp_potential) {
chase = false;
stun = false;
glue_mode = true;
temp_colour = glue_colour;
gc = 120;
myColor.setTransform(temp_colour);
}
this.onEnterFrame = function () {
enemy_x = (this._x + _root.pumpkins._x) - 220;
enemy_y = this._y - _root.hero._y;
my_position = this._x;
my_cord = Math.floor(my_position / grid_size);
my_level = ground_level[my_cord];
if (((Math.abs(enemy_x) < 370) && (!chase)) && (!stun)) {
direction = -1;
chase = true;
}
if (chase) {
x_speed = direction * max_speed;
}
if (stun) {
stun_t++;
force = force * 0.9;
x_speed = force;
if (stun_t == 10) {
stun = false;
chase = true;
stun_t = 0;
}
if (!glue_mode) {
temp_colour = normal_colour;
}
}
((Math.abs(enemy_x) < 120) ? ((the_level = _root.hero._y + (hover_height - 14))) : ((the_level = my_level)));
if (the_level == 600) {
the_level = 150;
}
ideal = the_level - hover_height;
y_speed = (ideal - this._y) * 0.05;
this._x = this._x + (x_speed * (!glue_mode));
this._y = this._y + (y_speed * (!glue_mode));
parts._y = parts._y + (Math.cos((float++) * 0.1) * (!glue_mode));
_root.pumpkin_info[id - 1][0] = this._x;
_root.pumpkin_info[id - 1][1] = this._y + 20;
if (!glue_mode) {
swap_image = swap_image + 0.5;
swap_image = swap_image & 6;
parts.attachMovie("fly" + int(swap_image + 1), "fly", 1);
}
if (colour < 0) {
myColor.setTransform(hit_colour);
}
if (colour == 0) {
myColor.setTransform(temp_colour);
}
colour++;
if (this._x < -100) {
_root.blow_up_pumpkin(this._x, this._y, id);
}
if (glue_mode) {
glue_colour = new Object();
glue_colour = {ra:"100", rb:gc, ga:"100", gb:gc, ba:"100", bb:gc, aa:"100", ab:"0"};
gc = gc - 2;
myColor.setTransform(glue_colour);
if (gc <= 0) {
temp_colour = normal_colour;
glue_mode = false;
route = true;
}
}
if ((!stun) && (!glue_mode)) {
if ((((this._xscale == 100) && (enemy_x < 60)) && (enemy_x > 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(1, 12);
}
if ((((this._xscale == -100) && (enemy_x > -60)) && (enemy_x <= 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(1, -12);
}
}
if (this._y > 400) {
_root.blow_up_pumpkin(this._x, this._y, p);
}
};
my_info = new Array(this._x, this._y, 90, 60);
_root.pumpkin_info[id - 1] = my_info;
myColor = new Color(this);
hit_colour = new Object();
hit_colour = {ra:"35", rb:"166", ga:"35", gb:"166", ba:"35", bb:"66", aa:"100", ab:"0"};
normal_colour = new Object();
normal_colour = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
temp_colour = normal_colour;
ground_level = _root.ground_level;
grid_size = _root.grid_size;
my_half = 60;
max_speed = 3;
this.createEmptyMovieClip("parts", 1);
parts._y = parts._y - 28;
hover_height = 80;
Symbol 751 MovieClip [toilet] Frame 1
this.onEnterFrame = function () {
if (!out) {
adjust = 10 * ((potential > 0) - (potential < 0));
my_cord = Math.floor(this._x / _root.grid_size);
bar_cord = Math.floor((this._x + adjust) / _root.grid_size);
my_level = _root.ground_level[my_cord];
bar_level = _root.ground_level[bar_cord];
if ((bar_level < this._y) || (Math.abs(potential) < 2)) {
potential = -potential;
out = true;
my_level = 500;
}
}
my_x = int(potential);
potential = potential * 0.97;
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
my_y = my_level;
velocity = int(-(velocity * elastic));
}
((this._y > 400) ? (_root.firing_toilet--this.removeMovieClip()) : 0);
this._y = my_y;
this._x = this._x + my_x;
this._rotation = this._rotation + (10 * (my_level == 500));
i = 0;
while (i < _root.pumpkin_amount) {
e_w = _root.pumpkin_info[i][2] * 0.5;
e_h = _root.pumpkin_info[i][3] * 0.5;
e_x = Math.abs(this._x - _root.pumpkin_info[i][0]);
e_y = Math.abs(this._y - (_root.pumpkin_info[i][1] - e_h));
if ((((e_x < e_w) && (e_y < e_h)) && (_root.pumpkin_positions[i] != "dead")) && (!t_done)) {
_root.pumpkins["pumpkin" + (i + 1)].hit(potential, 1, 0);
this.potential = 0;
t_done = true;
}
i++;
}
};
reach = 18;
rnd = int(Math.random() * 4);
x_adj = new Array(3, 1, 1.8, 3);
v_adj = new Array(-200, -250, -220, -100);
g_adj = new Array(300, 200, 200, 400);
potential = (_root.x_speed + (_root.hero._xscale * 0.1)) * x_adj[rnd];
this._xscale = -_root.hero._xscale;
velocity = v_adj[rnd];
gravity = g_adj[rnd];
elastic = 0.7;
Symbol 757 MovieClip [tnt] Frame 1
this.onEnterFrame = function () {
adjust = 10 * ((potential > 0) - (potential < 0));
potential = potential * 0.97;
my_x = int(potential);
my_cord = Math.floor(this._x / _root.grid_size);
bar_cord = Math.floor((this._x + adjust) / _root.grid_size);
my_level = _root.ground_level[my_cord];
bar_level = _root.ground_level[bar_cord];
if (bar_level < this._y) {
potential = -potential;
}
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
my_y = my_level;
velocity = int(-(velocity * elastic));
bounce++;
}
this._y = my_y;
this._x = this._x + my_x;
i = 0;
while (i < _root.pumpkin_amount) {
e_w = _root.pumpkin_info[i][2] * 0.5;
e_h = _root.pumpkin_info[i][3] * 0.5;
e_x = Math.abs(this._x - _root.pumpkin_info[i][0]);
e_y = Math.abs(this._y - (_root.pumpkin_info[i][1] - e_h));
if (((e_x < e_w) && (e_y < e_h)) && (_root.pumpkin_positions[i] != "dead")) {
potential = 0;
}
i++;
}
this._rotation = this._rotation + (int(potential) * 2.6);
((((this._y > 600) || (bounce == 2)) || (Math.abs(potential) < 0.8)) ? ((_root.firing_tnt = false)_root.make_explosion(this._x, my_y, this.getDepth())this.removeMovieClip()) : 0);
};
this._rotation = (-80 * (_root.hero._xscale == 100)) + (100 * (_root.hero._xscale == -100));
potential = _root.x_speed + (_root.hero._xscale * 0.1);
velocity = -300;
gravity = 250;
elastic = 0.7;
Symbol 769 MovieClip Frame 8
_parent.removeMovieClip();
Symbol 770 MovieClip [glue_explode] Frame 1
this.onEnterFrame = function () {
i = 0;
while (i < _root.pumpkin_amount) {
e_w = _root.pumpkin_info[i][2] * 0.5;
e_h = _root.pumpkin_info[i][3] * 0.5;
e_x = Math.abs(this._x - _root.pumpkin_info[i][0]);
e_y = Math.abs(this._y - (_root.pumpkin_info[i][1] - e_h));
if (((e_x < e_w) && (e_y < e_h)) && (_root.pumpkin_positions[i] != "dead")) {
_root.pumpkins["pumpkin" + (i + 1)].glue(potential);
}
i++;
}
};
reach = 25;
_root.snd("glue");
Symbol 773 MovieClip [glue] Frame 1
this.onEnterFrame = function () {
adjust = 10 * ((potential > 0) - (potential < 0));
potential = potential * 0.97;
my_x = int(potential);
my_cord = Math.floor(this._x / _root.grid_size);
bar_cord = Math.floor((this._x + adjust) / _root.grid_size);
my_level = _root.ground_level[my_cord];
bar_level = _root.ground_level[bar_cord];
if (bar_level < this._y) {
potential = -potential;
}
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
my_y = my_level;
velocity = int(-(velocity * elastic));
potential = potential * 0.5;
}
this._y = my_y;
this._x = this._x + my_x;
this._rotation = this._rotation + (int(potential) * 0.5);
((Math.abs(potential) < 0.8) ? ((_root.firing_glue = false)_root.glue_explode(this._x, my_y, this.getDepth())this.removeMovieClip()) : 0);
i = 0;
while (i < _root.pumpkin_amount) {
e_w = _root.pumpkin_info[i][2] * 0.5;
e_h = _root.pumpkin_info[i][3] * 0.5;
e_x = Math.abs(this._x - _root.pumpkin_info[i][0]);
e_y = Math.abs(this._y - (_root.pumpkin_info[i][1] - e_h));
if (((e_x < e_w) && (e_y < e_h)) && (_root.pumpkin_positions[i] != "dead")) {
_root.pumpkins["pumpkin" + (i + 1)].glue(potential);
this.potential = 0;
}
i++;
}
};
reach = 20;
this._rotation = (30 * (_root.hero._xscale == 100)) + (-30 * (_root.hero._xscale == -100));
potential = _root.x_speed + (_root.hero._xscale * 0.1);
velocity = -200;
gravity = 250;
elastic = 0;
Symbol 782 MovieClip Frame 21
_parent.removeMovieClip();
Symbol 783 MovieClip [explosion] Frame 1
this.onEnterFrame = function () {
i = 0;
while (i < _root.pumpkin_amount) {
e_w = _root.pumpkin_info[i][2];
e_h = _root.pumpkin_info[i][3];
e_x = Math.abs(this._x - _root.pumpkin_info[i][0]);
e_y = Math.abs(this._y - (_root.pumpkin_info[i][1] - e_h));
if ((((e_x < e_w) && (e_y < e_h)) && (_root.pumpkin_positions[i] != "dead")) && (!e_done)) {
_root.pumpkins["pumpkin" + (i + 1)].hit(potential, 10, 0);
this.potential = 0;
e_done = true;
}
i++;
}
};
reach = 25;
_root.snd("tnt");
Symbol 786 MovieClip Frame 7
_parent.removeMovieClip();
Symbol 787 MovieClip [egg_explode] Frame 1
_root.snd("egg");
Symbol 790 MovieClip [egg] Frame 1
this.onEnterFrame = function () {
adjust = 10 * ((potential > 0) - (potential < 0));
potential = potential * 0.97;
my_x = int(potential);
my_cord = Math.floor(this._x / _root.grid_size);
bar_cord = Math.floor((this._x + adjust) / _root.grid_size);
my_level = _root.ground_level[my_cord];
bar_level = _root.ground_level[bar_cord];
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
this._y = my_y;
this._x = this._x + my_x;
(((Math.abs(potential) < 0.8) || (my_y > my_level)) ? ((_root.firing_egg = false)_root.smash_egg(this._x, my_y, this.getDepth())this.removeMovieClip()) : 0);
i = 0;
while (i < _root.pumpkin_amount) {
e_w = _root.pumpkin_info[i][2] * 0.5;
e_h = _root.pumpkin_info[i][3] * 0.5;
e_x = Math.abs(this._x - _root.pumpkin_info[i][0]);
e_y = Math.abs(this._y - (_root.pumpkin_info[i][1] - e_h));
if (((e_x < e_w) && (e_y < e_h)) && (_root.pumpkin_positions[i] != "dead")) {
_root.pumpkins["pumpkin" + (i + 1)].hit(potential, 2, 0);
this.potential = 0;
}
i++;
}
};
potential = _root.x_speed + (_root.hero._xscale * 0.2);
velocity = -50;
gravity = 80;
elastic = 0;
Symbol 795 MovieClip Frame 4
stop();
Symbol 796 MovieClip [banana_split] Frame 1
this.onEnterFrame = function () {
i = 0;
while (i < _root.pumpkin_amount) {
e_w = _root.pumpkin_info[i][2] * 0.5;
e_h = _root.pumpkin_info[i][3] * 0.5;
e_x = Math.abs(this._x - _root.pumpkin_info[i][0]);
e_y = Math.abs((this._y - 30) - (_root.pumpkin_info[i][1] - e_h));
if ((((e_x < e_w) && (e_y < e_h)) && (_root.pumpkin_positions[i] != "dead")) && (!fall)) {
_root.pumpkins["pumpkin" + (i + 1)].banana();
temp = _root.pumpkins["pumpkin" + (i + 1)]._xscale;
fall = true;
}
i++;
}
if (fall) {
if (!setup) {
potential = temp * 0.1;
setup = true;
fall_y = 0.5;
}
potential = potential * 0.9;
this._x = this._x - potential;
fall_y = fall_y * 1.4;
this._y = this._y + fall_y;
((this._y > 400) ? (_root.firing_banana--this.removeMovieClip()) : 0);
}
(((life > 80) && (!fall)) ? ((fall = true)) : (life++));
};
Symbol 800 MovieClip [banana] Frame 1
this.onEnterFrame = function () {
adjust = 10 * ((potential > 0) - (potential < 0));
potential = potential * 0.97;
my_x = int(potential);
my_cord = Math.floor(this._x / _root.grid_size);
bar_cord = Math.floor((this._x + adjust) / _root.grid_size);
my_level = _root.ground_level[my_cord];
bar_level = _root.ground_level[bar_cord];
if (bar_level < this._y) {
potential = -potential;
}
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
my_y = my_level;
velocity = int(-(velocity * elastic));
potential = potential * 0.5;
}
this._y = my_y;
this._x = this._x + my_x;
this._rotation = this._rotation + (int(potential) * 0.5);
((Math.abs(potential) < 0.8) ? (_root.banana_split(this._x, my_y, this.getDepth())this.removeMovieClip()) : 0);
i = 0;
while (i < _root.pumpkin_amount) {
e_w = _root.pumpkin_info[i][2] * 0.5;
e_h = _root.pumpkin_info[i][3] * 0.5;
e_x = Math.abs(this._x - _root.pumpkin_info[i][0]);
e_y = Math.abs(this._y - (_root.pumpkin_info[i][1] - e_h));
if (((e_x < e_w) && (e_y < e_h)) && (_root.pumpkin_positions[i] != "dead")) {
_root.pumpkins["pumpkin" + (i + 1)].hit(potential, 0.5, 0);
potential = -potential;
}
i++;
}
};
this._rotation = (-30 * (_root.hero._xscale == 100)) + (-30 * (_root.hero._xscale == -100));
potential = _root.x_speed + (_root.hero._xscale * 0.1);
velocity = -300;
gravity = 250;
elastic = 0;
Symbol 801 MovieClip [pumpkin2] Frame 1
function hit(temp_potential, dm, sy) {
_root.snd("pumpkin1");
if (sy) {
_root.pumpkin_bits(this._x, _root.hero._y, enemy_x);
}
colour = -10;
colour = Math.max(-10, colour);
damage = damage + dm;
if (damage >= 4) {
_root.blow_up_pumpkin(this._x, this._y, id, 50);
}
}
function glue(temp_potential) {
glue_mode = true;
temp_colour = glue_colour;
gc = 120;
myColor.setTransform(temp_colour);
}
function banana(temp_potential) {
banana_mode = true;
}
this.onEnterFrame = function () {
enemy_x = (this._x + _root.pumpkins._x) - 220;
enemy_y = this._y - _root.hero._y;
if (Math.abs(enemy_x) < 300) {
my_position = this._x;
my_cord = Math.floor(my_position / grid_size);
left_position = (my_position + x_speed) - my_half;
left_cord = Math.floor(left_position / grid_size);
right_position = (my_position + x_speed) + my_half;
right_cord = Math.floor(right_position / grid_size);
my_level = ground_level[my_cord];
right_level = ground_level[right_cord];
left_level = ground_level[left_cord];
if (!banana_mode) {
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
my_y = my_level;
if (glue_mode) {
velocity = 0;
} else {
velocity = int(-(velocity * elastic));
}
}
this._y = my_y;
}
this._x = this._x - x_speed;
_root.pumpkin_info[id - 1][0] = this._x;
_root.pumpkin_info[id - 1][1] = this._y;
if (!glue_mode) {
this._xscale = (100 * (enemy_x >= 0)) + (-100 * (enemy_x < 0));
}
swap_image = Math.min(int((my_level - this._y) / 30) + 1, 4);
parts.attachMovie("bounce" + swap_image, "pumpkin", 1);
if (banana_mode) {
if (!banana_action) {
_root.snd("banana");
vel_y = 20;
gravity = 2;
banana_action = true;
}
this._rotation = this._rotation + 10;
x_speed = 0;
vel_y = vel_y - gravity;
y_speed = vel_y;
if (this._y > 400) {
_root.blow_up_pumpkin(this._x, this._y, id);
}
this._y = this._y - y_speed;
}
}
if (colour < 0) {
myColor.setTransform(hit_colour);
}
if (colour == 0) {
myColor.setTransform(temp_colour);
}
colour++;
if (glue_mode) {
glue_colour = new Object();
glue_colour = {ra:"100", rb:gc, ga:"100", gb:gc, ba:"100", bb:gc, aa:"100", ab:"0"};
gc = gc - 2;
myColor.setTransform(glue_colour);
if (gc <= 0) {
temp_colour = normal_colour;
glue_mode = false;
velocity = -312;
reset = true;
}
}
if (reset && (velocity > -110)) {
this._y = my_level - 200;
velocity = -100;
reset = false;
}
if ((!stun) && (!glue_mode)) {
if ((((this._xscale == 100) && (enemy_x < 40)) && (enemy_x > 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(1, 12);
}
if ((((this._xscale == -100) && (enemy_x > -40)) && (enemy_x <= 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(1, -12);
}
}
if (this._y > 400) {
_root.blow_up_pumpkin(this._x, this._y, p);
}
};
myColor = new Color(this);
hit_colour = new Object();
hit_colour = {ra:"35", rb:"166", ga:"35", gb:"166", ba:"35", bb:"66", aa:"100", ab:"0"};
normal_colour = new Object();
normal_colour = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
temp_colour = normal_colour;
this.createEmptyMovieClip("parts", 1);
parts._y = parts._y - 16;
my_info = new Array(this._x, this._y, 50, 56);
_root.pumpkin_info[id - 1] = my_info;
ground_level = _root.ground_level;
grid_size = _root.grid_size;
my_half = 26;
velocity = -100;
gravity = 200;
elastic = 1;
max_speed = 4;
my_cord = Math.floor(this._x / grid_size);
my_level = ground_level[my_cord];
this._y = my_level - 200;
Symbol 857 MovieClip [pumpkin1] Frame 1
function y_trim() {
jump = false;
jumping = false;
y_speed = 0;
this._y = my_level;
}
function hit(temp_potential, dm, sy) {
_root.snd("pumpkin1");
if (sy) {
_root.pumpkin_bits(this._x, _root.hero._y, enemy_x);
}
colour = -10;
colour = Math.max(-10, colour);
vel_y = spring * 0.3;
jump = true;
chase = false;
stun = true;
force = temp_potential * 0.7;
damage = damage + dm;
if (damage >= 21) {
_root.blow_up_pumpkin(this._x, this._y, id);
}
}
function glue(temp_potential) {
chase = false;
route = false;
stun = false;
glue_mode = true;
potential = 0;
x_speed = 0;
temp_colour = glue_colour;
gc = 120;
myColor.setTransform(temp_colour);
}
function banana(temp_potential) {
route = false;
chase = false;
stun = false;
banana_mode = true;
}
this.onEnterFrame = function () {
enemy_x = (this._x + _root.pumpkins._x) - 220;
enemy_y = this._y - _root.hero._y;
if (Math.abs(enemy_x) < 400) {
my_position = this._x;
my_cord = Math.floor(my_position / grid_size);
left_position = (my_position + x_speed) - my_half;
left_cord = Math.floor(left_position / grid_size);
right_position = (my_position + x_speed) + my_half;
right_cord = Math.floor(right_position / grid_size);
my_level = ground_level[my_cord];
right_level = ground_level[right_cord];
left_level = ground_level[left_cord];
if (!banana_mode) {
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
my_y = my_level;
if (glue_mode) {
velocity = 0;
} else {
velocity = int(-(velocity * elastic));
}
}
this._y = my_y;
}
if (route && (!banana_mode)) {
max_speed = 4;
if (this._x >= (ideal + range)) {
potential = -max_speed;
this._xscale = 100;
}
if (this._x < (ideal - range)) {
potential = max_speed;
this._xscale = -100;
}
}
if (chase && (!banana_mode)) {
max_speed = 6;
if (enemy_x >= 40) {
potential = -max_speed;
this._xscale = 100;
}
if (enemy_x <= -40) {
potential = max_speed;
this._xscale = -100;
}
}
if ((((((_root.hero._x - _root.pumpkins._x) < 890) && ((_root.hero._x - _root.pumpkins._x) > 490)) && (!stun)) && (!banana_mode)) && (!glue_mode)) {
chase = true;
route = false;
}
if (((_root.hero._x - _root.pumpkins._x) >= 890) || (((((_root.hero._x - _root.pumpkins._x) <= 490) && (!stun)) && (!banana_mode)) && (!glue_mode))) {
chase = false;
route = true;
}
if (stun) {
stun_t++;
force = force * 0.7;
((((x_speed <= 0) && (my_level > left_level)) || ((x_speed >= 0) && (my_level > right_level))) ? ((force = 0)) : 0);
x_speed = force;
if (stun_t == 10) {
stun = false;
stun_t = 0;
}
if (!glue_mode) {
temp_colour = normal_colour;
}
}
if (((left_stopper && (key_right)) && (!key_left)) || (left_stopper && (this._y < next_ledge))) {
left_stopper = false;
}
if (((right_stopper && (key_left)) && (!key_right)) || (right_stopper && (this._y < next_ledge))) {
right_stopper = false;
}
if (((my_level > left_level) && (x_speed < 0)) && (Math.abs(my_level - this._y) < 20)) {
velocity = spring;
}
if (((my_level > right_level) && (x_speed > 0)) && (Math.abs(my_level - this._y) < 20)) {
velocity = spring;
}
if (((left_level == 600) && (x_speed < 0)) && (my_level == this._y)) {
velocity = spring;
}
if (((right_level == 600) && (x_speed > 0)) && (my_level == this._y)) {
velocity = spring;
}
if (!stun) {
x_speed = x_speed + (potential > x_speed);
x_speed = x_speed - (potential < x_speed);
}
this._x = this._x + x_speed;
this._y = this._y + y_speed;
_root.pumpkin_info[id - 1][0] = this._x;
_root.pumpkin_info[id - 1][1] = this._y;
if (((!glue_mode) && (!banana_mode)) && (!stun)) {
swap_image++;
swap_image = swap_image % a_n;
parts.attachMovie(mode + (swap_image + 1), "skull", 1);
}
if (colour < 0) {
myColor.setTransform(hit_colour);
}
if (colour == 0) {
myColor.setTransform(temp_colour);
}
colour++;
if (glue_mode) {
glue_colour = new Object();
glue_colour = {ra:"100", rb:gc, ga:"100", gb:gc, ba:"100", bb:gc, aa:"100", ab:"0"};
gc = gc - 2;
myColor.setTransform(glue_colour);
if (gc <= 0) {
temp_colour = normal_colour;
glue_mode = false;
route = true;
}
}
if (((Math.abs(enemy_x) <= 60) && (mode != "s_fight")) && (!glue_mode)) {
mode = "s_fight";
a_n = 6;
swap_image = 1;
if (!fire_on) {
this.attachMovie("tounge", "fire", 2);
parts.attachMovie(mode + (swap_image + 1), "skull", 1);
fire_on = true;
}
}
if (((((Math.abs(enemy_x) > 60) && (mode != "skully")) && (swap_image == 1)) || (stun)) || (glue_mode)) {
mode = "skully";
a_n = 4;
swap_image = 1;
if (fire_on) {
fire.removeMovieClip();
fire_on = false;
}
}
if ((mode == "s_fight") && (!stun)) {
if ((((this._xscale == 100) && (enemy_x < 60)) && (enemy_x > 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(3, 12);
}
if ((((this._xscale == -100) && (enemy_x > -60)) && (enemy_x <= 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(3, -12);
}
}
if (banana_mode) {
if (!banana_action) {
_root.snd("banana");
vel = 16;
banana_action = true;
}
parts._rotation = parts._rotation + 10;
x_speed = 0;
vel = vel - gra;
if (this._y > 400) {
_root.blow_up_pumpkin(this._x, this._y, id);
}
this._y = this._y - vel;
}
if (this._y > 400) {
_root.blow_up_pumpkin(this._x, this._y, p);
}
}
};
myColor = new Color(this);
hit_colour = new Object();
hit_colour = {ra:"35", rb:"166", ga:"35", gb:"166", ba:"35", bb:"66", aa:"100", ab:"0"};
normal_colour = new Object();
normal_colour = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
temp_colour = normal_colour;
my_info = new Array(this._x, this._y, 70, 112);
_root.pumpkin_info[id - 1] = my_info;
gra = 2;
ideal = this._x;
range = 200;
a_n = 4;
mode = "crab_walk";
ground_level = _root.ground_level;
grid_size = _root.grid_size;
my_half = 26;
gravity = 200;
spring = -200;
elastic = 0.7;
max_speed = 4;
potential = -max_speed;
route = true;
this.createEmptyMovieClip("parts", 1);
parts._y = parts._y - 64;
parts.attachMovie("skully1", "skull", 1);
stop();
Symbol 857 MovieClip [pumpkin1] Frame 2
function y_trim() {
jump = false;
jumping = false;
y_speed = 0;
this._y = my_level;
}
function hit(temp_potential, dm, sy) {
if (sy) {
_root.pumpkin_bits(this._x, this._y, enemy_x);
}
colour = -10;
colour = Math.max(-10, colour);
vel_y = spring * 0.3;
jump = true;
chase = false;
stun = true;
force = temp_potential * 0.7;
damage = damage + dm;
if (damage >= 21) {
_root.blow_up_pumpkin(this._x, this._y, id);
}
}
function glue(temp_potential) {
chase = false;
route = false;
stun = false;
glue_mode = true;
potential = 0;
x_speed = 0;
temp_colour = glue_colour;
gc = 120;
myColor.setTransform(temp_colour);
}
function banana(temp_potential) {
route = false;
chase = false;
stun = false;
banana_mode = true;
}
this.onEnterFrame = function () {
enemy_x = (this._x + _root.pumpkins._x) - 220;
enemy_y = this._y - _root.hero._y;
my_position = this._x;
my_cord = Math.floor(my_position / grid_size);
left_position = (my_position + x_speed) - my_half;
left_cord = Math.floor(left_position / grid_size);
right_position = (my_position + x_speed) + my_half;
right_cord = Math.floor(right_position / grid_size);
my_level = ground_level[my_cord];
right_level = ground_level[right_cord];
left_level = ground_level[left_cord];
if (!banana_mode) {
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
my_y = my_level;
if (glue_mode) {
velocity = 0;
} else {
velocity = int(-(velocity * elastic));
}
}
this._y = my_y;
}
if (route && (!banana_mode)) {
max_speed = 4;
if ((my_level < left_level) && (x_speed > 0)) {
potential = -max_speed;
this._xscale = 100;
}
if ((my_level < right_level) && (x_speed < 0)) {
potential = max_speed;
this._xscale = -100;
}
}
if (chase && (!banana_mode)) {
max_speed = 6;
if (enemy_x >= 40) {
potential = -max_speed;
this._xscale = 100;
}
if (enemy_x <= -40) {
potential = max_speed;
this._xscale = -100;
}
}
if ((((Math.abs(enemy_x) < 500) && (!stun)) && (!banana_mode)) && (!glue_mode)) {
chase = true;
route = false;
}
if ((((Math.abs(enemy_x) >= 500) && (!stun)) && (!banana_mode)) && (!glue_mode)) {
chase = false;
route = true;
}
if (stun) {
stun_t++;
force = force * 0.7;
((((x_speed <= 0) && (my_level > left_level)) || ((x_speed >= 0) && (my_level > right_level))) ? ((force = 0)) : 0);
x_speed = force;
if (stun_t == 10) {
stun = false;
stun_t = 0;
}
if (!glue_mode) {
temp_colour = normal_colour;
}
}
if (((left_stopper && (key_right)) && (!key_left)) || (left_stopper && (this._y < next_ledge))) {
left_stopper = false;
}
if (((right_stopper && (key_left)) && (!key_right)) || (right_stopper && (this._y < next_ledge))) {
right_stopper = false;
}
if (((my_level > left_level) && (x_speed < 0)) && (Math.abs(my_level - this._y) < 20)) {
}
if (((my_level > right_level) && (x_speed > 0)) && (Math.abs(my_level - this._y) < 20)) {
}
if (((left_level == 600) && (x_speed < 0)) && (my_level == this._y)) {
velocity = spring;
}
if (((right_level == 600) && (x_speed > 0)) && (my_level == this._y)) {
velocity = spring;
}
if (!stun) {
x_speed = x_speed + (potential > x_speed);
x_speed = x_speed - (potential < x_speed);
}
this._x = this._x + x_speed;
this._y = this._y + y_speed;
_root.pumpkin_info[id - 1][0] = this._x;
_root.pumpkin_info[id - 1][1] = this._y;
if (((!glue_mode) && (!banana_mode)) && (!stun)) {
swap_image++;
swap_image = swap_image % a_n;
parts.attachMovie(mode + (swap_image + 1), "skull", 1);
}
if (colour < 0) {
myColor.setTransform(hit_colour);
}
if (colour == 0) {
myColor.setTransform(temp_colour);
}
colour++;
if (glue_mode) {
glue_colour = new Object();
glue_colour = {ra:"100", rb:gc, ga:"100", gb:gc, ba:"100", bb:gc, aa:"100", ab:"0"};
gc = gc - 3;
myColor.setTransform(glue_colour);
if (gc <= 0) {
temp_colour = normal_colour;
glue_mode = false;
route = true;
}
}
if (((Math.abs(enemy_x) <= 60) && (mode != "s_fight")) && (!glue_mode)) {
mode = "s_fight";
a_n = 6;
swap_image = 1;
if (!fire_on) {
this.attachMovie("tounge", "fire", 2);
parts.attachMovie(mode + (swap_image + 1), "skull", 1);
fire_on = true;
}
}
if (((((Math.abs(enemy_x) > 60) && (mode != "skully")) && (swap_image == 1)) || (stun)) || (glue_mode)) {
mode = "skully";
a_n = 4;
swap_image = 1;
if (fire_on) {
fire.removeMovieClip();
fire_on = false;
}
}
if ((mode == "s_fight") && (!stun)) {
if ((((this._xscale == 100) && (enemy_x < 60)) && (enemy_x > 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(3, 12);
}
if ((((this._xscale == -100) && (enemy_x > -60)) && (enemy_x <= 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(3, -12);
}
}
if (banana_mode) {
if (!banana_action) {
vel = 16;
banana_action = true;
}
parts._rotation = parts._rotation + 10;
x_speed = 0;
vel = vel - gra;
if (this._y > 400) {
_root.blow_up_pumpkin(this._x, this._y, id);
}
this._y = this._y - vel;
}
};
myColor = new Color(this);
hit_colour = new Object();
hit_colour = {ra:"35", rb:"166", ga:"35", gb:"166", ba:"35", bb:"66", aa:"100", ab:"0"};
normal_colour = new Object();
normal_colour = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
temp_colour = normal_colour;
my_info = new Array(this._x, this._y, 70, 112);
_root.pumpkin_info[id - 1] = my_info;
gra = 2;
ideal = this._x;
range = 200;
a_n = 4;
mode = "crab_walk";
ground_level = _root.ground_level;
grid_size = _root.grid_size;
my_half = 26;
gravity = 200;
spring = -200;
elastic = 0.7;
max_speed = 4;
potential = -max_speed;
route = true;
this.createEmptyMovieClip("parts", 1);
parts._y = parts._y - 64;
parts.attachMovie("skully1", "skull", 1);
Symbol 858 MovieClip [pumpkin5] Frame 1
function y_trim() {
jump = false;
jumping = false;
y_speed = 0;
this._y = my_level;
}
function hit(temp_potential, dm, sy) {
_root.snd("pumpkin1");
if (sy) {
_root.pumpkin_bits(this._x, _root.hero._y, enemy_x, 150);
}
colour = -10;
colour = Math.max(-10, colour);
vel_y = spring * 0.3;
jump = true;
chase = false;
stun = true;
force = temp_potential * 0.7;
damage = damage + dm;
if (damage >= 20) {
_root.blow_up_pumpkin(this._x, this._y, id);
}
}
function glue(temp_potential) {
route = false;
glue_mode = true;
potential = 0;
x_speed = 0;
temp_colour = glue_colour;
gc = 120;
myColor.setTransform(temp_colour);
}
function banana(temp_potential) {
route = false;
chase = false;
stun = false;
banana_mode = true;
}
this.onEnterFrame = function () {
enemy_x = (this._x + _root.pumpkins._x) - 220;
enemy_y = this._y - _root.hero._y;
if (Math.abs(enemy_x) < 400) {
my_position = this._x;
my_cord = Math.floor(my_position / grid_size);
left_position = (my_position + x_speed) - my_half;
left_cord = Math.floor(left_position / grid_size);
right_position = (my_position + x_speed) + my_half;
right_cord = Math.floor(right_position / grid_size);
my_level = ground_level[my_cord];
right_level = ground_level[right_cord];
left_level = ground_level[left_cord];
if (!banana_mode) {
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
my_y = my_level;
if (glue_mode) {
velocity = 0;
} else {
velocity = int(-(velocity * elastic));
}
}
this._y = my_y;
}
if (route && (!banana_mode)) {
max_speed = 4;
if (this._x >= (ideal + range)) {
potential = -max_speed;
this._xscale = 100;
}
if (this._x < (ideal - range)) {
potential = max_speed;
this._xscale = -100;
}
}
if (stun) {
stun_t++;
force = force * 0.7;
((((x_speed <= 0) && (my_level > left_level)) || ((x_speed >= 0) && (my_level > right_level))) ? ((force = 0)) : 0);
x_speed = force;
if (stun_t == 10) {
stun = false;
stun_t = 0;
route = true;
}
if (!glue_mode) {
temp_colour = normal_colour;
}
}
if (((left_stopper && (key_right)) && (!key_left)) || (left_stopper && (this._y < next_ledge))) {
left_stopper = false;
}
if (((right_stopper && (key_left)) && (!key_right)) || (right_stopper && (this._y < next_ledge))) {
right_stopper = false;
}
if (((my_level > left_level) && (x_speed < 0)) && (Math.abs(my_level - this._y) < 20)) {
velocity = spring;
}
if (((my_level > right_level) && (x_speed > 0)) && (Math.abs(my_level - this._y) < 20)) {
velocity = spring;
}
if (((left_level == 600) && (x_speed < 0)) && (my_level == this._y)) {
velocity = spring;
}
if (((right_level == 600) && (x_speed > 0)) && (my_level == this._y)) {
velocity = spring;
}
if (!stun) {
x_speed = x_speed + (potential > x_speed);
x_speed = x_speed - (potential < x_speed);
}
this._x = this._x + x_speed;
this._y = this._y + y_speed;
_root.pumpkin_info[id - 1][0] = this._x;
_root.pumpkin_info[id - 1][1] = this._y;
if (colour < 0) {
myColor.setTransform(hit_colour);
}
if (colour == 0) {
myColor.setTransform(temp_colour);
}
colour++;
if (glue_mode) {
glue_colour = new Object();
glue_colour = {ra:"100", rb:gc, ga:"100", gb:gc, ba:"100", bb:gc, aa:"100", ab:"0"};
gc = gc - 2;
myColor.setTransform(glue_colour);
if (gc <= 0) {
temp_colour = normal_colour;
glue_mode = false;
route = true;
if (this._xscale == -100) {
potential = max_speed;
} else {
potential = -max_speed;
}
}
}
if (banana_mode) {
if (!banana_action) {
_root.snd("banana");
vel = 16;
banana_action = true;
}
parts._rotation = parts._rotation + 10;
x_speed = 0;
vel = vel - gra;
if (this._y > 400) {
_root.blow_up_pumpkin(this._x, this._y, id);
}
this._y = this._y - vel;
}
if (((!glue_mode) && (!banana_mode)) && (!stun)) {
swap_image++;
swap_image = swap_image % a_n;
parts.attachMovie(mode + (swap_image + 1), "crab", 1);
}
if (((Math.abs(enemy_x) <= 60) && (mode != "crab_attack")) && (!glue_mode)) {
mode = "crab_attack";
a_n = 17;
swap_image = 1;
}
if (((((Math.abs(enemy_x) > 60) && (mode != "crab_walk")) && (swap_image == 1)) || (glue_mode)) || (stun)) {
mode = "crab_walk";
a_n = 4;
swap_image = 1;
}
if (((mode == "crab_attack") && (!stun)) && (!glue_mode)) {
if ((((this._xscale == 100) && (enemy_x < 60)) && (enemy_x > 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(3, 12);
}
if ((((this._xscale == -100) && (enemy_x > -60)) && (enemy_x <= 0)) && (Math.abs(enemy_y) < 40)) {
_root.health(3, -12);
}
}
if (this._y > 400) {
_root.blow_up_pumpkin(this._x, this._y, p);
}
}
};
route = true;
myColor = new Color(this);
hit_colour = new Object();
hit_colour = {ra:"35", rb:"166", ga:"35", gb:"166", ba:"35", bb:"66", aa:"100", ab:"0"};
normal_colour = new Object();
normal_colour = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
temp_colour = normal_colour;
my_info = new Array(this._x, this._y, 76, 60);
_root.pumpkin_info[id - 1] = my_info;
a_n = 4;
mode = "crab_walk";
this.createEmptyMovieClip("parts", 1);
parts._y = parts._y - 42;
parts.attachMovie("crab_walk1", "crab", 1);
gra = 2;
ideal = this._x;
range = 100;
ground_level = _root.ground_level;
grid_size = _root.grid_size;
my_half = 26;
gravity = 200;
spring = -200;
elastic = 0.7;
max_speed = 2;
potential = -max_speed;
route = true;
Symbol 933 MovieClip Frame 7
_parent.removeMovieClip();
Symbol 934 MovieClip [spit] Frame 1
this.onEnterFrame = function () {
enemy_x = (this._x + _root.missiles._x) - 220;
enemy_y = (this._y - _root.hero._y) + 32;
my_position = this._x;
my_cord = Math.floor(my_position / grid_size);
my_level = ground_level[my_cord];
if (this._currentframe == 1) {
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
velocity = 0;
gravity = 0;
x_speed = 0;
my_y = my_level;
this.gotoAndStop(2);
} else {
x_speed = x_speed * 0.91;
}
this._y = my_y;
this._x = this._x - x_speed;
}
if ((Math.abs(enemy_x) < 40) && (Math.abs(enemy_y) < 40)) {
_root.health(6, 0);
}
};
rnd = int(Math.random() * 4);
x_speed = (this._xscale * (10 + (rnd * 2))) * 0.01;
ground_level = _root.ground_level;
grid_size = _root.grid_size;
gravity = 240;
velocity = -160;
stop();
Symbol 941 MovieClip [sign] Frame 1
gotoAndStop(_root.l_part[_root.level - 1]);
Symbol 946 MovieClip [pumpkinbits] Frame 10
this.removeMovieClip();
Symbol 947 MovieClip [pumpkin10] Frame 1
function spit() {
_root.snd("gob");
spitting = true;
_root.missile_level++;
_root.missiles.attachMovie("spit", "spit" + _root.missile_level, _root.missile_level);
_root.missiles["spit" + _root.missile_level]._x = this._x - (this._xscale * 0.56);
_root.missiles["spit" + _root.missile_level]._y = this._y - 120;
_root.missiles["spit" + _root.missile_level]._xscale = this._xscale;
}
function y_trim() {
jump = false;
jumping = false;
y_speed = 0;
this._y = my_level;
}
function hit(temp_potential, dm, sy) {
_root.snd("pumpkin2");
if (colour > 10) {
if (sy) {
_root.pumpkin_bits(this._x, _root.hero._y, enemy_x);
}
d_am++;
colour = -1;
vel_y = spring * 0.3;
stun = true;
force = (-temp_potential) * 0.7;
damage = damage + (dm * 0.5);
if (damage >= 40) {
_root.boss_dead = true;
_root.blow_up_pumpkin(this._x, this._y, id, 1000);
}
}
}
function banana(temp_potential) {
chase_mode = false;
stun_mode = false;
banana_mode = true;
}
this.onUnload = function () {
_root.stop_play = true;
_root.key_left = false;
_root.key_right = false;
_root.potential = false;
_root.x_speed = false;
};
this.onEnterFrame = function () {
enemy_x = (this._x + _root.pumpkins._x) - 220;
enemy_y = this._y - _root.hero._y;
if ((Math.abs(enemy_x) < 1200) || (active)) {
if (!eerie) {
_root.snd("eerie");
eerie = true;
}
active = true;
my_position = this._x;
my_cord = Math.floor(my_position / grid_size);
left_position = my_position - (my_half * 2);
left_cord = Math.floor(left_position / grid_size);
right_position = my_position + (my_half * 2);
right_cord = Math.floor(right_position / grid_size);
my_level = ground_level[my_cord];
right_level = ground_level[right_cord];
left_level = ground_level[left_cord];
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
if (velocity == 240) {
_root.snd("shake");
shake = 32;
}
my_y = my_level;
st_done = false;
velocity = int(-(velocity * elastic));
}
this._y = my_y;
if ((shake > 0) && (!_root.stop_play)) {
shake = shake * 0.9;
_root._y = int(shake) * Math.cos(float++);
} else {
_root.y = 0;
}
if ((my_level > left_level) && (key_left)) {
left_stopper = true;
x_speed = 0;
potential = 0;
}
if ((my_level > right_level) && (key_right)) {
right_stopper = true;
x_speed = 0;
potential = 0;
}
chase = ((((Math.abs(enemy_x) > 200) && (!attack)) && (!stomp)) && (!stun)) && (!run);
attack = (((Math.abs(enemy_x) <= 200) && (!stomp)) && (!run)) && (!stun);
stomp = (Math.abs(enemy_x) < 60) && (!run);
run = ((s_am >= 6) || (d_am >= 6)) && (!stomp);
if (chase) {
key_right = (enemy_x < 0) && (!right_stopper);
key_left = (enemy_x > 0) && (!left_stopper);
potential = max_speed * (key_left - key_right);
x_speed = x_speed + ((x_speed < potential) - (x_speed > potential));
if ((x_speed != 0) && (!stun)) {
this._xscale = (100 * (x_speed > 0)) - (100 * (x_speed < 0));
}
}
if (attack) {
x_speed = 0;
if (!s_done) {
swap_image = 1;
s_done = true;
}
if (attack_image == 23) {
spit();
}
if (attack_image == 18) {
s_am++;
this._xscale = (100 * (enemy_x > 0)) - (100 * (enemy_x <= 0));
}
}
if (stomp) {
if (!st_done) {
velocity = spring * 1.2;
st_done = true;
swap_image = 3;
}
if (((((_root.my_level == _root.hero._y) && (Math.abs(enemy_y) < 40)) && (enemy_x < 80)) && (enemy_x > 0)) && (velocity > 0)) {
_root.health(6, 12);
}
if (((((_root.my_level == _root.hero._y) && (Math.abs(enemy_y) < 40)) && (enemy_x > -80)) && (enemy_x <= 0)) && (velocity > 0)) {
_root.health(6, -12);
}
}
if (run) {
r_time++;
if (!sd_done) {
if (enemy_x > 0) {
key_right = true;
key_left = false;
} else {
key_left = true;
key_right = false;
}
sd_done = true;
}
potential = (max_speed * 4) * (key_left - key_right);
x_speed = x_speed + ((x_speed < potential) - (x_speed > potential));
if (sd_done) {
if (key_right && (my_level > right_level)) {
key_left = true;
key_right = false;
}
if (key_left && (my_level > left_level)) {
key_right = true;
key_left = false;
}
}
if ((x_speed != 0) && (!stun)) {
this._xscale = (100 * (x_speed > 0)) - (100 * (x_speed < 0));
}
if (r_time > 100) {
s_am = 0;
d_am = 0;
r_time = 0;
sd_done = false;
}
}
if (stun) {
force = force * 0.5;
((((x_speed <= 0) && (right_stopper)) || ((x_speed >= 0) && (left_stopper))) ? ((force = 0)) : 0);
x_speed = force;
((Math.abs(force) < 0.4) ? ((stun = false)) : 0);
temp_colour = normal_colour;
}
left_stopper = my_level > left_level;
right_stopper = my_level > right_level;
this._x = this._x - x_speed;
this._y = this._y - y_speed;
_root.pumpkin_info[id - 1][0] = this._x;
_root.pumpkin_info[id - 1][1] = this._y;
if (((x_speed != 0) && (chase)) && (!stun)) {
swap_image = swap_image + 0.33;
swap_image = swap_image % 17;
parts.attachMovie("boss1." + int(swap_image + 1), "body", 1);
}
if (((x_speed != 0) && (run)) && (!stun)) {
swap_image = swap_image + 1;
swap_image = swap_image % 17;
parts.attachMovie("boss1." + int(swap_image + 1), "body", 1);
}
if (attack && (!stun)) {
swap_image = swap_image + 0.5;
swap_image = swap_image % 10;
attack_image = attack_ani[int(swap_image)];
parts.attachMovie("boss1." + attack_image, "body", 1);
}
if (stomp) {
parts.attachMovie("boss1." + Math.min(swap_image, 9), "body", 1);
swap_image = swap_image + 1;
}
if (colour < 0) {
myColor.setTransform(hit_colour);
}
if (colour == 0) {
myColor.setTransform(temp_colour);
}
colour++;
}
};
myColor = new Color(this);
hit_colour = new Object();
hit_colour = {ra:"35", rb:"166", ga:"35", gb:"166", ba:"35", bb:"66", aa:"100", ab:"0"};
normal_colour = new Object();
normal_colour = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
temp_colour = normal_colour;
my_info = new Array(this._x, this._y, 160, 150);
_root.pumpkin_info[id - 1] = my_info;
attack_ani = new Array(18, 19, 20, 21, 22, 23, 24, 25, 22, 19);
my_half = 192;
ground_level = _root.ground_level;
grid_size = _root.grid_size;
my_half = 56;
gravity = 200;
spring = -200;
elastic = 0.5;
max_speed = 2;
this.createEmptyMovieClip("parts", 1);
parts._y = parts._y - 100;
parts.attachMovie("boss1.1", "body", 1);
this._y = this._y + 140;
Symbol 1023 MovieClip [pumpkin20] Frame 1
function spit(hand) {
f_x = this._xscale * 0.7;
f_y = 132;
spitting = true;
_root.missile_level++;
_root.missiles.attachMovie("fireball", "fireball" + _root.missile_level, _root.missile_level);
_root.missiles["fireball" + _root.missile_level]._x = this._x - f_x;
_root.missiles["fireball" + _root.missile_level]._y = this._y - f_y;
_root.missiles["fireball" + _root.missile_level].id = c_id;
_root.missiles["fireball" + _root.missile_level].dir = this._xscale;
}
function y_trim() {
jump = false;
jumping = false;
y_speed = 0;
this._y = my_level;
}
function hit(temp_potential, dm, sy) {
_root.snd("pumpkin2");
if (colour > 10) {
if (sy) {
_root.pumpkin_bits(this._x, _root.hero._y, enemy_x);
}
d_am++;
colour = -1;
vel_y = spring * 0.3;
stun = true;
force = (-temp_potential) * 0.7;
damage = damage + (dm * 0.5);
if (damage >= 60) {
_root.boss_dead = true;
_root.blow_up_pumpkin(this._x, this._y, id, 1500);
}
}
}
function banana(temp_potential) {
chase_mode = false;
stun_mode = false;
banana_mode = true;
}
this.onUnload = function () {
_root.stop_play = true;
_root.key_left = false;
_root.key_right = false;
_root.potential = false;
_root.x_speed = false;
};
this.onEnterFrame = function () {
enemy_x = (this._x + _root.pumpkins._x) - 220;
enemy_y = this._y - _root.hero._y;
if ((Math.abs(enemy_x) < 800) || (active)) {
if (!eerie) {
_root.snd("eerie");
eerie = true;
}
active = true;
my_position = this._x;
my_cord = Math.floor(my_position / grid_size);
left_position = my_position - my_half;
left_cord = Math.floor(left_position / grid_size);
right_position = my_position + my_half;
right_cord = Math.floor(right_position / grid_size);
my_level = ground_level[my_cord];
right_level = ground_level[right_cord];
left_level = ground_level[left_cord];
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
my_y = my_level;
st_done = false;
velocity = int(-(velocity * elastic));
}
this._y = my_y;
if ((my_level > left_level) && (key_left)) {
left_stopper = true;
x_speed = 0;
potential = 0;
}
if ((my_level > right_level) && (key_right)) {
right_stopper = true;
x_speed = 0;
potential = 0;
}
chase = ((((Math.abs(enemy_x) > 200) && ((!Math.abs(enemy_x)) < 40)) && (!attack)) && (!stun)) && (!run);
attack = ((Math.abs(enemy_x) <= 200) && (!run)) && (!stun);
run = (s_am >= 6) || (d_am >= 3);
if (chase) {
key_right = (enemy_x < 0) && (!right_stopper);
key_left = (enemy_x > 0) && (!left_stopper);
potential = max_speed * (key_left - key_right);
x_speed = x_speed + ((x_speed < potential) - (x_speed > potential));
if ((x_speed != 0) && (!stun)) {
this._xscale = (100 * (x_speed > 0)) - (100 * (x_speed < 0));
}
}
if (attack) {
if ((enemy_x < 20) && (enemy_x > 0)) {
_root.health(2, 12);
}
if ((enemy_x > -20) && (enemy_x <= 0)) {
_root.health(2, -12);
}
key_right = (enemy_x < 0) && (!right_stopper);
key_left = (enemy_x > 0) && (!left_stopper);
potential = key_left - key_right;
x_speed = x_speed + ((x_speed < potential) - (x_speed > potential));
if ((x_speed != 0) && (!stun)) {
this._xscale = (100 * (x_speed > 0)) - (100 * (x_speed < 0));
}
if (!s_done) {
swap_image = 1;
s_done = true;
}
if (attack_image == 12) {
c_id++;
spit();
}
if (attack_image == 18) {
c_id++;
spit();
}
if (attack_image == 24) {
s_am++;
this._xscale = (100 * (enemy_x > 0)) - (100 * (enemy_x <= 0));
s_done = false;
}
}
if (run) {
r_time++;
if (!sd_done) {
if (enemy_x > 0) {
key_right = true;
key_left = false;
} else {
key_left = true;
key_right = false;
}
sd_done = true;
}
potential = (max_speed * 3) * (key_left - key_right);
x_speed = x_speed + ((x_speed < potential) - (x_speed > potential));
if (sd_done) {
if (key_right && (my_level > right_level)) {
key_left = true;
key_right = false;
}
if (key_left && (my_level > left_level)) {
key_right = true;
key_left = false;
}
}
if ((x_speed != 0) && (!stun)) {
this._xscale = (100 * (x_speed > 0)) - (100 * (x_speed < 0));
}
if (r_time > 100) {
c_id = 0;
s_am = 0;
d_am = 0;
r_time = 0;
sd_done = false;
}
}
if (stun) {
force = force * 0.5;
((((x_speed <= 0) && (right_stopper)) || ((x_speed >= 0) && (left_stopper))) ? ((force = 0)) : 0);
x_speed = force;
((Math.abs(force) < 0.4) ? ((stun = false)) : 0);
temp_colour = normal_colour;
}
left_stopper = my_level > left_level;
right_stopper = my_level > right_level;
this._x = this._x - x_speed;
this._y = this._y - y_speed;
_root.pumpkin_info[id - 1][0] = this._x;
_root.pumpkin_info[id - 1][1] = this._y;
if (((x_speed != 0) && (chase)) && (!stun)) {
swap_image = swap_image + 0.5;
swap_image = swap_image % 4;
parts.attachMovie("boss2." + int(swap_image + 1), "body", 1);
}
if (((x_speed != 0) && (run)) && (!stun)) {
swap_image = swap_image + 1;
swap_image = swap_image % 4;
parts.attachMovie("boss2." + int(swap_image + 1), "body", 1);
}
if (attack) {
swap_image = swap_image + 0.5;
swap_image = swap_image % 20;
attack_image = swap_image + 5;
parts.attachMovie("boss2." + int(attack_image), "body", 1);
}
if (stomp) {
}
if (colour < 0) {
myColor.setTransform(hit_colour);
}
if (colour == 0) {
myColor.setTransform(temp_colour);
}
colour++;
}
};
myColor = new Color(this);
hit_colour = new Object();
hit_colour = {ra:"35", rb:"166", ga:"35", gb:"166", ba:"35", bb:"66", aa:"100", ab:"0"};
normal_colour = new Object();
normal_colour = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
temp_colour = normal_colour;
my_info = new Array(this._x, this._y, 100, 180);
_root.pumpkin_info[id - 1] = my_info;
my_half = 192;
ground_level = _root.ground_level;
grid_size = _root.grid_size;
my_half = 56;
gravity = 200;
spring = -200;
elastic = 0.5;
max_speed = 3;
this.createEmptyMovieClip("parts", 1);
parts._y = parts._y - 100;
parts.attachMovie("boss2.1", "body", 1);
this._y = this._y + 140;
Symbol 1030 MovieClip Frame 6
gotoAndPlay (1);
Symbol 1046 MovieClip Frame 9
_parent.removeMovieClip();
Symbol 1047 MovieClip [fireball] Frame 1
this.onEnterFrame = function () {
enemy_x = (this._x + _root.missiles._x) - 220;
enemy_y = (this._y - _root.hero._y) + 20;
my_position = this._x;
my_cord = Math.floor(my_position / grid_size);
my_level = ground_level[my_cord];
if (this._y >= my_level) {
x_speed = 0;
y_speed = 0;
this.gotoAndStop(2);
}
if ((Math.abs(enemy_x) < 40) && (Math.abs(enemy_y) < 40)) {
_root.health(8, 0);
if (!flash) {
_root.flash(160, 190, 230);
flash = true;
}
}
this._x = this._x + (x_speed * 12);
this._y = this._y + (y_speed * 12);
};
rnd = int(Math.random() * 3);
if (dir == 100) {
angle = new Array(110, 135, 160);
} else {
angle = new Array(70, 45, 20);
}
x_speed = Math.cos(angle[rnd] * 0.0174);
y_speed = Math.sin(angle[rnd] * 0.0174);
ball._rotation = angle[rnd] + 28;
ground_level = _root.ground_level;
grid_size = _root.grid_size;
stop();
Symbol 1048 MovieClip [pumpkin30] Frame 1
function spit() {
f_x = this._xscale * 0.56;
f_y = 140;
spitting = true;
i = 0;
while (i < 3) {
_root.missile_level++;
_root.missiles.attachMovie("jack_fire", "fireball" + _root.missile_level, _root.missile_level);
_root.missiles["fireball" + _root.missile_level]._x = this._x - f_x;
_root.missiles["fireball" + _root.missile_level]._y = this._y - f_y;
_root.missiles["fireball" + _root.missile_level].id = i + 1;
i++;
}
}
function y_trim() {
jump = false;
jumping = false;
y_speed = 0;
this._y = my_level;
}
function hit(temp_potential, dm, sy) {
_root.snd("pumpkin2");
if (colour > 10) {
if (sy) {
_root.pumpkin_bits(this._x, _root.hero._y, enemy_x);
}
d_am++;
colour = -1;
vel_y = spring * 0.3;
stun = true;
force = (-temp_potential) * 0.7;
damage = damage + (dm * 0.5);
if (damage >= 80) {
_root.boss_dead = true;
_root.blow_up_pumpkin(this._x, this._y, id, 2500);
}
}
}
function banana(temp_potential) {
chase_mode = false;
stun_mode = false;
banana_mode = true;
}
function make_bad() {
_root.pumpkin_amount++;
p = _root.pumpkin_amount;
p_type = bad_type[bt];
p_position = my_cord + 2;
_root.pumpkins.attachMovie("pumpkin" + p_type, "pumpkin" + p, p);
_root.pumpkins["pumpkin" + p]._x = (p_position * grid_size) - (grid_size * 0.5);
_root.pumpkins["pumpkin" + p]._y = -100;
_root.pumpkins["pumpkin" + p].id = p;
_root.pumpkins["pumpkin" + p].gotoAndStop(2);
}
this.onUnload = function () {
_root.stop_play = true;
_root.key_left = false;
_root.key_right = false;
_root.potential = false;
_root.x_speed = false;
};
this.onEnterFrame = function () {
enemy_x = (this._x + _root.pumpkins._x) - 220;
enemy_y = this._y - _root.hero._y;
if ((Math.abs(enemy_x) < 1200) || (active)) {
if (!eerie) {
_root.snd("eerie");
eerie = true;
}
active = true;
my_position = this._x;
my_cord = Math.floor(my_position / grid_size);
left_position = my_position - my_half;
left_cord = Math.floor(left_position / grid_size);
right_position = my_position + my_half;
right_cord = Math.floor(right_position / grid_size);
my_level = ground_level[my_cord];
right_level = ground_level[right_cord];
left_level = ground_level[left_cord];
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
my_y = my_level;
st_done = false;
velocity = int(-(velocity * elastic));
}
this._y = my_y;
if ((my_level != left_level) && (key_left)) {
left_stopper = true;
x_speed = 0;
potential = 0;
}
if (((this._x - ideal) >= -80) && (key_right)) {
right_stopper = true;
x_speed = 0;
potential = 0;
}
if (chase) {
if (left_stopper) {
key_right = true;
key_left = false;
laugh++;
if (laugh > 4) {
laugh = 0;
release_bad = true;
pot_attack = false;
chase = false;
}
}
if (right_stopper) {
key_left = true;
key_right = false;
if (laugh <= 3) {
pot_attack = true;
}
}
potential = max_speed * (key_left - key_right);
x_speed = x_speed + ((x_speed < potential) - (x_speed > potential));
if ((x_speed != 0) && (!stun)) {
this._xscale = (100 * (x_speed > 0)) - (100 * (x_speed < 0));
}
if ((pot_attack && ((this._x - ideal) < -80)) && (parts.body._currentframe == 1)) {
parts.body.gotoAndPlay(21);
pot_attack = false;
}
}
if (release_bad) {
if (parts.body._currentframe < 61) {
parts.body.gotoAndPlay(61);
b_done = true;
key_left = false;
key_right = false;
potential = 0;
this._xscale = 100;
bt = 0;
make_bad();
}
rel++;
if (rel == 62) {
bt++;
make_bad();
rel = 0;
}
x_speed = x_speed + ((x_speed < potential) - (x_speed > potential));
if (bt == 4) {
bt = 0;
rel = 0;
chase = true;
key_right = true;
parts.body.gotoAndPlay(1);
release_bad = false;
}
}
if (stun) {
force = force * 0.5;
((((x_speed <= 0) && (right_stopper)) || ((x_speed >= 0) && (left_stopper))) ? ((force = 0)) : 0);
x_speed = force;
((Math.abs(force) < 0.4) ? ((stun = false)) : 0);
temp_colour = normal_colour;
}
left_stopper = my_level > left_level;
right_stopper = my_level > right_level;
this._x = this._x - x_speed;
this._y = this._y - y_speed;
_root.pumpkin_info[id - 1][0] = this._x;
_root.pumpkin_info[id - 1][1] = this._y;
if (colour < 0) {
myColor.setTransform(hit_colour);
}
if (colour == 0) {
myColor.setTransform(temp_colour);
}
colour++;
}
};
myColor = new Color(this);
hit_colour = new Object();
hit_colour = {ra:"35", rb:"166", ga:"35", gb:"166", ba:"35", bb:"66", aa:"100", ab:"0"};
normal_colour = new Object();
normal_colour = {ra:"100", rb:"0", ga:"100", gb:"0", ba:"100", bb:"0", aa:"100", ab:"0"};
temp_colour = normal_colour;
my_info = new Array(this._x, this._y, 70, 120);
_root.pumpkin_info[id - 1] = my_info;
my_half = 192;
ideal = this._x;
range = 400;
ground_level = _root.ground_level;
grid_size = _root.grid_size;
my_half = 56;
gravity = 200;
spring = -200;
elastic = 0.5;
max_speed = 5;
this.createEmptyMovieClip("parts", 1);
parts._y = parts._y - 50;
parts.attachMovie("jack", "body", 1);
this._y = this._y + 140;
key_left = true;
chase = true;
bad_type = new Array(3, 3, 1, 3, 3);
Symbol 1148 MovieClip [jack] Frame 20
gotoAndPlay (1);
Symbol 1148 MovieClip [jack] Frame 57
_parent._parent.spit();
Symbol 1148 MovieClip [jack] Frame 60
gotoAndPlay (1);
Symbol 1148 MovieClip [jack] Frame 68
gotoAndPlay (61);
Symbol 1158 MovieClip [jack_fire] Frame 1
this.onEnterFrame = function () {
enemy_x = (this._x + _root.missiles._x) - 220;
enemy_y = (this._y - _root.hero._y) + 32;
my_position = this._x;
my_cord = Math.floor(my_position / grid_size);
my_level = ground_level[my_cord];
if (this._currentframe == 1) {
my_y = this._y;
velocity = velocity + (gravity / 10);
my_y = my_y + (velocity / 10);
if (my_y > my_level) {
velocity = 0;
gravity = 0;
x_speed = 0;
my_y = my_level;
this.gotoAndStop(2);
} else {
x_speed = x_speed * 0.91;
}
this._y = my_y;
this._x = this._x - x_speed;
}
if ((Math.abs(enemy_x) < 40) && (Math.abs(enemy_y) < 40)) {
_root.health(8, 0);
if (!flash) {
_root.flash(200, 200, 100);
flash = true;
}
}
ball._rotation = ball._rotation - 2;
};
x_speed = id * 20;
ground_level = _root.ground_level;
grid_size = _root.grid_size;
gravity = 100;
velocity = -60;
stop();
Symbol 1219 MovieClip Frame 41
stop();
Symbol 1229 MovieClip Frame 39
_root.attachMovie("fade", "fade", 2000);
_root.fade.fnct = "level_end";
_root.fade._alpha = 0;
stop();
Symbol 1230 MovieClip [win] Frame 8
stop();
Symbol 1230 MovieClip [win] Frame 16
stop();
Symbol 1231 MovieClip [boss_smash] Frame 1
_root.snd("boss_die");
Symbol 1231 MovieClip [boss_smash] Frame 19
_root.snd("ghost");
Symbol 1231 MovieClip [boss_smash] Frame 55
_root.win_dance();
this.removeMovieClip();
Symbol 1232 MovieClip Frame 1
stop();