Frame 1
_lockroot = true;
_quality = "HIGH";
stop();
stopAllSounds();
menu = new ContextMenu();
menu.hideBuiltInItems();
_root.kongregateServices.connect();
NewgroundsAPI.connectMovie(8553);
_root.API_Settings = {movie_id:8553, enc_key:"JGrJWVQr14X8aEDBYEbS4PM5y3UbJPNI", debug_mode:false, movie_version:""};
gotoAndStop ("game");
Frame 3
stopAllSounds();
Frame 4
function f_item_use_cond(id, target) {
if (target == "trademachine") {
if (id > 22) {
wrong_item = true;
game.trademachine.ierror = true;
} else {
f_itemslot_free(id);
}
} else if (((id == 25) || (id == 26)) && (target == "hobo")) {
f_itemslot_free(id);
} else if (((id == 20) && ((target == "elevator") || (target == "teddybear1"))) && (objectives[3] > 0)) {
if (target == "teddybear1") {
f_itemslot_free(id);
} else {
used_item = id;
}
} else if ((((id == 1) || (id == 19)) || (id == 21)) && (target == "catapult")) {
temp_array = new Array(1, 19, 21);
i = 0;
while (i < 3) {
if (temp_array[i] == id) {
_root.game.catapult_pieces[i] = id;
}
i++;
}
f_itemslot_free(id);
cinema = false;
} else if ((id == 17) && (target == "doctor1")) {
f_itemslot_free(id);
} else if (((id == 15) || (((id == 18) && (favors_used[3] > 0)) && (objectives[2] > 0))) && (target == "seamstress")) {
f_itemslot_free(id);
} else if ((id == 8) && (target == "seamstress")) {
wrong_item = true;
used_item = id;
} else if (((target == "seamstress") && (favors_used[3] > 0)) && (objectives[2] > 0)) {
wrong_item = true;
used_item = id;
} else if ((id == 14) && (target == "farmer1")) {
f_itemslot_free(id);
} else if (((id == 16) && (target == "gardener")) && (_root.objectives[4] > 0)) {
f_itemslot_free(id);
} else if ((id == 13) && (target == "gardener")) {
f_itemslot_free(id);
} else if ((id == 3) && (target == "spider")) {
if (objectives[8] > 0) {
f_itemslot_free(id);
_root.game.objects.flypaper.nextFrame();
} else {
wrong_item = true;
chat_alien.gotoAndStop("dontuse");
}
} else {
wrong_item = true;
f_sound("buzzer", 1);
return(false);
}
}
function f_use_favor(id) {
if (id == 1) {
if ((wounded == true) || (_root.game.pighunter_dead == true)) {
favors_used[id - 1] = id;
game.appointment = true;
chat_alien.gotoAndStop("doctor1");
} else {
chat_alien.gotoAndStop("doctor2");
}
} else if (id == 2) {
if ((game._currentframe == 24) && (objectives[11] > 0)) {
_root.game.cats = true;
_root.exit_right = false;
_root.exit_down = false;
favors_used[id - 1] = id;
_root.f_sound("cats2", 1);
game.commander_chat1.gotoAndStop(4);
} else {
chat_alien.gotoAndStop("cat");
}
} else if (id == 3) {
if (((game._currentframe == 24) && (_root.player.cover == true)) && (objectives[11] > 0)) {
favors_used[id - 1] = id;
game.collector.play();
} else {
chat_alien.gotoAndStop("collector");
}
} else if (id == 4) {
if (f_have_item(18) && (objectives[2] > 0)) {
favors_used[id - 1] = id;
game.make_costume = true;
chat_alien.gotoAndStop("tailor1");
} else if (objectives[2] > 0) {
chat_alien.gotoAndStop("tailor2");
} else {
chat_alien.gotoAndStop("tailor3");
}
}
}
function f_angle(theta) {
rad2Deg = 57.2957795130823;
ang = Math.atan(theta) * rad2Deg;
return(ang);
}
function f_sound(id, loops, type) {
if (type == undefined) {
type = "sound";
}
var _local3 = _root[type];
_root["s_" + id] = new Sound(_local3);
_root["s_" + id].attachSound(id);
_root["s_" + id].start(0, loops);
}
function f_total_score() {
total_score = 0;
i = 0;
while (i < 6) {
if (objectives[i] > 0) {
total_score = total_score + 100;
}
if (favors[i] > 0) {
total_score = total_score + 100;
}
if (bodycount[i] > 0) {
total_score = total_score + 10;
}
i++;
}
total_score = total_score + 10;
if (tenacity == 1) {
total_score = total_score + 10;
}
total_score = total_score + (bunny_kills * 10);
}
function f_new_kill(id) {
bodycount[id] = id + 1;
kills++;
}
function f_new_mainquest(id) {
if (objectives[id - 1] == 0) {
objectives[id - 1] = id;
new_objective.id = id;
new_objective.gotoAndPlay(2);
}
}
function f_new_sidequest(id) {
var _local3 = false;
i = 0;
while (i < 4) {
if (_root.favors[i] == id) {
_local3 = true;
i = 4;
}
i++;
}
if (_local3 == false) {
i = 1;
while (i <= 4) {
if (_root.favors[i] == 0) {
_root.favors[i] = id;
new_favor.id = id;
new_favor.gotoAndPlay(2);
i = 4;
}
i++;
}
}
}
function f_complete_quest(id, type) {
if (type == 1) {
if (objectives_got[id - 1] != id) {
objectives[id - 1] = id;
objectives_got[id - 1] = id;
new_objective.id = -1;
new_objective.gotoAndPlay(2);
}
} else {
i = 1;
while (i <= 4) {
if (_root["sidequest" + i] == id) {
_root["sidequest" + i] = 0;
favors[id - 1] = id;
favors_got[id - 1] = id;
new_favor.id = -1;
new_favor.gotoAndPlay(2);
}
i++;
}
}
}
function f_get_item(id) {
game["get_" + id] = true;
if (item_get._currentframe > 1) {
f_add_item(item_get.id);
}
item_get.id = id;
item_get.gotoAndPlay(2);
}
function f_add_item(id) {
item_slots.push(id);
if (item_slots.length > 5) {
item_slots_pos = item_slots.length - 5;
}
}
function f_itemslot_free(id) {
cinema = true;
used_item = id;
i = 0;
while (i < item_slots.length) {
if (item_slots[i] == id) {
item_slots.splice(i, 1);
if (((item_slots_pos + 7) > item_slots.length) && (item_slots_pos > 0)) {
item_slots_pos--;
}
i = item_slots.length;
}
i++;
}
cursor._visible = false;
cursor.gotoAndStop(1);
}
function f_combine_item(id1, id2) {
var _local3;
if (((id1 == 26) && (id2 == 25)) || ((id2 == 26) && (id1 == 25))) {
f_change_item(id2, 27);
_local3 = true;
} else if (((id1 == 22) && (id2 == 20)) || ((id2 == 22) && (id1 == 20))) {
f_change_item(id2, 26);
_local3 = true;
}
if (_local3) {
f_sound("harp", 1);
f_itemslot_free(id1);
cinema = false;
return(true);
}
cursor.comb._visible = false;
}
function f_change_item(id, new_id) {
i = 0;
while (i < item_slots.length) {
if (item_slots[i] == id) {
item_slots[i] = new_id;
cursor.gotoAndStop(1);
}
i++;
}
}
function f_item_use(target) {
id = cursor._currentframe - 1;
wrong_item = false;
used_item = -1;
f_item_use_cond(id, target);
if (wrong_item != true) {
f_sound("harp", 1);
}
}
function f_have_item(id) {
var _local1;
i = 0;
while (i < item_slots.length) {
if (item_slots[i] == id) {
_local1 = true;
}
i++;
}
if (_local1 == true) {
return(true);
}
return(false);
}
function f_advance(area, ent) {
inventory_gun._visible = true;
if ((gun_have == false) && (_root.game.get_2 == true)) {
slingshot = true;
inventory_gun.gotoAndStop(2);
}
gun_unsafe = false;
interacting = false;
exit_right = false;
exit_left = false;
exit_down = false;
area_right = 1;
area_left = -1;
area_down = 1;
area_up = -1;
area_right_ent = 1;
area_left_ent = -1;
area_down_ent = 1;
area_up_ent = -1;
limit_right_z = true;
limit_left_z = true;
entrance = ent;
cinema = false;
walk = true;
alien_fixed = false;
m_item = false;
player.speed_x = 0;
player.speed_y = 0;
player.old_dest_x = 0;
player.old_dest_y = 0;
game.npcs = 0;
game.gotoAndStop(game._currentframe + area);
}
function f_place_alien(x, y, dir) {
player = game.objects.alien;
player.dir = dir;
player._x = x;
player._y = y;
player.scale();
player.movement();
player.animation();
}
function onEnterFrame() {
player = game.objects.alien;
if ((game.outside != true) && (music_vol > 0)) {
music_vol_offset = 50;
} else {
music_vol_offset = 0;
}
sound.all_sound.setVolume(sound_vol);
music.all_music.setVolume(music_vol - music_vol_offset);
if (Key.isDown(39)) {
press_right = true;
} else {
press_right = false;
}
if (Key.isDown(37)) {
press_left = true;
} else {
press_left = false;
}
if (Key.isDown(40)) {
press_down = true;
} else {
press_down = false;
}
if (Key.isDown(38)) {
press_up = true;
} else {
press_up = false;
}
if (Key.isDown(32)) {
press_holster = true;
} else {
press_holster = false;
}
if (m_click_time > 0) {
m_click_time--;
}
cursor._x = _xmouse;
cursor._y = _ymouse;
if ((cursor._currentframe > 1) && (_ymouse > 50)) {
Mouse.hide();
cursor._visible = true;
} else if (((((m_aim == true) && (player.gun == true)) && (gun_active == true)) || ((_root.player.cover == true) && (_ymouse > 50))) && (inventory._currentframe == 1)) {
Mouse.hide();
cursor._visible = true;
cursor.cursor.gotoAndStop(1);
} else {
Mouse.show();
cursor._visible = false;
if (_ymouse > 50) {
if (exit_right == true) {
if (_xmouse > ((Stage.width / 2.24) + game._x)) {
Mouse.hide();
cursor._visible = true;
cursor.cursor.gotoAndStop(3);
}
}
if (exit_left == true) {
if (_xmouse < (((-Stage.width) / 2.24) + game._x)) {
Mouse.hide();
cursor._visible = true;
cursor.cursor.gotoAndStop(2);
}
}
if (exit_down == true) {
if (_ymouse > ((Stage.height / 2.2) + game._y)) {
Mouse.hide();
cursor._visible = true;
cursor.cursor.gotoAndStop(5);
}
}
}
}
i = 1;
while (i <= 12) {
inventory["o" + i].gotoAndStop(objectives[i - 1] + 1);
if (show_favor[i - 1] > 0) {
inventory["f" + i].gotoAndStop(favors[i - 1] + 1);
if (favors_used[i - 1] > 0) {
inventory["f" + i].ring._visible = false;
}
} else if ((favors[i - 1] > 0) && (inventory._currentframe == 1)) {
inventory.play();
}
i++;
}
i = 0;
while (i < 5) {
if (item_slots[i + item_slots_pos] == undefined) {
inventory["slot" + i].gotoAndStop(1);
} else {
inventory["slot" + i].gotoAndStop(item_slots[i + item_slots_pos] + 1);
}
i++;
}
if (inventory.hitTest(_xmouse, _ymouse, true) || (inventory_gun.hitTest(_xmouse, _ymouse, true))) {
m_inventory = true;
} else {
m_inventory = false;
}
if (item_slots_pos == 0) {
inventory.lb._visible = false;
} else {
inventory.lb._visible = true;
}
if ((item_slots_pos + 5) >= item_slots.length) {
inventory.rb._visible = false;
} else {
inventory.rb._visible = true;
}
if (Key.isDown(16) && (testmode == true)) {
debug = (((((((((((((((((("Size: " + Math.ceil(player._yscale)) + newline) + "X location: ") + Math.ceil(player._x)) + newline) + "Y location: ") + Math.ceil(player._y)) + newline) + "Used Item: ") + used_item) + newline) + "Cinema Mode: ") + cinema) + newline) + "Destination X: ") + player.dest_x) + newline) + "Destination Y: ") + player.dest_y;
} else {
debug = "";
}
if (Key.isDown(35)) {
wounded = true;
}
}
function onMouseDown() {
m_click = true;
m_click_time = m_click_time + 15;
if (m_click_time > 80) {
m_click_time = 0;
}
}
function onMouseUp() {
m_click = false;
}
c_red = new Object();
c_red.ra = 250;
c_red.rb = 0;
c_red.ga = 150;
c_red.gb = 0;
c_red.ba = 100;
c_red.bb = 0;
c_grey = new Object();
c_grey.ra = 92;
c_grey.rb = 0;
c_grey.ga = 100;
c_grey.gb = 0;
c_grey.ba = 100;
c_grey.bb = 0;
c_white = new Object();
c_white.ra = 150;
c_white.rb = 70;
c_white.ga = 150;
c_white.gb = 70;
c_white.ba = 150;
c_white.bb = 70;
c_nada = new Object();
c_nada.ra = 100;
c_nada.rb = 0;
c_nada.ga = 100;
c_nada.gb = 0;
c_nada.ba = 100;
c_nada.bb = 0;
var music_vol = 100;
var music_vol_offset = 0;
var sound_vol = 100;
var sound_vol_offset = 0;
var total_score = 0;
var tenacity = 0;
var loyalty = 0;
var kills = 0;
var bunny_kills = 0;
var objectives = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var objectives_got = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
var favors = new Array(0, 0, 0, 0);
var favors_used = new Array(0, 0, 0, 0);
var show_favor = new Array(0, 0, 0, 0);
var bodycount = new Array(0, 0, 0, 0, 0, 0);
var r_symbol = (random(3) + 1);
var item_slots = new Array();
var item_slots_pos = 0;
var wrong_item = false;
var badge = 1;
var cinema = false;
var walk = true;
var alien_fixed = false;
var m_click = false;
var m_click_time = 0;
var m_item = false;
var m_aim = false;
var press_right = false;
var press_left = false;
var entrance = 0;
var exit_right = false;
var exit_left = false;
var exit_down = false;
var exit_up = false;
var area_right = 1;
var area_left = -1;
var limit_right_z = true;
var limit_left_z = true;
var used_item = 0;
var player = _root.game.alien;
var m_target;
var m_inventory;
var interacting;
var gun_have = true;
var gun_active = true;
var gun_unsafe = false;
var ammo = 0;
var hit = false;
var wounded = false;
var shield = false;
var shield_hp = 2;
var disguise = false;
var tradingpost = new Array(1, 2, 3, 4, 5, 6, 7, 8);
var informant = (random(6) + 1);
game.npcs = 0;
game.pighunter_stage = 0;
game.catapult_pieces = new Array(0, 0, 0);
_quality = "medium";
createEmptyMovieClip("sound", 2);
createEmptyMovieClip("music", 3);
sound.all_sound = new Sound(sound);
music.all_music = new Sound(music);
var key_object = new Object();
key_object.onKeyDown = function () {
if (testmode == true) {
if (Key.isDown(39)) {
game.nextFrame();
}
if (Key.isDown(37)) {
game.prevFrame();
}
}
};
Key.addListener(key_object);
inventory_gun.gotoAndStop(2);
if (testmode == true) {
item_slots = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27);
item_slots_pos = 0;
favors = new Array(1, 2, 3, 4);
ammo = 3;
game.get_2 = true;
game.gotoAndStop(11);
} else {
item_slots[0] = 10;
game.gotoAndStop(28);
}
stop();
Frame 5
prevFrame();
Frame 6
function onEnterFrame() {
}
_quality = "HIGH";
Mouse.show();
stopAllSounds();
f_total_score();
Frame 7
_root.kongregateStats.submit("GameComplete", 1);
Symbol 22 MovieClip [squidgy] Frame 1
#initclip 51
Object.registerClass("squidgy", item);
#endinitclip
stop();
Symbol 22 MovieClip [squidgy] Frame 2
if (_parent.pee_guard_dead == true) {
_parent.blob_speech.gotoAndStop(3);
} else {
_parent.blob_speech.gotoAndStop(2);
}
_root.cinema = true;
Symbol 28 MovieClip Frame 1
function onEnterFrame() {
if (_parent._parent.snake_speech._currentframe > 1) {
play();
} else {
gotoAndStop (1);
}
}
Symbol 30 MovieClip [snake] Frame 1
#initclip 17
Object.registerClass("snake", item);
#endinitclip
interact_x = -50;
stop();
Symbol 30 MovieClip [snake] Frame 2
if ((_root.used_item == 27) || (_parent.give_toy == true)) {
_parent.give_toy = true;
_parent.babysnake.nextFrame();
_parent.snake_speech.gotoAndStop(3);
} else if (_root.wrong_item == true) {
_root.wrong_item = false;
_parent.snake_speech.gotoAndStop(4);
} else {
_parent.snake_speech.gotoAndStop(2);
}
Symbol 32 MovieClip [pipe appear] Frame 1
#initclip 18
Object.registerClass("pipe appear", item);
#endinitclip
_root.exit_right = true;
stop();
Symbol 32 MovieClip [pipe appear] Frame 19
id = 19;
collectable = true;
_root.exit_right = false;
Symbol 32 MovieClip [pipe appear] Frame 20
if (_visible == false) {
_root.exit_right = true;
}
Symbol 32 MovieClip [pipe appear] Frame 21
gotoAndPlay(_currentframe - 1);
Symbol 41 MovieClip [pee guard] Frame 1
#initclip 19
Object.registerClass("pee guard", item);
#endinitclip
enemy = true;
if (_parent.guard_pissing != true) {
_visible = false;
}
if (_parent.pee_guard_dead == true) {
gotoAndStop(_totalframes);
} else {
stop();
}
Symbol 41 MovieClip [pee guard] Frame 2
_root.f_new_kill(3);
_parent.pee_guard_dead = true;
_root.f_sound("splat1", 1);
Symbol 41 MovieClip [pee guard] Frame 14
_root.f_complete_quest(4);
alive = false;
stop();
Symbol 41 MovieClip [pee guard] Frame 15
prevFrame();
Symbol 47 MovieClip [door open1] Frame 1
#initclip 20
Object.registerClass("door open1", item);
#endinitclip
stop();
Symbol 47 MovieClip [door open1] Frame 2
if (_parent._currentframe == 24) {
if ((_root.badge == 4) && (_parent.appointment == true)) {
_root.cinema = true;
_root.f_sound("doorslide", 1);
} else {
if (_root.badge == 4) {
_parent.sec_speech.gotoAndStop(3);
} else {
_parent.sec_speech.gotoAndStop(2);
}
prevFrame();
}
}
Symbol 47 MovieClip [door open1] Frame 15
_root.f_advance(1, 1);
Symbol 65 MovieClip [at desk] Frame 1
#initclip 21
Object.registerClass("at desk", item);
#endinitclip
enemy = true;
if (_parent.lobe_dead == true) {
gotoAndStop(_totalframes);
} else {
stop();
}
Symbol 65 MovieClip [at desk] Frame 2
_root.f_new_kill(5);
_parent.lobe_dead = true;
_root.f_sound("splat1", 1);
Symbol 65 MovieClip [at desk] Frame 12
alive = false;
_root.f_complete_quest(6, 1);
Symbol 65 MovieClip [at desk] Frame 49
if (_parent.worm_dead != true) {
_root.loyalty = 1;
}
_root.gotoAndStop("end");
Symbol 69 MovieClip [HOSES] Frame 1
#initclip 22
Object.registerClass("HOSES", item);
#endinitclip
id = 2;
if (_parent.get_2 == true) {
collectable = true;
nextFrame();
} else {
stop();
}
Symbol 69 MovieClip [HOSES] Frame 2
if (collectable != true) {
prevFrame();
} else {
_parent.sd_attachment.collectable = false;
}
_parent.trading1 = false;
collectable = false;
_visible = true;
Symbol 74 MovieClip [power beams] Frame 1
#initclip 23
Object.registerClass("power beams", item);
#endinitclip
interact_x = -70;
interact_y = -40;
if (ini != true) {
ini = true;
if (_parent.security2 == false) {
gotoAndStop(_totalframes - 1);
}
}
Symbol 74 MovieClip [power beams] Frame 2
if (_root.badge == 2) {
_parent.security2 = false;
}
if (_parent.security2 != false) {
gotoAndPlay (1);
} else {
_root.f_sound("powerdown", 1);
}
Symbol 74 MovieClip [power beams] Frame 12
stop();
Symbol 74 MovieClip [power beams] Frame 13
_root.gun_active = true;
_parent.new_song = false;
_root.f_new_mainquest(5);
_root.f_advance(1, 8);
Symbol 81 MovieClip [whirly blade] Frame 1
#initclip 24
Object.registerClass("whirly blade", item);
#endinitclip
enemy = true;
if (_parent.bathroom_fan == false) {
gotoAndStop ("static");
} else {
stop();
}
Symbol 81 MovieClip [whirly blade] Frame 9
gotoAndStop (1);
Symbol 81 MovieClip [whirly blade] Frame 10
stop();
Symbol 87 MovieClip [dryer] Frame 1
#initclip 25
Object.registerClass("dryer", item);
#endinitclip
dof = true;
stop();
Symbol 87 MovieClip [dryer] Frame 8
stop();
Symbol 93 MovieClip Frame 1
function onEnterFrame() {
if (_root.game.makecoffee > 0) {
gotoAndStop(_root.game.makecoffee + 1);
} else {
gotoAndStop (1);
}
}
Symbol 94 MovieClip [coffeemaker] Frame 1
#initclip 26
Object.registerClass("coffeemaker", item);
#endinitclip
interact_y = -50;
stop();
Symbol 94 MovieClip [coffeemaker] Frame 2
_root.cinema = true;
_parent.coffeemachinepop.play();
Symbol 96 MovieClip [item_door3 copy 3] Frame 1
#initclip 27
Object.registerClass("item_door3 copy 3", item);
#endinitclip
stop();
Symbol 96 MovieClip [item_door3 copy 3] Frame 2
_root.f_advance(1, -1);
Symbol 114 MovieClip Frame 149
_parent.nextFrame();
Symbol 119 MovieClip Frame 5
_root.game.alien.walksounds();
Symbol 119 MovieClip Frame 20
_root.game.alien.walksounds();
Symbol 121 MovieClip Frame 1
_root.cinema = true;
Symbol 121 MovieClip Frame 2
function onEnterFrame() {
_parent._y = _parent._y + 0.25;
}
Symbol 121 MovieClip Frame 30
_root.game.alien.dir = "left";
Symbol 121 MovieClip Frame 106
function onEnterFrame() {
}
_parent._parent.bathroomdoor1.npc_interact = true;
_parent._parent.bathroomdoor1.play();
Symbol 121 MovieClip Frame 137
_root.cinema = false;
_parent._parent.guard_pissing = true;
_parent.gotoAndStop(4);
Symbol 122 MovieClip [ob_guard] Frame 1
#initclip 28
Object.registerClass("ob_guard", item);
#endinitclip
this.cacheAsBitmap = true;
interact_y = -150;
if (_parent.guard_pissing == true) {
gotoAndStop (4);
} else {
stop();
}
Symbol 122 MovieClip [ob_guard] Frame 2
if (_root.used_item == 16) {
_parent.guard_speech.gotoAndStop(3);
stop();
} else {
_parent.guard_speech.gotoAndStop(2);
prevFrame();
}
Symbol 124 MovieClip [exit1] Frame 1
#initclip 29
Object.registerClass("exit1", item);
#endinitclip
stop();
Symbol 124 MovieClip [exit1] Frame 2
_root.f_advance(1, -1);
Symbol 126 MovieClip [triggerbox3] Frame 1
#initclip 30
Object.registerClass("triggerbox3", item);
#endinitclip
stop();
Symbol 126 MovieClip [triggerbox3] Frame 2
_parent.keypad2.play();
_root.cinema = true;
Symbol 127 MovieClip [triggerbox5] Frame 1
#initclip 31
Object.registerClass("triggerbox5", item);
#endinitclip
stop();
Symbol 127 MovieClip [triggerbox5] Frame 2
_parent.chart1.play();
_root.cinema = true;
Symbol 128 MovieClip [eventtriggerbox] Frame 1
#initclip 32
Object.registerClass("eventtriggerbox", item);
#endinitclip
stop();
Symbol 128 MovieClip [eventtriggerbox] Frame 2
_parent[targ].play();
_root.cinema = true;
Symbol 129 MovieClip [exit_zone] Frame 1
#initclip 33
Object.registerClass("exit_zone", item);
#endinitclip
stop();
Symbol 129 MovieClip [exit_zone] Frame 2
_root.f_advance(area);
Symbol 132 MovieClip Frame 1
function onEnterFrame() {
this.swapDepths(Math.ceil((_y - 0.1) * 10));
}
Symbol 133 MovieClip [bushes_overlay] Frame 1
#initclip 34
Object.registerClass("bushes_overlay", physical);
#endinitclip
Symbol 137 Button
on (release) {
if (_root.favors[1] == 0) {
_root.favors[1] = 2;
}
_root.f_complete_quest(9, 1);
_root.exit_right = true;
gotoAndStop (1);
}
Symbol 138 MovieClip [cattalk2] Frame 1
#initclip 35
Object.registerClass("cattalk2", chat);
#endinitclip
Symbol 141 Button
on (release) {
gotoAndStop (1);
}
Symbol 144 MovieClip [spider cave talk] Frame 1
#initclip 36
Object.registerClass("spider cave talk", chat);
#endinitclip
Symbol 146 MovieClip Frame 10
_root.cinema = false;
if (_root.game.objects.spider.enemy == true) {
_root.game.objects.spider.gotoAndStop("stuck2");
}
stop();
Symbol 147 MovieClip [flypaper clip] Frame 1
#initclip 37
Object.registerClass("flypaper clip", item);
#endinitclip
if (_root.game.flypaper == true) {
gotoAndStop (3);
}
Symbol 147 MovieClip [flypaper clip] Frame 2
_root.game.flypaper = true;
alive = false;
Symbol 147 MovieClip [flypaper clip] Frame 3
call(2);
Symbol 161 MovieClip Frame 1
function onEnterFrame() {
if (_root.game.cat_chat1._currentframe == 1) {
gotoAndStop (1);
} else {
play();
}
}
Symbol 162 MovieClip Frame 11
_root.game.cat_chat1.gotoAndStop(2);
stop();
Symbol 163 MovieClip [catinweb] Frame 1
#initclip 38
Object.registerClass("catinweb", item);
#endinitclip
interact_x = 50;
if ((_root.objectives[8] == 0) || (_root.objectives_got[8] > 0)) {
_visible = false;
}
Symbol 163 MovieClip [catinweb] Frame 2
if (_root.game.spider_dead == true) {
stop();
} else {
_root.game.alien_chat1.gotoAndStop(2);
prevFrame();
}
Symbol 163 MovieClip [catinweb] Frame 4
prevFrame();
Symbol 172 MovieClip Frame 24
_parent.nextFrame();
Symbol 177 MovieClip Frame 20
_parent.gotoAndStop("appear");
Symbol 183 MovieClip Frame 68
gotoAndPlay (10);
Symbol 188 MovieClip Frame 50
gotoAndPlay (10);
Symbol 196 MovieClip Frame 9
_root.game.spider_dead = true;
stop();
Symbol 197 MovieClip [SPIDERCREATURE] Frame 1
#initclip 39
Object.registerClass("SPIDERCREATURE", item);
#endinitclip
interact_x = 120;
if (_root.objectives_got[8] > 0) {
gotoAndStop (13);
}
Symbol 197 MovieClip [SPIDERCREATURE] Frame 2
_root.f_sound("monster1", 1);
if (_root.objectives[8] > 0) {
gotoAndStop ("appear");
} else {
_root.game.alien_chat1.gotoAndStop(3);
gotoAndStop (1);
}
Symbol 197 MovieClip [SPIDERCREATURE] Frame 4
enemy = true;
if (_root.game.flypaper == true) {
gotoAndStop ("stuck");
}
Symbol 197 MovieClip [SPIDERCREATURE] Frame 5
enemy = true;
Symbol 197 MovieClip [SPIDERCREATURE] Frame 6
if (_root.used_item == 3) {
gotoAndStop ("stuck");
}
Symbol 197 MovieClip [SPIDERCREATURE] Frame 7
enemy = false;
stop();
Symbol 197 MovieClip [SPIDERCREATURE] Frame 8
prevFrame();
Symbol 197 MovieClip [SPIDERCREATURE] Frame 9
prevFrame();
Symbol 197 MovieClip [SPIDERCREATURE] Frame 10
enemy = true;
Symbol 197 MovieClip [SPIDERCREATURE] Frame 12
if (_root.slingshot == true) {
_root.f_sound("hit", 1);
prevFrame();
} else {
_root.exit_right = false;
_root.f_sound("splat1", 1);
stop();
}
Symbol 200 Button
on (release) {
_root.game.objects.cat1.gotoAndStop(3);
nextFrame();
}
Symbol 203 Button
on (release) {
nextFrame();
}
Symbol 208 Button
on (release) {
_root.f_new_mainquest(9);
gotoAndStop (1);
}
Symbol 211 Button
on (release) {
gotoAndStop (1);
}
Symbol 212 MovieClip [cat_chat1] Frame 1
#initclip 40
Object.registerClass("cat_chat1", chat);
#endinitclip
Symbol 220 MovieClip Frame 13
_root.game.cat_chat1.gotoAndStop(2);
stop();
Symbol 221 MovieClip Frame 31
_root.game.cat_chat1.nextFrame();
stop();
Symbol 222 MovieClip [cat1] Frame 1
#initclip 41
Object.registerClass("cat1", item);
#endinitclip
if (_root.objectives_got[8] > 0) {
gotoAndStop (4);
} else if (_root.objectives[8] > 0) {
_visible = false;
}
Symbol 222 MovieClip [cat1] Frame 2
_root.cinema = true;
stop();
Symbol 222 MovieClip [cat1] Frame 3
_root.f_sound("monster1", 1);
Symbol 222 MovieClip [cat1] Frame 5
_root.cinema = true;
_root.game.cat_chat1.gotoAndStop("thanks");
prevFrame();
Symbol 227 Button
on (release) {
_root.f_new_mainquest(8);
gotoAndStop (1);
}
Symbol 242 Button
on (release) {
_root.f_complete_quest(8, 1);
_root.f_advance(1, 1);
gotoAndStop (1);
}
Symbol 243 MovieClip [catapultspeech] Frame 1
#initclip 42
Object.registerClass("catapultspeech", chat);
#endinitclip
Symbol 258 MovieClip [catapult] Frame 1
#initclip 43
Object.registerClass("catapult", item);
#endinitclip
function checker() {
cf = catapult._currentframe;
pieces = _root.game.catapult_pieces.join(",");
if ((pieces == "1,19,21") && (cf < 6)) {
catapult.gotoAndStop(6);
} else if ((pieces == "1,19,0") && (cf < 4)) {
catapult.gotoAndStop(4);
} else if ((pieces == "0,19,0") && (cf < 2)) {
catapult.gotoAndStop(2);
} else if (pieces == "0,0,0") {
if (_root.objectives[7] > 0) {
_root.game.alien_chat1.gotoAndStop(3);
} else {
_root.game.alien_chat1.gotoAndStop(2);
}
} else if (pieces == "1,0,0") {
_root.game.alien_chat1.gotoAndStop(4);
catapult.gotoAndStop(11);
} else if (pieces == "1,19,0") {
_root.game.alien_chat1.gotoAndStop(6);
catapult.gotoAndStop(5);
} else if (pieces == "1,0,21") {
_root.game.alien_chat1.gotoAndStop(5);
catapult.gotoAndStop(12);
} else if (pieces == "0,19,0") {
_root.game.alien_chat1.gotoAndStop(8);
catapult.gotoAndStop(3);
} else if (pieces == "0,19,21") {
_root.game.alien_chat1.gotoAndStop(7);
catapult.gotoAndStop(9);
} else if (pieces == "0,0,21") {
_root.game.alien_chat1.gotoAndStop(9);
catapult.gotoAndStop(10);
} else if (pieces == "1,19,21") {
_root.game.alien_chat1.gotoAndStop(10);
catapult.gotoAndStop(7);
}
_root.game.catapult_state = _currentframe;
}
if (ini != true) {
ini = true;
interact_y = -100;
zsort = true;
catapult.stop();
if (_root.game.catapult_pieces.join(",") != "0,0,0") {
checker();
}
}
Symbol 258 MovieClip [catapult] Frame 2
checker();
prevFrame();
Symbol 261 MovieClip [generic_boundary] Frame 1
#initclip 44
Object.registerClass("generic_boundary", obstacle);
#endinitclip
w = _width / 2;
if (_rotation == 0) {
h = _height / 2;
} else {
h = 20;
}
box._visible = false;
Symbol 262 MovieClip [target_box] Frame 1
#initclip 45
Object.registerClass("target_box", item);
#endinitclip
stop();
Symbol 262 MovieClip [target_box] Frame 2
_root.f_advance(area, ent);
Symbol 275 MovieClip Frame 15
stop();
Symbol 277 MovieClip Frame 21
_parent.collectable = true;
stop();
Symbol 278 MovieClip [birdzz] Frame 1
#initclip 46
Object.registerClass("birdzz", npc);
#endinitclip
id = 26;
enemy = true;
speed_fall = 0;
zsort = false;
Symbol 278 MovieClip [birdzz] Frame 2
if (_root.slingshot == true) {
stunned = true;
_root.f_sound("hit", 1);
nextFrame();
} else {
_root.f_sound("splat1", 1);
alive = false;
stop();
}
Symbol 278 MovieClip [birdzz] Frame 3
enemy = false;
_root.m_target = null;
collectable = true;
Symbol 281 Button
on (release) {
gotoAndStop (1);
}
Symbol 282 MovieClip [alien_chat1] Frame 1
#initclip 47
Object.registerClass("alien_chat1", chat);
#endinitclip
Symbol 284 MovieClip [rockity rock] Frame 1
#initclip 48
Object.registerClass("rockity rock", item);
#endinitclip
if (ini != true) {
ini = true;
id = 23;
interact_y = -100;
zsort = true;
collectable = true;
if (random(4) > 1) {
_visible = false;
}
}
Symbol 284 MovieClip [rockity rock] Frame 2
if (collectable == true) {
_root.ammo++;
_root.game.get_23 = false;
stop();
} else {
prevFrame();
}
Symbol 298 MovieClip [firepit] Frame 1
#initclip 49
Object.registerClass("firepit", obstacle);
#endinitclip
h = 20;
w = 70;
zsort = true;
pathing = false;
Symbol 307 MovieClip Frame 1
function f_anim() {
if (_root.game.alien.got_gun == true) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
function onEnterFrame() {
f_anim();
}
f_anim();
Symbol 317 MovieClip Frame 1
function onEnterFrame() {
gotoAndStop(_root.badge);
}
gotoAndStop(_root.badge);
Symbol 347 MovieClip Frame 1
function f() {
if (_root.wounded == true) {
_visible = true;
} else {
_visible = false;
}
}
function onEnterFrame() {
f();
}
f();
Symbol 358 MovieClip Frame 1
stop();
Symbol 372 MovieClip Frame 1
function onEnterFrame() {
gotoAndStop(_root.badge);
}
gotoAndStop(_root.badge);
Instance of Symbol 375 MovieClip in Symbol 376 MovieClip Frame 1
onClipEvent (load) {
if (_root.disguise == true) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Symbol 395 MovieClip Frame 1
function onEnterFrame() {
if (_parent._parent.laser._visible == false) {
play();
}
}
stop();
Symbol 397 MovieClip Frame 1
function f_state() {
if (_root.gun_active == false) {
gotoAndStop ("inactive");
} else if (_root.slingshot == true) {
gotoAndStop ("slingshot");
} else {
gotoAndStop (1);
}
}
function onEnterFrame() {
f_state();
}
f_state();
Instance of Symbol 364 MovieClip in Symbol 399 MovieClip Frame 2
onClipEvent (load) {
if (_root.disguise == false) {
_visible = false;
}
}
onClipEvent (enterFrame) {
if (_root.disguise == false) {
_visible = false;
}
}
Instance of Symbol 364 MovieClip in Symbol 399 MovieClip Frame 10
onClipEvent (load) {
if (_root.disguise == false) {
_visible = false;
}
}
onClipEvent (enterFrame) {
if (_root.disguise == false) {
_visible = false;
}
}
Symbol 403 MovieClip Frame 3
_root.player.walksounds();
Symbol 403 MovieClip Frame 15
_root.player.walksounds();
Symbol 408 MovieClip Frame 5
_root.player.walksounds();
Symbol 408 MovieClip Frame 17
_root.player.walksounds();
Symbol 424 MovieClip Frame 3
_root.player.walksounds();
Symbol 424 MovieClip Frame 13
_root.player.walksounds();
Symbol 425 MovieClip Frame 1
_root.player.walksounds();
Symbol 425 MovieClip Frame 19
_root.player.walksounds();
Symbol 426 MovieClip Frame 3
_root.player.walksounds();
Symbol 426 MovieClip Frame 17
_root.player.walksounds();
Symbol 427 MovieClip Frame 5
_root.player.walksounds();
Symbol 427 MovieClip Frame 17
_root.player.walksounds();
Symbol 443 MovieClip Frame 5
_root.player.walksounds();
Symbol 443 MovieClip Frame 17
_root.player.walksounds();
Symbol 445 MovieClip Frame 1
_root.player.walksounds();
Symbol 445 MovieClip Frame 19
_root.player.walksounds();
Symbol 446 MovieClip Frame 3
_root.player.walksounds();
Symbol 446 MovieClip Frame 15
_root.player.walksounds();
Symbol 447 MovieClip Frame 5
_root.player.walksounds();
Symbol 447 MovieClip Frame 17
_root.player.walksounds();
Symbol 461 MovieClip Frame 3
_root.player.walksounds();
Symbol 461 MovieClip Frame 13
_root.player.walksounds();
Symbol 462 MovieClip Frame 1
_root.player.walksounds();
Symbol 462 MovieClip Frame 19
_root.player.walksounds();
Symbol 463 MovieClip Frame 3
_root.player.walksounds();
Symbol 463 MovieClip Frame 15
_root.player.walksounds();
Symbol 464 MovieClip Frame 5
_root.player.walksounds();
Symbol 464 MovieClip Frame 17
_root.player.walksounds();
Symbol 478 MovieClip Frame 3
_root.player.walksounds();
Symbol 478 MovieClip Frame 13
_root.player.walksounds();
Symbol 479 MovieClip Frame 1
_root.player.walksounds();
Symbol 479 MovieClip Frame 19
_root.player.walksounds();
Symbol 482 MovieClip Frame 1
if (_root.disguise == true) {
nextFrame();
} else {
stop();
}
Symbol 484 MovieClip Frame 12
_root.game.alien.got_gun = false;
_root.f_sound("arm", 1);
Symbol 484 MovieClip Frame 36
_parent.gotoAndStop(1);
Symbol 484 MovieClip Frame 54
_root.f_sound("arm", 1);
Symbol 484 MovieClip Frame 60
_parent.gotoAndStop(1);
Symbol 485 MovieClip Frame 1
_root.cinema = true;
_root.f_sound("arm", 1);
Symbol 485 MovieClip Frame 15
_parent.got_gun = true;
Symbol 485 MovieClip Frame 19
_root.cinema = false;
_parent.gotoAndStop(1);
Symbol 486 MovieClip Frame 1
if (_root.disguise == true) {
nextFrame();
} else {
stop();
}
Symbol 505 MovieClip Frame 6
if (_root.slingshot == true) {
_root.f_sound("slingshot_fire", 1);
} else {
_root.f_sound("lasershot", 1);
}
if (_parent.deflect != true) {
gotoAndPlay ("fire");
}
Symbol 505 MovieClip Frame 15
_parent.gotoAndStop(1);
Symbol 505 MovieClip Frame 16
if (_root.slingshot == true) {
laser._visible = false;
}
Symbol 505 MovieClip Frame 19
if (((_parent._x > _root.m_target._x) && (_parent.dir == "left")) || ((_parent._x < _root.m_target._x) && (_parent.dir == "right"))) {
if (_root.slingshot == true) {
_root.ammo--;
}
if (_root.ammo == 0) {
_root.f_itemslot_free(23);
_root.cinema = false;
}
_root.m_target.play();
}
Symbol 505 MovieClip Frame 21
_parent.gotoAndStop(1);
Symbol 521 MovieClip Frame 46
_parent.gotoAndStop(1);
Symbol 526 MovieClip Frame 4
_root.wounded = true;
_root.f_advance(-1, -1);
_parent.gotoAndStop(1);
Symbol 529 MovieClip Frame 17
_root.cinema = false;
_parent.gotoAndStop(1);
Symbol 532 MovieClip Frame 9
stop();
Symbol 532 MovieClip Frame 16
_root.f_sound("lasershot", 1);
Symbol 532 MovieClip Frame 20
if (_root.m_target.cover == false) {
_root.m_target.play();
}
gotoAndPlay (1);
Symbol 533 MovieClip [player] Frame 1
#initclip 50
Object.registerClass("player", player);
#endinitclip
cover = false;
deflect = false;
if (_root.hit == true) {
_root.hit = false;
gotoAndStop ("blownback");
}
stop();
Symbol 533 MovieClip [player] Frame 7
_root.hit = true;
Symbol 533 MovieClip [player] Frame 8
_root.cinema = true;
dir = "right";
_x = (_x - 100);
Symbol 533 MovieClip [player] Frame 9
if (_root.slingshot == true) {
_root.f_change_item(24, 2);
}
_root.slingshot = false;
cover = true;
gun = true;
unholstered = true;
_root.inventory_gun.gotoAndStop(3);
Symbol 577 MovieClip Frame 40
stop();
Symbol 588 Button
on (press) {
tellTarget (_root) {
nextFrame();
};
}
Symbol 589 Button
on (press) {
gotoAndStop ("end");
_root.nextFrame();
}
Instance of Symbol 567 MovieClip in Symbol 590 MovieClip Frame 1
onClipEvent (load) {
_root.stop();
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndStop("lastframe");
}
}
onClipEvent (enterFrame) {
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndPlay("loaded");
}
}
Symbol 590 MovieClip Frame 101
play();
Symbol 590 MovieClip Frame 165
stop();
Symbol 595 Button
on (release) {
NewgroundsAPI.loadNewgrounds();
}
Symbol 599 Button
on (release) {
getURL ("http://www.newgrounds.com", "_blank");
}
Symbol 600 MovieClip Frame 1
function startAd(ngad_url) {
trace("opening " + ngad_url);
System.security.allowDomain("70.87.128.99");
System.security.allowInsecureDomain("70.87.128.99");
System.security.allowDomain("ads.shizmoo.com");
System.security.allowInsecureDomain("ads.shizmoo.com");
System.security.allowDomain("www.cpmstar.com");
System.security.allowInsecureDomain("www.cpmstar.com");
System.security.allowDomain("server.cpmstar.com");
System.security.allowInsecureDomain("server.cpmstar.com");
var ngads_redirect = new XML();
ngads_redirect.ignoreWhite = true;
ngads_redirect.onLoad = function (success) {
trace("[NEWGROUNDS FLASH ADS] :: You may get a 'Security Sandbox Violation' ... this is normal, do not freak out!");
if (success) {
ng_ad.loadMovie(ngads_redirect.toString(), "GET");
}
};
ngads_redirect.load(ngad_url);
}
if (NewgroundsAPI.getAdURL()) {
startAd(NewgroundsAPI.getAdURL());
}
NewgroundsAPI.onAdsApproved = function (ad_url) {
startAd(ad_url);
};
stop();
Symbol 625 MovieClip Frame 1
function onPress() {
timer = 600;
}
function onEnterFrame() {
timer++;
if (timer >= 600) {
if (_currentframe == _totalframes) {
gotoAndStop (1);
} else {
nextFrame();
}
timer = 0;
}
}
var timer = 570;
stop();
Symbol 659 MovieClip Frame 1
function onPress() {
timer = 600;
}
function onEnterFrame() {
timer++;
if (timer >= 600) {
if (_currentframe == _totalframes) {
gotoAndStop (1);
} else {
nextFrame();
}
timer = 0;
}
}
var timer = 570;
stop();
Symbol 661 MovieClip Frame 1
stop();
Symbol 663 MovieClip Frame 10
if (_root.testmode == true) {
_root.gotoAndStop("game");
}
Symbol 666 Button
on (release) {
this._visible = false;
}
Symbol 675 MovieClip Frame 1
_visible = false;
var checkConnection = function (event) {
if (!event.success) {
_visible = true;
gotoAndStop (3);
}
};
if (com.Newgrounds.NewgroundsAPI.isNewgrounds() || (_root.API_Settings.debug_mode)) {
com.Newgrounds.NewgroundsAPI.addEventListener(com.Newgrounds.NewgroundsAPI.events.MOVIE_CONNECTED, checkConnection);
if ((!com.Newgrounds.NewgroundsAPI.hasUserSession()) && (!_root.API_Settings.debug_mode)) {
_visible = true;
gotoAndStop (2);
}
}
com.Newgrounds.NewgroundsAPI.setMovieVersion(_root.API_Settings.movie_version);
com.Newgrounds.NewgroundsAPI.connectMovie(_root.API_Settings.movie_id, _root.API_Settings.enc_key, _root.API_Settings.debug_mode);
com.Newgrounds.NewgroundsAPI.loadMedals();
stop();
Symbol 688 MovieClip Frame 1
function unlockMedal(m_name) {
clearInterval(pop_delay);
var _local1 = com.Newgrounds.NewgroundsAPI.getMedals();
var _local2 = null;
for (i in _local1) {
if (_local1[i].medal_name == m_name) {
_local2 = _local1[i];
medal_name = _local2.medal_name;
medal_value = _local2.medal_value + "pts";
com.Newgrounds.NewgroundsAPI.unlockMedal(medal_name);
pop_delay = setInterval(endDelay, 3000);
_visible = true;
gotoAndPlay (2);
break;
}
}
}
function endDelay(params) {
gotoAndPlay (10);
clearInterval(pop_delay);
}
var pop_delay;
var medal_name = "?????";
var medal_value = "???";
_visible = false;
Symbol 688 MovieClip Frame 10
var myBitmapData = flash.display.BitmapData.loadBitmap(medal_name + ".gif");
medal_icon.attachBitmap(myBitmapData, 111);
stop();
Symbol 2075 MovieClip [__Packages.NewgroundsAPI] Frame 0
class NewgroundsAPI
{
static var tracker_id, host, version, debug, error_format, header_format, normal_format, link_format;
function NewgroundsAPI () {
}
static function connectMovie(id) {
if (!id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.connectMovie(id:Number)");
} else if (!tracker_id) {
SendMessage("Connecting to API gateway...");
tracker_id = id;
host = _url.split("/")[2].toLowerCase();
if (host.length < 1) {
host = "localhost";
}
var _local2 = new Object();
SendEvent(MOVIE_VIEWS);
}
}
static function setMovieVersion(movie_version) {
if (!movie_version) {
SendError("Missing required 'version' in NewgroundsAPI.setMovieVersion(version:String)");
} else {
version = movie_version;
}
}
static function debugMode() {
debug = true;
}
static function addCustomEvent(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else if (!stat_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else {
custom_events[stat_name] = CUSTOM_STATS + stat_id;
SendMessage("Created custom event: " + stat_name);
}
}
static function addCustomLink(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else if (!stat_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else {
custom_links[stat_name] = CUSTOM_STATS + stat_id;
SendMessage((("Created custom link " + stat_id) + ": ") + stat_name);
}
}
static function loadMySite() {
SendLink(AUTHOR_SITE);
}
static function loadNewgrounds(special) {
if (special) {
var _local1 = {page:special};
}
SendLink(NEWGROUNDS, _local1);
}
static function logCustomEvent(event_name) {
if (!event_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.logCustomEvent(event_name:String)");
} else if (!custom_events[event_name]) {
SendError("Attempted to log undefined custom event: " + event_name);
} else {
SendEvent(custom_events[event_name]);
}
}
static function loadCustomLink(link_name) {
if (!link_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.loadCustomLink(link_name:String)");
} else if (!custom_links[link_name]) {
SendError("Attempted to open undefined custom link: " + link_name);
} else {
SendLink(custom_links[link_name]);
}
}
static function getAdURL() {
return(movie_options.ad_url);
}
static function getMovieURL() {
if (movie_options.movie_url) {
return(movie_options.movie_url);
}
return("Newgrounds.com");
}
static function getNewVersionURL() {
return((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + NEW_VERSION);
}
static function SendEvent(id) {
SendStat(id, false);
}
static function SendLink(id, extra) {
SendStat(id, true, extra);
}
static function ReadGatewayData(params) {
for (var _local2 in params) {
params[_local2] = unescape(params[_local2]);
movie_options[_local2] = params[_local2];
}
if (params.settings_loaded) {
SendMessage("You have successfully connected to the Newgrounds API gateway!");
SendMessage(("Movie Identified as '" + movie_options.movie_name) + "'");
if (movie_options.message) {
SendMessage(movie_options.message);
}
if (movie_options.ad_url) {
SendMessage("Your movie has been approved to run Flash Ads");
onAdsApproved(movie_options.ad_url);
}
if (movie_options.movie_version and (movie_options.movie_version.toString() != version.toString())) {
SendMessage("WARNING: The movie version configured in your API settings does not match this movie's version!");
onNewVersionAvailable(movie_options.movie_version, getMovieURL(), getNewVersionURL());
}
if (movie_options.deny_host) {
SendMessage("You have blocked 'localHost' in your API settings.");
SendMessage("If you wish to test your movie you will need to remove this block.");
onDenyHost(host, getMovieURL(), getNewVersionURL());
}
if (movie_options.request_portal_url == 1) {
var _local4 = (((GATEWAY_URL + "?&id=") + tracker_id) + "&portal_url=") + escape(_url);
var _local3 = new XML();
_local3.ignoreWhite = true;
_local3.load(_local4);
}
} else if (!movie_options.settings_loaded) {
SendError("Could not establish connection to the API gateway.");
}
}
static function SendStat(stat_id, open_in_browser, extra) {
if (!tracker_id) {
SendError("API calls cannot be made without a valid movie id.");
SendError("Did you remember to add the \"NewgroundsAPI.connectMovie()\" code?");
} else {
var _local7 = (((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + stat_id;
for (var _local9 in extra) {
_local7 = _local7 + ((("&" + escape(_local9)) + "=") + escape(extra[_local9]));
}
trace(_local7);
if (debug) {
_local7 = _local7 + "&debug=1";
}
if (open_in_browser) {
getURL (_local7, "_blank");
} else {
var _local10 = new XML();
_local10.ignoreWhite = true;
_local10.onLoad = function (success) {
var _local6 = new Object();
var _local3 = 0;
while (_local3 < this.firstChild.childNodes.length) {
var _local4 = this.firstChild.childNodes[_local3];
var _local5 = _local4.nodeName;
var _local2 = _local4.attributes.value;
if (_local2 == Number(_local2)) {
_local2 = Number(_local2);
}
_local6[_local5] = _local2;
_local3++;
}
NewgroundsAPI.ReadGatewayData(_local6);
};
_local10.load(_local7);
}
}
}
static function SendError(msg) {
trace("[NEWGROUNDS API ERROR] :: " + msg);
}
static function SendMessage(msg) {
trace("[NEWGROUNDS API] :: " + msg);
}
static function InitTextFormats() {
if (!error_format) {
error_format = new TextFormat();
error_format.font = "Arial Black";
error_format.size = 48;
error_format.color = 16711680 /* 0xFF0000 */;
}
if (!header_format) {
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.size = 24;
header_format.color = 16777215 /* 0xFFFFFF */;
}
if (!normal_format) {
normal_format = new TextFormat();
normal_format.font = "Arial";
normal_format.bold = true;
normal_format.size = 12;
normal_format.color = 16777215 /* 0xFFFFFF */;
}
if (!link_format) {
link_format = new TextFormat();
link_format.color = 16776960 /* 0xFFFF00 */;
link_format.underline = true;
}
}
static function onNewVersionAvailable(version, movie_url, redirect_url) {
InitTextFormats();
var _local2 = new Object();
_local2.x = Stage.width / 2;
_local2.y = Stage.height / 2;
_root.createEmptyMovieClip("NGAPI_new_version_overlay", _root.getNextHighestDepth());
_root.NGAPI_new_version_overlay.lineStyle(1, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(0, 70);
_root.NGAPI_new_version_overlay.moveTo(-10, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, -10);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.lineStyle(10, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(51);
_root.NGAPI_new_version_overlay.moveTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.createEmptyMovieClip("exit", 1000);
_root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100);
_root.NGAPI_new_version_overlay.exit.beginFill(0, 50);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.endFill();
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 214, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 226, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 226, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 214, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.onMouseUp = function () {
if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) {
_root.NGAPI_new_version_overlay.removeMovieClip();
}
};
var _local3 = (("Version " + version) + " is now available at:") + newline;
var _local5 = _local3.length;
_local3 = _local3 + movie_url;
var _local4 = _local3.length;
_root.NGAPI_new_version_overlay.createTextField("mouseblocker", 99, -10, -10, 1000, 1000);
_root.NGAPI_new_version_overlay.createTextField("newversion", 100, _local2.x - 210, _local2.y - 90, 400, 80);
_root.NGAPI_new_version_overlay.newversion.text = "New Version Available!";
_root.NGAPI_new_version_overlay.newversion.setTextFormat(header_format);
_root.NGAPI_new_version_overlay.createTextField("message", 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40);
_root.NGAPI_new_version_overlay.message.text = _local3;
_root.NGAPI_new_version_overlay.message.multiline = true;
_root.NGAPI_new_version_overlay.message.wordWrap = true;
_root.NGAPI_new_version_overlay.message.html = true;
_root.NGAPI_new_version_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_new_version_overlay.message.setTextFormat(_local5, _local4, link_format);
}
static function onDenyHost(hostname, movie_url, redirect_url) {
InitTextFormats();
_root.createEmptyMovieClip("NGAPI_deny_host_overlay", _root.getNextHighestDepth());
_root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100);
_root.NGAPI_deny_host_overlay.beginFill(6684672);
_root.NGAPI_deny_host_overlay.moveTo(0, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, 0);
_root.NGAPI_deny_host_overlay.endFill();
var _local2 = ("This movie has not been approved for use on " + hostname) + ".";
_local2 = _local2 + "\r\rFor an aproved copy, please visit:\r";
var _local4 = _local2.length;
_local2 = _local2 + movie_url;
var _local3 = _local2.length;
_root.NGAPI_deny_host_overlay.createTextField("mousekill", 100, 0, 0, Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.createTextField("error", 101, (Stage.width - 400) / 2, (Stage.height / 2) - 100, 400, 200);
_root.NGAPI_deny_host_overlay.error.text = "ERROR!";
_root.NGAPI_deny_host_overlay.error.setTextFormat(error_format);
_root.NGAPI_deny_host_overlay.createTextField("message", 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200);
_root.NGAPI_deny_host_overlay.message.text = _local2;
_root.NGAPI_deny_host_overlay.message.multiline = true;
_root.NGAPI_deny_host_overlay.message.wordWrap = true;
_root.NGAPI_deny_host_overlay.message.html = true;
_root.NGAPI_deny_host_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_deny_host_overlay.message.setTextFormat(_local4, _local3, link_format);
}
static function isInstalled() {
return(true);
}
static function onAdsApproved(ad_url) {
}
static var movie_options = new Object();
static var custom_events = new Object();
static var custom_links = new Object();
static var MOVIE_VIEWS = 1;
static var AUTHOR_SITE = 2;
static var NEWGROUNDS = 3;
static var NEW_VERSION = 4;
static var CUSTOM_STATS = 50;
static var GATEWAY_URL = "http://www.ngads.com/gateway.php";
}
Symbol 2076 MovieClip [__Packages.com.Newgrounds.BaseN] Frame 0
class com.Newgrounds.BaseN
{
var ceiling, hashIndex, bitSize, hashVal, i;
function BaseN (hash) {
ceiling = 100000000000000;
if (hash) {
hashIndex = hash;
} else {
hashIndex = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/";
}
bitSize = hashIndex.length;
hashVal = new Object();
i = 0;
while (i < bitSize) {
hashVal[hashIndex.charAt(i)] = i;
i++;
}
}
function verify(s) {
if (hashVal[s] != undefined) {
return(true);
}
return(false);
}
function encode(n, minchars) {
debug.lastencode = "";
if (typeof(i) != "string") {
n = n.toString();
}
if (n.charAt(0) == "-") {
var _local3 = "-";
n = n.substring(1);
} else {
var _local3 = "";
}
if (String(n).indexOf(".") > -1) {
var _local4 = String(n).split(".", 2);
return(((_local3 + baseNEncoder(_local4[0], minchars)) + ".") + baseNEncoder(_local4[1]));
}
debug.lastencode = debug.lastencode + "\tNo decimal\r";
return(_local3 + baseNEncoder(n, minchars));
}
function decode(s) {
var _local4 = 1;
if (s.charAt(0) == "-") {
_local4 = -1;
s = s.substring(1, s.length);
}
var _local3 = s.indexOf(".");
if (_local3 > -1) {
var _local5 = Math.pow(10, baseNDecoder(s.substring(_local3 + 1, s.length)));
return((baseNDecoder(s.substring(0, _local3)) / _local5) * _local4);
}
return(baseNDecoder(s) * _local4);
}
function baseNEncoder(n, minchars) {
if (!minchars) {
minchars = 1;
}
var _local4 = "";
while (n != 0) {
n = Math.round(n);
var _local3 = n % bitSize;
if (Math.round(_local3) != _local3) {
trace((((((((("BaseN failed on " + n) + "%") + bitSize) + " = ") + _local3) + " ") + int(n)) + " ") + int(bitSize));
}
_local4 = hashIndex.charAt(_local3) + _local4;
debug.lastencode = debug.lastencode + (((((((("\t-> n:" + n) + " % bitSize:") + bitSize) + " = ") + _local3) + ", final char=") + _local4) + newline);
n = n - _local3;
n = n / bitSize;
}
if (minchars) {
while (_local4.length < minchars) {
_local4 = hashIndex.charAt(0) + _local4;
}
}
return(_local4);
}
function baseNDecoder(s) {
var _local2 = 0;
var _local6 = 0;
i = 0;
while (i < s.length) {
var _local3 = s.charAt((s.length - i) - 1);
if (_local3 == hashIndex.charAt(0)) {
var _local5 = 0;
} else {
var _local5 = hashVal[_local3] * Math.pow(bitSize, i);
}
_local2 = _local2 + _local5;
if (_local2 >= ceiling) {
_local6 = _local6 + ((_local2 - (_local2 % ceiling)) / ceiling);
_local2 = _local2 % ceiling;
}
i++;
}
if (_local6 > 0) {
_local2 = "" + _local2;
while (_local2.length < (ceiling.toString().length - 1)) {
_local2 = "0" + _local2;
}
_local2 = ("" + _local6) + _local2;
}
return(_local2);
}
var debug = new Object();
}
Symbol 2077 MovieClip [__Packages.com.Newgrounds.NewgroundsAPIError] Frame 0
class com.Newgrounds.NewgroundsAPIError
{
var message, name, alias;
function NewgroundsAPIError (error, msg) {
if (Number(error).toString() == String(error)) {
error = Number(error);
} else if (error_codes[String(error)]) {
error = error_codes[String(error)];
} else {
error = 0;
}
code = error;
message = msg;
name = error_names[error];
alias = aliases[error];
}
static function init_codes() {
var _local2 = new Object();
var _local1 = 0;
while (_local1 < aliases.length) {
_local2[aliases[_local1]] = _local1;
_local1++;
}
return(_local2);
}
static function init_names() {
var _local5 = new Array();
var _local3 = 0;
while (_local3 < aliases.length) {
var _local2 = aliases[_local3].toLowerCase().split("_");
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = _local2[_local1].substr(0, 1).toUpperCase() + _local2[_local1].substr(1, _local2[_local1].length);
for (var _local4 in always_caps) {
if (_local2[_local1].toUpperCase() == always_caps[_local4]) {
_local2[_local1] = _local2[_local1].toUpperCase();
}
}
_local1++;
}
_local5[_local3] = _local2.join(" ");
_local3++;
}
return(_local5);
}
function isError() {
return(true);
}
static var aliases = new Array("UNKNOWN_ERROR", "INVALID_API_ID", "MISSING_PARAM", "INVALID_STAT_ID", "INVALID_COMMAND_ID", "FLASH_ADS_NOT_APPROVED", "PERMISSION_DENIED", "IDENTIFICATION_REQUIRED", "INVALID_EMAIL_ADDRESS", "BANNED_USER", "SESSION_EXPIRED", "INVALID_SCORE", "INVALID_MEDAL", "INVALID_FOLDER", "FILE_NOT_FOUND", "SITE_ID_REQUIRED", "UPLOAD_IN_PROGRESS", "USER_CANCELLED", "CONFIRM_REQUEST", "CONNECTION_FAILED");
static var always_caps = new Array("API", "URL", "ID");
static var error_codes = init_codes();
static var error_names = init_names();
var code = 0;
}
Symbol 2078 MovieClip [__Packages.com.Newgrounds.NewgroundsAPI] Frame 0
class com.Newgrounds.NewgroundsAPI
{
static var version, user_email, movie_id, debug, session_id, publisher_id, timeout, connected, tracker_id, encryption_key, user_id, user_name, host, error_format, normal_format, link_format, header_format, ad_url, ad_swf_url;
function NewgroundsAPI () {
}
static function setMovieVersion(v) {
if (v) {
version = String(v);
}
}
static function setUserEmail(e) {
user_email = e;
}
static function getOfficialVersionURL() {
var _local1 = (((((GATEWAY_URL + "?tracker_id=") + movie_id) + "&command_id=") + getCommandID("loadOfficalVersion")) + "&seed=") + Math.random();
if (debug) {
_local1 = _local1 + "&debug=1";
}
return(_local1);
}
static function hasUserSession() {
if (session_id && (publisher_id)) {
return(true);
}
if (_root.NewgroundsAPI_PublisherID && (_root.NewgroundsAPI_SessionID)) {
return(true);
}
return(false);
}
static function isNewgrounds() {
return(((publisher_id == 1) || (_root.NewgroundsAPI_PublisherID == 1)) || (getHost().toLowerCase().indexOf("ungrounded.net") > -1));
}
static function hasPublisher() {
return(publisher_id || (_root.NewgroundsAPI_PublisherID));
}
static function hasUserEmail() {
if (user_email) {
return(true);
}
return(false);
}
static function connectionTimeOut() {
clearInterval(timeout);
callListener(events.MOVIE_CONNECTED, false, new com.Newgrounds.NewgroundsAPIError("CONNECTION_FAILED", "Connection to NewgroundsAPI gateway timed out."));
}
static function connectMovie(m_id, encrypt_key, debug_mode) {
if (connected) {
return(undefined);
}
var _local2 = function () {
com.Newgrounds.NewgroundsAPI.connectionTimeOut();
};
timeout = setInterval(_local2, 8000, null);
if (!m_id) {
fatalError("NewgroundsAPI.connectMovie() - missing required movie_id parameter", "connectMovie");
}
movie_id = String(m_id);
tracker_id = Number(movie_id.substring(0, movie_id.indexOf(":")));
encryption_key = encrypt_key;
debug = debug_mode;
if (_root.NewgroundsAPI_PublisherID) {
publisher_id = _root.NewgroundsAPI_PublisherID;
if (_root.NewgroundsAPI_SessionID) {
session_id = _root.NewgroundsAPI_SessionID;
}
} else {
publisher_id = 1;
session_id = null;
user_id = 0;
user_name = "Guest";
}
if (_root.NewgroundsAPI_UserName) {
user_name = _root.NewgroundsAPI_UserName;
}
if (_root.NewgroundsAPI_UserID) {
user_id = _root.NewgroundsAPI_UserID;
}
connected = true;
sendCommand("connectMovie", {host:getHost(), movie_version:version});
}
static function getHost() {
if (!host) {
var _local1 = _url;
if ((_local1.indexOf("http://") > -1) or (_local1.indexOf("https://") > -1)) {
host = _local1.split("/")[2].toLowerCase();
} else {
host = "localhost";
}
}
return(host);
}
static function loadNewgrounds() {
sendCommand("loadNewgrounds", {host:getHost()}, true);
}
static function loadMySite() {
sendCommand("loadMySite", {host:getHost()});
}
static function loadCustomLink(link) {
sendCommand("loadCustomLink", {host:getHost(), link:link}, true);
}
static function logCustomEvent(event) {
sendCommand("logCustomEvent", {host:getHost(), event:event});
}
static function postScore(score, value, get_best) {
if ((!score) or (value == undefined)) {
sendError({command_id:getCommandID("postScore")}, new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", "missing required parameter(s)"));
return(undefined);
}
sendSecureCommand("postScore", {score:score, value:value, get_best:get_best});
}
static function getTodaysScores(score, params) {
getScores(score, "t", params, "getTodaysScores");
}
static function getYesterdaysScores(score, params) {
getScores(score, "y", params, "getYesterdaysScores");
}
static function getThisWeeksScores(score, params) {
getScores(score, "w", params, "getThisWeeksScores");
}
static function getThisMonthsScores(score, params) {
getScores(score, "m", params, "getThisMonthsScores");
}
static function getThisYearsScores(score, params) {
getScores(score, "y", params, "getThisYearsScores");
}
static function getAlltimeScores(score, params) {
getScores(score, "a", params, "getAlltimeScores");
}
static function getScores(score, period, params, command_name) {
if (!score) {
sendError({command_id:getCommandID(command_name)}, new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", "missing required score name"));
return(undefined);
}
if (!params) {
params = new Object();
}
if (!hasUserSession()) {
callListener(events.SCORES_LOADED, false, new com.Newgrounds.NewgroundsAPIError("SITE_ID_REQUIRED", ("Host '" + getHost()) + "' does not have high scores enabled"));
return(undefined);
}
params.publisher_id = publisher_id;
params.period = period;
params.score = score;
if (params.user_id) {
var _local3 = period;
} else {
var _local3 = period + "-u";
}
if (score_page_counts[_local3] == undefined) {
params.request_page_count = true;
}
sendCommand("getScores", params);
}
static function unlockMedal(medal, get_score) {
if (!medal) {
sendError({command_id:getCommandID("unlockMedal")}, new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", "missing required medal name"));
return(undefined);
}
var _local1 = new Object();
_local1.medal = medal;
if (get_score) {
_local1.get_score = get_score;
}
sendSecureCommand("unlockMedal", _local1);
}
static function loadMedals() {
if (medals) {
callListener(events.MEDALS_LOADED, true, {medals:medals});
return(undefined);
}
var _local1 = new Object();
if (hasUserSession()) {
_local1.publisher_id = publisher_id;
_local1.user_id = user_id;
}
sendCommand("getMedals", _local1);
}
static function getMedals() {
return(medals);
}
static function saveLocal(save_id, save_data, size_allocation) {
if (!sharedObjects[save_id]) {
sharedObjects[save_id] = SharedObject.getLocal((("ng_ap_secure_" + movie_id) + "_") + save_id);
}
sharedObjects[save_id].data[save_id] = encodeData(save_data);
sharedObjects[save_id].flush();
}
static function loadLocal(save_id) {
if (!sharedObjects[save_id]) {
sharedObjects[save_id] = SharedObject.getLocal((("ng_ap_secure_" + movie_id) + "_") + save_id);
}
sharedObjects[save_id].flush();
if (sharedObjects[save_id].data[save_id]) {
return(decodeData(sharedObjects[save_id].data[save_id]));
}
return(null);
}
static function encodeData(data) {
return(compressHex(com.Newgrounds.RC4.encrypt(com.Newgrounds.JSON.encode(data), encryption_key)));
}
static function decodeData(base) {
return(com.Newgrounds.JSON.decode(com.Newgrounds.RC4.decrypt(uncompressHex(base), encryption_key)));
}
static function compressHex(hex_value) {
var _local5 = hex_value.length % 6;
var _local4 = "";
var _local1 = 0;
while (_local1 < hex_value.length) {
var _local2 = Number("0x" + hex_value.substr(_local1, 6));
_local4 = _local4 + compressor.encode(_local2, 4);
_local1 = _local1 + 6;
}
return(_local5 + _local4);
}
static function uncompressHex(base_value) {
var _local8 = Number(base_value.charAt(0));
var _local7 = "";
var _local3;
var _local2 = 1;
while (_local2 < base_value.length) {
var _local6 = base_value.substr(_local2, 4);
var _local5 = compressor.decode(_local6);
var _local1 = dec2hex(_local5);
if ((_local2 + 4) < base_value.length) {
_local3 = 6;
} else {
_local3 = _local8;
}
while (_local1.length < _local3) {
_local1 = "0" + _local1;
}
_local7 = _local7 + _local1;
_local2 = _local2 + 4;
}
return(_local7);
}
static function dec2hex(dec) {
var _local4 = "0123456789ABCDEF";
var _local3 = "";
while (dec > 0) {
var _local2 = dec % 16;
_local3 = _local4.charAt(_local2) + _local3;
dec = (dec - _local2) / 16;
}
return(_local3);
}
static function saveFile(folder, filename, contents, thumbnail_source) {
if (!save_file) {
save_file = new com.Newgrounds.NewgroundsAPISaveFile(movie_id, folder, filename);
save_file.setContents(contents);
if (thumbnail_source) {
save_file.setThumbnail(thumbnail_source);
}
save_file.onError = function (msg) {
var _local1 = new com.Newgrounds.NewgroundsAPIError("PERMISSION_DENIED", msg);
com.Newgrounds.NewgroundsAPI.sendError({command_id:com.Newgrounds.NewgroundsAPI.getCommandID("saveFile")}, _local1);
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, _local1);
};
save_file.onCancel = function (msg) {
var _local1 = new com.Newgrounds.NewgroundsAPIError("USER_CANCELLED", msg);
com.Newgrounds.NewgroundsAPI.callListener(com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, false, _local1);
};
save_file.submit();
} else {
var _local1 = new com.Newgrounds.NewgroundsAPIError("UPLOAD_IN_PROGRESS", "Please wait for the previous file to finish uploading");
sendError({command_id:getCommandID("saveFile")}, _local1);
callListener(events.FILE_SAVED, false, _local1);
}
}
static function checkFilePrivs(folder, filename) {
if (user_id) {
var _local1 = user_id;
} else {
var _local1 = 0;
}
var _local2 = {folder:folder, filename:filename, user_id:_local1, publisher_id:publisher_id};
sendCommand("checkFilePrivs", _local2);
}
static function finishFileSave(folder, filename, description, share, file, thumbnail) {
var _local2;
_local2 = {folder:folder, filename:filename, description:description, share:share};
var _local1;
_local1 = {file:file, thumbnail:thumbnail};
sendSecureCommand("saveFile", _local2, null, _local1);
}
static function getFiles(folder, options) {
var _local7 = {name:1, date:2, score:3};
var _local2 = {user_only:false, sort_on:"date", page:1, results_per_page:20, sort_descending:true};
var _local6 = new Array();
for (var _local10 in _local7) {
_local6.push(("'" + _local10) + "'");
}
var _local4 = new Array();
for (var _local9 in _local2) {
_local4.push(("'" + _local9) + "'");
}
if (options.sort_descending && (!_local7[options.sort_descending])) {
var _local3 = new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", (("'" + options.sort_descending) + "' is not a valid sort_on value. Valid values are: ") + _local6.join(", "));
sendError({command_id:getCommandID("getFiles")}, _local3);
delete options.sort_descending;
}
var _local8;
if (options) {
for (var _local10 in options) {
if (_local2[_local10] == undefined) {
var _local3 = new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", (("'" + _local10) + "' is not a valid option. Valid options are: ") + _local4.join(", "));
sendError({command_id:getCommandID("getFiles")}, _local3);
delete options[_local10];
} else if (typeof(options[_local10]) != typeof(_local2[_local10])) {
var _local3 = new com.Newgrounds.NewgroundsAPIError("MISSING_PARAM", (("option '" + _local10) + "' should be the following type: ") + typeof(_local2[_local10]));
sendError({command_id:getCommandID("getFiles")}, _local3);
delete options[_local10];
}
}
_local8 = options;
} else {
_local8 = new Object();
}
if (hasUserSession()) {
_local8.publisher_id = publisher_id;
_local8.user_id = user_id;
}
_local8.folder = folder;
sendCommand("getFiles", _local8);
}
static function getConfirmation(command_name, event, msg, target, confirm, cancel) {
var _local1 = new com.Newgrounds.NewgroundsAPIError("CONFIRM_REQUEST", msg);
_local1.confirm = function () {
target[confirm]();
};
_local1.cancel = function () {
target[cancel]();
};
_local1.command = getCommandID(command_name);
callListener(event, false, _local1);
}
static function doBlockHost(event) {
_root.stop();
initTextFormats();
_root.createEmptyMovieClip("NGAPI_deny_host_overlay", _root.getNextHighestDepth());
_root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100);
_root.NGAPI_deny_host_overlay.beginFill(6684672);
_root.NGAPI_deny_host_overlay.moveTo(0, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, 0);
_root.NGAPI_deny_host_overlay.endFill();
var _local2 = ("This movie has not been approved for use on " + getHost()) + ".";
_local2 = _local2 + "\r\rFor an aproved copy, please visit:\r";
var _local4 = _local2.length;
_local2 = _local2 + event.data.movie_url;
var _local3 = _local2.length;
_root.NGAPI_deny_host_overlay.createTextField("mousekill", 100, 0, 0, Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.createTextField("error", 101, (Stage.width - 400) / 2, (Stage.height / 2) - 100, 400, 200);
_root.NGAPI_deny_host_overlay.error.text = "ERROR!";
_root.NGAPI_deny_host_overlay.error.setTextFormat(error_format);
_root.NGAPI_deny_host_overlay.createTextField("message", 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200);
_root.NGAPI_deny_host_overlay.message.text = _local2;
_root.NGAPI_deny_host_overlay.message.multiline = true;
_root.NGAPI_deny_host_overlay.message.wordWrap = true;
_root.NGAPI_deny_host_overlay.message.html = true;
_root.NGAPI_deny_host_overlay.message.setTextFormat(normal_format);
link_format.url = event.data.redirect_url;
_root.NGAPI_deny_host_overlay.message.setTextFormat(_local4, _local3, link_format);
}
static function onNewVersionAvailable(event) {
_root.stop();
initTextFormats();
var _local2 = new Object();
_local2.x = Stage.width / 2;
_local2.y = Stage.height / 2;
_root.createEmptyMovieClip("NGAPI_new_version_overlay", _root.getNextHighestDepth());
_root.NGAPI_new_version_overlay.lineStyle(1, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(0, 70);
_root.NGAPI_new_version_overlay.moveTo(-10, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, -10);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.lineStyle(10, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(51);
_root.NGAPI_new_version_overlay.moveTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.createEmptyMovieClip("exit", 1000);
_root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100);
_root.NGAPI_new_version_overlay.exit.beginFill(0, 50);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.endFill();
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 214, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 226, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 226, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 214, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.onMouseUp = function () {
if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) {
_root.NGAPI_new_version_overlay.removeMovieClip();
}
};
var _local3 = (("Version " + event.data.movie_version) + " is now available at:") + newline;
var _local6 = _local3.length;
_local3 = _local3 + event.data.movie_url;
var _local4 = _local3.length;
_root.NGAPI_new_version_overlay.createTextField("mouseblocker", 99, -10, -10, 1000, 1000);
_root.NGAPI_new_version_overlay.createTextField("newversion", 100, _local2.x - 210, _local2.y - 90, 400, 80);
_root.NGAPI_new_version_overlay.newversion.text = "New Version Available!";
_root.NGAPI_new_version_overlay.newversion.setTextFormat(header_format);
_root.NGAPI_new_version_overlay.createTextField("message", 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40);
_root.NGAPI_new_version_overlay.message.text = _local3;
_root.NGAPI_new_version_overlay.message.multiline = true;
_root.NGAPI_new_version_overlay.message.wordWrap = true;
_root.NGAPI_new_version_overlay.message.html = true;
_root.NGAPI_new_version_overlay.message.setTextFormat(normal_format);
link_format.url = event.data.redirect_url;
_root.NGAPI_new_version_overlay.message.setTextFormat(_local6, _local4, link_format);
}
static function initTextFormats() {
if (!error_format) {
error_format = new TextFormat();
error_format.font = "Arial Black";
error_format.size = 48;
error_format.color = 16711680 /* 0xFF0000 */;
}
if (!header_format) {
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.size = 24;
header_format.color = 16777215 /* 0xFFFFFF */;
}
if (!normal_format) {
normal_format = new TextFormat();
normal_format.font = "Arial";
normal_format.bold = true;
normal_format.size = 12;
normal_format.color = 16777215 /* 0xFFFFFF */;
}
if (!link_format) {
link_format = new TextFormat();
link_format.color = 16776960 /* 0xFFFF00 */;
link_format.underline = true;
}
}
static function doEvent(e) {
switch (getCommandName(e.command_id)) {
case "connectMovie" :
clearInterval(timeout);
sendMessage("You have successfully connected to the Newgrounds API Gateway");
sendMessage(("Movie identified as \"" + e.movie_name) + "\"");
callListener(events.MOVIE_CONNECTED, e.success, {movie_name:e.movie_name});
var _local4 = false;
if (e.ad_status === -1) {
var _local6 = "This movie was not approved to run Flash Ads.";
sendWarning(_local6);
sendWarning(("visit " + AD_TERMS_URL) + " to view our approval guidelines");
if (!e.ad_url) {
callListener(events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError("FLASH_ADS_NOT_APPROVED", _local6));
} else {
_local4 = true;
}
} else if (e.ad_status === 0) {
var _local6 = "Flash Ads are currently awaiting approval.";
sendNotice(_local6);
if (!e.ad_url) {
callListener(events.ADS_APPROVED, false, new com.Newgrounds.NewgroundsAPIError("FLASH_ADS_NOT_APPROVED", _local6));
} else {
_local4 = true;
}
}
if (e.ad_url) {
ad_url = unescape(e.ad_url);
if (!_local4) {
sendMessage("This movie has been approved to run Flash Ads!");
}
callListener(events.ADS_APPROVED, true);
}
if (e.deny_host) {
var _local6 = getHost() + " does not have permission to run this movie!";
sendWarning(_local6);
sendWarning("\tUpdate your API configuration to unblock " + getHost());
callListener(events.HOST_BLOCKED, true, {movie_url:unescape(e.movie_url), redirect_url:getOfficialVersionURL()});
}
if (e.movie_version) {
sendWarning("According to your API Configuration, this version is out of date.");
if (version) {
sendWarning("\tThe this movie is version " + version);
}
sendWarning("\tThe most current version is " + e.movie_version);
callListener(events.NEW_VERSION_AVAILABLE, true, {movie_version:e.movie_version, movie_url:unescape(e.movie_url), redirect_url:getOfficialVersionURL()});
}
if (e.request_portal_url) {
sendCommand("setPortalID", {portal_url:_url});
}
break;
case "logCustomEvent" :
if (e.success) {
sendMessage(("Event '" + e.event) + "' was logged.");
}
callListener(events.EVENT_LOGGED, e.success, {event:e.event});
break;
case "postScore" :
var _local7;
if (e.success) {
var _local3 = "User";
if (user_email) {
_local3 = user_email;
} else if (user_name) {
_local3 = user_name;
}
sendMessage(((((_local3 + " posted ") + e.value) + " to '") + e.score) + "'");
_local7 = {score:e.score, value:e.value, username:_local3};
}
callListener(events.SCORE_POSTED, e.success, _local7);
break;
case "getScores" :
_local7 = new Object();
if (e.user_id) {
var _local5 = e.period;
} else {
var _local5 = e.period + "-u";
}
if (e.total_pages) {
score_page_counts[_local5] = e.total_pages;
}
_local7.user_id = e.user_id;
_local7.current_page = e.current_page;
_local7.total_pages = score_page_counts[_local5];
_local7.scores = e.scores;
_local7.period = getPeriodName(e.period);
callListener(events.SCORES_LOADED, e.success, _local7);
break;
case "unlockMedal" :
if (medals) {
var _local2 = 0;
while (_local2 < medals.length) {
if (medals[_local2].medal_name === e.medal_name) {
medals[_local2].medal_unlocked = true;
break;
}
_local2++;
}
}
_local7 = {medal_name:e.medal_name, medal_value:e.medal_value, medal_difficulty:e.medal_difficulty};
callListener(events.MEDAL_UNLOCKED, e.success, _local7);
break;
case "getMedals" :
medals = e.medals;
_local7 = {medals:e.medals};
callListener(events.MEDALS_LOADED, e.success, _local7);
break;
case "getFiles" :
break;
case "getSystemFiles" :
break;
case "saveFile" :
save_file = null;
_local7 = {file_id:e.file_id, filename:e.filename, file_url:e.file_url, thumbnail:e.thumbnail, icon:e.icon};
callListener(events.FILE_SAVED, e.success, _local7);
break;
case "checkFilePrivs" :
if (save_file) {
save_file.checkPrivs(e);
} else {
_local7 = {filename:e.filename, folder:e.folder, can_read:e.can_read, can_write:e.can_write};
callListener(events.FILE_PRIVS_LOADED, e.success, _local7);
}
}
}
static function setDefaultListeners() {
var _local1 = new Array();
_local1[events.HOST_BLOCKED] = {listener:doBlockHost};
_local1[events.NEW_VERSION_AVAILABLE] = {listener:onNewVersionAvailable};
return(_local1);
}
static function addEventListener(event, listener, params) {
listeners[event] = {listener:listener, params:params};
}
static function removeEventListener(event) {
delete listeners[event];
}
static function getEventName(event) {
for (var _local2 in events) {
if (events[_local2] == event) {
return(_local2);
}
}
return(undefined);
}
static function callListener(event, success, data, target) {
echo("Fired Event: " + getEventName(event));
if (listeners[event]) {
if (data.isError()) {
listeners[event].listener({event:event, success:success, error:data, target:target}, listeners[event].params);
} else {
listeners[event].listener({event:event, success:success, data:data, target:target}, listeners[event].params);
}
}
}
static function getCommandName(id) {
return(id);
}
static function getCommandID(name) {
return(name);
}
static function getPeriodAliases() {
var _local1 = new Object();
for (var _local2 in period_aliases) {
_local1[period_aliases[_local2].alias] = _local2;
}
return(_local1);
}
static function getPeriodName(p) {
for (var _local2 in period_aliases) {
if (_local2 == p) {
return(period_aliases[_local2].name);
}
}
return(null);
}
static function getPeriodAlias(p) {
for (var _local2 in period_aliases) {
if (_local2 == p) {
return(period_aliases[_local2].alias);
}
}
return(null);
}
static function sendError(c, e) {
trace((((((("[NewgroundsAPI ERROR] :: " + getCommandName(c.command_id)) + "() - ") + e.name) + ":") + newline) + "\t\t\t\t") + e.message);
}
static function sendWarning(m, c) {
if (c) {
m = m + ((("\r[NewgroundsAPI WARNING] :: \tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information.");
}
trace("[NewgroundsAPI WARNING] :: " + m);
}
static function sendNotice(m, c) {
if (c) {
m = m + ((("\r[NewgroundsAPI NOTICE] :: \tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information.");
}
trace("[NewgroundsAPI NOTICE] :: " + m);
}
static function fatalError(m, c) {
if (c) {
m = m + ((("\r\tSee " + COMMANDS_WIKI_URL) + c.toLowerCase()) + " for additional information.");
}
throw (((("***ERROR*** frame=" + _root._currentframe) + ", class=NewgroundsAPI") + newline) + newline) + m;
}
static function sendSecureCommand(command, secure_params, unsecure_params, files) {
if (((!debug) && (!hasUserSession())) && (!hasUserEmail())) {
sendError({command_id:getCommandID(command)}, new com.Newgrounds.NewgroundsAPIError("IDENTIFICATION_REQUIRED", ("You must be logged in or provide an e-mail address ( using NewgroundsAPI.setUserEmail(\"name@domain.com\"); ) to use " + command) + "()."));
return(undefined);
}
if (!command) {
fatalError("Missing command", "sendSecureCommand");
}
if (!secure_params) {
fatalError("Missing secure_params", "sendSecureCommand");
}
if (!unsecure_params) {
unsecure_params = new Object();
}
var _local2 = "";
var _local1 = 0;
while (_local1 < 16) {
_local2 = _local2 + compression_radix.charAt(Math.floor(Math.random() * compression_radix.length));
_local1++;
}
if (debug) {
secure_params.session_id = "";
} else {
secure_params.session_id = session_id;
}
secure_params.as_version = 2;
secure_params.user_email = user_email;
secure_params.publisher_id = publisher_id;
secure_params.seed = _local2;
secure_params.command_id = getCommandID(command);
var _local8 = com.Newgrounds.MD5.calculate(_local2);
var _local6 = com.Newgrounds.RC4.encrypt(com.Newgrounds.JSON.encode(secure_params), encryption_key);
var _local7 = _local8 + _local6;
unsecure_params.secure = compressHex(_local7);
sendCommand("securePacket", unsecure_params, false, files);
}
static function sendCommand(command, params, open_browser, files) {
if ((!connected) and (command != "connectMovie")) {
var _local11 = (("NewgroundsAPI." + command) + "() - NewgroundsAPI.connectMovie() must be called before this command can be called") + newline;
fatalError(_local11, "connectMovie");
}
if (open_browser) {
var _local1 = new Object();
} else {
var _local1 = new LoadVars();
}
_local1.command_id = getCommandID(command);
_local1.tracker_id = movie_id;
if (debug) {
_local1.debug = debug;
}
if (params) {
for (var _local8 in params) {
_local1[_local8] = params[_local8];
}
}
if (files) {
for (var _local8 in files) {
_local1[_local8] = files[_local8];
}
}
echo(("OUTPUT: \r" + com.Newgrounds.JSON.encode(_local1)) + newline);
if (open_browser) {
var _local5 = (GATEWAY_URL + "?seed=") + Math.random();
for (var _local8 in _local1) {
_local5 = _local5 + ((("&" + escape(_local8)) + "=") + escape(_local1[_local8]));
}
getURL (_local5, "_blank");
_local1.removeMovieClip();
} else {
var _local9 = new LoadVars();
_local9.onData = function (data) {
com.Newgrounds.NewgroundsAPI.echo(("INPUT: \r" + data) + newline);
if (data) {
var _local1 = com.Newgrounds.JSON.decode(data);
} else {
var _local1 = {success:false};
}
if (!_local1.success) {
var _local3 = new com.Newgrounds.NewgroundsAPIError(_local1.error_code, _local1.error_msg);
com.Newgrounds.NewgroundsAPI.sendError(_local1, _local3);
} else {
com.Newgrounds.NewgroundsAPI.doEvent(_local1);
}
};
var _local4 = new Array();
for (var _local7 in _local1) {
_local4.push((_local7 + "=") + escape(_local1[_local7]));
}
echo((("POST " + GATEWAY_URL) + "?") + _local4.join("&"));
_local1.sendAndLoad((GATEWAY_URL + "?seed=") + Math.random(), _local9, "POST");
}
}
static function renderAd(target) {
if (ad_swf_url) {
target.background = target.createEmptyMovieClip("background", 100);
target.background.beginFill(0);
target.background.moveTo(0, 0);
target.background.lineTo(300, 0);
target.background.lineTo(300, 250);
target.background.lineTo(0, 250);
target.background.lineTo(0, 0);
target.background.endFill();
target.mask = target.createEmptyMovieClip("mask", 101);
target.mask.beginFill(0);
target.mask.moveTo(0, 0);
target.mask.lineTo(300, 0);
target.mask.lineTo(300, 250);
target.mask.lineTo(0, 250);
target.mask.lineTo(0, 0);
target.mask.endFill();
target.clip = target.createEmptyMovieClip("clip", 102);
target.clip.ad = target.clip.createEmptyMovieClip("ad", 100);
target.clip.setMask(target.mask);
loadMovie (ad_swf_url, target.clip.ad);
callListener(events.AD_ATTACHED, true, null, target);
} else {
callListener(events.AD_ATTACHED, false, new com.Newgrounds.NewgroundsAPIError("FLASH_ADS_NOT_APPROVED", "Unable to render ad"));
}
}
static function attachFlashAd(target) {
System.security.allowDomain("http://server.cpmstar.com");
System.security.allowDomain("http://www.cpmstar.com");
System.security.allowDomain("https://server.cpmstar.com");
System.security.allowDomain("https://www.cpmstar.com");
System.security.allowInsecureDomain("http://server.cpmstar.com");
System.security.allowInsecureDomain("http://www.cpmstar.com");
System.security.allowInsecureDomain("https://server.cpmstar.com");
System.security.allowInsecureDomain("https://www.cpmstar.com");
sendMessage("You may get a security sandbox violation from this ad. This is nothing to worry about!");
if (resetAdTimer()) {
if (ad_url) {
var _local1 = new LoadVars();
_local1.onData = function (data) {
if (data) {
com.Newgrounds.NewgroundsAPI.ad_swf_url = data;
} else {
com.Newgrounds.NewgroundsAPI.ad_swf_url = null;
}
com.Newgrounds.NewgroundsAPI.renderAd(target);
};
if (ad_url.indexOf("?") > -1) {
_local1.load((ad_url + "&random=") + Math.random());
} else {
_local1.load((ad_url + "?random=") + Math.random());
}
}
} else {
renderAd(target);
}
}
static function resetAdTimer() {
if (!ad_url) {
return(false);
}
var _local1 = new Date();
if (_local1.getTime() >= ad_reset) {
ad_reset = _local1.getTime() + 300000;
return(true);
}
return(false);
}
static function sendMessage(m, r) {
var _local1 = "[NewgroundsAPI] :: " + m;
if (r) {
return(_local1);
}
trace(_local1);
}
static function echo(m) {
if (do_echo) {
trace(m);
}
}
static var do_echo = false;
static var GATEWAY_URL = "http://www.ngads.com/gateway_v2.php";
static var AD_TERMS_URL = "http://www.newgrounds.com/wiki/flashads/terms/";
static var COMMANDS_WIKI_URL = "http://www.newgrounds.com/wiki/flashapi/commands/";
static var ad_reset = 0;
static var save_file = null;
static var medals = null;
static var score_page_counts = new Object();
static var compression_radix = "/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X";
static var compressor = new com.Newgrounds.BaseN(compression_radix);
static var errors = com.Newgrounds.NewgroundsAPIError.init_codes();
static var sharedObjects = new Object();
static var events = {MOVIE_CONNECTED:1, ADS_APPROVED:2, AD_ATTACHED:3, HOST_BLOCKED:4, NEW_VERSION_AVAILABLE:5, EVENT_LOGGED:6, SCORE_POSTED:7, SCORES_LOADED:8, MEDAL_UNLOCKED:9, MEDALS_LOADED:10, FILE_PRIVS_LOADED:11, FILE_SAVED:12};
static var listeners = setDefaultListeners();
static var periods = getPeriodAliases();
static var period_aliases = {t:{name:"Today", alias:"TODAY"}, p:{name:"Yesterday", alias:"YESTERDAY"}, w:{name:"This Week", alias:"THIS_WEEK"}, m:{name:"This Month", alias:"THIS_MONTH"}, y:{name:"This Year", alias:"THIS_YEAR"}, a:{name:"All-Time", alias:"ALL_TIME"}};
}
Symbol 2079 MovieClip [__Packages.com.Newgrounds.NewgroundsAPISaveFile] Frame 0
class com.Newgrounds.NewgroundsAPISaveFile
{
var tracker_id, folder, filename, contents, thumbnail, icon_url, thumbnail_url, description, scan, scanner;
function NewgroundsAPISaveFile (tracker_id, folder, filename) {
this.tracker_id = tracker_id;
this.folder = folder;
this.filename = filename;
contents = null;
thumbnail = null;
icon_url = null;
thumbnail_url = null;
}
function setDescription(description) {
this.description = description;
}
function setShared(share) {
this.share = share;
}
function setContents(contents) {
this.contents = contents;
}
function setThumbnail(thumb) {
if (thumb) {
thumbnail = thumb;
} else {
thumbnail = null;
}
}
function onError(msg) {
trace("[NewgroundsAPISaveFile ERROR] :: " + msg);
}
function onCancel(msg) {
trace("[NewgroundsAPISaveFile] :: " + msg);
}
function submit() {
scan = null;
com.Newgrounds.NewgroundsAPI.checkFilePrivs(folder, filename);
}
function checkPrivs(p) {
if (p.success) {
if (p.can_write) {
can_write = p.can_write;
if (p.exists) {
com.Newgrounds.NewgroundsAPI.getConfirmation("saveFile", com.Newgrounds.NewgroundsAPI.events.FILE_SAVED, ("File '" + filename) + "' exists, overwrite?", this, "startFile", "cancelFile");
} else {
startFile();
}
} else {
onError("This filename is owned by another user.");
}
} else {
onError("There was a problem looking up your file's details");
}
}
function cancelFile() {
onCancel("Overwrite was cancelled");
}
function startFile() {
if (can_write) {
if (thumbnail) {
scanner = new com.Newgrounds.ImageScanner(thumbnail);
scanner.setCallback(this, "writeFile");
scanner.startScan(100, 100, true);
} else {
writeFile();
}
} else {
onError(("You cannot write to filename \"" + filename) + "\"");
}
}
function writeFile(img) {
trace("FINISHED");
com.Newgrounds.NewgroundsAPI.finishFileSave(folder, filename, description, share, com.Newgrounds.JSON.encode(contents), img);
}
var can_write = false;
var share = true;
}
Symbol 2080 MovieClip [__Packages.com.Newgrounds.ImageScanner] Frame 0
class com.Newgrounds.ImageScanner
{
var image_source, source_width, source_height, sourceBitmap, callback_target, callback_function, hash, cube, basen, xpos, ypos, pixels, busy, canvas_width, canvas_height, resizedBitmap, copyBitmap, output, draw_interval, callback_interval;
function ImageScanner (the_source) {
if (the_source) {
image_source = the_source;
} else {
image_source = _root;
}
reset();
if (typeof(image_source) == "movieclip") {
if (image_source == _root) {
source_width = Stage.width;
source_height = Stage.height;
} else {
source_width = Math.floor(image_source._width);
source_height = Math.floor(image_source._height);
}
sourceBitmap = new flash.display.BitmapData(source_width, source_height, false, 4294967295);
sourceBitmap.draw(_root);
} else if (image_source.width) {
source_width = image_source.width;
source_height = image_source.height;
sourceBitmap = image_source;
} else {
error("You can only use BitMaptData and MovieClip objects to create images");
}
}
function setCallback(target, funct) {
if (target && (funct)) {
callback_target = target;
callback_function = funct;
}
}
function reset() {
callback_target = null;
callback_function = null;
debug.bad_pixels = 0;
hash = "0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&";
var _local3 = Math.pow(hash.length, 2);
trace("MAX COLORS: " + _local3);
var _local2 = Math.floor(Math.pow(_local3, 0.333333333333333)) - 1;
var _local4 = Math.pow(_local2, 3);
cube = _local2;
basen = new com.Newgrounds.BaseN(hash);
xpos = 0;
ypos = 0;
pixels = 0;
busy = false;
}
function startScan(w, h, s) {
if (w) {
image_width = w;
}
if (h) {
image_height = h;
}
if (s != undefined) {
crop = s;
}
var _local7 = _root.getNextHighestDepth();
var _local6 = _root.createEmptyMovieClip("API_image_container_" + _local7, _local7);
var _local5 = _local6.createEmptyMovieClip("canvas", 100);
_local5.attachBitmap(sourceBitmap, 100);
if (crop) {
if ((image_width / source_width) > (image_height / source_height)) {
canvas_width = image_width;
canvas_height = Math.ceil(source_height * (image_width / source_width));
} else {
canvas_height = image_height;
canvas_width = Math.ceil(source_width * (image_height / source_height));
}
} else {
canvas_width = image_width;
canvas_height = image_height;
}
_local5._x = Math.round((image_width - canvas_width) / 2);
_local5._width = canvas_width;
_local5._height = canvas_height;
resizedBitmap = new flash.display.BitmapData(image_width, image_height, false, 4294967295);
resizedBitmap.draw(_local6);
_local6.removeMovieClip();
copyBitmap = new flash.display.BitmapData(image_width, image_height, false, 4294967295);
var _local3 = "" + image_width;
while (_local3.length < 3) {
_local3 = "0" + _local3;
}
var _local4 = "" + image_height;
while (_local4.length < 3) {
_local4 = "0" + _local4;
}
output = _local3 + _local4;
draw_interval = setInterval(this, "drawChunk", 10);
busy = false;
return(resizedBitmap);
}
function getBitmapData() {
return(copyBitmap);
}
function getBytesTotal() {
return((image_width * image_height) * 2);
}
function getBytesScanned() {
return(pixels * 2);
}
function drawChunk() {
if (!busy) {
busy = true;
var _local2 = 0;
while (_local2 < 250) {
if (!nextPixel()) {
clearInterval(draw_interval);
callback_interval = setInterval(this, "doCallback", 25);
busy = true;
break;
}
_local2++;
}
busy = false;
}
}
function doCallback() {
busy = false;
clearInterval(callback_interval);
if (callback_target and callback_function) {
callback_target[callback_function](output);
} else {
onScanComplete(output);
}
}
function onScanComplete(packet) {
sendMessage(("packet size: " + output.length) + " bytes", "onScanComplete");
}
function nextPixel() {
var _local15 = xpos;
var _local14 = ypos;
var _local7 = resizedBitmap.getPixel(_local15, _local14);
var _local17 = (_local7 >> 16) & 255;
var _local20 = (_local7 >> 8) & 255;
var _local16 = (_local7 >> 0) & 255;
var _local11 = Math.round(((_local17 + 1) / 256) * cube);
var _local10 = Math.round(((_local20 + 1) / 256) * cube);
var _local13 = Math.round(((_local16 + 1) / 256) * cube);
var _local12 = (((_local11 * (cube + 1)) * (cube + 1)) + (_local10 * (cube + 1))) + _local13;
var _local6 = basen.encode(_local12, 2);
output = output + _local6;
if (_local6.length != 2) {
trace("bad pixel " + _local6);
}
var _local5 = basen.decode(_local6);
var _local18 = _local5;
var _local8 = _local5 % (cube + 1);
_local5 = (_local5 - _local8) / (cube + 1);
var _local9 = _local5 % (cube + 1);
var _local19 = (_local5 - _local9) / (cube + 1);
if (((_local13 != _local8) and (_local10 != _local9)) and (_local11 != _local10)) {
debug.bad_pixels++;
trace((((((("BAD PIXEL " + debug.bad_pixels) + ") ") + _local12) + " != ") + _local18) + " ") + _local6);
trace(basen.debug.lastencode);
}
var _local2 = Math.round((_local19 / cube) * 255).toString(16);
var _local4 = Math.round((_local9 / cube) * 255).toString(16);
var _local3 = Math.round((_local8 / cube) * 255).toString(16);
while (_local2.length < 2) {
_local2 = "0" + _local2;
}
while (_local4.length < 2) {
_local4 = "0" + _local4;
}
while (_local3.length < 2) {
_local3 = "0" + _local3;
}
copyBitmap.setPixel(_local15, _local14, Number((("0x" + _local2) + _local4) + _local3));
pixels++;
if (pixels >= (image_width * image_height)) {
return(false);
}
xpos++;
if (xpos >= image_width) {
xpos = 0;
ypos++;
}
return(true);
}
function error(e, f) {
sendMessage(e, f, "ERROR");
}
function sendMessage(msg, func, type) {
var _local1 = "ImageScanner";
if (func) {
_local1 = _local1 + (("." + func) + "()");
}
if (type) {
_local1 = (type + " in ") + _local1;
}
_local1 = _local1 + (" :: " + msg);
trace(_local1);
}
var image_width = 100;
var image_height = 100;
var crop = true;
var debug = new Object();
}
Symbol 2081 MovieClip [__Packages.com.Newgrounds.JSON] Frame 0
class com.Newgrounds.JSON
{
function JSON () {
}
static function encode(arg, noquotes) {
var _local3;
var _local2;
var _local6;
var _local1 = "";
var _local4;
if (arg.isSServerVar()) {
var _local8 = "sservervariable";
} else {
var _local8 = typeof(arg);
}
switch (_local8) {
case "sservervariable" :
return("?" + arg.getEncodedValue());
case "object" :
if (arg) {
if (arg instanceof Array) {
_local2 = 0;
while (_local2 < arg.length) {
_local4 = encode(arg[_local2]);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + _local4;
_local2++;
}
return(("[" + _local1) + "]");
}
if (typeof(arg.toString) != "undefined") {
for (_local2 in arg) {
_local4 = arg[_local2];
if ((typeof(_local4) != "undefined") && (typeof(_local4) != "function")) {
_local4 = encode(_local4);
if (_local1) {
_local1 = _local1 + ",";
}
_local1 = _local1 + ((encode(_local2) + ":") + _local4);
}
}
return(("{" + _local1) + "}");
}
}
return("null");
case "number" :
return((isFinite(arg) ? (String(arg)) : "null"));
case "string" :
_local6 = arg.length;
if (noquotes) {
var _local7 = "";
} else {
var _local7 = "\"";
}
_local1 = _local7;
_local2 = 0;
while (_local2 < _local6) {
_local3 = arg.charAt(_local2);
if (_local3 >= " ") {
if ((_local3 == "\\") || (_local3 == "\"")) {
_local1 = _local1 + "\\";
}
_local1 = _local1 + _local3;
} else {
switch (_local3) {
case "\b" :
_local1 = _local1 + "\\b";
break;
case "\f" :
_local1 = _local1 + "\\f";
break;
case newline :
_local1 = _local1 + "\\n";
break;
case "\r" :
_local1 = _local1 + "\\r";
break;
case "\t" :
_local1 = _local1 + "\\t";
break;
default :
_local3 = _local3.charCodeAt();
_local1 = _local1 + (("\\u00" + Math.floor(_local3 / 16).toString(16)) + (_local3 % 16).toString(16));
}
}
_local2 = _local2 + 1;
}
return(_local1 + _local7);
case "boolean" :
return(String(arg));
}
return("null");
}
static function decode(text) {
var at = 0;
var ch = " ";
var _value;
var _error = function (m) {
throw {name:"JSONError", message:m, at:at - 1, text:text};
};
var _next = function () {
ch = text.charAt(at);
at = at + 1;
return(ch);
};
var _white = function () {
while (ch) {
if (ch <= " ") {
_next();
} else if (ch == "/") {
switch (_next()) {
case "/" :
while ((_next() && (ch != newline)) && (ch != "\r")) {
}
break;
case "*" :
_next();
for(;;){
if (ch) {
if (ch == "*") {
if (_next() == "/") {
_next();
// unexpected jump
}
} else {
_next();
}
} else {
_error("Unterminated comment");
}
};
break;
default :
_error("Syntax error");
}
} else {
return;
}
}
};
var _string = function () {
var _local4;
var _local1 = "";
var _local3;
var _local2;
var _local5 = false;
if (ch == "\"") {
while (_next()) {
if (ch == "\"") {
_next();
return(_local1);
}
if (ch == "\\") {
switch (_next()) {
case "b" :
_local1 = _local1 + "\b";
break;
case "f" :
_local1 = _local1 + "\f";
break;
case "n" :
_local1 = _local1 + newline;
break;
case "r" :
_local1 = _local1 + "\r";
break;
case "t" :
_local1 = _local1 + "\t";
break;
case "u" :
_local2 = 0;
_local4 = 0;
while (_local4 < 4) {
_local3 = parseInt(_next(), 16);
if (!isFinite(_local3)) {
_local5 = true;
break;
}
_local2 = (_local2 * 16) + _local3;
_local4 = _local4 + 1;
}
if (_local5) {
_local5 = false;
break;
}
_local1 = _local1 + String.fromCharCode(_local2);
break;
default :
_local1 = _local1 + ch;
}
} else {
_local1 = _local1 + ch;
}
}
}
_error("Bad string");
};
var _array = function () {
var _local1 = [];
if (ch == "[") {
_next();
_white();
if (ch == "]") {
_next();
return(_local1);
}
while (ch) {
_local1.push(_value());
_white();
if (ch == "]") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad array");
};
var _object = function () {
var _local2;
var _local1 = {};
if (ch == "{") {
_next();
_white();
if (ch == "}") {
_next();
return(_local1);
}
while (ch) {
_local2 = _string();
_white();
if (ch != ":") {
break;
}
_next();
_local1[_local2] = _value();
_white();
if (ch == "}") {
_next();
return(_local1);
}
if (ch != ",") {
break;
}
_next();
_white();
}
}
_error("Bad object");
};
var _number = function () {
var _local1 = "";
var _local2;
if (ch == "-") {
_local1 = "-";
_next();
}
while ((ch >= "0") && (ch <= "9")) {
_local1 = _local1 + ch;
_next();
}
if (ch == ".") {
_local1 = _local1 + ".";
while ((_next() && (ch >= "0")) && (ch <= "9")) {
_local1 = _local1 + ch;
}
}
_local2 = 1 * _local1;
if (!isFinite(_local2)) {
_error("Bad number");
} else {
return(_local2);
}
};
var _word = function () {
switch (ch) {
case "t" :
if (((_next() == "r") && (_next() == "u")) && (_next() == "e")) {
_next();
return(true);
}
break;
case "f" :
if ((((_next() == "a") && (_next() == "l")) && (_next() == "s")) && (_next() == "e")) {
_next();
return(false);
}
break;
case "n" :
if (!(((_next() == "u") && (_next() == "l")) && (_next() == "l"))) {
break;
}
_next();
return(null);
}
_error("Syntax error");
};
_value = function () {
_white();
switch (ch) {
case "{" :
return(_object());
case "[" :
return(_array());
case "\"" :
return(_string());
case "-" :
return(_number());
}
return((((ch >= "0") && (ch <= "9")) ? (_number()) : (_word())));
};
return(_value());
}
}
Symbol 2082 MovieClip [__Packages.com.Newgrounds.RC4] Frame 0
class com.Newgrounds.RC4
{
function RC4 () {
}
static function encrypt(src, key) {
var _local3 = strToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToHex(_local2));
}
static function encryptbin(src, key) {
var _local3 = strToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(_local2);
}
static function decrypt(src, key) {
var _local3 = hexToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToStr(_local2));
}
static function initialize(pwd) {
var _local2 = 0;
var _local3;
var _local4 = pwd.length;
var _local1 = 0;
while (_local1 <= 255) {
mykey[_local1] = pwd[_local1 % _local4];
sbox[_local1] = _local1;
_local1++;
}
_local1 = 0;
while (_local1 <= 255) {
_local2 = ((_local2 + sbox[_local1]) + mykey[_local1]) % 256;
_local3 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local3;
_local1++;
}
}
static function calculate(plaintxt, psw) {
initialize(psw);
var _local1 = 0;
var _local2 = 0;
var _local9 = new Array();
var _local7;
var _local5;
var _local6;
var _local3 = 0;
while (_local3 < plaintxt.length) {
_local1 = (_local1 + 1) % 256;
_local2 = (_local2 + sbox[_local1]) % 256;
_local5 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local5;
var _local4 = (sbox[_local1] + sbox[_local2]) % 256;
_local7 = sbox[_local4];
_local6 = plaintxt[_local3] ^ _local7;
_local9.push(_local6);
_local3++;
}
return(_local9);
}
static function charsToHex(chars) {
var _local4 = new String("");
var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local1 = 0;
while (_local1 < chars.length) {
_local4 = _local4 + (_local3[chars[_local1] >> 4] + _local3[chars[_local1] & 15]);
_local1++;
}
return(_local4);
}
static function hexToChars(hex) {
var _local3 = new Array();
var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0);
while (_local1 < hex.length) {
_local3.push(parseInt(hex.substr(_local1, 2), 16));
_local1 = _local1 + 2;
}
return(_local3);
}
static function charsToStr(chars) {
var _local3 = new String("");
var _local1 = 0;
while (_local1 < chars.length) {
_local3 = _local3 + String.fromCharCode(chars[_local1]);
_local1++;
}
return(_local3);
}
static function strToChars(str) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < str.length) {
_local3.push(str.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
static var sbox = new Array(255);
static var mykey = new Array(255);
}
Symbol 2083 MovieClip [__Packages.com.Newgrounds.MD5] Frame 0
class com.Newgrounds.MD5
{
function MD5 () {
}
static function calculate(src) {
return(hex_md5(src));
}
static function hex_md5(src) {
return(binl2hex(core_md5(str2binl(src), src.length * 8)));
}
static function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local4 = 1732584193 /* 0x67452301 */;
var _local3 = -271733879;
var _local2 = -1732584194;
var _local1 = 271733878 /* 0x10325476 */;
var _local5 = 0;
while (_local5 < x.length) {
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
var _local7 = _local1;
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 0], 7, -680876936);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 1], 12, -389564586);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 2], 17, 606105819);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 3], 22, -1044525330);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 4], 7, -176418897);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 5], 12, 1200080426);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 6], 17, -1473231341);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 7], 22, -45705983);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 8], 7, 1770035416);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 9], 12, -1958414417);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 10], 17, -42063);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 11], 22, -1990404162);
_local4 = md5_ff(_local4, _local3, _local2, _local1, x[_local5 + 12], 7, 1804603682);
_local1 = md5_ff(_local1, _local4, _local3, _local2, x[_local5 + 13], 12, -40341101);
_local2 = md5_ff(_local2, _local1, _local4, _local3, x[_local5 + 14], 17, -1502002290);
_local3 = md5_ff(_local3, _local2, _local1, _local4, x[_local5 + 15], 22, 1236535329);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 1], 5, -165796510);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 6], 9, -1069501632);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 11], 14, 643717713);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 0], 20, -373897302);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 5], 5, -701558691);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 10], 9, 38016083);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 15], 14, -660478335);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 4], 20, -405537848);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 9], 5, 568446438);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 14], 9, -1019803690);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 3], 14, -187363961);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 8], 20, 1163531501);
_local4 = md5_gg(_local4, _local3, _local2, _local1, x[_local5 + 13], 5, -1444681467);
_local1 = md5_gg(_local1, _local4, _local3, _local2, x[_local5 + 2], 9, -51403784);
_local2 = md5_gg(_local2, _local1, _local4, _local3, x[_local5 + 7], 14, 1735328473);
_local3 = md5_gg(_local3, _local2, _local1, _local4, x[_local5 + 12], 20, -1926607734);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 5], 4, -378558);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 8], 11, -2022574463);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 11], 16, 1839030562);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 14], 23, -35309556);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 1], 4, -1530992060);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 4], 11, 1272893353);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 7], 16, -155497632);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 10], 23, -1094730640);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 13], 4, 681279174);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 0], 11, -358537222);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 3], 16, -722521979);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 6], 23, 76029189);
_local4 = md5_hh(_local4, _local3, _local2, _local1, x[_local5 + 9], 4, -640364487);
_local1 = md5_hh(_local1, _local4, _local3, _local2, x[_local5 + 12], 11, -421815835);
_local2 = md5_hh(_local2, _local1, _local4, _local3, x[_local5 + 15], 16, 530742520);
_local3 = md5_hh(_local3, _local2, _local1, _local4, x[_local5 + 2], 23, -995338651);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 0], 6, -198630844);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 7], 10, 1126891415);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 14], 15, -1416354905);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 5], 21, -57434055);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 12], 6, 1700485571);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 3], 10, -1894986606);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 10], 15, -1051523);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 1], 21, -2054922799);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 8], 6, 1873313359);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 15], 10, -30611744);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 6], 15, -1560198380);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 13], 21, 1309151649);
_local4 = md5_ii(_local4, _local3, _local2, _local1, x[_local5 + 4], 6, -145523070);
_local1 = md5_ii(_local1, _local4, _local3, _local2, x[_local5 + 11], 10, -1120210379);
_local2 = md5_ii(_local2, _local1, _local4, _local3, x[_local5 + 2], 15, 718787259);
_local3 = md5_ii(_local3, _local2, _local1, _local4, x[_local5 + 9], 21, -343485551);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local1 = safe_add(_local1, _local7);
_local5 = _local5 + 16;
}
return(new Array(_local4, _local3, _local2, _local1));
}
static function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
static function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
static function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
static function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
static function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
static function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
static function safe_add(x, y) {
var _local1 = (x & 65535) + (y & 65535);
var _local2 = ((x >> 16) + (y >> 16)) + (_local1 >> 16);
return((_local2 << 16) | (_local1 & 65535));
}
static function str2binl(str) {
var _local3 = new Array();
var _local4 = 255;
var _local1 = 0;
while (_local1 < (str.length * 8)) {
_local3[_local1 >> 5] = _local3[_local1 >> 5] | ((str.charCodeAt(_local1 / 8) & _local4) << (_local1 % 32));
_local1 = _local1 + 8;
}
return(_local3);
}
static function binl2hex(binarray) {
var _local4 = new String("");
var _local3 = new String("0123456789abcdef");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
}
Symbol 2084 MovieClip [__Packages.physical] Frame 0
class physical extends MovieClip
{
var _xscale, _y, _yscale, size, ratio_y, swapDepths, _x, _currentframe, angle, speed;
function physical () {
super();
}
function scale() {
_xscale = _root.min_size + (((_y - _root.limit_up) / (_root.limit_down - _root.limit_up)) * (_root.max_size - _root.min_size));
_yscale = _xscale;
size = Math.abs(_xscale / 100);
if (dir == "right") {
_xscale = _xscale * -1;
}
ratio_y = ((_root.limit_down - _root.limit_up) / Stage.height) * 2;
swapDepths(Math.ceil((_y - 0.1) * 10));
}
function walksounds() {
if (_root.game.outside == true) {
}
}
function walkto(loc) {
if ((((old_dest_x != _x) || (old_dest_y != _y)) && (_root.walk == true)) && (_currentframe < 3)) {
new_dest_x = loc[0];
new_dest_y = loc[1];
if (new_dest_y > _root.limit_down) {
new_dest_y = _root.limit_down;
} else if (new_dest_y < _root.limit_up) {
new_dest_y = _root.limit_up;
}
if (new_dest_x > _root.limit_right) {
new_dest_x = _root.limit_right;
} else if (new_dest_x < _root.limit_left) {
new_dest_x = _root.limit_left;
}
scale();
angle = _root.f_angle((new_dest_x - _x) / (new_dest_y - _y));
if (new_dest_y < _y) {
angle = angle + 180;
}
speed_x = Math.sin((Math.PI/180) * angle) * speed;
speed_y = Math.cos((Math.PI/180) * angle) * speed;
if ((Math.abs(_x - new_dest_x) > Math.abs(speed_x * 3)) || (Math.abs(_y - new_dest_y) > Math.abs(speed_y * 3))) {
if (Math.abs(speed_x) > Math.abs(speed_y)) {
if (speed_x > 0) {
dir = "right";
}
if (speed_x < 0) {
dir = "left";
}
} else if (speed_y > 0) {
dir = "down";
} else if (speed_y < 0) {
dir = "up";
}
} else {
speed_x = 0;
speed_y = 0;
}
dest.push(new Array(new_dest_x, new_dest_y));
dest_x = new_dest_x;
dest_y = new_dest_y;
}
old_dest_x = loc[0];
old_dest_y = loc[1];
}
function onEnterFrame() {
scale();
}
var speed_x = 0;
var speed_y = 0;
var dest = new Array();
var dest_x = 0;
var dest_y = 0;
var new_dest_x = 0;
var new_dest_y = 0;
var old_dest_x = 0;
var old_dest_y = 0;
var dir = "";
}
Symbol 2085 MovieClip [__Packages.item] Frame 0
class item extends physical
{
var diff_x, _width, _x, diff_y, _height, _y, blur_amount, m_over, alive, filters, enemy, _name, dof, _visible, id, nextFrame, enemy_interact, play, stop, cacheAsBitmap, zsort, scale, _currentframe, useHandCursor;
function item () {
super();
}
function mouse() {
diff_x = Math.abs((_x + _width) - (_root._xmouse - _root.game._x));
diff_y = Math.abs((_y + _height) - (_root._ymouse - _root.game._y));
blur_amount = ((diff_x + diff_y) / (Stage.width + Stage.height)) * 5;
if (((m_over == true) && (_root.m_aim == true)) && (alive == false)) {
_root.m_aim = false;
} else if ((m_over == true) && (alive != false)) {
if (_root.cinema != true) {
if (collectable == true) {
filters = [new flash.filters.GlowFilter(16777215, 0.5, 8, 8, 2, 1)];
} else if (enemy == true) {
_root.m_aim = true;
} else {
filters = [];
}
_root.m_item = true;
}
if ((((enemy == true) && (_root.player._currentframe == 1)) && (_root.player.unholstered == true)) && (_root.cinema != true)) {
if (_x > _root.player._x) {
_root.player.dir = "right";
} else if (_x < _root.player._x) {
_root.player.dir = "left";
}
}
if ((_root.m_click == true) && (_root.cinema != true)) {
if ((_root.cursor._currentframe > 1) && (_root.player._currentframe < 3)) {
_root.f_item_use(_name);
}
_root.cursor.gotoAndStop(1);
if (((_root.player.gun == true) || (_root.alien_fixed == true)) && (enemy == true)) {
if ((_root.slingshot != true) || (_root.ammo > 0)) {
if ((_x > _root.player._x) && (_root.player.dir != "right")) {
_root.player.dir = "right";
} else if ((_x < _root.player._x) && (_root.player.dir == "right")) {
_root.player.dir = "left";
}
if ((_root.alien_fixed == false) && (_root.gun_active == true)) {
if (_root.player.cover == true) {
_root.player.a.play();
} else {
_root.player.gotoAndStop("shoot");
}
} else {
_root.player_arm.play();
}
_root.m_target = this;
} else {
_root.chat_alien.gotoAndStop("ammo");
}
} else {
_root.player.walkto(new Array(_x + interact_x, (_y + 100) + interact_y));
if ((_root.m_click_time > 20) && (Math.abs(_root.player.speed_x) > Math.abs(_root.player.speed_y))) {
_root.m_click_time = 0;
_root.player.running = true;
} else {
_root.player.running = false;
}
}
if (_root.player._currentframe < 3) {
_root.m_target = this;
}
}
if (_root.m_target == this) {
_root.m_click = false;
}
}
if (_root.cinema != true) {
if (((collectable == true) && (m_over != true)) || (dof == true)) {
filters = [];
}
} else {
filters = [];
}
}
function interact() {
if (collectable == true) {
_visible = false;
_root.f_get_item(id);
nextFrame();
} else {
_root.interacting = true;
if ((enemy != true) || ((enemy_interact == true) && (_root.player.gun != true))) {
play();
}
}
}
function unique() {
}
function onLoad() {
stop();
cacheAsBitmap = true;
if ((_root.game["get_" + id] == true) && (collectable == true)) {
_visible = false;
}
if (zsort == true) {
scale();
}
}
function onEnterFrame() {
if (_visible == true) {
mouse();
}
if ((_root.cinema == true) && (_currentframe > 1)) {
useHandCursor = false;
} else if (alive != false) {
useHandCursor = true;
} else {
useHandCursor = false;
}
if (zsort == true) {
scale();
}
unique();
}
function onRelease() {
}
function onRollOver() {
m_over = true;
}
function onDragOut() {
_root.m_item = false;
_root.m_aim = false;
m_over = false;
}
function onRollOut() {
_root.m_item = false;
_root.m_aim = false;
m_over = false;
}
var interact_x = 0;
var interact_y = 0;
var collectable = false;
}
Symbol 2086 MovieClip [__Packages.chat] Frame 0
class chat extends MovieClip
{
var _alpha, stop, _visible, _currentframe;
function chat () {
super();
_alpha = 0;
stop();
}
function onEnterFrame() {
_visible = false;
if (_root.new_objective._currentframe == 1) {
if (_currentframe > 1) {
_visible = true;
} else {
_alpha = 0;
}
}
if (_currentframe != prev_frame) {
if (_currentframe == 1) {
_root.cinema = false;
} else {
_root.cinema = true;
}
}
if ((_alpha < 100) && (_currentframe > 1)) {
_alpha = _alpha + Math.ceil((100 - _alpha) / 10);
}
prev_frame = _currentframe;
}
var prev_frame = 1;
var delay = 0;
}
Symbol 2087 MovieClip [__Packages.obstacle] Frame 0
class obstacle extends physical
{
var zsort, size, scale, bound, mod_h, w, _rotation, _x, _visible, absolute, redirect, h, _y, pathing;
function obstacle () {
super();
if (zsort != true) {
size = 1;
}
}
function onEnterFrame() {
if (zsort == true) {
scale();
}
bound = "";
mod_h = (((_root.player._x - _x) * _root.player.size) * (_rotation * 10)) / w;
if ((_visible == true) && ((absolute == true) || (_root.cinema != true))) {
if (redirect != true) {
if ((_root.player._x < (_x + (w * size))) && (_root.player._x > (_x - (w * size)))) {
if (((_root.player._y + _root.player.speed_y) < ((_y + (h * size)) + mod_h)) && (_root.player._y > (_y + mod_h))) {
_root.player._y = ((_y + (h * size)) + mod_h) + Math.abs(_root.player.speed_y);
bound = "v";
} else if (((_root.player._y + _root.player.speed_y) > ((_y - (h * size)) + mod_h)) && (_root.player._y < (_y + mod_h))) {
_root.player._y = ((_y - (h * size)) - Math.abs(_root.player.speed_y)) + mod_h;
bound = "v";
}
} else if (((_rotation == 0) && (_root.player._y < (_y + (h * size)))) && (_root.player._y > (_y - (h * size)))) {
if (((_root.player._x + (_root.player.speed_x * 2)) < (_x + (w * size))) && (_root.player._x > _x)) {
_root.player._x = (_x + (w * size)) + Math.abs(_root.player.speed_x * 2);
bound = "h";
} else if (((_root.player._x + (_root.player.speed_x * 2)) > (_x - (w * size))) && (_root.player._x < _x)) {
_root.player._x = _x - ((w * size) + Math.abs(_root.player.speed_x * 2));
bound = "h";
}
}
}
if (bound != "") {
if (pathing != false) {
if (bound == "h") {
if (_root.player._y > _y) {
_root.player.walkto(new Array(_x, (_y + h) + 10));
} else {
_root.player.walkto(new Array(_x, (_y - h) - 10));
}
} else if (_root.player._x > _x) {
_root.player.walkto(new Array((_x + w) + 10, _y));
} else {
_root.player.walkto(new Array((_x - w) - 10, _y));
}
bound = "";
} else if (bound == "h") {
_root.player.speed_x = 0;
} else {
_root.player.speed_y = 0;
}
}
}
}
}
Symbol 2088 MovieClip [__Packages.npc] Frame 0
class npc extends item
{
var npc_id, wander, follow, org_x, _x, _y, size, dir, zsort, scale, _xscale, alive, mouse, useHandCursor, stunned, unique;
function npc () {
super();
_root.game.npcs++;
npc_id = (("corpse_" + _root.game._currentframe) + "_") + _root.game.npcs;
if (_root.game[npc_id] == false) {
}
}
function movement() {
if ((wander == true) && (follow != true)) {
if (random(50) == 1) {
dest_x = (org_x - 50) + random(100);
}
}
if (Math.abs(_x - dest_x) < Math.abs(speed)) {
dest_x = _x;
speed_x = 0;
} else if (_x < dest_x) {
speed_x = speed;
} else if (_x > dest_x) {
speed_x = -speed;
}
if (_y < _root.limit_up) {
speed_y = speed_fall;
} else {
speed_y = 0;
}
_x = _x + (speed_x * size);
_y = _y + speed_y;
if (speed_x > 0) {
dir = "right";
} else if (speed_x < 0) {
dir = "left";
}
if (zsort != false) {
scale();
}
if (((dir == "right") && (_xscale > 0)) || ((dir == "left") && (_xscale < 0))) {
_xscale = _xscale * -1;
}
}
function onEnterFrame() {
if (alive != false) {
mouse();
useHandCursor = true;
} else {
useHandCursor = false;
}
if ((alive != false) && (stunned != true)) {
movement();
}
unique();
}
var speed = 3;
var speed_fall = 9;
var speed_x = 0;
var speed_y = 0;
var dest_x = MovieClip.prototype._x;
var dest_y = MovieClip.prototype._y;
}
Symbol 2089 MovieClip [__Packages.player] Frame 0
class player extends physical
{
var dest, walkto, speed_y, speed_x, _currentframe, _x, size, _y, dest_x, dest_y, dir, scale, gotoAndStop, variant_frm, p;
function player () {
super();
if ((_root.inventory_gun._currentframe == 3) && (_root.gun_unsafe != true)) {
unholstered = true;
gun = true;
}
}
function control() {
if ((((_root.m_click == true) && (m_click == false)) && (_root.m_inventory == false)) && (_root.m_item == false)) {
_root.interacting = false;
_root.cursor.gotoAndStop(1);
_root.cursor.cursor.play();
_root.m_target = null;
dest = new Array();
walkto(new Array(_root._xmouse - _root.game._x, (_root._ymouse - _root.game._y) + 20));
if ((_root.m_click_time > 20) && (Math.abs(speed_x) > Math.abs(speed_y))) {
_root.m_click_time = 0;
running = true;
} else {
running = false;
}
}
if (_root.m_click == true) {
m_click = true;
} else {
m_click = false;
}
}
function movement() {
if (_root.cinema == false) {
control();
}
if (_currentframe > 2) {
speed_x = 0;
speed_y = 0;
}
if (running == true) {
_x = _x + ((speed_x * size) * 2.4);
_y = _y + ((speed_y * size) * 2.4);
} else {
_x = _x + (speed_x * size);
_y = _y + (speed_y * size);
}
if (Math.abs(speed_x) < 0.5) {
speed_x = 0;
}
if (Math.abs(speed_y) < 0.5) {
speed_y = 0;
}
if (_root.limit_right_z == true) {
if (_x > (_root.limit_right * size)) {
_x = _root.limit_right * size;
speed_x = 0;
}
} else if (_x > _root.limit_right) {
_x = _root.limit_right;
speed_x = 0;
}
if (_root.limit_left_z == true) {
if (_x < (_root.limit_left * size)) {
_x = _root.limit_left * size;
speed_x = 0;
}
} else if (_x < _root.limit_left) {
_x = _root.limit_left;
speed_x = 0;
}
if ((_root.exit_right == true) && (_root.cinema != true)) {
if ((_x > (Stage.width / 2.24)) && (speed_x > 0)) {
_root.f_advance(_root.area_right, _root.area_right_ent);
}
}
if ((_root.exit_left == true) && (_root.cinema != true)) {
if ((_x < ((-Stage.width) / 2.24)) && (speed_x < 0)) {
_root.f_advance(_root.area_left, _root.area_left_ent);
}
}
if ((_root.exit_down == true) && (_root.cinema != true)) {
if ((_y > (Stage.height / 2.1)) && (speed_y > 0)) {
_root.f_advance(_root.area_down, _root.area_down_ent);
}
}
if (_y > _root.limit_down) {
_y = _root.limit_down;
dest_x = _x;
dest_y = _y;
}
if (_y < _root.limit_up) {
if (_root.player.cover != true) {
_y = _root.limit_up;
}
dest_x = _x;
dest_y = _y;
}
if (Math.abs(_x - dest_x) < (Math.abs(speed_x) * 3)) {
speed_x = speed_x * 0.7;
dest_x = _x;
}
if (Math.abs(_y - dest_y) < (Math.abs(speed_y) * 3)) {
speed_y = speed_y * 0.7;
dest_y = _y;
}
if ((speed_x == 0) && (speed_y == 0)) {
if (_currentframe == 2) {
_root.game.check_cover();
}
if (((_root.m_target != null) && (_currentframe < 3)) && (((Math.abs(_x - (_root.m_target._x + _root.m_target.interact_x)) < 50) || (Math.abs(_x - (_root.limit_right * size)) < 50)) || (Math.abs(_x - (_root.limit_left * size)) < 30))) {
_root.m_target.interact();
if ((_x - 10) > _root.m_target._x) {
dir = "left";
} else if ((_x + 10) < _root.m_target._x) {
dir = "right";
} else if (_y > _root.m_target._y) {
dir = "up";
} else if (_y < _root.m_target._y) {
dir = "down";
}
if ((_root.m_target.enemy != true) || (gun != true)) {
_root.m_target = null;
}
}
}
scale();
}
function animation() {
if ((gun == true) && (unholstered != true)) {
unholstered = true;
gotoAndStop("unholster");
} else if ((gun == false) && (unholstered == true)) {
unholstered = false;
gotoAndStop("holster");
}
if (((Math.abs(speed_x) > 0) || (Math.abs(speed_y) > 0)) && (_currentframe < 3)) {
gotoAndStop("walk");
} else if (_currentframe == 2) {
gotoAndStop(1);
}
variant_frm = 0;
if ((running == true) && (_currentframe == 2)) {
variant_frm = 4;
} else if (dir == "down") {
variant_frm = 3;
} else if (dir == "up") {
variant_frm = 2;
} else {
variant_frm = 1;
}
if (gun == true) {
variant_frm = variant_frm + 4;
}
if (_root.disguise == true) {
variant_frm = variant_frm + 8;
}
if (((_currentframe == 1) && (p._currentframe > 3)) && (gun == false)) {
p.p.play();
}
p.gotoAndStop(variant_frm);
}
function onEnterFrame() {
movement();
animation();
}
var m_click = false;
var m_over = false;
var holstering = false;
var unholstered = false;
var running = false;
var gun = false;
var speed = 6;
var got_gun = false;
}
Symbol 2090 MovieClip [__Packages.scan] Frame 0
class scan extends item
{
var the_matrix, _x, _y, clr_matrix, hitTest, scanning, filters, id, _name, informant, useHandCursor, scale, _xscale, _yscale;
function scan () {
super();
}
function scanit() {
the_matrix = new flash.geom.Matrix();
the_matrix.translate((_root.cursor.screen._width / 2) + (_x - (_root.cursor._x - _root.game._x)), (_root.cursor.screen._height / 2) + (_y - (_root.cursor._y - _root.game._y)));
clr_matrix = new Array();
clr_matrix = clr_matrix.concat([0, 0, 0, 0, 0]);
clr_matrix = clr_matrix.concat([0, 0, 0, 0, 0]);
clr_matrix = clr_matrix.concat([1, 1, 1, 0, 1]);
clr_matrix = clr_matrix.concat([0, 0, 0, 1, 0]);
if (hitTest(_root.cursor) && (_root.cursor._currentframe == 10)) {
scanning = true;
filters = [new flash.filters.ColorMatrixFilter(clr_matrix), new flash.filters.GlowFilter(16777215, 0.9 - (random(20) / 100), 20, 20, 1, 1), new flash.filters.BlurFilter(6, 0, 2)];
_root.cursor.screen.bmp.draw(this, the_matrix);
id = Number(substring(_name, 4, 1));
if ((id == _root.informant) && (_root.objectives_got[0] == 0)) {
the_matrix.translate(informant._x, informant._y);
_root.cursor.screen.bmp.draw(informant, the_matrix);
if ((Math.abs((_x + informant._x) - (_root.cursor._x - _root.game._x)) < 15) && (Math.abs((_y + informant._y) - (_root.cursor._y - _root.game._y)) < 15)) {
_root.game.informant._visible = true;
_root.game.informant.gotoAndPlay("a" + id);
_root.cursor.gotoAndStop(1);
}
}
} else {
scanning = false;
}
filters = [];
}
function onEnterFrame() {
useHandCursor = false;
scale();
_xscale = 100;
_yscale = 100;
scanit();
}
}
Symbol 695 Button
on (press) {
_parent.play();
}
Symbol 698 Button
on (press) {
play();
}
Symbol 700 Button
on (press) {
getURL ("http://www.newgrounds.com/refer/zeebarf", "_blank");
}
Symbol 707 Button
on (press) {
play();
}
Symbol 708 MovieClip Frame 1
stop();
Symbol 708 MovieClip Frame 27
stop();
Symbol 710 Button
on (press) {
getURL ("http://zeebarf.newgrounds.com/", "_blank");
}
Symbol 711 Button
on (press) {
getURL ("http://riftmaster.newgrounds.com/", "_blank");
}
Symbol 713 MovieClip Frame 23
if (go != true) {
stop();
}
Symbol 713 MovieClip Frame 42
_root.nextFrame();
Symbol 730 Button
on (press) {
play();
}
Symbol 732 MovieClip Frame 1
this.cacheAsBitmap = true;
Symbol 732 MovieClip Frame 100
stop();
Symbol 732 MovieClip Frame 114
_root.gotoAndStop("game");
Symbol 792 MovieClip Frame 1
stop();
Symbol 797 MovieClip Frame 1
stop();
Symbol 797 MovieClip Frame 15
stop();
Symbol 799 MovieClip Frame 1
stop();
Symbol 799 MovieClip Frame 15
stop();
Symbol 801 MovieClip Frame 1
stop();
Symbol 801 MovieClip Frame 15
stop();
Symbol 803 MovieClip Frame 1
stop();
Symbol 803 MovieClip Frame 15
stop();
Symbol 805 MovieClip Frame 1
stop();
Symbol 805 MovieClip Frame 15
stop();
Symbol 807 MovieClip Frame 1
stop();
Symbol 807 MovieClip Frame 15
stop();
Symbol 809 MovieClip Frame 1
stop();
Symbol 809 MovieClip Frame 15
stop();
Symbol 811 Button
on (release) {
_root.f_advance(2, 11);
}
on (rollOver, dragOver) {
a2.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a2.gotoAndPlay(16);
}
Symbol 812 Button
on (release) {
getURL ("http://www.newgrounds.com/portal/view/495164", "_blank");
}
on (rollOver, dragOver) {
a7.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a7.gotoAndPlay(16);
}
Symbol 813 Button
on (release) {
_root.f_advance(1);
}
on (rollOver, dragOver) {
a1.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a1.gotoAndPlay(16);
}
Symbol 814 Button
on (release) {
_root.f_advance(16);
}
on (rollOver, dragOver) {
a3.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a3.gotoAndPlay(16);
}
Symbol 815 Button
on (release) {
_root.f_advance(26);
}
on (rollOver, dragOver) {
a4.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a4.gotoAndPlay(16);
}
Symbol 816 Button
on (release) {
_root.f_advance(25);
}
on (rollOver, dragOver) {
a6.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a6.gotoAndPlay(16);
}
Symbol 817 Button
on (release) {
_root.f_advance(24);
}
on (rollOver, dragOver) {
a5.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a5.gotoAndPlay(16);
}
Symbol 818 MovieClip Frame 1
if (_parent.intro == true) {
gotoAndStop(_totalframes);
}
Symbol 818 MovieClip Frame 24
_parent.intro = true;
stop();
Symbol 824 MovieClip [item_hat1] Frame 1
#initclip 110
Object.registerClass("item_hat1", item);
#endinitclip
id = 11;
if (_root.game["get_" + id] == true) {
collectable = true;
}
Symbol 824 MovieClip [item_hat1] Frame 2
if (collectable == true) {
_parent.item1.collectable = false;
_parent.item3.collectable = false;
_parent.item4.collectable = false;
_root.exit_right = true;
stop();
} else {
prevFrame();
}
Symbol 832 MovieClip Frame 1
function onEnterFrame() {
if (_root.game.chat_hobo1._currentframe != 1) {
play();
} else {
gotoAndStop (1);
}
}
Symbol 843 MovieClip [angry hobo] Frame 1
#initclip 52
Object.registerClass("angry hobo", item);
#endinitclip
interact_x = 80;
interact_y = -100;
zsort = true;
enemy_interact = true;
enemy = true;
if (_parent.hobo_dead == true) {
gotoAndStop(_totalframes);
} else {
stop();
}
Symbol 843 MovieClip [angry hobo] Frame 2
if (_root.m_target != this) {
if ((_root.used_item == 25) || (_root.used_item == 26)) {
_parent._parent.chat_hobo1.gotoAndStop(5);
} else if (_root.game.scavenger_quest == true) {
_parent._parent.chat_hobo1.gotoAndStop(4);
} else {
_parent._parent.chat_hobo1.nextFrame();
}
_root.cinema = true;
_root.m_target = null;
}
prevFrame();
Symbol 843 MovieClip [angry hobo] Frame 24
_root.cinema = false;
alive = false;
Symbol 843 MovieClip [angry hobo] Frame 25
prevFrame();
Symbol 845 MovieClip [item_bowling_ball] Frame 1
#initclip 53
Object.registerClass("item_bowling_ball", item);
#endinitclip
id = 12;
if (_root.game["get_" + id] == true) {
collectable = true;
}
Symbol 845 MovieClip [item_bowling_ball] Frame 2
if (collectable == true) {
_parent.item2.collectable = false;
_parent.item3.collectable = false;
_parent.item4.collectable = false;
_root.exit_right = true;
stop();
} else {
prevFrame();
}
Symbol 846 MovieClip [catapult_pole] Frame 1
#initclip 54
Object.registerClass("catapult_pole", item);
#endinitclip
id = 19;
interact_y = -100;
if (_root.game["get_" + id] == true) {
collectable = true;
}
Symbol 846 MovieClip [catapult_pole] Frame 2
if (collectable == true) {
_parent.item1.collectable = false;
_parent.item2.collectable = false;
_parent.item3.collectable = false;
_root.exit_right = true;
stop();
} else {
prevFrame();
}
Symbol 848 MovieClip [catapult_elastic] Frame 1
#initclip 55
Object.registerClass("catapult_elastic", item);
#endinitclip
id = 21;
interact_y = -100;
if (_root.game["get_" + id] == true) {
collectable = true;
}
Symbol 848 MovieClip [catapult_elastic] Frame 2
if (collectable == true) {
_parent.item1.collectable = false;
_parent.item2.collectable = false;
_parent.item4.collectable = false;
_root.exit_right = true;
stop();
} else {
prevFrame();
}
Symbol 855 Button
on (release) {
play();
}
Symbol 856 MovieClip Frame 1
stop();
Symbol 856 MovieClip Frame 15
stop();
Symbol 856 MovieClip Frame 30
_root.cinema = false;
Symbol 862 Button
on (release) {
_parent.scavenger_quest = true;
gotoAndStop (1);
}
Symbol 865 Button
on (release) {
gotoAndStop (1);
}
Symbol 868 Button
on (release) {
if ((_root.game.get_11 != true) || (_root.game.get_12 != true)) {
_root.exit_right = false;
}
_root.used_item = -1;
_root.game.objects.item1.collectable = true;
_root.game.objects.item2.collectable = true;
_root.game.objects.item3.collectable = true;
_root.game.objects.item4.collectable = true;
gotoAndStop (1);
}
Symbol 869 MovieClip [chat_hobo1] Frame 1
#initclip 56
Object.registerClass("chat_hobo1", chat);
#endinitclip
Symbol 877 MovieClip Frame 2
if (_parent.speed_x == 0) {
gotoAndPlay (1);
}
Symbol 885 MovieClip Frame 13
_root.cinema = false;
stop();
Symbol 888 MovieClip Frame 15
stop();
Symbol 889 MovieClip [bunny] Frame 1
#initclip 57
Object.registerClass("bunny", npc);
#endinitclip
id = 25;
interact_y = -100;
enemy = true;
wander = true;
org_x = _x;
_x = (_x + (-50 + random(100)));
stop();
Symbol 889 MovieClip [bunny] Frame 2
if (_root.slingshot == true) {
stunned = true;
_root.f_sound("hit", 1);
nextFrame();
} else {
_root.bunny_kills++;
_root.f_sound("splat1", 1);
alive = false;
stop();
}
Symbol 889 MovieClip [bunny] Frame 3
enemy = false;
_root.m_target = null;
collectable = true;
Symbol 896 MovieClip [item_plant1] Frame 1
#initclip 58
Object.registerClass("item_plant1", item);
#endinitclip
id = 16;
collectable = true;
interact_y = -100;
Symbol 915 MovieClip Frame 1
function place() {
_x = _root.player._x;
_y = (_root.player._y + 10);
_xscale = _root.player._xscale;
_yscale = Math.abs(_xscale);
this.swapDepths(Math.ceil((_y - 0.1) * 10));
}
function onEnterFrame() {
if (_currentframe == 2) {
place();
} else if ((_root.shield == true) && (_currentframe == 1)) {
gotoAndStop (2);
}
scale();
}
stop();
place();
Symbol 915 MovieClip Frame 3
_root.wounded = true;
_root.f_sound("shieldhit", 1);
Symbol 915 MovieClip Frame 12
_root.cinema = false;
_root.s_forest.stop();
_root.f_sound("boss", 999, "music");
_root.player.gotoAndStop("cover");
stop();
Symbol 926 MovieClip Frame 11
stop();
Symbol 926 MovieClip Frame 17
_parent.gotoAndStop("attack");
Symbol 929 MovieClip Frame 1
function f_hit() {
if ((_root.shield != true) && (_root.player.cover != true)) {
_root.player.gotoAndStop("hurt");
} else if (_root.shield_hp > 0) {
_root.shield_hp--;
if (_root.shield_hp == 0) {
_root.shield = false;
_root.game.objects.shield.play();
}
}
}
Symbol 929 MovieClip Frame 13
_root.f_sound("lasershot", 1);
Symbol 929 MovieClip Frame 16
f_hit();
Symbol 929 MovieClip Frame 25
_root.f_sound("lasershot", 1);
Symbol 929 MovieClip Frame 28
f_hit();
Symbol 929 MovieClip Frame 41
_parent.gotoAndStop(1);
Symbol 934 MovieClip Frame 13
_parent.gotoAndStop("nada");
Symbol 935 MovieClip Frame 51
_root.favors[2] = 3;
_root.f_complete_quest(11, 1);
_root.f_itemslot_free(22);
_root.game.pighunter_dead = true;
_root.s_boss.stop();
_root.f_sound("forest", 999, "music");
_root.chat_alien.gotoAndStop("shield2");
stop();
Symbol 936 MovieClip [pighunter clips] Frame 1
#initclip 59
Object.registerClass("pighunter clips", npc);
#endinitclip
function unique() {
if (_currentframe > 3) {
_root.limit_right = 700;
}
if (timer == intervals[n]) {
p.play();
timer = 0;
n++;
if (n == intervals.length) {
n = 0;
}
}
timer++;
}
if (ini != true) {
ini = true;
var intervals = new Array(60, 50, 80, 120, 70);
var timer = 0;
var n = 0;
speed_fall = 0;
zsort = false;
enemy = true;
if (_root.game.pighunter_stage > 0) {
shield._visible = false;
}
}
if (((_root.game._currentframe == (5 + _root.game.pighunter_stage)) && (_currentframe == 1)) && (_root.game.pighunter_dead != true)) {
_root.limit_right = -260;
} else {
gotoAndStop ("nada");
}
cover = true;
Symbol 936 MovieClip [pighunter clips] Frame 2
prevFrame();
Symbol 936 MovieClip [pighunter clips] Frame 3
cover = false;
Symbol 936 MovieClip [pighunter clips] Frame 4
alive = false;
_root.player.gotoAndStop(1);
if (_root.game.pighunter_stage == 1) {
_root.cinema = true;
_root.player.walkto(new Array(_root.player._x + 180, _root.player._y + 85));
nextFrame();
} else {
_root.game.pighunter_stage++;
_root.f_sound("hit", 1);
_root.f_sound("shieldhit", 1);
stop();
}
Symbol 936 MovieClip [pighunter clips] Frame 5
_root.f_sound("splat1", 1);
stop();
Symbol 936 MovieClip [pighunter clips] Frame 6
prevFrame();
Symbol 962 MovieClip [char_bug1] Frame 1
#initclip 60
Object.registerClass("char_bug1", npc);
#endinitclip
interact_x = -90;
interact_y = -110;
stop();
Symbol 962 MovieClip [char_bug1] Frame 2
if (_root.used_item == 20) {
_root.f_complete_quest(4, 1);
_parent._parent.chat_teddybear1.gotoAndStop(5);
} else if (_root.objectives[3] > 0) {
_parent._parent.chat_teddybear1.gotoAndStop(4);
} else if (_root.objectives_got[0] > 0) {
_root.game.chat_alien1.gotoAndStop(2);
} else {
_parent._parent.chat_teddybear1.gotoAndStop(6);
}
Symbol 971 Button
on (release) {
_root.f_new_mainquest(4);
gotoAndStop (1);
}
Symbol 974 Button
on (release) {
gotoAndStop (1);
}
Symbol 977 Button
on (release) {
_parent.teddyhelp = true;
_root.f_new_mainquest(3);
gotoAndStop (1);
}
Symbol 982 Button
on (release) {
gotoAndStop (2);
}
Symbol 983 MovieClip [chat_bug1] Frame 1
#initclip 61
Object.registerClass("chat_bug1", chat);
#endinitclip
Symbol 986 Button
on (release) {
_root.f_complete_quest(2, 1);
_parent.chat_teddybear1.gotoAndStop(7);
gotoAndStop (1);
}
Symbol 987 MovieClip [scaveng speech copy 2] Frame 1
#initclip 62
Object.registerClass("scaveng speech copy 2", chat);
#endinitclip
Symbol 997 MovieClip Frame 1
stop();
Symbol 997 MovieClip Frame 7
_root.game.chat_doorman1.gotoAndStop(2);
Symbol 997 MovieClip Frame 9
prevFrame();
Symbol 998 MovieClip [ob_doorman1] Frame 1
#initclip 63
Object.registerClass("ob_doorman1", item);
#endinitclip
interact_x = -190;
interact_y = -100;
Symbol 998 MovieClip [ob_doorman1] Frame 2
s.play();
gotoAndStop (1);
Symbol 1003 Button
on (release) {
if (_root.slingshot == true) {
_root.f_change_item(24, 2);
}
_root.gun_have = false;
_root.inventory_gun.gotoAndStop(1);
nextFrame();
}
Symbol 1006 Button
on (release) {
_root.f_advance(1);
}
Symbol 1007 MovieClip [chat_doorman1] Frame 1
#initclip 64
Object.registerClass("chat_doorman1", chat);
#endinitclip
Symbol 1019 MovieClip Frame 1
gotoAndPlay(random(200) + 1);
Symbol 1021 MovieClip Frame 1
stop();
Symbol 1021 MovieClip Frame 15
stop();
Symbol 1023 MovieClip Frame 1
stop();
Symbol 1023 MovieClip Frame 15
stop();
Symbol 1025 MovieClip Frame 1
stop();
Symbol 1025 MovieClip Frame 15
stop();
Symbol 1027 MovieClip Frame 1
stop();
Symbol 1027 MovieClip Frame 15
stop();
Symbol 1029 MovieClip Frame 1
stop();
Symbol 1029 MovieClip Frame 15
stop();
Symbol 1031 MovieClip Frame 1
stop();
Symbol 1031 MovieClip Frame 15
stop();
Symbol 1033 MovieClip Frame 1
stop();
Symbol 1033 MovieClip Frame 15
stop();
Symbol 1034 Button
on (release) {
_root.f_advance(6);
}
on (rollOver, dragOver) {
a1.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a1.gotoAndPlay(16);
}
Symbol 1035 Button
on (release) {
_root.f_advance(5);
}
on (rollOver, dragOver) {
a3.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a3.gotoAndPlay(16);
}
Symbol 1036 Button
on (release) {
_root.gun_have = true;
_root.f_advance(-1, -1);
}
on (rollOver, dragOver) {
a6.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a6.gotoAndPlay(16);
}
Symbol 1037 Button
on (release) {
_root.f_advance(2);
}
on (rollOver, dragOver) {
a5.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a5.gotoAndPlay(16);
}
Symbol 1038 Button
on (release) {
_root.f_advance(4);
}
on (rollOver, dragOver) {
a4.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a4.gotoAndPlay(16);
}
Symbol 1039 Button
on (release) {
_root.f_advance(3);
}
on (rollOver, dragOver) {
a2.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a2.gotoAndPlay(16);
}
Symbol 1040 Button
on (release) {
_root.f_advance(1);
}
on (rollOver, dragOver) {
a7.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a7.gotoAndPlay(16);
}
Symbol 1048 Button
on (rollOver) {
txt = _root.game["txt" + (id - 1)];
txt.id = _currentframe;
txt.play();
}
on (rollOut, dragOut) {
txt.gotoAndStop(1);
}
on (press) {
_root.tradingpost[id - 1] = _root.used_item;
_root.used_item = -1;
_root.f_get_item(_currentframe - 1);
button._visible = false;
_root.game.trading = false;
_root.cinema = false;
_root.game.trademachine.gotoAndStop(1);
}
Symbol 1082 MovieClip Frame 1
function f() {
if (_root.game.trading == true) {
button._visible = true;
} else {
button._visible = false;
}
gotoAndStop(_root.tradingpost[id - 1] + 1);
}
function onEnterFrame() {
f();
}
id = Number(substring(_name, 5, 1));
f();
Symbol 1085 MovieClip [trademachine] Frame 1
#initclip 65
Object.registerClass("trademachine", item);
#endinitclip
Symbol 1085 MovieClip [trademachine] Frame 2
if (ierror == true) {
ierror = false;
_root.chat_alien.gotoAndStop("trade3");
gotoAndStop (1);
} else if (_root.used_item > 0) {
_root.cinema = true;
_root.game.chat_trade.gotoAndStop(2);
nextFrame();
} else {
_root.cinema = true;
_root.game.chat_trade.gotoAndStop(4);
gotoAndStop (1);
}
Symbol 1085 MovieClip [trademachine] Frame 3
_root.game.trading = true;
Symbol 1142 MovieClip Frame 1
gotoAndStop(_parent.id);
Symbol 1142 MovieClip Frame 24
txt2 = ("(x" + _root.ammo) + ")";
Symbol 1143 MovieClip Frame 1
stop();
Symbol 1143 MovieClip Frame 10
stop();
Symbol 1147 Button
on (release) {
nextFrame();
}
Symbol 1150 Button
on (release) {
gotoAndStop (1);
}
Symbol 1151 MovieClip [chat_trade] Frame 1
#initclip 66
Object.registerClass("chat_trade", chat);
#endinitclip
Symbol 1168 MovieClip Frame 1
stop();
Symbol 1169 MovieClip [doctor1] Frame 1
#initclip 67
Object.registerClass("doctor1", item);
#endinitclip
interact_x = -60;
interact_y = -100;
zsort = true;
Symbol 1169 MovieClip [doctor1] Frame 2
if (_root.objectives_got[9] > 0) {
if (_root.game.appointment == true) {
_root.exit_down = false;
_root.game.appointment = false;
_root.wounded = false;
_parent._parent.doctor_chat1.gotoAndStop(6);
_parent.giftshop.collectable = true;
} else if ((_root.game.appointment == false) && (_root.favors_used[0] > 0)) {
_parent._parent.doctor_chat1.gotoAndStop(9);
} else {
_parent._parent.doctor_chat1.gotoAndStop(8);
}
} else if (_root.used_item == 17) {
_root.cinema = true;
_root.game.doctor_plant = true;
_parent._parent.doctor_chat1.gotoAndStop(5);
} else if (_root.objectives[9] > 0) {
_parent._parent.doctor_chat1.gotoAndStop(4);
} else {
_parent._parent.doctor_chat1.gotoAndStop(2);
}
d.gotoAndStop(2);
gotoAndStop (1);
Symbol 1171 MovieClip [giftshop] Frame 1
#initclip 68
Object.registerClass("giftshop", item);
#endinitclip
id = 18;
if (_root.game.get_18 == true) {
collectable = true;
gotoAndStop (2);
}
Symbol 1171 MovieClip [giftshop] Frame 2
if (collectable == true) {
_root.exit_down = true;
alive = false;
_visible = true;
stop();
} else {
_parent.doctor1.d.gotoAndStop(2);
_root.game.doctor_chat1.gotoAndStop(7);
prevFrame();
}
Symbol 1180 Button
on (release) {
_root.f_new_mainquest(10);
_root.game.objects.doctor1.d.gotoAndStop(1);
gotoAndStop (1);
}
Symbol 1183 Button
on (release) {
_root.game.objects.doctor1.d.gotoAndStop(1);
gotoAndStop (1);
}
Symbol 1186 Button
on (release) {
_root.favors[0] = 1;
_root.f_complete_quest(10, 1);
_root.game.objects.doctor1.d.gotoAndStop(1);
gotoAndStop (1);
}
Symbol 1195 MovieClip [chat3] Frame 1
#initclip 69
Object.registerClass("chat3", chat);
#endinitclip
Symbol 1217 MovieClip [mayor] Frame 1
#initclip 70
Object.registerClass("mayor", item);
#endinitclip
if (_root.game.get_20 == true) {
_visible = false;
} else if (_root.objectives_got[6] > 0) {
gotoAndStop ("speech");
} else {
stop();
}
Symbol 1217 MovieClip [mayor] Frame 2
prevFrame();
Symbol 1217 MovieClip [mayor] Frame 49
enemy = true;
enemy_interact = true;
stop();
Symbol 1217 MovieClip [mayor] Frame 50
if (_root.player.gun == true) {
_root.f_sound("hit", 1);
} else {
if (_root.objectives[6] > 0) {
_root.chat_alien.gotoAndStop("mayor1");
} else {
_root.chat_alien.gotoAndStop("mayor2");
}
prevFrame();
}
Symbol 1217 MovieClip [mayor] Frame 85
_root.game.objects.item_teddykey._visible = true;
stop();
Symbol 1233 MovieClip Frame 1
function onEnterFrame() {
if (_root.game.seamstress_chat1._currentframe > 1) {
frm = 2;
} else {
frm = 1;
}
if ((_root.objectives_got[6] > 0) || (_root.game.seamstress_chat1._currentframe == 8)) {
frm = frm + 2;
}
gotoAndStop(frm);
}
Symbol 1234 MovieClip [seamstress] Frame 1
#initclip 71
Object.registerClass("seamstress", item);
#endinitclip
interact_x = -90;
interact_y = -100;
Symbol 1234 MovieClip [seamstress] Frame 2
if (_root.f_have_item(27)) {
_parent._parent.seamstress_chat1.gotoAndStop(9);
} else if ((_root.game.make_disguise != true) && (_root.favors_used[3] > 0)) {
if (_root.used_item == 18) {
_root.used_item = -1;
_root.game.make_disguise = true;
_root.f_complete_quest(3, 1);
_root.f_get_item(27);
_root.cinema = false;
} else if (_root.used_item == -1) {
_parent._parent.seamstress_chat1.gotoAndStop(11);
} else {
_parent._parent.seamstress_chat1.gotoAndStop(10);
}
} else if (_root.objectives_got[6] > 0) {
_parent._parent.seamstress_chat1.gotoAndStop(6);
} else if ((_root.used_item == 15) || (_root.objectives_got[6] > 0)) {
_root.cinema = true;
_parent._parent.seamstress_chat1.gotoAndStop(8);
} else if (_root.used_item == 8) {
_root.cinema = true;
_parent._parent.seamstress_chat1.gotoAndStop(7);
} else if (_root.objectives[6] > 0) {
_parent._parent.seamstress_chat1.gotoAndStop(5);
} else {
_parent._parent.seamstress_chat1.gotoAndStop(2);
}
gotoAndStop (1);
Symbol 1235 MovieClip [item_teddykey] Frame 1
#initclip 72
Object.registerClass("item_teddykey", item);
#endinitclip
id = 20;
collectable = true;
interact_y = -100;
_visible = false;
Symbol 1243 Button
on (release) {
nextFrame();
}
Symbol 1246 Button
on (release) {
_root.game.fashion_pop.play();
gotoAndStop (1);
}
Symbol 1249 Button
on (release) {
gotoAndStop (1);
}
Symbol 1256 Button
on (release) {
if (_root.favors[3] == 0) {
_root.favors[3] = 4;
_root.f_complete_quest(7, 1);
_root.game.mayor.gotoAndPlay("emerge");
}
gotoAndStop (1);
}
Symbol 1263 MovieClip [Symbol 107] Frame 1
#initclip 73
Object.registerClass("Symbol 107", chat);
#endinitclip
Symbol 1266 Button
on (press) {
play();
}
Symbol 1267 MovieClip Frame 1
stop();
Symbol 1267 MovieClip Frame 21
stop();
Symbol 1267 MovieClip Frame 39
_root.f_new_mainquest(7);
Symbol 1279 MovieClip Frame 1
function onEnterFrame() {
if (_root.game.farmer_chat1._currentframe > 1) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 1280 MovieClip [farmer] Frame 1
#initclip 74
Object.registerClass("farmer", item);
#endinitclip
interact_x = -90;
interact_y = -100;
zsort = true;
Symbol 1280 MovieClip [farmer] Frame 2
if (_root.game.get_15 == true) {
_parent._parent.farmer_chat1.gotoAndStop(10);
} else if (_root.used_item == 14) {
_parent._parent.farmer_chat1.gotoAndStop(9);
} else if (_root.game.get_13 == true) {
_parent.farmer_chat1.gotoAndStop(7);
} else {
_parent._parent.farmer_chat1.gotoAndStop(2);
}
gotoAndStop (1);
Symbol 1284 MovieClip [snails] Frame 1
#initclip 75
Object.registerClass("snails", item);
#endinitclip
interact_y = -100;
Symbol 1284 MovieClip [snails] Frame 2
if (_root.game.get_15 == true) {
_parent.farmer_chat1.gotoAndStop(10);
} else if (_root.game.get_13 == true) {
_parent.farmer_chat1.gotoAndStop(7);
} else {
_parent.farmer_chat1.gotoAndStop(3);
}
prevFrame();
Symbol 1291 Button
on (release) {
gotoAndStop (1);
}
Symbol 1300 Button
on (release) {
if (_root.game.get_13 != true) {
_root.f_get_item(13);
}
_root.f_new_mainquest(6);
_root.game.objects.farmer1.farmer.gotoAndStop(1);
gotoAndStop (1);
}
Symbol 1305 Button
on (release) {
_root.game.objects.farmer1.farmer.gotoAndStop(1);
gotoAndStop (1);
}
Symbol 1308 Button
on (release) {
if (_parent.get_15 != true) {
_root.f_get_item(15);
}
_root.game.objects.farmer1.farmer.gotoAndStop(1);
gotoAndStop (1);
}
Symbol 1311 Button
on (release) {
_root.game.objects.farmer1.farmer.gotoAndStop(1);
gotoAndStop (1);
}
Symbol 1312 MovieClip [chat4] Frame 1
#initclip 76
Object.registerClass("chat4", chat);
#endinitclip
Symbol 1327 MovieClip Frame 1
function onEnterFrame() {
if (_root.game.favordude_chat1._currentframe == 1) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
Symbol 1328 MovieClip [favorguy2] Frame 1
#initclip 77
Object.registerClass("favorguy2", item);
#endinitclip
interact_x = -70;
Symbol 1328 MovieClip [favorguy2] Frame 2
if (_root.cinema != true) {
if (_root.objectives[10] == 0) {
_root.game.favordude_chat1.gotoAndStop(2);
} else if (_root.game.pighunter_dead == true) {
_root.game.favordude_chat1.gotoAndStop(8);
} else {
_root.game.favordude_chat1.gotoAndStop(7);
}
}
prevFrame();
Symbol 1340 Button
on (release) {
_root.game.pighunter_pop.play();
nextFrame();
}
Symbol 1343 Button
on (release) {
_root.f_get_item(22);
_root.f_new_mainquest(11);
gotoAndStop (1);
}
Symbol 1346 Button
on (release) {
gotoAndStop (1);
}
Symbol 1349 MovieClip [favor dude speech] Frame 1
#initclip 78
Object.registerClass("favor dude speech", chat);
#endinitclip
Symbol 1352 Button
on (release) {
play();
}
Symbol 1353 MovieClip Frame 1
stop();
Symbol 1353 MovieClip Frame 26
stop();
Symbol 1353 MovieClip Frame 49
_root.game.favordude_chat1.nextFrame();
Symbol 1359 MovieClip Frame 1
_visible = false;
Symbol 1361 MovieClip [drinking guy1] Frame 1
#initclip 79
Object.registerClass("drinking guy1", scan);
#endinitclip
stop();
Symbol 1364 MovieClip [drinking guy5] Frame 1
#initclip 80
Object.registerClass("drinking guy5", scan);
#endinitclip
scannable = true;
Symbol 1368 MovieClip [drinking guy2] Frame 1
#initclip 81
Object.registerClass("drinking guy2", scan);
#endinitclip
scannable = true;
Symbol 1377 MovieClip [drinking guy3] Frame 1
#initclip 82
Object.registerClass("drinking guy3", scan);
#endinitclip
scannable = true;
Symbol 1380 MovieClip [bartender] Frame 1
#initclip 83
Object.registerClass("bartender", scan);
#endinitclip
scannable = true;
Symbol 1386 MovieClip [drinking guy6] Frame 1
#initclip 84
Object.registerClass("drinking guy6", scan);
#endinitclip
scannable = true;
Symbol 1391 MovieClip [drinking guy7] Frame 1
#initclip 85
Object.registerClass("drinking guy7", scan);
#endinitclip
scannable = true;
Symbol 1396 MovieClip Frame 1
function speech() {
_root.game.informant_chat1.gotoAndStop(2);
stop();
}
_visible = false;
stop();
Symbol 1396 MovieClip Frame 25
speech();
Symbol 1396 MovieClip Frame 50
speech();
Symbol 1396 MovieClip Frame 75
speech();
Symbol 1396 MovieClip Frame 100
speech();
Symbol 1396 MovieClip Frame 125
speech();
Symbol 1396 MovieClip Frame 150
speech();
Symbol 1396 MovieClip Frame 175
speech();
Symbol 1396 MovieClip Frame 216
stop();
Symbol 1405 Button
on (release) {
_root.f_complete_quest(1, 1);
_root.f_new_mainquest(2);
_parent.informant.gotoAndPlay("exit");
gotoAndStop (1);
}
Symbol 1406 MovieClip [informant speech] Frame 1
#initclip 86
Object.registerClass("informant speech", chat);
#endinitclip
Symbol 1417 MovieClip Frame 10
_root.f_sound("catapultlaunch", 1);
Symbol 1417 MovieClip Frame 67
_root.f_advance(1, 1);
Symbol 1418 MovieClip Frame 10
_root.f_sound("catapultlaunch", 1);
Symbol 1418 MovieClip Frame 67
_root.f_advance(-1, -1);
Symbol 1419 MovieClip Frame 1
if (_root.entrance == 1) {
stop();
} else {
nextFrame();
}
Symbol 1425 MovieClip [elevator] Frame 1
#initclip 87
Object.registerClass("elevator", item);
#endinitclip
stop();
Symbol 1425 MovieClip [elevator] Frame 2
if ((_root.used_item == 20) || (_root.game.objects.teddybear1._visible == true)) {
_root.game.elevator_unlock = true;
}
if (_root.game.elevator_unlock == true) {
_root.player._visible = false;
} else {
_root.cinema = true;
_root.game.alien_chat1.gotoAndStop(2);
prevFrame();
}
Symbol 1425 MovieClip [elevator] Frame 80
_root.f_advance(1, 1);
Symbol 1426 MovieClip [catapult_b] Frame 1
#initclip 88
Object.registerClass("catapult_b", item);
#endinitclip
interact_y = -100;
Symbol 1426 MovieClip [catapult_b] Frame 2
_root.f_advance(-1, -1);
Symbol 1427 MovieClip [char_bug2] Frame 1
#initclip 89
Object.registerClass("char_bug2", item);
#endinitclip
interact_x = -90;
interact_y = -110;
stop();
Symbol 1427 MovieClip [char_bug2] Frame 2
if (_root.disguise == true) {
_parent._parent.chat_teddybear1.gotoAndStop(3);
} else {
_parent._parent.chat_teddybear1.gotoAndStop(2);
}
Symbol 1431 Button
on (release) {
gotoAndStop (1);
}
Symbol 1432 MovieClip [elevator speech] Frame 1
#initclip 90
Object.registerClass("elevator speech", chat);
#endinitclip
Symbol 1435 Button
on (release) {
gotoAndStop (1);
}
Symbol 1438 MovieClip [bear elevator speech] Frame 1
#initclip 91
Object.registerClass("bear elevator speech", chat);
#endinitclip
Symbol 1450 MovieClip [elevatorup] Frame 1
#initclip 92
Object.registerClass("elevatorup", item);
#endinitclip
Instance of Symbol 1449 MovieClip in Symbol 1450 MovieClip [elevatorup] Frame 1
onClipEvent (enterFrame) {
tellTarget (_parent) {
if (_currentframe == 1) {
if (_root.entrance == -1) {
gotoAndStop (40);
} else {
_root.cinema = true;
gotoAndPlay (2);
}
}
};
}
Symbol 1450 MovieClip [elevatorup] Frame 39
if (_root.disguise == true) {
_root.player._visible = true;
_root.cinema = false;
nextFrame();
} else {
_root.game.guard_chat1.gotoAndStop(2);
stop();
}
Symbol 1450 MovieClip [elevatorup] Frame 46
_root.player._visible = false;
Symbol 1450 MovieClip [elevatorup] Frame 82
_root.f_advance(-1, -1);
Symbol 1466 MovieClip Frame 5
_root.f_sound("lasershot", 1);
Symbol 1466 MovieClip Frame 6
_root.game.laser1.play();
Symbol 1469 MovieClip Frame 5
_root.f_sound("lasershot", 1);
Symbol 1469 MovieClip Frame 21
_parent.gotoAndStop("duck");
Symbol 1473 MovieClip Frame 16
stop();
Symbol 1473 MovieClip Frame 30
if (_root.game.collector._currentframe > 1) {
_parent.gotoAndStop("shoot2");
} else {
_parent.gotoAndStop("shoot1");
}
Symbol 1479 MovieClip Frame 33
_root.game.collector.gotoAndStop(4);
_root.game.commander.enemy = false;
_root.player.gotoAndStop(1);
_root.s_boss.stop();
_root.f_sound("end", 999, "music");
stop();
Symbol 1480 MovieClip [jack in box guard] Frame 1
#initclip 93
Object.registerClass("jack in box guard", npc);
#endinitclip
function unique() {
if (_currentframe > 2) {
_root.exit_right = false;
_root.exit_down = false;
}
if ((_currentframe == 3) && (_root.player.a._currentframe > 10)) {
gotoAndStop ("duck");
}
if (timer == intervals[n]) {
p.play();
timer = 0;
n++;
if (n == intervals.length) {
n = 0;
}
}
timer++;
}
if (ini != true) {
ini = true;
var intervals = new Array(10, 50, 80, 120, 70);
var timer = 0;
var n = 0;
interact_x = 80;
interact_y = -100;
speed_fall = 0;
zsort = true;
cover = false;
}
Symbol 1480 MovieClip [jack in box guard] Frame 2
if (_root.game._currentframe == 24) {
if ((_root.game.cats == true) && (_root.player._currentframe == 5)) {
_root.game.make_attack();
} else {
_root.game.commander_chat1.gotoAndStop(3);
}
} else if (_root.disguise == true) {
_root.game.guard_chat1.gotoAndStop(3);
} else {
_root.game.guard_chat1.gotoAndStop(2);
}
prevFrame();
Symbol 1480 MovieClip [jack in box guard] Frame 3
cover = true;
Symbol 1480 MovieClip [jack in box guard] Frame 4
cover = false;
Symbol 1480 MovieClip [jack in box guard] Frame 5
cover = true;
Symbol 1480 MovieClip [jack in box guard] Frame 6
alive = false;
_root.f_sound("splat1", 1);
stop();
Symbol 1484 Button
on (release) {
_parent.elevator.gotoAndPlay("down");
gotoAndStop (1);
}
Symbol 1487 Button
on (release) {
gotoAndStop (1);
}
Symbol 1488 MovieClip [guard speech] Frame 1
#initclip 94
Object.registerClass("guard speech", chat);
#endinitclip
Symbol 1494 MovieClip Frame 1
stop();
Symbol 1494 MovieClip Frame 15
stop();
Symbol 1496 MovieClip Frame 1
stop();
Symbol 1496 MovieClip Frame 15
stop();
Symbol 1500 MovieClip Frame 1
stop();
Symbol 1500 MovieClip Frame 15
stop();
Symbol 1501 Button
on (release) {
_root.f_advance(1);
}
on (rollOver, dragOver) {
a2.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a2.gotoAndPlay(16);
}
Symbol 1502 Button
on (release) {
_root.f_advance(3);
}
on (rollOver, dragOver) {
a1.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a1.gotoAndPlay(16);
}
Symbol 1503 Button
on (release) {
_root.f_advance(-1, -1);
}
on (rollOver, dragOver) {
a3.gotoAndPlay(2);
}
on (rollOut, dragOut) {
a3.gotoAndPlay(16);
}
Symbol 1518 Button
on (release) {
_root.f_new_mainquest(12);
_root.f_advance(-1, -1);
}
Symbol 1520 Button
on (release) {
_root.f_get_item(28);
_parent.ender.play();
gotoAndStop (1);
}
Symbol 1521 MovieClip [personality speech] Frame 1
#initclip 95
Object.registerClass("personality speech", chat);
#endinitclip
Symbol 1523 MovieClip Frame 1
stop();
Symbol 1523 MovieClip Frame 100
_root.f_advance(6, 1);
Symbol 1527 MovieClip Frame 1
stop();
Symbol 1527 MovieClip Frame 17
stop();
Symbol 1535 MovieClip Frame 1
if (_parent.ducking == true) {
gotoAndStop(_totalframes);
}
Symbol 1535 MovieClip Frame 21
_parent.ducking = true;
_parent.enemy = true;
stop();
Symbol 1539 MovieClip Frame 99
stop();
Symbol 1547 MovieClip Frame 41
_root.f_complete_quest(12, 1);
Symbol 1547 MovieClip Frame 100
_root.f_advance(-1);
Symbol 1548 MovieClip [poppet] Frame 1
#initclip 96
Object.registerClass("poppet", item);
#endinitclip
function unique() {
if (_root.game.objects.guard.alive == false) {
cover = false;
}
}
interact_x = 100;
interact_y = -100;
cover = true;
Symbol 1548 MovieClip [poppet] Frame 2
if (enemy == true) {
enemy = false;
stop();
_root.game.make_attack();
} else {
_root.game.commander_chat1.gotoAndStop(2);
prevFrame();
}
Symbol 1548 MovieClip [poppet] Frame 4
if (_root.game.objects.guard.alive != false) {
prevFrame();
}
Symbol 1548 MovieClip [poppet] Frame 5
if ((_root.game.objects.guard.alive == false) && (enemy == false)) {
enemy = true;
_root.game.commander_chat1.gotoAndStop("beg");
prevFrame();
} else if (_root.slingshot == true) {
prevFrame();
} else {
stopAllSounds();
_root.f_sound("recordscratch", 1);
_root.f_sound("squeek", 1);
_root.f_sound("splat1", 1);
alive = false;
_root.game.commander_dead = true;
stop();
}
Symbol 1556 MovieClip Frame 13
_root.game.favordude_chat1.gotoAndStop(2);
stop();
Symbol 1558 MovieClip Frame 14
_root.f_sound("lasershot", 1);
Symbol 1558 MovieClip Frame 26
_root.f_sound("lasershot", 1);
Symbol 1559 MovieClip Frame 1
stop();
Symbol 1559 MovieClip Frame 2
stop();
Symbol 1561 MovieClip [tent_roof1] Frame 1
#initclip 97
Object.registerClass("tent_roof1", item);
#endinitclip
zsort = true;
Symbol 1566 MovieClip Frame 1
stop();
Symbol 1571 Button
on (release) {
gotoAndStop (1);
}
Symbol 1576 Button
on (release) {
_root.gun_unsafe = false;
_root.game.commander.enemy = true;
_root.game.objects.guard.enemy = true;
_root.game.teddyguard1.play();
_root.game.teddyguard2.play();
gotoAndStop (1);
}
Symbol 1579 MovieClip [poppetspeech] Frame 1
#initclip 98
Object.registerClass("poppetspeech", chat);
#endinitclip
Symbol 1582 Button
on (release) {
_root.game.collector.nextFrame();
gotoAndStop (1);
}
Symbol 1583 MovieClip [favor dude speech copy] Frame 1
#initclip 99
Object.registerClass("favor dude speech copy", chat);
#endinitclip
Symbol 1586 Button
on (release) {
gotoAndStop (1);
}
Symbol 1587 MovieClip [scaveng speech copy] Frame 1
#initclip 100
Object.registerClass("scaveng speech copy", chat);
#endinitclip
Symbol 1592 MovieClip Frame 10
stop();
Symbol 1595 MovieClip Frame 10
stop();
Symbol 1598 MovieClip Frame 10
stop();
Symbol 1599 MovieClip Frame 1
function onEnterFrame() {
if ((p_x - _root.player._x) > 120) {
p_x = _root.player._x;
nextFrame();
}
}
p_x = _root.player._x;
stop();
Symbol 1616 MovieClip [guard_dog] Frame 1
#initclip 101
Object.registerClass("guard_dog", item);
#endinitclip
Symbol 1616 MovieClip [guard_dog] Frame 2
_root.game.chat_alien1.gotoAndStop(2);
prevFrame();
Symbol 1629 MovieClip Frame 1
function onEnterFrame() {
if (_root.game.gardener_chat1._currentframe > 1) {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
stop();
Symbol 1630 MovieClip [GARDENER] Frame 1
#initclip 102
Object.registerClass("GARDENER", item);
#endinitclip
zsort = true;
interact_y = -100;
Symbol 1630 MovieClip [GARDENER] Frame 2
if (_root.objectives_got[5] > 0) {
_root.game.gardener_chat1.gotoAndStop(6);
} else if (_root.used_item == 16) {
_root.game.gardener_chat1.gotoAndStop(6);
} else if (_root.objectives[4] > 0) {
_root.game.gardener_chat1.gotoAndStop(5);
} else if (_root.used_item == 13) {
_root.game.gardener_chat1.gotoAndStop(3);
} else {
_root.game.gardener_chat1.gotoAndStop(2);
}
prevFrame();
Symbol 1631 MovieClip [item_plant2] Frame 1
#initclip 103
Object.registerClass("item_plant2", item);
#endinitclip
id = 17;
interact_y = -100;
Symbol 1631 MovieClip [item_plant2] Frame 2
if (collectable != true) {
_root.game.chat_alien1.gotoAndStop(5);
prevFrame();
} else {
stop();
}
Instance of Symbol 261 MovieClip [generic_boundary] "blocker" in Symbol 1632 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
pathing = false;
absolute = true;
}
Instance of Symbol 261 MovieClip [generic_boundary] in Symbol 1632 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
pathing = false;
absolute = true;
}
Instance of Symbol 261 MovieClip [generic_boundary] in Symbol 1632 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
pathing = false;
absolute = true;
}
Symbol 1635 Button
on (release) {
gotoAndStop (1);
}
Symbol 1640 Button
on (release) {
_root.f_new_mainquest(5);
gotoAndStop (1);
}
Symbol 1645 Button
on (release) {
_parent.objects.blocker._visible = false;
_parent.objects.plant.collectable = true;
if (_root.game.get_14 != true) {
_root.f_get_item(14);
}
_root.f_complete_quest(6, 1);
_root.f_complete_quest(5, 1);
gotoAndStop (1);
}
Symbol 1646 MovieClip [chat5] Frame 1
#initclip 104
Object.registerClass("chat5", chat);
#endinitclip
Symbol 1649 Button
on (release) {
gotoAndStop (1);
}
Symbol 1656 MovieClip [alien garden speech] Frame 1
#initclip 105
Object.registerClass("alien garden speech", chat);
#endinitclip
Symbol 1659 MovieClip [item_door1] Frame 1
#initclip 106
Object.registerClass("item_door1", item);
#endinitclip
this.cacheAsBitmap = true;
stop();
Symbol 1659 MovieClip [item_door1] Frame 2
if (_root.objectives[0] > 0) {
_root.cinema = true;
_root.f_sound("doorslide", 1);
} else {
_parent.alien_chat1.gotoAndStop(3);
prevFrame();
}
Symbol 1659 MovieClip [item_door1] Frame 16
_root.f_advance(-27);
gotoAndStop (1);
Symbol 1671 MovieClip Frame 1
dof = true;
interact_y = 260;
stop();
Symbol 1671 MovieClip Frame 2
if ((_root.inventory_gun._currentframe > 1) && (_root.gun_active != true)) {
_root.game.alien.dir = "left";
_root.game.alien.gotoAndStop("charge");
_root.gun_active = true;
_root.f_sound("guncharge", 1);
}
prevFrame();
Symbol 1673 MovieClip [package1] Frame 1
#initclip 107
Object.registerClass("package1", item);
#endinitclip
zsort = true;
interact_y = -100;
Symbol 1673 MovieClip [package1] Frame 2
_root.game.alien_chat1.gotoAndStop(2);
Symbol 1673 MovieClip [package1] Frame 6
prevFrame();
Symbol 1685 Button
on (release) {
_root.f_new_mainquest(1);
_root.f_get_item(9);
gotoAndStop (1);
}
Symbol 1688 Button
on (release) {
gotoAndStop (1);
}
Symbol 1689 MovieClip [aparment speech] Frame 1
#initclip 108
Object.registerClass("aparment speech", chat);
#endinitclip
Symbol 1703 Button
on (press) {
nextFrame();
}
Symbol 1704 MovieClip Frame 388
stop();
Symbol 1704 MovieClip Frame 389
stopAllSounds();
_root.final_popup.play();
Symbol 1705 MovieClip Frame 1
function f_alien_error(id) {
if (id == 1) {
chat_alien1.gotoAndStop("dontshoot");
}
}
outside = true;
_root.inventory_gun._visible = false;
_root.inventory_gun.gotoAndStop(2);
stop();
if (music_change == true) {
stopAllSounds();
_root.f_sound("wasteland", 999, "music");
}
music_change = false;
outside = true;
Symbol 1705 MovieClip Frame 2
function check_cover() {
}
_root.limit_right = 1000;
_root.limit_left = -200;
_root.limit_up = 45;
_root.limit_down = 300;
_root.max_size = 120;
_root.min_size = 40;
_root.exit_right = true;
_root.area_right = -1;
_root.gun_unsafe = true;
_root.f_place_alien(400, 120, "left");
_root.player.walkto(new Array(250, 120));
Symbol 1705 MovieClip Frame 3
music_change = true;
_root.limit_right = 5000;
_root.limit_left = -5000;
_root.limit_up = 100;
_root.limit_down = 250;
_root.max_size = 120;
_root.min_size = 70;
_root.exit_right = true;
_root.exit_left = true;
_root.area_left = -2;
if (_root.entrance == 11) {
_root.f_place_alien(-420, 120, "right");
_root.player.walkto(new Array(-270, 120));
stopAllSounds();
_root.f_sound("forest", 9999, "music");
} else if (_root.entrance == -2) {
_root.f_place_alien(0, 120, "down");
} else {
_root.f_place_alien(270, 120, "left");
}
Instance of Symbol 262 MovieClip [target_box] in Symbol 1705 MovieClip Frame 3
//component parameters
onClipEvent (construct) {
ent = 0;
area = 6;
interact_x = -100;
interact_y = 0;
}
Symbol 1705 MovieClip Frame 4
outside = true;
_root.limit_right = 500;
_root.limit_left = -500;
_root.limit_down = 160;
_root.limit_up = 70;
_root.max_size = 90;
_root.min_size = 70;
_root.exit_right = true;
_root.exit_left = true;
_root.area_right_ent = 1;
if (_root.entrance == -1) {
_root.f_place_alien(270, 120, "left");
} else {
_root.f_place_alien(-270, 120, "right");
}
Symbol 1705 MovieClip Frame 5
_root.limit_right = 700;
_root.limit_left = -700;
_root.limit_down = 180;
_root.limit_up = 55;
_root.min_size = 60;
_root.max_size = 100;
_root.exit_right = true;
_root.exit_left = true;
_root.area_right = 1;
_root.area_left = -1;
if (_root.entrance == 1) {
if ((pighunter_stage == 0) && (pighunter_dead != true)) {
_root.cinema = true;
}
_root.f_place_alien(-400, _root.limit_up, "right");
_root.player.walkto(new Array(-190, _root.limit_up + 20));
} else {
_root.f_place_alien(260, 160, "left");
}
Instance of Symbol 261 MovieClip [generic_boundary] in Symbol 1705 MovieClip Frame 5
//component parameters
onClipEvent (construct) {
pathing = false;
absolute = true;
}
Instance of Symbol 261 MovieClip [generic_boundary] in Symbol 1705 MovieClip Frame 5
//component parameters
onClipEvent (construct) {
pathing = false;
absolute = true;
}
Symbol 1705 MovieClip Frame 6
_root.limit_right = 500;
_root.limit_left = -500;
_root.limit_up = 58;
_root.limit_down = 300;
_root.max_size = 90;
_root.min_size = 65;
_root.max_size = 130;
_root.exit_right = true;
_root.exit_left = true;
if (_root.entrance == 1) {
if (pighunter_dead != true) {
if (_root.slingshot == true) {
_root.f_change_item(24, 2);
}
_root.slingshot = false;
_root.player.cover = true;
_root.player.gotoAndStop("cover");
_root.f_place_alien(-245, 25, "right");
} else {
_root.f_place_alien(-275, 75, "right");
}
} else {
_root.f_place_alien(270, 75, "left");
}
Symbol 1705 MovieClip Frame 7
_root.limit_right = 600;
_root.limit_left = -600;
_root.limit_down = 300;
_root.limit_up = 143;
_root.limit_left_z = false;
_root.max_size = 140;
_root.min_size = 55;
if (_root.entrance == 1) {
_root.f_place_alien(-270, 160, "right");
} else {
_root.f_place_alien(270, 160, "left");
}
_root.exit_right = true;
_root.exit_left = true;
_root.area_right_ent = 1;
_root.area_left_ent = -1;
Symbol 1705 MovieClip Frame 8
_root.limit_right = -50;
_root.limit_left = -500;
_root.limit_down = 300;
_root.limit_up = 100;
_root.limit_left_z = false;
_root.max_size = 120;
_root.min_size = 70;
_root.exit_left = true;
_root.area_left_ent = -1;
_root.f_place_alien(-270, _root.limit_up + 30, "right");
if (teddyhelp == true) {
objects.teddybear1._visible = false;
}
Symbol 1705 MovieClip Frame 9
_root.limit_right = 0;
_root.limit_left = -1000;
_root.limit_down = 200;
_root.limit_up = 105;
_root.max_size = 90;
_root.min_size = 50;
_root.exit_left = true;
_root.area_left = -6;
_root.area_left_ent = -2;
if (_root.entrance == -1) {
_root.f_place_alien(0, 130, "left");
stopAllSounds();
_root.f_sound("forest", 9999, "music");
if (_root.slingshot == true) {
_root.slingshot = false;
_root.f_change_item(24, 2);
}
_root.inventory_gun.gotoAndStop(2);
if (enter_town == true) {
_root.f_advance(-6, -2);
}
} else {
_root.f_place_alien(-400, 150, "right");
_root.player.walkto(new Array(-212, 134));
if (enter_town == true) {
_root.gun_have = false;
_root.inventory_gun.gotoAndStop(1);
if (_root.slingshot != true) {
_root.slingshot = true;
} else {
_root.f_change_item(24, 2);
}
_root.f_advance(1, 1);
}
}
Symbol 1705 MovieClip Frame 10
outside = true;
_root.inventory_gun._visible = false;
enter_town = true;
if (music_change == true) {
stopAllSounds();
_root.f_sound("town", 9999, "music");
}
music_change = false;
Symbol 1705 MovieClip Frame 11
trading = false;
_root.limit_right = 380;
_root.limit_left = -380;
_root.limit_down = 400;
_root.limit_up = 80;
_root.limit_right_z = false;
_root.limit_left_z = false;
_root.max_size = 160;
_root.min_size = 80;
_root.exit_down = true;
_root.area_down = -1;
_root.f_place_alien(0, 500, "up");
_root.player.walkto(new Array(0, 200));
Symbol 1705 MovieClip Frame 12
_root.limit_right = 500;
_root.limit_left = -500;
_root.limit_down = 500;
_root.limit_up = 70;
_root.max_size = 120;
_root.min_size = 70;
_root.exit_down = true;
_root.area_down = -2;
_root.f_place_alien(-200, 500, "right");
_root.player.walkto(new Array(-10, 200));
Symbol 1705 MovieClip Frame 13
_root.used_item = -1;
_root.limit_right = 550;
_root.limit_left = -200;
_root.limit_down = 280;
_root.limit_up = 100;
_root.max_size = 110;
_root.min_size = 80;
_root.exit_right = true;
_root.exit_down = true;
_root.area_right = -3;
_root.area_right_ent = 4;
_root.area_down = -3;
_root.f_place_alien(400, 500, "left");
_root.player.walkto(new Array(200, 0));
Symbol 1705 MovieClip Frame 14
_root.limit_right = -160;
_root.limit_left = -400;
_root.limit_down = 260;
_root.limit_up = 0;
_root.max_size = 150;
_root.min_size = 60;
_root.exit_left = true;
_root.area_left = -4;
_root.f_place_alien(-500, 500, "right");
_root.player.walkto(new Array(200, 120));
Symbol 1705 MovieClip Frame 15
_root.limit_right = 50;
_root.limit_left = -500;
_root.limit_down = 260;
_root.limit_up = 115;
_root.max_size = 120;
_root.min_size = 65;
_root.exit_left = true;
_root.exit_down = true;
_root.area_left = -5;
_root.area_down = -5;
_root.f_place_alien(-500, 300, "right");
_root.player.walkto(new Array(-200, 120));
Symbol 1705 MovieClip Frame 16
_root.limit_right = 500;
_root.limit_left = -300;
_root.limit_down = 300;
_root.limit_up = -14;
_root.max_size = 135;
_root.min_size = 60;
_root.exit_right = true;
_root.area_right = -6;
_root.f_place_alien(500, 250, "left");
_root.player.walkto(new Array(200, 180));
Symbol 1705 MovieClip Frame 17
_root.limit_right = 155;
_root.limit_left = -700;
_root.limit_down = 400;
_root.limit_up = 130;
_root.max_size = 120;
_root.min_size = 70;
_root.exit_left = true;
_root.area_left = -16;
_root.f_place_alien(-400, 300, "right");
_root.player.walkto(new Array(-200, 150));
Symbol 1705 MovieClip Frame 19
_root.limit_right = 105;
_root.limit_left = -130;
_root.limit_down = 95;
_root.limit_up = 40;
_root.max_size = 80;
_root.min_size = 50;
if (_root.entrance == 1) {
_root.f_place_alien(_root.limit_left, _root.limit_up, "right");
} else {
_root.f_place_alien(_root.limit_right, _root.limit_down, "left");
}
if (teddyhelp != true) {
objects.teddybear1._visible = false;
}
Symbol 1705 MovieClip Frame 20
_root.limit_right = 300;
_root.limit_left = -200;
_root.limit_down = 70;
_root.limit_up = -30;
_root.max_size = 80;
_root.min_size = 50;
_root.exit_down = true;
_root.area_down = -2;
_root.area_down_ent = 9;
if (_root.entrance == 1) {
_root.player._visible = false;
_root.f_place_alien(99, 48, "down");
} else {
_root.f_place_alien(0, _root.limit_up, "down");
}
Instance of Symbol 262 MovieClip [target_box] in Symbol 1705 MovieClip Frame 20
//component parameters
onClipEvent (construct) {
ent = 1;
area = 1;
interact_x = 0;
interact_y = -100;
}
Symbol 1705 MovieClip Frame 21
_root.limit_right = 1200;
_root.limit_left = -200;
_root.limit_down = 70;
_root.limit_up = -33;
_root.max_size = 70;
_root.min_size = 20;
_root.f_place_alien(_root.limit_left, _root.limit_up, "up");
Instance of Symbol 364 MovieClip in Symbol 1705 MovieClip Frame 21
onClipEvent (load) {
if (_root.disguise == false) {
_visible = false;
}
}
onClipEvent (enterFrame) {
if (_root.disguise == false) {
_visible = false;
}
}
Symbol 1705 MovieClip Frame 22
outside = true;
_root.limit_right = -10;
_root.limit_left = -120;
_root.limit_down = 400;
_root.limit_up = 23;
_root.max_size = 100;
_root.min_size = 40;
_root.exit_down = true;
_root.area_down = -1;
if (_root.entrance != -1) {
_root.f_place_alien(-120, 550, "up");
_root.player.walkto(new Array(-60, 185));
} else {
_root.f_place_alien(_root.limit_right, _root.limit_up, "down");
}
Instance of Symbol 262 MovieClip [target_box] in Symbol 1705 MovieClip Frame 22
//component parameters
onClipEvent (construct) {
ent = 0;
area = 1;
interact_x = 0;
interact_y = -100;
}
Symbol 1705 MovieClip Frame 23
outside = false;
if (commander_dead == true) {
personality_chat1.gotoAndStop(5);
} else if (_root.objectives[11] > 0) {
personality_chat1.gotoAndStop(4);
} else {
personality_chat1.gotoAndStop(2);
}
Symbol 1705 MovieClip Frame 24
function make_attack() {
if (_root.slingshot == true) {
_root.f_change_item(24, 2);
}
_root.slingshot = false;
_root.cinema = true;
_root.disguise = false;
_root.s_wasteland.stop();
_root.f_sound("boss", 999, "music");
commander.gotoAndStop("duck");
objects.guard.gotoAndStop("duck");
if (_root.player.cover != true) {
_root.player.gotoAndStop(1);
_root.player.running = true;
_root.player.walkto(new Array(240, 165));
}
}
function check_cover() {
if (((commander._currentframe >= 3) && (_root.cinema == true)) && (_currentframe == 24)) {
_root.cinema = false;
_root.player.dir = "left";
_root.player.gotoAndStop("cover");
}
}
_root.limit_right = 800;
_root.limit_right_z = false;
_root.limit_left = -250;
_root.limit_left_z = false;
_root.limit_down = 300;
_root.limit_up = 55;
_root.max_size = 100;
_root.min_size = 50;
_root.exit_right = true;
_root.exit_down = true;
_root.area_right = -3;
_root.area_down = -3;
_root.gun_unsafe = true;
_root.f_place_alien(450, 300, "left");
_root.player.walkto(new Array(100, 150));
_root.inventory_gun.gotoAndStop(2);
_root.player.gun = false;
_root.player.unholstered = false;
Instance of Symbol 261 MovieClip [generic_boundary] in Symbol 1705 MovieClip Frame 24
//component parameters
onClipEvent (construct) {
pathing = false;
absolute = false;
}
Instance of Symbol 261 MovieClip [generic_boundary] in Symbol 1705 MovieClip Frame 24
//component parameters
onClipEvent (construct) {
pathing = false;
absolute = true;
}
Symbol 1705 MovieClip Frame 25
music_change = true;
_root.limit_right = 600;
_root.limit_left = -15;
_root.limit_down = 300;
_root.limit_up = 155;
_root.max_size = 90;
_root.min_size = 60;
_root.exit_right = true;
_root.area_right = -24;
_root.f_place_alien(400, 185, "left");
_root.player.walkto(new Array(240, 185));
_root.s_wasteland.stop();
_root.f_sound("cats1", 999, "music");
Symbol 1705 MovieClip Frame 26
_root.limit_right = 600;
_root.limit_left = -120;
_root.limit_down = 250;
_root.limit_up = 140;
_root.max_size = 120;
_root.min_size = 80;
_root.exit_right = true;
_root.area_right = -25;
_root.f_place_alien(400, _root.limit_up + 100, "left");
_root.player.walkto(new Array(250, _root.limit_up + 100));
Symbol 1705 MovieClip Frame 27
_root.gun_unsafe = true;
_root.limit_right = 350;
_root.limit_left = -350;
_root.limit_down = 500;
_root.limit_up = 25;
_root.min_size = 55;
_root.max_size = 120;
_root.f_place_alien(0, 500, "up");
_root.player.walkto(new Array(0, 200));
_root.exit_down = true;
_root.area_down = -26;
if (_root.objectives_got[4] > 0) {
objects.blocker._visible = false;
objects.plant.collectable = true;
}
Symbol 1705 MovieClip Frame 28
_root.inventory_gun._visible = true;
music_change = true;
outside = false;
_root.limit_right = 350;
_root.limit_left = -70;
_root.limit_down = 400;
_root.limit_up = 60;
_root.max_size = 200;
_root.min_size = 80;
_root.f_place_alien(218.3, 138.4, "left");
stopAllSounds();
_root.f_sound("newobjective", 1);
_root.f_sound("soundscape1", 999999, "music");
Instance of Symbol 1659 MovieClip [item_door1] in Symbol 1705 MovieClip Frame 28
//component parameters
onClipEvent (construct) {
area = 1;
ent = 1;
}
Symbol 1705 MovieClip Frame 29
_root.inventory._visible = false;
_root.inventory_gun._visible = false;
Symbol 1708 Button
on (press) {
if ((_root.cinema != true) && (_root.player.cover != true)) {
if (_root.gun_unsafe == true) {
_root.game.f_alien_error(1);
} else if (_root.player.gun == true) {
_root.player.gun = false;
prevFrame();
} else {
_root.player.gun = true;
nextFrame();
}
}
}
Symbol 1710 MovieClip Frame 1
_root.game.alien.got_gun = false;
stop();
trace(1);
Symbol 1712 Button
on (press) {
play();
}
Symbol 1717 Button
on (press) {
_root.sound_vol = 0;
nextFrame();
}
Symbol 1719 Button
on (press) {
_root.sound_vol = 100;
prevFrame();
}
Symbol 1720 MovieClip Frame 1
if (ini != true) {
ini = true;
if (_root.sound_vol == 0) {
nextFrame();
} else {
stop();
}
}
Symbol 1722 Button
on (press) {
getURL ("http://www.newgrounds.com/lit/anothersmallfavor", "_blank");
}
Symbol 1725 Button
on (press) {
_root.music_vol = 0;
nextFrame();
}
Symbol 1727 Button
on (press) {
_root.music_vol = 100;
prevFrame();
}
Symbol 1728 MovieClip Frame 1
if (ini != true) {
ini = true;
if (_root.music_vol == 0) {
nextFrame();
} else {
stop();
}
}
Symbol 1731 Button
on (press) {
gotoAndStop (1);
}
Symbol 1739 MovieClip Frame 1
function onEnterFrame() {
if (_root.objectives_got[_parent.id] > 0) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
stop();
Symbol 1740 Button
on (press) {
clr.setTransform(_root.c_nada);
_parent.od.gotoAndStop(_currentframe);
}
Symbol 1763 MovieClip Frame 1
if (ini != true) {
ini = true;
clr = new Color(this);
id = _parent.onum;
_parent.onum++;
}
Symbol 1791 MovieClip Frame 1
stop();
Symbol 1799 Button
on (rollOver) {
_parent.fd.gotoAndStop(_currentframe);
}
on (rollOut, dragOut) {
_parent.fd.gotoAndStop(1);
}
on (release) {
id = _currentframe - 1;
if ((_root.cinema != true) && (_root.favors_used[id - 1] == 0)) {
_root.f_use_favor(id);
_parent.gotoAndStop(1);
}
}
Symbol 1809 MovieClip Frame 1
if (ini != true) {
ini = true;
clr = new Color(this);
_parent.fnum++;
stop();
}
Symbol 1811 Button
on (press) {
if (_root.item_slots.length > (5 + _root.item_slots_pos)) {
_root.item_slots_pos++;
}
}
Symbol 1812 Button
on (press) {
if (_root.item_slots_pos > 0) {
_root.item_slots_pos--;
}
}
Symbol 1819 MovieClip Frame 1
stop();
Symbol 1821 Button
on (rollOver) {
txt = _parent["txt" + (substring(_name, 5, 1))];
txt.id = _currentframe;
txt.play();
if (_root.cursor._currentframe > 1) {
}
}
on (rollOut, dragOut) {
txt.gotoAndStop(1);
_root.cursor.comb.gotoAndStop(1);
}
on (press) {
ccf = _root.cursor._currentframe - 1;
cf = _currentframe - 1;
if (cf == 27) {
if (_root.disguise == true) {
if ((_root.game._currentframe > 24) || (_root.game._currentframe < 20)) {
_root.disguise = false;
} else {
_root.f_sound("buzzer", 1);
}
} else {
_root.disguise = true;
}
} else if (cf == 24) {
if (_root.player.cover != true) {
_root.inventory_gun.gotoAndStop(2);
_root.slingshot = false;
_root.f_change_item(24, 2);
}
} else if (cf == 22) {
if (((_root.game._currentframe >= 4) && (_root.game._currentframe <= 6)) && (_root.game.pighunter_dead != true)) {
_root.shield = true;
_root.f_sound("shieldhit", 1);
} else if (_root.game.pighunter_dead == true) {
_root.chat_alien.gotoAndStop("shield2");
_root.cursor.gotoAndStop(_currentframe);
} else {
_root.chat_alien.gotoAndStop("shield");
}
} else if (cf == 2) {
if (_root.player.cover != true) {
_root.slingshot = true;
_root.inventory_gun._visible = true;
if (_root.inventory_gun._currentframe == 1) {
_root.inventory_gun.gotoAndStop(2);
}
if (_root.gun_have == true) {
_root.f_change_item(2, 24);
}
} else {
_root.f_sound("buzzer", 1);
_root.slingshot = false;
}
} else {
_root.cursor.gotoAndStop(_currentframe);
}
_parent.gotoAndStop(1);
}
Symbol 1848 MovieClip Frame 1
stop();
Symbol 1849 MovieClip Frame 1
function onEnterFrame() {
}
onum = 0;
fnum = 0;
stop();
Symbol 1849 MovieClip Frame 12
function onEnterFrame() {
if (count > -1) {
count++;
}
if (count > 20) {
count = -1;
i = 0;
while (i < 4) {
if (_root.show_favor[i] != _root.favors[i]) {
_root.medal_popup.unlockMedal(medals[i]);
_root.f_sound("completefavor", 1);
}
_root.show_favor[i] = _root.favors[i];
i++;
}
}
}
var medals = new Array("Flower Power", "Spider Slayer", "Hunt the Hunter", "A Small Stitch");
var count = 0;
stop();
Symbol 1856 MovieClip Frame 1
stop();
Symbol 1859 MovieClip Frame 1
stop();
Symbol 1862 MovieClip Frame 1
function onEnterFrame() {
bmp.fillRect(new flash.geom.Rectangle(0, 0, 100, 100), new Color(1, 1, 1, 1, 1, 1, 1, 1));
}
bmp = new flash.display.BitmapData(screen._width, screen._height, true);
screen.attachBitmap(bmp, 1);
Symbol 1862 MovieClip Frame 2
_root.f_sound("scanner", 1);
Symbol 1862 MovieClip Frame 61
gotoAndPlay (2);
Symbol 1866 MovieClip Frame 1
stop();
Symbol 1869 MovieClip Frame 1
function onEnterFrame() {
if (_parent._currentframe == 1) {
_parent._visible = false;
} else {
_parent._visible = true;
}
if (_parent.id == -1) {
gotoAndStop(_totalframes);
} else {
gotoAndStop(_parent.id);
}
}
Symbol 1871 MovieClip Frame 1
stop();
Symbol 1871 MovieClip Frame 2
if (id == -1) {
_root.f_sound("completefavor", 1);
} else {
_root.f_sound("newfavor", 1);
}
Symbol 1903 MovieClip Frame 1
function onEnterFrame() {
gotoAndStop(_parent.id);
}
Symbol 1903 MovieClip Frame 23
txt2 = ("(X" + _root.ammo) + ")";
Symbol 1904 MovieClip Frame 1
this.cacheAsBitmap = true;
stop();
Symbol 1904 MovieClip Frame 2
_root.f_sound("item", 1);
Symbol 1904 MovieClip Frame 67
if ((id != 23) || (_root.ammo == 1)) {
_root.f_add_item(id);
}
Symbol 1932 MovieClip Frame 1
function onEnterFrame() {
if (_parent._currentframe == 1) {
_parent._visible = false;
} else {
_parent._visible = true;
}
if (_parent.id == -1) {
gotoAndStop(_totalframes);
} else {
gotoAndStop(_parent.id);
}
}
Symbol 1934 MovieClip Frame 1
stop();
Symbol 1934 MovieClip Frame 2
if (id == -1) {
_root.f_sound("completeobjective", 1);
} else {
_root.f_sound("newobjective", 1);
}
Symbol 1934 MovieClip Frame 88
gotoAndStop (1);
Symbol 1937 Button
on (release) {
gotoAndStop (1);
}
Symbol 1955 Button
on (release) {
gotoAndStop (1);
}
Symbol 1970 MovieClip [global_speech] Frame 1
#initclip 109
Object.registerClass("global_speech", chat);
#endinitclip
Symbol 1984 MovieClip Frame 36
stop();
Symbol 1987 MovieClip Frame 21
stop();
Symbol 2017 MovieClip Frame 1
stop();
Symbol 2017 MovieClip Frame 325
_root.medal_popup.unlockMedal("Another Small Favor");
stop();
Symbol 2017 MovieClip Frame 326
_root.gotoAndStop("end");
Symbol 2026 MovieClip Frame 21
_parent.nextFrame();
stop();
Symbol 2046 MovieClip Frame 56
_root.nextFrame();
Symbol 2047 MovieClip Frame 1
function onPress() {
nextFrame();
}
stop();
Symbol 2068 Button
on (press) {
getURL ("http://www.diverge.ws/", "_blank");
}
Symbol 2069 Button
on (press) {
_root.gotoAndStop("game");
}
Symbol 2070 Button
on (press) {
getURL ("http://www.newgrounds.com/collection/reemus", "_blank");
}
Symbol 2071 Button
on (press) {
getURL ("http://www.zeebarf.com/zeelist.html", "_blank");
}