Frame 1
stop();
var CPMStarContentSpotID = "0";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=1037QE0F3765B");
Instance of Symbol 219 MovieClip "ProgressBar" in Frame 1
onClipEvent (load) {
this.ProgressBg1._xscale = 0;
totalFileSize = _root.getBytesTotal();
_root.StartMenu._visible = false;
_root.StartMenu._alpha = 0;
}
onClipEvent (enterFrame) {
bytesLoaded = _root.getBytesLoaded();
amountLoaded = bytesLoaded / totalFileSize;
percentLoaded = int(100 * amountLoaded);
this.ProgressBg1._xscale = percentLoaded;
_root.ProgressText = this.ProgressBg1._xscale + "%";
if (this.ProgressBg1._xscale >= 100) {
_root.ProgressText = "PLAY";
this._xscale = 100;
_root.StartMenu._visible = true;
if (_root.StartMenu._alpha < 100) {
_root.StartMenu._alpha = _root.StartMenu._alpha + 5;
}
}
}
on (press) {
if (this._xscale == 100) {
_root.removeMovieClip("adBox");
_root.play();
}
}
Frame 2
stop();
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("731eb1b9", this, 10301, true);
Frame 3
function onConnectError(status) {
StartMenu.ScoresButton._alpha = 25;
StartMenu.ScoresButton.enabled = false;
b_online = false;
}
function SetLanguage(lang) {
game_lang = lang;
GameName.English._visible = false;
GameName.Russian._visible = false;
Statistic1.honey_menu.russian._visible = false;
Statistic1.honey_menu.english._visible = false;
Statistic2.puhi_menu.russian._visible = false;
Statistic2.puhi_menu.english._visible = false;
Pause.PauseText.russian._visible = false;
Pause.PauseText.english._visible = false;
if (lang == 0) {
string1 = "\u041F\u0440\u043E\u0434\u043E\u043B\u0436\u0438\u0442\u044C";
string2 = "\u0421 \u043D\u0430\u0447\u0430\u043B\u0430";
string3 = "\u0420\u0435\u043A\u043E\u0440\u0434\u044B";
string4 = "\u0418\u0413\u0420\u0410\u0422\u042C";
string5 = "\u0412\u044B\u0441\u043E\u043A\u043E \u0432 \u0443\u043B\u044C\u0435 \u0436\u0438\u043B\u0438 \u043F\u0447\u0451\u043B\u044B \u043F\u0440\u043E\u043B\u0435\u0442\u0430\u0440\u0438\u0438";
string6 = "\u041D\u043E \u043E\u0434\u043D\u0430\u0436\u0434\u044B \u0433\u0430\u0434\u043A\u0430\u044F \u043A\u0430\u043F\u0438\u0442\u0430\u043B\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043A\u0430\u044F \u0441\u0432\u0438\u043D\u044C\u044F \u0412\u0438\u043D\u043D\u0438 \u0440\u0435\u0448\u0438\u043B \u043D\u0430\u043B\u043E\u0436\u0438\u0442\u044C \u0441\u0432\u043E\u044E \u043B\u0430\u043F\u0443 \u043D\u0430 \u043D\u0430\u0440\u043E\u0434\u043D\u044B\u0439 \u043C\u0451\u0434";
string7 = "\u0413\u043B\u0443\u043F\u044B\u0435 \u043F\u0447\u0451\u043B\u044B, \u044F \u043F\u0440\u0438\u043D\u0435\u0441\u0443 \u0432\u0430\u043C \u0441\u0432\u043E\u0431\u043E\u0434\u0443 \u0441\u043B\u043E\u0432\u0430 \u0438 \u0434\u0435\u043C\u043E\u043A\u0440\u0430\u0442\u0438\u044E... \u0410 \u0442\u0430\u043A \u0436\u0435 \u0440\u0430\u0437\u0440\u0443\u0445\u0443, \u043F\u0440\u0438\u0432\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044E \u0438 \u0433\u0435\u043D\u043E\u0446\u0438\u0434!";
string8 = "\u0421\u043A\u043B\u043E\u043D\u0438\u0442\u0435\u0441\u044C \u043F\u0435\u0440\u0435\u0434 \u043B\u0443\u0447\u0435\u0437\u0430\u0440\u043D\u044B\u043C \u0434\u0436\u044B\u0434\u0430\u0435\u043C \u043A\u0430\u043F\u0438\u0442\u0430\u043B\u0438\u0437\u043C\u0430!";
string9 = "\u041A\u0422\u041E \u0421\u041F\u0410\u0421\u0415\u0422 \u041F\u0427\u0415\u041B?";
string10 = "\u041A\u0422\u041E \u041E\u0421\u0422\u0410\u041D\u041E\u0412\u0418\u0422 \u041A\u0410\u041F\u0418\u0422\u0410\u041B\u0418\u0421\u0422\u0418\u0427\u0415\u0421\u041A\u0423\u042E \u0421\u0412\u0418\u041D\u042C\u042E?!";
string11 = "\u0420\u0423\u0421\u0421\u041A\u0418\u0419 \u041C\u0415\u0414\u0412\u0415\u0414\u042C";
string12 = "\u0421\u041E\u0412\u0415\u0422\u0421\u041A\u0418\u0419 \u0421\u041E\u041B\u0414\u0410\u0422";
string13 = "\u041F\u042F\u0422\u0410\u0427\u041A\u041E\u0412";
string14 = "\u041F\u0420\u041E\u041F\u0423\u0421\u0422\u0418\u0422\u042C";
string15 = "\u0443\u0440\u043E\u0432\u0435\u043D\u044C";
string16 = "\u042F\u0420\u041E\u0421\u0422\u042C";
string17 = "";
string18 = "";
GameName.Russian._visible = true;
Statistic1.honey_menu.russian._visible = true;
Statistic2.puhi_menu.russian._visible = true;
Pause.PauseText.russian._visible = true;
} else if (lang == 1) {
string1 = "Continue";
string2 = "New Game";
string3 = "Records";
string4 = "PLAY";
string5 = "The proletarian bees were living in the hive";
string6 = "But one day, disgusting capitalistic swine Vinny decided to steal the public honey";
string7 = "Silly bees, I'll bring you human rights and democracy... and also destruction, privatization and genocide! he he...";
string8 = "Obey the power of democratis!";
string9 = "Who's gonna save the bees?";
string10 = "Who's gonna stop the capitalistic swine?";
string11 = "ONLY RUSSIAN BEAR";
string12 = "SOVIET SOLDIER";
string13 = "JOHN";
string14 = "SKIP";
string15 = "level";
string16 = "RAGE";
GameName.English._visible = true;
Statistic1.honey_menu.english._visible = true;
Statistic2.puhi_menu.english._visible = true;
Pause.PauseText.english._visible = true;
}
}
function RestartAll() {
m_level_num = 0;
m_honey = 0;
m_bzz_health = 1000;
b_spell1 = false;
b_spell2 = false;
b_spell3 = false;
m_upgrades.m_bzz_attack_i = 0;
m_upgrades.m_bzz_speed_i = 0;
m_upgrades.m_bzz_num_i = 0;
m_upgrades.m_pig_attack_i = 0;
m_upgrades.m_pig_num_i = 0;
m_upgrades.m_pig_speed_i = 0;
m_upgrades.m_spell1_i = 0;
m_upgrades.m_spell2_i = 0;
m_upgrades.m_spell3_i = 0;
}
function InitParams() {
m_upgrades = new Object();
m_levels = new Array();
m_puh_weapon = new Array();
m_puh_weapon.push({dist:0, damage:0, speed:0});
m_puh_weapon.push({dist:400, damage:0.5, speed:3000});
m_puh_weapon.push({dist:400, damage:0.5, speed:3000});
m_puh_weapon.push({dist:380, damage:0.5, speed:2500});
m_puh_weapon.push({dist:350, damage:0.5, speed:2000});
RestartAll();
b_sound_on = true;
b_start = true;
b_start2 = true;
b_pause = false;
myLSO = SharedObject.getLocal("VinnyGameV5");
if (myLSO.data.myObj == undefined) {
myObj = new Object();
myLSO.data.myObj = myObj;
myLSO.data.myObj.m_all_honey = 0;
myLSO.data.myObj.m_all_score = 0;
SaveData();
} else {
LoadData();
}
b_spell1 = false;
b_spell2 = false;
b_spell3 = false;
m_start_puh_dt = 1800;
m_start_puh_last_t = 0;
m_start_puh_speed = 15;
m_start_puh_x = 20;
m_levels.push({m_puh_num:5, m_p1:5, m_p2:0, m_p3:0, m_p4:0, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:20, m_puh_cost:10});
m_levels.push({m_puh_num:12, m_p1:12, m_p2:0, m_p3:0, m_p4:0, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:30, m_puh_cost:12});
m_levels.push({m_puh_num:14, m_p1:14, m_p2:0, m_p3:0, m_p4:0, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:50, m_puh_cost:14});
m_levels.push({m_puh_num:16, m_p1:16, m_p2:0, m_p3:0, m_p4:0, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:80, m_puh_cost:16});
m_levels.push({m_puh_num:1, m_p1:0, m_p2:1, m_p3:0, m_p4:0, m_puh_speed1:1, m_puh_speed2:1, m_puh_life:2000, m_puh_cost:280});
m_levels.push({m_puh_num:18, m_p1:14, m_p2:4, m_p3:0, m_p4:0, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:90, m_puh_cost:18});
m_levels.push({m_puh_num:20, m_p1:12, m_p2:8, m_p3:0, m_p4:0, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:110, m_puh_cost:20});
m_levels.push({m_puh_num:22, m_p1:12, m_p2:10, m_p3:0, m_p4:0, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:130, m_puh_cost:24});
m_levels.push({m_puh_num:24, m_p1:10, m_p2:14, m_p3:0, m_p4:0, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:150, m_puh_cost:28});
m_levels.push({m_puh_num:1, m_p1:0, m_p2:0, m_p3:1, m_p4:0, m_puh_speed1:1, m_puh_speed2:1, m_puh_life:2800, m_puh_cost:860});
m_levels.push({m_puh_num:26, m_p1:10, m_p2:0, m_p3:7, m_p4:0, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:160, m_puh_cost:36});
m_levels.push({m_puh_num:28, m_p1:5, m_p2:5, m_p3:10, m_p4:0, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:180, m_puh_cost:42});
m_levels.push({m_puh_num:30, m_p1:10, m_p2:10, m_p3:10, m_p4:0, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:200, m_puh_cost:50});
m_levels.push({m_puh_num:32, m_p1:2, m_p2:10, m_p3:20, m_p4:0, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:220, m_puh_cost:62});
m_levels.push({m_puh_num:1, m_p1:0, m_p2:0, m_p3:0, m_p4:1, m_puh_speed1:1, m_puh_speed2:1, m_puh_life:1500, m_puh_cost:2600});
m_levels.push({m_puh_num:34, m_p1:17, m_p2:0, m_p3:0, m_p4:17, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:200, m_puh_cost:80});
m_levels.push({m_puh_num:36, m_p1:0, m_p2:18, m_p3:0, m_p4:18, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:240, m_puh_cost:100});
m_levels.push({m_puh_num:38, m_p1:0, m_p2:0, m_p3:19, m_p4:19, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:280, m_puh_cost:120});
m_levels.push({m_puh_num:40, m_p1:10, m_p2:10, m_p3:10, m_p4:10, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:320, m_puh_cost:150});
m_levels.push({m_puh_num:42, m_p1:10, m_p2:10, m_p3:10, m_p4:12, m_puh_speed1:1.5, m_puh_speed2:2, m_puh_life:360, m_puh_cost:180});
m_levels.push({m_puh_num:42, m_p1:42, m_p2:0, m_p3:0, m_p4:0, m_puh_speed1:2, m_puh_speed2:2.5, m_puh_life:450, m_puh_cost:190});
m_levels.push({m_puh_num:44, m_p1:0, m_p2:44, m_p3:0, m_p4:0, m_puh_speed1:2, m_puh_speed2:2.5, m_puh_life:500, m_puh_cost:240});
m_levels.push({m_puh_num:46, m_p1:0, m_p2:0, m_p3:46, m_p4:0, m_puh_speed1:2, m_puh_speed2:2.5, m_puh_life:550, m_puh_cost:300});
m_levels.push({m_puh_num:48, m_p1:0, m_p2:0, m_p3:0, m_p4:48, m_puh_speed1:2, m_puh_speed2:2.5, m_puh_life:350, m_puh_cost:370});
m_levels.push({m_puh_num:99, m_p1:33, m_p2:33, m_p3:33, m_p4:33, m_puh_speed1:4.5, m_puh_speed2:6, m_puh_life:300, m_puh_cost:2});
m_upgrades.m_bzz_attack = [20, 24, 28, 32, 36, 40, 44, 48, 52, 56, 60];
m_upgrades.m_bzz_attack_cost = [25, 200, 450, 800, 1200, 1600, 2400, 3200, 3600, 5000];
m_upgrades.m_bzz_move_speed = [10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20];
m_upgrades.m_bzz_build_speed = [5000, 4600, 4200, 3800, 3400, 3000, 2600, 2200, 1800, 1200, 1000];
m_upgrades.m_bzz_speed_cost = [25, 200, 450, 800, 1200, 1600, 2400, 3200, 3600, 5000];
m_upgrades.m_bzz_num = [1, 2, 3, 4, 5];
m_upgrades.m_bzz_num_cost = [50, 500, 1500, 5000];
m_upgrades.m_pig_attack = [10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30];
m_upgrades.m_pig_attack_cost = [25, 200, 450, 800, 1200, 1600, 2400, 3200, 3600, 5000];
m_upgrades.m_pig_num = [10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60];
m_upgrades.m_pig_num_cost = [25, 200, 450, 800, 1200, 1600, 2400, 3200, 3600, 5000];
m_upgrades.m_pig_fire_speed = [300, 280, 260, 240, 220, 200, 180, 160, 140, 120, 100];
m_upgrades.m_pig_reload_speed = [3000, 2800, 2600, 2400, 2200, 2000, 1800, 1600, 1400, 1200, 1000];
m_upgrades.m_pig_speed_cost = [25, 200, 450, 800, 1200, 1600, 2400, 3200, 3600, 5000];
m_upgrades.m_spell1_cost = [200, 450, 800, 1200, 1600, 2400, 3200, 3600, 5000, 6000];
m_upgrades.m_spell1_time = [3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8];
m_upgrades.m_spell1_reload = [-1, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3];
m_upgrades.m_spell1_k = [3, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 4, 4.2];
m_upgrades.m_spell2_cost = [200, 450, 800, 1200, 1600, 2400, 3200, 3600, 5000, 6000];
m_upgrades.m_spell2_time = [3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8];
m_upgrades.m_spell2_reload = [-1, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3];
m_upgrades.m_spell3_cost = [200, 450, 800, 1200, 1600, 2400, 3200, 3600, 5000, 6000];
m_upgrades.m_spell3_time = [3, 3.5, 4, 4.5, 5, 5.5, 6, 6.5, 7, 7.5, 8];
m_upgrades.m_spell3_reload = [-1, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3, 0.3];
m_upgrades.m_spell3_damage = [20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120];
m_next_beam_dt = 400;
}
function AddHoney(honey) {
if ((m_honey + honey) < 0) {
return(false);
}
m_honey = m_honey + honey;
HoneyControl.HoneyText = m_honey;
if (honey > 0) {
myLSO.data.myObj.m_all_honey = myLSO.data.myObj.m_all_honey + honey;
}
return(true);
}
function SaveData() {
myLSO.data.myObj.m_level_num = m_level_num;
myLSO.data.myObj.m_honey = m_honey;
myLSO.data.myObj.m_bzz_health = m_bzz_health;
myLSO.data.myObj.m_bzz_attack_i = m_upgrades.m_bzz_attack_i;
myLSO.data.myObj.m_bzz_speed_i = m_upgrades.m_bzz_speed_i;
myLSO.data.myObj.m_bzz_num_i = m_upgrades.m_bzz_num_i;
myLSO.data.myObj.m_pig_attack_i = m_upgrades.m_pig_attack_i;
myLSO.data.myObj.m_pig_num_i = m_upgrades.m_pig_num_i;
myLSO.data.myObj.m_pig_speed_i = m_upgrades.m_pig_speed_i;
myLSO.data.myObj.m_spell1_i = m_upgrades.m_spell1_i;
myLSO.data.myObj.m_spell2_i = m_upgrades.m_spell2_i;
myLSO.data.myObj.m_spell3_i = m_upgrades.m_spell3_i;
}
function LoadData() {
m_level_num = myLSO.data.myObj.m_level_num;
m_honey = myLSO.data.myObj.m_honey;
m_bzz_health = myLSO.data.myObj.m_bzz_health;
m_upgrades.m_bzz_attack_i = myLSO.data.myObj.m_bzz_attack_i;
m_upgrades.m_bzz_speed_i = myLSO.data.myObj.m_bzz_speed_i;
m_upgrades.m_bzz_num_i = myLSO.data.myObj.m_bzz_num_i;
m_upgrades.m_pig_attack_i = myLSO.data.myObj.m_pig_attack_i;
m_upgrades.m_pig_num_i = myLSO.data.myObj.m_pig_num_i;
m_upgrades.m_pig_speed_i = myLSO.data.myObj.m_pig_speed_i;
m_upgrades.m_spell1_i = myLSO.data.myObj.m_spell1_i;
m_upgrades.m_spell2_i = myLSO.data.myObj.m_spell2_i;
m_upgrades.m_spell3_i = myLSO.data.myObj.m_spell3_i;
}
function sitelock(urls_allowed) {
lock = false;
return(undefined);
x = ;
if (urls_allowed[x] == real_domain[0]) {
lock = false;
}
// unexpected jump
if (lock) {
_root._visible = false;
}
}
stop();
b_root_start = true;
if (b_root_start) {
b_online = true;
_root.b_send_scores = false;
url_string = "http//www.blitzgamer.com/honeytree_highscores.php";
InitParams();
SetLanguage(1);
b_root_start = false;
}
urls_allowed = ["astargames.ru", "www.astargames.ru", ""];
sitelock(urls_allowed);
if (b_online == false) {
StartMenu.ScoresButton._alpha = 25;
StartMenu.ScoresButton.enabled = false;
}
if (myLSO.data.myObj.m_level_num == 0) {
StartMenu.ContinueButton._alpha = 25;
StartMenu.ContinueButton.enabled = false;
}
VinnyIntroBg.Statistic1.Text = myLSO.data.myObj.m_all_honey;
Instance of Symbol 367 MovieClip in Frame 3
on (press) {
_root.gotoAndStop("Credits");
}
Instance of Symbol 370 MovieClip in Frame 3
on (release) {
getURL ("http://www.blitzgamer.com/?gameref=honeydefense", "_blank");
}
Instance of Symbol 378 MovieClip in Frame 3
onClipEvent (load) {
px = _x;
py = _y;
speed = 20;
way = new Array();
omx = 0;
omy = 0;
in_puh = false;
max_moves = 10;
}
onClipEvent (enterFrame) {
var dirx;
var diry;
var len;
var xx;
var yy;
if (way.length > 0) {
px = way[0].px;
py = way[0].py;
dirx = px - _x;
diry = py - _y;
len = Math.sqrt((dirx * dirx) + (diry * diry));
dirx = dirx / len;
diry = diry / len;
_x = (_x + (dirx * speed));
_y = (_y + (diry * speed));
if (dirx > 0) {
_xscale = -100;
} else {
_xscale = 100;
}
var flag = true;
while (flag) {
flag = false;
dirx = way[0].px - _x;
diry = way[0].py - _y;
len = Math.sqrt((dirx * dirx) + (diry * diry));
if (len < speed) {
way.splice(0, 1);
if (way.length > 0) {
flag = true;
}
}
}
} else {
var dirx = (wayx - _x);
var diry = (wayy - _y);
_x = (_x + (dirx * 0.3));
_y = (_y + (diry * 0.3));
if (dirx > 0) {
_xscale = -100;
} else {
_xscale = 100;
}
}
xx = (_x - _root.VinnyIntroBg.VinnyIntro._x) - _root.VinnyIntroBg._x;
yy = ((_y - _root.VinnyIntroBg.VinnyIntro._y) - _root.VinnyIntroBg._y) - 70;
len = Math.sqrt((xx * xx) + (yy * yy));
if ((len < 50) && (in_puh == false)) {
_root.VinnyIntroBg.VinnyIntro.gotoAndPlay("Panic");
_root.VinnyIntroBg.VinnyIntro.in_static = false;
in_puh = true;
} else if ((len > 50) && (in_puh == true)) {
_root.VinnyIntroBg.VinnyIntro.gotoAndPlay("Static");
_root.VinnyIntroBg.VinnyIntro.in_static = true;
in_puh = false;
}
}
onClipEvent (mouseMove) {
wayx = _root._xmouse;
wayy = _root._ymouse;
if (((Math.abs(wayx - omx) > speed) || (Math.abs(wayy - omy) > speed)) && ((Math.abs(wayx - _x) > speed) || (Math.abs(wayy - _y) > speed))) {
way.push({px:wayx, py:wayy});
omx = wayx;
omy = wayy;
if (way.length >= max_moves) {
way.splice(0, 1);
}
}
}
Instance of Symbol 219 MovieClip "ProgressBar" in Frame 6
onClipEvent (load) {
this._xscale = 0;
totalFileSize = _root.getBytesTotal();
}
onClipEvent (enterFrame) {
bytesLoaded = _root.getBytesLoaded();
amountLoaded = bytesLoaded / totalFileSize;
percentLoaded = int(100 * amountLoaded);
this._xscale = percentLoaded;
_root.ProgressText = this._xscale + "%";
if (this._xscale >= 100) {
this._xscale = 100;
_root.ProgressText = "\u0418\u0413\u0420\u0410\u0422\u042C";
}
}
on (press) {
if (this._xscale >= 100) {
_root.gotoAndStop("Menu");
}
}
Frame 14
Frame 26
function SwitchPause() {
if (b_pause) {
Pause._visible = false;
b_pause = false;
} else {
mx.behaviors.DepthControl.bringToFront(Pause);
Pause._visible = true;
b_pause = true;
}
}
function Init() {
Mouse.hide();
CrossHair._visible = true;
m_st0 = 0;
m_st1 = 0;
m_st2 = 0;
m_st3 = 0;
_root.Pause._visible = false;
b_pause = false;
Statistika._visible = false;
b_InUpgradeScreen = false;
if (_root.b_sound_on == false) {
_root.SoundButton.gotoAndStop("off");
}
spell_reloading_1 = m_upgrades.m_spell1_reload[m_upgrades.m_spell1_i];
spell_reloading_2 = m_upgrades.m_spell2_reload[m_upgrades.m_spell2_i];
spell_reloading_3 = m_upgrades.m_spell3_reload[m_upgrades.m_spell3_i];
m_bzz_num = m_upgrades.m_bzz_num[m_upgrades.m_bzz_num_i];
m_bzz_speed = m_upgrades.m_bzz_move_speed[m_upgrades.m_bzz_speed_i];
m_bzz_time = 3000;
m_bzz = new Array();
m_bzz_attack = m_upgrades.m_bzz_attack[m_upgrades.m_bzz_attack_i];
m_next_bzz_dt = m_upgrades.m_bzz_build_speed[m_upgrades.m_bzz_speed_i];
m_next_bzz_time = getTimer() + m_next_bzz_dt;
m_bullet_speed = 50;
m_bullets = new Array();
m_bullets_num = m_upgrades.m_pig_num[m_upgrades.m_pig_num_i];
m_max_bullets_num = m_upgrades.m_pig_num[m_upgrades.m_pig_num_i];
t_reload_time = m_upgrades.m_pig_reload_speed[m_upgrades.m_pig_speed_i];
b_reload = false;
m_puh = new Array();
m_puh_speed1 = m_levels[m_level_num].m_puh_speed1;
m_puh_speed2 = m_levels[m_level_num].m_puh_speed2;
m_puh_num = 5;
m_puh_level_num = m_levels[m_level_num].m_puh_num;
m_live_puh_num = m_puh_level_num;
PuhNumBar.Text = m_live_puh_num;
if (m_puh_level_num == 1) {
b_boss = true;
} else {
b_boss = false;
}
level = 0;
m_uley_x = 458;
m_uley_y = 153;
m_uley_r = 200;
t_weapon_time = getTimer();
t_weapon_delta = m_upgrades.m_pig_fire_speed[m_upgrades.m_pig_speed_i];
m_fire = false;
m_weapon_attack = m_upgrades.m_pig_attack[m_upgrades.m_pig_attack_i];
m_gravity = 2;
AddHoney(0);
SetPigletRed(false);
m_next_beam_time = 0;
BzzHealth(0);
LevelBox.Text = m_level_num + 1;
InitPuhTypes();
SpellDisabled1._visible = spell_reloading_1 == -1;
SpellDisabled2._visible = spell_reloading_2 == -1;
SpellDisabled3._visible = spell_reloading_3 == -1;
}
function ShowCombo(num) {
if (b_sound_on) {
SoundCombo.start(0, 1);
}
ComboText._visible = true;
ComboText.gotoAndPlay(2);
ComboText.Next.Text = num;
}
function InitPuhTypes() {
m_puh_types = new Array();
var _local5 = m_levels[m_level_num].m_p1;
var _local6 = m_levels[m_level_num].m_p2;
var _local7 = m_levels[m_level_num].m_p3;
var _local8 = m_levels[m_level_num].m_p4;
while ((_local5--) > 0) {
m_puh_types.push(1);
}
while ((_local6--) > 0) {
m_puh_types.push(2);
}
while ((_local7--) > 0) {
m_puh_types.push(3);
}
while ((_local8--) > 0) {
m_puh_types.push(4);
}
while (m_puh_types.length < m_levels[m_level_num].m_puh_num) {
m_puh_types.push(1);
}
var _local4 = 300;
var _local3;
var _local2;
var _local1;
while (_local4--) {
_local2 = int(Math.random() * m_puh_types.length);
_local1 = int(Math.random() * m_puh_types.length);
_local3 = m_puh_types[_local2];
m_puh_types[_local2] = m_puh_types[_local1];
m_puh_types[_local1] = _local3;
}
}
function BzzHealth(d_health) {
m_bzz_health = m_bzz_health + int(d_health);
UpdateUley();
if (m_bzz_health <= 0) {
Mouse.show();
CrossHair._visible = false;
m_bzz_health = 0;
t_spell3_start = 0;
DeActivateSpell3();
SetPigletRed(false);
Release();
delete m_puh_types;
RestartAll();
LoadData();
gotoAndStop ("Looser");
}
BzzHealthBar.Text = m_bzz_health;
}
function ActivateSpell1() {
if (_root.b_pause == true) {
return(undefined);
}
if (Spell1.Reload._yscale > 0) {
return(undefined);
}
if (b_sound_on) {
SoundRage.start(0, 1);
}
Spell1.Reload._yscale = 100;
SetPigletRed(true);
t_spell1_start = getTimer();
b_spell1 = true;
}
function DeActivateSpell1() {
if ((getTimer() - t_spell1_start) < (m_upgrades.m_spell1_time[m_upgrades.m_spell1_i] * 1000)) {
return(undefined);
}
SetPigletRed(false);
b_spell1 = false;
}
function ActivateSpell2() {
if (_root.b_pause == true) {
return(undefined);
}
if (Spell2.Reload._yscale > 0) {
return(undefined);
}
if (b_sound_on) {
SoundIce.start(0, 1);
}
Spell2.Reload._yscale = 100;
var _local2 = 0;
while (_local2 < m_puh.length) {
if (m_puh[_local2].b_live == true) {
m_puh[_local2].Freeze._visible = true;
m_puh[_local2].gotoAndStop("Move");
}
_local2++;
}
t_spell2_start = getTimer();
b_spell2 = true;
}
function DeActivateSpell2() {
if ((getTimer() - t_spell2_start) < (m_upgrades.m_spell2_time[m_upgrades.m_spell2_i] * 1000)) {
return(undefined);
}
var _local1 = 0;
while (_local1 < m_puh.length) {
if (m_puh[_local1].b_live == true) {
m_puh[_local1].gotoAndPlay("Move");
m_puh[_local1].Freeze._visible = false;
}
_local1++;
}
b_spell2 = false;
}
function ActivateSpell3() {
if (_root.b_pause == true) {
return(undefined);
}
if (Spell3.Reload._yscale > 0) {
return(undefined);
}
Spell3.Reload._yscale = 100;
t_spell3_start = getTimer();
b_spell3 = true;
}
function CalculateSpell3() {
if (getTimer() > m_next_beam_time) {
if (b_sound_on) {
SoundGrad.start(0, 1);
}
_root.VM.attachMovie("LaserBeam", "LaserBeam" + _root.level, _root.level);
_root.VM["LaserBeam" + _root.level]._x = Math.random() * 450;
_root.VM["LaserBeam" + _root.level]._y = 180;
_root.level++;
m_next_beam_time = getTimer() + _root.m_next_beam_dt;
}
}
function FireSpell3(xx) {
var _local3 = 40;
var _local1 = 0;
while (_local1 < m_puh.length) {
if (m_puh[_local1].PuhSelector.hitTest(xx)) {
PuhLoseLife(m_puh[_local1], m_upgrades.m_spell3_damage[m_upgrades.m_spell3_i]);
}
_local1++;
}
}
function DeActivateSpell3() {
if ((getTimer() - t_spell3_start) < (m_upgrades.m_spell3_time[m_upgrades.m_spell3_i] * 1000)) {
return(undefined);
}
b_spell3 = false;
}
function SetPigletRed(b_red) {
if (b_red) {
b_piglet_red = true;
_root.myPiglet._visible = false;
_root.myPigletRed._visible = true;
m_piglet = _root.myPigletRed;
} else {
b_piglet_red = false;
_root.myPiglet._visible = true;
_root.myPigletRed._visible = false;
m_piglet = _root.myPiglet;
}
AimPiglet();
}
function Release() {
var _local1 = 0;
while (_local1 < m_puh.length) {
m_puh[_local1].removeMovieClip();
_local1++;
}
delete m_puh;
_local1 = 0;
while (_local1 < m_bzz.length) {
m_bzz[_local1].removeMovieClip();
_local1++;
}
delete m_bzz;
_local1 = 0;
while (_local1 < m_bullets.length) {
m_bullets[_local1].removeMovieClip();
_local1++;
}
delete m_bullets;
}
function BzzControl() {
if (_root.m_bzz.length < _root.m_bzz_num) {
if (getTimer() > m_next_bzz_time) {
_root.VM.attachMovie("Bzz", "Bzz" + _root.level, _root.level);
_root.m_bzz.push(_root.VM["Bzz" + _root.level]);
_root.VM["Bzz" + _root.level]._x = m_uley_x;
_root.VM["Bzz" + _root.level].m_px = m_uley_x;
_root.VM["Bzz" + _root.level]._y = m_uley_y;
_root.VM["Bzz" + _root.level].m_px = m_uley_y;
_root.VM["Bzz" + _root.level].m_timer = getTimer();
_root.VM["Bzz" + _root.level].m_move = 0;
_root.VM["Bzz" + _root.level].p_attack = 0;
_root.VM["Bzz" + _root.level].b_live = true;
_root.VM["Bzz" + _root.level].m_yspeed = 0;
_root.VM["Bzz" + _root.level].m_xspeed = 0;
_root.level++;
m_next_bzz_time = getTimer() + _root.m_next_bzz_dt;
}
}
var _local2 = 0;
while (_local2 < m_puh.length) {
if ((m_puh[_local2]._x > (m_uley_x - m_uley_r)) and m_puh[_local2].b_live) {
var _local3 = 0;
while (_local3 < m_bzz.length) {
if ((m_bzz[_local3].p_attack == m_puh[_local2]) or (m_bzz[_local3].p_attack == 0)) {
break;
}
_local3++;
}
if (m_bzz[_local3].p_attack == 0) {
if (b_sound_on) {
SoundBzz.start(0, 1);
}
}
if (m_puh[_local2].m_type == 4) {
m_bzz[_local3].m_px = m_puh[_local2]._x;
m_bzz[_local3].m_py = m_puh[_local2]._y + 100;
} else {
m_bzz[_local3].m_px = m_puh[_local2]._x + m_puh[_local2].Balloon._x;
m_bzz[_local3].m_py = m_puh[_local2]._y + m_puh[_local2].Balloon._y;
}
m_bzz[_local3].m_move = 100;
m_bzz[_local3].p_attack = m_puh[_local2];
m_bzz[_local3].gotoAndPlay("Attack");
}
_local2++;
}
_local2 = 0;
for ( ; _local2 < m_bzz.length ; _local2++) {
if (m_bzz[_local2].b_live == false) {
m_bzz[_local2]._y = m_bzz[_local2]._y + m_bzz[_local2].m_yspeed;
m_bzz[_local2]._x = m_bzz[_local2]._x + m_bzz[_local2].m_xspeed;
m_bzz[_local2].m_yspeed = m_bzz[_local2].m_yspeed + m_gravity;
if (m_bzz[_local2]._y > 500) {
m_bzz[_local2].removeMovieClip();
m_bzz.splice(_local2, 1);
if (getTimer() > m_next_bzz_time) {
m_next_bzz_time = getTimer() + _root.m_next_bzz_dt;
}
}
}
if ((m_bzz[_local2].m_move > 0) and m_bzz[_local2].b_live) {
var _local5;
var _local4;
var _local6;
_local5 = m_bzz[_local2].m_px - m_bzz[_local2]._x;
_local4 = m_bzz[_local2].m_py - m_bzz[_local2]._y;
_local6 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local6 < m_bzz_speed) {
m_bzz[_local2].m_move = 0;
if (m_bzz[_local2].p_attack != 0) {
var _local3 = 0;
while (_local3 < m_bzz.length) {
if ((_local2 != _local3) and (m_bzz[_local3].p_attack == m_bzz[_local2].p_attack)) {
m_bzz[_local3].p_attack = 0;
m_bzz[_local3].gotoAndPlay("Static");
m_bzz[_local3].m_move = 0;
}
_local3++;
}
if (b_sound_on) {
SoundVinnyBalloon.start(0, 1);
}
PuhLoseLife(m_bzz[_local2].p_attack, m_bzz_attack);
m_bzz[_local2].removeMovieClip();
m_bzz.splice(_local2, 1);
if (getTimer() > m_next_bzz_time) {
m_next_bzz_time = getTimer() + _root.m_next_bzz_dt;
}
}
continue;
}
_local5 = _local5 / _local6;
_local4 = _local4 / _local6;
m_bzz[_local2]._x = m_bzz[_local2]._x + (_local5 * m_bzz_speed);
m_bzz[_local2]._y = m_bzz[_local2]._y + (_local4 * m_bzz_speed);
m_bzz[_local2].m_move--;
} else if ((getTimer() > (m_bzz[_local2].m_timer + m_bzz_time)) and (m_bzz[_local2].b_live == true)) {
m_bzz[_local2].m_timer = getTimer();
m_bzz[_local2].m_move = 10;
m_bzz[_local2].m_px = (int(Math.random() * m_uley_r) - (m_uley_r / 2)) + m_uley_x;
m_bzz[_local2].m_py = int(Math.random() * 200) + 10;
}
}
}
function AimPiglet() {
dx = _root._xmouse - (m_piglet._x + m_piglet.Weapon._x);
dy = _root._ymouse - (m_piglet._y + m_piglet.Weapon._y);
if (dx > 0) {
dx = 0;
}
FireRadians = Math.atan2(dy, dx);
FireDegrees = ((FireRadians * 180) / Math.PI) + 180;
m_piglet.Weapon._rotation = FireDegrees;
m_piglet.Hand._rotation = FireDegrees;
m_piglet.Head._rotation = FireDegrees;
}
function StartReload() {
if ((b_reload == true) or (m_bullets_num == m_max_bullets_num)) {
return(undefined);
}
if (b_sound_on) {
SoundReload.start(0, 1);
}
t_reload_start_time = getTimer();
b_reload = true;
}
function CalculateReload() {
if (b_reload == false) {
return(undefined);
}
if ((t_reload_start_time + t_reload_time) < getTimer()) {
b_reload = false;
m_bullets_num = m_max_bullets_num;
}
}
function UpdateGUI() {
if (b_reload) {
BulletsControl.ReloadBar._xscale = ((getTimer() - t_reload_start_time) / t_reload_time) * 100;
}
BulletsControl.ReloadText = (m_bullets_num + "/") + m_max_bullets_num;
if (!b_reload) {
BulletsControl.ReloadBar._xscale = 100;
}
}
function Fire() {
if (b_reload == true) {
return(undefined);
}
m_st2++;
if (b_sound_on) {
if (b_spell1) {
SoundWeapon2.start(0, 1);
} else {
SoundBlaster.start(0, 1);
}
}
var _local2 = m_piglet.Weapon._rotation;
if (b_spell1) {
var _local8 = (Math.random() * 20) - 10;
_local2 = _local2 + _local8;
} else {
m_bullets_num = m_bullets_num - 1;
}
var _local7;
var _local6;
var _local3 = 56;
var _local5;
var _local4;
_local7 = m_piglet.Weapon._x + m_piglet._x;
_local6 = (m_piglet.Weapon._y + m_piglet._y) - 5;
_local5 = Math.cos((_local2 / 180) * Math.PI);
_local4 = Math.sin((_local2 / 180) * Math.PI);
_local7 = _local7 - (_local3 * _local5);
_local6 = _local6 - (_local3 * _local4);
_root.VM.attachMovie("bullet", "bullet" + _root.level, _root.level);
_root.VM["bullet" + _root.level]._x = _local7;
_root.VM["bullet" + _root.level]._y = _local6;
_root.VM["bullet" + _root.level].dx = (-_local5) * m_bullet_speed;
_root.VM["bullet" + _root.level].dy = (-_local4) * m_bullet_speed;
_root.VM["bullet" + _root.level]._rotation = _local2;
_root.VM["bullet" + _root.level].m_hero = 0;
_root.VM["bullet" + _root.level].b_hit = false;
m_bullets.push(_root.VM["bullet" + _root.level]);
_root.level++;
m_piglet.Weapon.gotoAndPlay("Fire");
m_piglet.Hand.gotoAndPlay("Fire");
m_piglet.Head.gotoAndPlay("Fire");
if (m_bullets_num == 0) {
StartReload();
}
}
function KillBullet(bullet_i) {
if (m_bullets[bullet_i].m_hero > 1) {
var _local2 = m_levels[m_level_num].m_puh_cost / 2;
_local2 = _local2 * m_bullets[bullet_i].m_hero;
_local2 = _local2 * (m_bullets[bullet_i].m_hero - 1);
AddHoney(_local2);
AddHoneyClip(278, 120, _local2);
ShowCombo(m_bullets[bullet_i].m_hero);
}
if (m_bullets[bullet_i].b_hit) {
m_st3++;
}
m_bullets[bullet_i].removeMovieClip();
m_bullets.splice(bullet_i, 1);
}
function CalculateBullets() {
var _local1 = 0;
while (_local1 < m_bullets.length) {
m_bullets[_local1]._x = m_bullets[_local1]._x + m_bullets[_local1].dx;
m_bullets[_local1]._y = m_bullets[_local1]._y + m_bullets[_local1].dy;
FireRadians = Math.atan2(m_bullets[_local1].dx, m_bullets[_local1].dy);
FireDegrees = (((-FireRadians) * 180) / Math.PI) - 90;
m_bullets[_local1]._rotation = FireDegrees;
m_bullets[_local1].dy = m_bullets[_local1].dy + 1;
if ((((m_bullets[_local1]._x < -50) or (m_bullets[_local1]._x > 600)) or (m_bullets[_local1]._y < -50)) or (m_bullets[_local1]._y > 500)) {
KillBullet(_local1);
}
var _local2 = 0;
while (_local2 < m_puh.length) {
if (m_puh[_local2].Balloon.hitTest(m_bullets[_local1]._x, m_bullets[_local1]._y, true) && (m_puh[_local2].b_live)) {
AddPigletWeaponEffect(m_bullets[_local1]._x, m_bullets[_local1]._y);
m_bullets[_local1].b_hit = true;
if (b_sound_on) {
SoundVinnyBalloon.start(0, 1);
}
PuhLoseLife(m_puh[_local2], m_weapon_attack);
KillBullet(_local1);
break;
}
if (m_puh[_local2].PuhSelector.hitTest(m_bullets[_local1]._x, m_bullets[_local1]._y, true) && (m_puh[_local2].b_live)) {
AddPigletWeaponEffect(m_bullets[_local1]._x, m_bullets[_local1]._y);
m_bullets[_local1].b_hit = true;
if (b_sound_on) {
if (m_puh[_local2].m_type == 3) {
SoundVinnyBronka.start(0, 1);
} else {
SoundVinnyNormal.start(0, 1);
}
}
if (b_spell2 == false) {
m_puh[_local2].gotoAndPlay("Hit");
}
PuhLoseLife(m_puh[_local2], m_weapon_attack / 3);
KillBullet(_local1);
break;
}
var _local4 = 3;
var _local3 = 0;
while (_local3 < _local4) {
var _local6;
var _local5;
_local6 = m_bullets[_local1]._x - ((m_bullets[_local1].dx / _local4) * _local3);
_local5 = m_bullets[_local1]._y - ((m_bullets[_local1].dy / _local4) * _local3);
if (m_puh[_local2].Hat.hitTest(_local6, _local5, true)) {
AddPigletWeaponEffect(_local6, _local5);
if (m_puh[_local2].Hat.b_free == false) {
m_bullets[_local1].b_hit = true;
if (b_sound_on) {
SoundVinnyHat.start(0, 1);
}
m_bullets[_local1].m_hero++;
AddHoney(m_levels[m_level_num].m_puh_cost / 2);
AddHoneyClip(_local6, _local5, m_levels[m_level_num].m_puh_cost / 2);
m_st1++;
}
m_puh[_local2].Hat.b_free = true;
m_puh[_local2].Hat.m_x = m_puh[_local2].Hat._x + m_puh[_local2]._x;
m_puh[_local2].Hat.m_dx = m_bullets[_local1].dx / 5;
m_puh[_local2].Hat.m_y = m_puh[_local2].Hat._y + m_puh[_local2]._y;
m_puh[_local2].Hat.m_dy = m_bullets[_local1].dy / 5;
m_puh[_local2].Hat.m_angle = m_puh[_local2].Hat._rotation;
m_puh[_local2].Hat.m_da = _local5 - m_puh[_local2].Hat.m_y;
break;
}
_local3++;
}
_local2++;
}
if (b_spell1 == true) {
_local2 = 0;
while (_local2 < m_bzz.length) {
var _local4 = 10;
var _local3 = 0;
while (_local3 < _local4) {
var _local6 = m_bullets[_local1]._x - ((m_bullets[_local1].dx / _local4) * _local3);
var _local5 = m_bullets[_local1]._y - ((m_bullets[_local1].dy / _local4) * _local3);
if (m_bzz[_local2].hitTest(_local6, _local5, true)) {
if (b_sound_on) {
SoundVinnyHat.start(0, 1);
}
m_bzz[_local2].b_live = false;
m_bzz[_local2].m_xspeed = m_bullets[_local1].dx / 10;
m_bzz[_local2].m_yspeed = m_bullets[_local1].dy / 10;
m_bzz[_local2].gotoAndPlay("Fall");
break;
}
_local3++;
}
_local2++;
}
}
_local1++;
}
}
function FrezzBzz(puh) {
var _local1 = 0;
while (_local1 < m_bzz.length) {
if (m_bzz[_local1].p_attack == puh) {
m_bzz[_local1].p_attack = 0;
m_bzz[_local1].gotoAndPlay("Static");
m_bzz[_local1].m_move = 0;
}
_local1++;
}
}
function PuhLoseLife(puh, life) {
var _local3;
if (b_spell1) {
life = life * m_upgrades.m_spell1_k[m_upgrades.m_spell1_i];
}
if ((puh.m_type == 3) and (!b_boss)) {
life = life / 2;
}
puh.m_life = puh.m_life - life;
if (puh.m_life < 0) {
puh.m_life = 0;
}
_local3 = (puh.m_life / puh.m_max_life) * 100;
puh.p_life._xscale = _local3;
if ((puh.m_life == 0) and (puh.b_live == true)) {
if (b_sound_on) {
if (b_boss) {
SoundVinnyDead.start(0, 1);
} else {
SoundBalloon.start(0, 1);
}
}
myLSO.data.myObj.m_all_score = myLSO.data.myObj.m_all_score + 1;
FrezzBzz(puh);
m_live_puh_num--;
PuhNumBar.Text = m_live_puh_num;
if (m_live_puh_num == 0) {
if (b_sound_on) {
SoundVictory.start(0, 1);
}
}
if (b_spell2 == true) {
puh.Freeze._visible = false;
}
puh.b_live = false;
puh.gotoAndPlay("Fall");
puh.Balloon.gotoAndPlay("Bum");
AddHoney(m_levels[m_level_num].m_puh_cost);
AddHoneyClip(puh._x, puh._y, m_levels[m_level_num].m_puh_cost);
}
}
function PuhFire(puh_id) {
var _local2 = puh_id;
m_puh[_local2].gotoAndPlay("Fire");
m_puh[_local2].m_fire_time = getTimer() + m_puh_weapon[m_puh[_local2].m_type].speed;
if (b_sound_on) {
SoundWeapon2.start(0, 1);
}
var _local3;
if (m_puh[_local2].m_type == 1) {
_local3 = "PuhWeapon1Effect";
} else if (m_puh[_local2].m_type == 2) {
_local3 = "PuhWeapon2Effect";
} else if (m_puh[_local2].m_type == 3) {
_local3 = "PuhWeapon3Effect";
} else if (m_puh[_local2].m_type == 4) {
_local3 = "PuhWeapon4Effect";
}
_root.VM.attachMovie(_local3, _local3 + level, level);
_root.VM[_local3 + level]._x = (475 + (Math.random() * 70)) - 35;
_root.VM[_local3 + level]._y = (130 + (Math.random() * 100)) - 50;
level++;
if (b_boss) {
BzzHealth(((-m_puh[_local2].m_life) * m_puh_weapon[m_puh[_local2].m_type].damage) * 0.1);
} else {
BzzHealth((-m_puh[_local2].m_life) * m_puh_weapon[m_puh[_local2].m_type].damage);
}
}
function PuhControll() {
if (!b_spell2) {
if ((m_puh.length < m_puh_num) and (m_puh_level_num > 0)) {
if ((m_start_puh_last_t + m_start_puh_dt) < getTimer()) {
m_start_puh_last_t = getTimer();
var _local7 = m_puh_types[m_puh_level_num - 1];
_root.VM.attachMovie("Puuh" + _local7, "Puuh" + level, level);
_root.VM["Puuh" + level]._x = -500;
_root.VM["Puuh" + level]._y = 50 + int(Math.random() * 100);
_root.VM["Puuh" + level].m_speed = m_start_puh_speed;
_root.VM["Puuh" + level].b_live = true;
_root.VM["Puuh" + level].m_yspeed = 0;
_root.VM["Puuh" + level].m_life = m_levels[m_level_num].m_puh_life;
_root.VM["Puuh" + level].m_max_life = m_levels[m_level_num].m_puh_life;
_root.VM["Puuh" + level].b_start = true;
_root.VM["Puuh" + level].m_type = _local7;
_root.VM["Puuh" + level].m_angle = 0;
_root.VM["Puuh" + level].Hat.b_free = false;
_root.VM["Puuh" + level].m_position = m_puh_weapon[_local7].dist - (Math.random() * 50);
_root.VM["Puuh" + level].b_on_position = false;
if (_local7 != 4) {
m_st0++;
}
if (_local7 == 1) {
_root.VM["Puuh" + level].b_weapon = false;
} else if (_local7 == 2) {
_root.VM["Puuh" + level].b_weapon = true;
} else if (_local7 == 3) {
_root.VM["Puuh" + level].b_weapon = true;
} else if (_local7 == 4) {
_root.VM["Puuh" + level].b_weapon = true;
}
if (b_boss) {
_root.VM["Puuh" + level]._y = 50;
_root.VM["Puuh" + level]._xscale = 170;
_root.VM["Puuh" + level]._yscale = 170;
if (b_sound_on) {
SoundBoss.start(0, 1);
}
}
if (_root.VM["Puuh" + level].b_weapon == false) {
_root.VM["Puuh" + level].Weapon._visible = false;
}
_root.VM["Puuh" + level].Freeze._visible = false;
m_puh.push(_root.VM["Puuh" + level]);
level++;
m_puh_level_num--;
}
}
}
var _local2 = 0;
for ( ; _local2 < m_puh.length ; _local2++) {
if ((m_puh[_local2].b_on_position && (m_puh[_local2].b_live)) && (!b_spell2)) {
if (m_puh[_local2].m_fire_time < getTimer()) {
PuhFire(_local2);
}
}
if ((!b_spell2) && (m_puh[_local2].b_on_position == false)) {
if ((m_puh[_local2]._x > m_puh[_local2].m_position) && (m_puh[_local2].b_weapon == true)) {
m_puh[_local2].b_on_position = true;
m_puh[_local2].m_fire_time = getTimer() + m_puh_weapon[m_puh[_local2].m_type].speed;
continue;
}
m_puh[_local2]._x = m_puh[_local2]._x + m_puh[_local2].m_speed;
var _local6 = m_puh[_local2].m_speed / 10;
var _local3 = 1;
if (m_puh[_local2].m_type == 2) {
_local3 = 6;
}
if (b_boss == false) {
var _local5 = Math.cos(m_puh[_local2].m_angle) * 2;
var _local4 = Math.sin(m_puh[_local2].m_angle) * _local3;
m_puh[_local2]._x = m_puh[_local2]._x + _local5;
m_puh[_local2]._y = m_puh[_local2]._y + _local4;
m_puh[_local2].m_angle = m_puh[_local2].m_angle + _local6;
}
}
if ((m_puh[_local2]._x > m_start_puh_x) and m_puh[_local2].b_start) {
m_puh[_local2].b_start = false;
m_puh[_local2].m_speed = (Math.random() * (m_puh_speed2 - m_puh_speed1)) + m_puh_speed1;
}
if (m_puh[_local2].Hat.b_free) {
m_puh[_local2].Hat.m_angle = m_puh[_local2].Hat.m_angle + m_puh[_local2].Hat.m_da;
m_puh[_local2].Hat.m_x = m_puh[_local2].Hat.m_x + m_puh[_local2].Hat.m_dx;
m_puh[_local2].Hat.m_y = m_puh[_local2].Hat.m_y + m_puh[_local2].Hat.m_dy;
m_puh[_local2].Hat.m_dy = m_puh[_local2].Hat.m_dy + m_gravity;
m_puh[_local2].Hat._x = m_puh[_local2].Hat.m_x - m_puh[_local2]._x;
m_puh[_local2].Hat._y = m_puh[_local2].Hat.m_y - m_puh[_local2]._y;
m_puh[_local2].Hat._rotation = m_puh[_local2].Hat.m_angle;
}
if (m_puh[_local2].b_live == false) {
m_puh[_local2]._y = m_puh[_local2]._y + m_puh[_local2].m_yspeed;
m_puh[_local2].m_yspeed = m_puh[_local2].m_yspeed + m_gravity;
}
if ((m_puh[_local2]._x > 650) or (m_puh[_local2]._y > 500)) {
if ((m_puh[_local2]._x > 650) and (m_puh[_local2].b_live == true)) {
if (b_sound_on) {
SoundUley.start(0, 1);
}
FrezzBzz(m_puh[_local2]);
m_live_puh_num--;
PuhNumBar.Text = m_live_puh_num;
BzzHealth(((-Math.random()) * 50) - 50);
}
m_puh[_local2].removeMovieClip();
m_puh.splice(_local2, 1);
}
}
}
function CheckLevelEnd() {
if ((m_puh.length == 0) and (m_puh_level_num <= 0)) {
Mouse.show();
CrossHair._visible = false;
t_spell3_start = 0;
DeActivateSpell3();
SetPigletRed(false);
Release();
delete m_puh_types;
m_level_num++;
b_InUpgradeScreen = true;
if (b_pause) {
SwitchPause();
}
if (m_level_num >= m_levels.length) {
gotoAndStop ("Victory");
} else {
b_pause = true;
var _local2;
var _local1;
if (m_st0 == 0) {
_local2 = 0;
} else {
_local2 = int((m_st1 / m_st0) * 100);
}
Statistika.StatistikaFrame.st1 = _local2 + " %";
if (m_st2 == 0) {
_local1 = 0;
} else {
_local1 = int((m_st3 / m_st2) * 100);
}
Statistika.StatistikaFrame.st2 = _local1 + " %";
Statistika._visible = true;
mx.behaviors.DepthControl.bringToFront(Statistika);
var _local3 = 0.1;
m_bonus_honey_1 = int(((_local2 / 100) * m_honey) * _local3);
m_bonus_honey_t1 = 0;
m_bonus_honey_2 = int(((_local1 / 100) * m_honey) * _local3);
m_bonus_honey_t2 = 0;
m_bonus_honey_time = getTimer();
}
}
}
function UpdateBonusHoney() {
var _local2 = 20;
var _local1 = 0;
if ((m_bonus_honey_time + _local2) < getTimer()) {
if (m_bonus_honey_t1 < m_bonus_honey_1) {
m_bonus_honey_t1++;
_local1++;
}
Statistika.StatistikaFrame.bonus1 = m_bonus_honey_t1;
if (m_bonus_honey_t2 < m_bonus_honey_2) {
m_bonus_honey_t2++;
_local1++;
}
Statistika.StatistikaFrame.bonus2 = m_bonus_honey_t2;
m_bonus_honey_time = getTimer();
}
}
function AddFinalHoneyBonus() {
AddHoney(m_bonus_honey_1 + m_bonus_honey_2);
}
function SkipLevel() {
while (m_puh.length != 0) {
PuhLoseLife(m_puh[0], 1000000);
m_start_puh_last_t = 0;
PuhControll();
}
}
function AddHoneyClip(xx, yy, num) {
_root.VM.attachMovie("AddHoneyClip", "AddHoneyClip" + _root.level, _root.level);
_root.VM["AddHoneyClip" + _root.level]._x = xx;
_root.VM["AddHoneyClip" + _root.level]._y = yy;
_root.VM["AddHoneyClip" + _root.level].Next.text1 = num;
level++;
}
function AddPigletWeaponEffect(xx, yy) {
_root.attachMovie("PigletWeapon1Effect", "PigletWeapon1Effect" + _root.level, _root.level);
_root["PigletWeapon1Effect" + _root.level]._x = xx;
_root["PigletWeapon1Effect" + _root.level]._y = yy;
level++;
}
function UpdateUley() {
_root.uley.uley_0._visible = false;
_root.uley.uley_25._visible = false;
_root.uley.uley_50._visible = false;
_root.uley.uley_75._visible = false;
_root.uley.uley_100._visible = false;
if (m_bzz_health <= 0) {
_root.uley.uley_0._visible = true;
}
if ((m_bzz_health > 0) && (m_bzz_health <= 250)) {
_root.uley.uley_25._visible = true;
}
if ((m_bzz_health > 250) && (m_bzz_health <= 500)) {
_root.uley.uley_50._visible = true;
}
if ((m_bzz_health > 500) && (m_bzz_health <= 900)) {
_root.uley.uley_75._visible = true;
}
if ((m_bzz_health > 900) && (m_bzz_health <= 1000)) {
_root.uley.uley_100._visible = true;
}
}
SetLanguage(game_lang);
if (b_start) {
b_start = false;
SoundBalloon = new Sound();
SoundBalloon.attachSound("Balloon.mp3");
SoundBlaster = new Sound();
SoundBlaster.attachSound("Blaster.mp3");
SoundBoss = new Sound();
SoundBoss.attachSound("Boss.mp3");
SoundBzz = new Sound();
SoundBzz.attachSound("Bzz.mp3");
SoundGrad = new Sound();
SoundGrad.attachSound("Grad.mp3");
SoundIce = new Sound();
SoundIce.attachSound("Ice.mp3");
SoundRage = new Sound();
SoundRage.attachSound("Rage.mp3");
SoundReload = new Sound();
SoundReload.attachSound("Reload.mp3");
SoundSpell = new Sound();
SoundSpell.attachSound("Spell.mp3");
SoundUley = new Sound();
SoundUley.attachSound("Uley.mp3");
SoundVinny = new Sound();
SoundVinny.attachSound("Vinny.mp3");
SoundVinnyBalloon = new Sound();
SoundVinnyBalloon.attachSound("vinny_balloon.WAV");
SoundVinnyBronka = new Sound();
SoundVinnyBronka.attachSound("vinny_bronka.WAV");
SoundVinnyHat = new Sound();
SoundVinnyHat.attachSound("vinny_hat.WAV");
SoundVinnyNormal = new Sound();
SoundVinnyNormal.attachSound("vinny_normal.wav");
SoundCombo = new Sound();
SoundCombo.attachSound("Combo.mp3");
SoundVictory = new Sound();
SoundVictory.attachSound("Victory.wav");
SoundWeapon2 = new Sound();
SoundWeapon2.attachSound("Weapon2.wav");
SoundVinnyDead = new Sound();
SoundVinnyDead.attachSound("Vinny_dead.wav");
}
if (b_start2) {
var keyListener = new Object();
keyListener.onKeyDown = function () {
if ((Key.getCode() == 49) || (Key.getCode() == 65)) {
ActivateSpell1();
} else if ((Key.getCode() == 50) || (Key.getCode() == 83)) {
ActivateSpell2();
} else if ((Key.getCode() == 51) || (Key.getCode() == 68)) {
ActivateSpell3();
} else if ((Key.getCode() == 32) || (Key.getCode() == 80)) {
if (_root.b_InUpgradeScreen == false) {
_root.SwitchPause();
}
} else if (Key.getCode() == 52) {
}
};
Key.addListener(keyListener);
b_start2 = false;
}
Instance of Symbol 202 MovieClip [Actions] "Actions" in Frame 26
onClipEvent (load) {
_root.Init();
}
onClipEvent (enterFrame) {
_root.CrossHair._x = _root._xmouse;
_root.CrossHair._y = _root._ymouse;
if (_root.b_pause == true) {
return(undefined);
}
_root.AimPiglet();
_root.BzzControl();
_root.CalculateBullets();
_root.PuhControll();
_root.CalculateReload();
_root.UpdateGUI();
_root.CheckLevelEnd();
if (_root.m_fire and (_root._ymouse < 340)) {
if (_root.t_weapon_time < getTimer()) {
_root.Fire();
_root.t_weapon_time = getTimer() + _root.t_weapon_delta;
}
}
if (_root.b_spell1) {
_root.DeActivateSpell1();
}
if (_root.b_spell2) {
_root.DeActivateSpell2();
}
if (_root.b_spell3) {
_root.CalculateSpell3();
_root.DeActivateSpell3();
}
}
onClipEvent (mouseDown) {
if (_root.b_pause == true) {
return(undefined);
}
if (_root.SoundButton.hitTest(_root._xmouse, _root._ymouse)) {
return(undefined);
}
_root.m_fire = true;
}
onClipEvent (mouseUp) {
_root.m_fire = false;
}
onClipEvent (keyDown) {
}
Instance of Symbol 471 MovieClip "Spell1" in Frame 26
onClipEvent (load) {
text1 = _root.string16;
}
Instance of Symbol 499 MovieClip "LevelBox" in Frame 26
onClipEvent (load) {
text1 = _root.string15;
}
Instance of Symbol 514 MovieClip "SoundButton" in Frame 26
on (press) {
if (_root.b_sound_on == true) {
_root.MySound.setVolume(0);
_root.b_sound_on = false;
_root.SoundButton.gotoAndStop("off");
} else {
_root.MySound.setVolume(100);
_root.b_sound_on = true;
_root.SoundButton.gotoAndStop("on");
}
}
Instance of Symbol 566 MovieClip "Statistika" in Frame 26
onClipEvent (enterFrame) {
if (_visible) {
_root.UpdateBonusHoney();
}
}
Frame 38
function UpdateUpgrades() {
if (((_root.m_upgrades.m_spell1_i > 0) && (_root.m_upgrades.m_spell2_i > 0)) && (_root.m_upgrades.m_spell3_i > 0)) {
help._visible = false;
}
UpgradeUleyScreen.UpgrTxt1 = 1000 - _root.m_bzz_health;
if (m_upgrades.m_bzz_attack_cost[m_upgrades.m_bzz_attack_i] == undefined) {
BzzUpgrade.UpgrTxt1 = "MAX";
BzzUpgrade.UpgrBtn1.enabled = false;
} else {
BzzUpgrade.UpgrTxt1 = m_upgrades.m_bzz_attack_cost[m_upgrades.m_bzz_attack_i];
}
if (m_upgrades.m_bzz_num_cost[m_upgrades.m_bzz_num_i] == undefined) {
BzzUpgrade.UpgrTxt2 = "MAX";
BzzUpgrade.UpgrBtn2.enabled = false;
} else {
BzzUpgrade.UpgrTxt2 = m_upgrades.m_bzz_num_cost[m_upgrades.m_bzz_num_i];
}
if (m_upgrades.m_bzz_speed_cost[m_upgrades.m_bzz_speed_i] == undefined) {
BzzUpgrade.UpgrTxt3 = "MAX";
BzzUpgrade.UpgrBtn3.enabled = false;
} else {
BzzUpgrade.UpgrTxt3 = m_upgrades.m_bzz_speed_cost[m_upgrades.m_bzz_speed_i];
}
if (m_upgrades.m_pig_attack_cost[m_upgrades.m_pig_attack_i] == undefined) {
PigUpgrade.UpgrTxt1 = "MAX";
PigUpgrade.UpgrBtn1.enabled = false;
} else {
PigUpgrade.UpgrTxt1 = m_upgrades.m_pig_attack_cost[m_upgrades.m_pig_attack_i];
}
if (m_upgrades.m_pig_num_cost[m_upgrades.m_pig_num_i] == undefined) {
PigUpgrade.UpgrTxt2 = "MAX";
PigUpgrade.UpgrBtn2.enabled = false;
} else {
PigUpgrade.UpgrTxt2 = m_upgrades.m_pig_num_cost[m_upgrades.m_pig_num_i];
}
if (m_upgrades.m_pig_speed_cost[m_upgrades.m_pig_speed_i] == undefined) {
PigUpgrade.UpgrTxt3 = "MAX";
PigUpgrade.UpgrBtn3.enabled = false;
} else {
PigUpgrade.UpgrTxt3 = m_upgrades.m_pig_speed_cost[m_upgrades.m_pig_speed_i];
}
}
UpdateUpgrades();
UpgradeSpell1.onRollOver = function () {
if (m_upgrades.m_spell1_cost[m_upgrades.m_spell1_i] == undefined) {
UpgrTxt1 = "MAX";
UpgrTxt2 = "";
} else {
UpgrTxt1 = m_upgrades.m_spell1_i + 1;
UpgrTxt2 = m_upgrades.m_spell1_cost[m_upgrades.m_spell1_i];
}
};
UpgradeSpell2.onRollOver = function () {
if (m_upgrades.m_spell2_cost[m_upgrades.m_spell2_i] == undefined) {
UpgrTxt1 = "MAX";
UpgrTxt2 = "";
} else {
UpgrTxt1 = m_upgrades.m_spell2_i + 1;
UpgrTxt2 = m_upgrades.m_spell2_cost[m_upgrades.m_spell2_i];
}
};
UpgradeSpell3.onRollOver = function () {
if (m_upgrades.m_spell3_cost[m_upgrades.m_spell3_i] == undefined) {
UpgrTxt1 = "MAX";
UpgrTxt2 = "";
} else {
UpgrTxt1 = m_upgrades.m_spell3_i + 1;
UpgrTxt2 = m_upgrades.m_spell3_cost[m_upgrades.m_spell3_i];
}
};
Instance of Symbol 175 MovieClip [UpgradeActions] in Frame 38
onClipEvent (enterFrame) {
}
Frame 66
if (myLSO.data.myObj.m_all_honey == 0) {
EnterRecord._visible = false;
}
EnterRecord.user_score = myLSO.data.myObj.m_all_honey;
Instance of Symbol 370 MovieClip in Frame 66
on (release) {
getURL ("http://www.blitzgamer.com/?gameref=honeydefense", "_blank");
}
Instance of Symbol 173 MovieClip [Puuh1] "Puh111" in Frame 76
onClipEvent (load) {
this.Freeze._visible = false;
}
Instance of Symbol 370 MovieClip in Frame 76
on (release) {
getURL ("http://www.blitzgamer.com/?gameref=honeydefense", "_blank");
}
Frame 96
stop();
Statistic1.Text = myLSO.data.myObj.m_all_honey;
yourScore.scoreText.text = myLSO.data.myObj.m_all_honey;
var PATH = "http://www.blitzgamer.com/blitz_HighScores/";
var GAMENAME = "honeytree";
var SCORESPATH = (("http://www.blitzgamer.com/" + GAMENAME) + "_highscores.php");
this.createEmptyMovieClip("highSender", this.getNextHighestDepth());
yourScore.submit.onRelease = function () {
if (myLSO.data.myObj.m_all_honey == 0) {
return(undefined);
}
highSender.playerName = yourScore.nameText;
highSender.score = myLSO.data.myObj.m_all_honey;
highSender.gamename = GAMENAME;
highSender.validator = _root.scoreSystem.processScore(_root.score);
highSender.loadVariables(PATH + "new_score.php", "POST");
getURL (SCORESPATH, "_blank");
this._visible = false;
myLSO.data.myObj.m_all_honey = 0;
Statistic1.Text = myLSO.data.myObj.m_all_honey;
yourScore.scoreText.text = myLSO.data.myObj.m_all_honey;
};
Instance of Symbol 370 MovieClip in Frame 96
on (release) {
getURL ("http://www.blitzgamer.com/?gameref=honeydefense", "_blank");
}
Frame 106
if (b_send_scores == true) {
_root.gotoAndStop("Victory");
b_send_scores = false;
} else {
_root.gotoAndStop("Loading");
}
Symbol 3 MovieClip [PigletWeapon1Effect] Frame 5
stop();
this.removeMovieClip();
Symbol 9 MovieClip [AddHoneyClip] Frame 8
stop();
this.removeMovieClip();
Symbol 45 MovieClip [Puuh4] Frame 30
gotoAndPlay ("Move");
Symbol 45 MovieClip [Puuh4] Frame 60
stop();
Symbol 45 MovieClip [Puuh4] Frame 70
gotoAndPlay ("Move");
Symbol 45 MovieClip [Puuh4] Frame 80
gotoAndPlay ("Move");
Symbol 51 MovieClip [LaserBeam] Frame 1
_root.FireSpell3(this);
Symbol 51 MovieClip [LaserBeam] Frame 5
stop();
this.removeMovieClip();
Symbol 64 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 5
stop();
Symbol 74 MovieClip [Puuh3] Frame 30
gotoAndPlay ("Move");
Symbol 74 MovieClip [Puuh3] Frame 60
stop();
Symbol 74 MovieClip [Puuh3] Frame 70
gotoAndPlay ("Move");
Symbol 74 MovieClip [Puuh3] Frame 80
gotoAndPlay ("Move");
Symbol 86 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 5
stop();
Symbol 98 MovieClip [Puuh2] Frame 30
gotoAndPlay ("Move");
Symbol 98 MovieClip [Puuh2] Frame 60
stop();
Symbol 98 MovieClip [Puuh2] Frame 70
gotoAndPlay ("Move");
Symbol 98 MovieClip [Puuh2] Frame 80
gotoAndPlay ("Move");
Symbol 103 MovieClip [PuhWeapon4Effect] Frame 13
stop();
this.removeMovieClip();
Symbol 104 MovieClip [PuhWeapon3Effect] Frame 13
stop();
this.removeMovieClip();
Symbol 106 MovieClip [PuhWeapon2Effect] Frame 5
stop();
this.removeMovieClip();
Symbol 107 MovieClip [PuhWeapon1Effect] Frame 5
stop();
this.removeMovieClip();
Symbol 113 MovieClip [Symbol 1] Frame 1
#initclip 15
Object.registerClass("Symbol 1", lang);
#endinitclip
Symbol 118 MovieClip [ScoresText21] Frame 1
#initclip 3
Object.registerClass("ScoresText21", lang);
#endinitclip
Symbol 123 MovieClip [ScoresText22] Frame 1
#initclip 4
Object.registerClass("ScoresText22", lang);
#endinitclip
Symbol 128 MovieClip [ScoresText23] Frame 1
#initclip 5
Object.registerClass("ScoresText23", lang);
#endinitclip
Symbol 133 MovieClip [ScoresText24] Frame 1
#initclip 6
Object.registerClass("ScoresText24", lang);
#endinitclip
Symbol 139 MovieClip [sc5text4] Frame 1
#initclip 7
Object.registerClass("sc5text4", lang);
#endinitclip
Symbol 144 MovieClip [sc5text3] Frame 1
#initclip 8
Object.registerClass("sc5text3", lang);
#endinitclip
Symbol 152 MovieClip [sc2text1] Frame 1
#initclip 9
Object.registerClass("sc2text1", lang);
#endinitclip
Symbol 157 MovieClip [sc1text1] Frame 1
#initclip 10
Object.registerClass("sc1text1", lang);
#endinitclip
Symbol 166 MovieClip Frame 1
stop();
Symbol 166 MovieClip Frame 5
stop();
Symbol 173 MovieClip [Puuh1] Frame 30
gotoAndPlay ("Move");
Symbol 173 MovieClip [Puuh1] Frame 60
stop();
Symbol 173 MovieClip [Puuh1] Frame 70
gotoAndPlay ("Move");
Symbol 173 MovieClip [Puuh1] Frame 80
gotoAndPlay ("Move");
Symbol 181 MovieClip [UpgradeText10] Frame 1
#initclip 11
Object.registerClass("UpgradeText10", lang);
#endinitclip
Symbol 188 MovieClip [Bzz] Frame 30
gotoAndPlay ("Static");
Symbol 188 MovieClip [Bzz] Frame 69
gotoAndPlay ("Attack");
Symbol 188 MovieClip [Bzz] Frame 85
gotoAndPlay ("Fall");
Symbol 193 MovieClip [StText1] Frame 1
#initclip 12
Object.registerClass("StText1", lang);
#endinitclip
Symbol 198 MovieClip [BonusText11] Frame 1
#initclip 13
Object.registerClass("BonusText11", lang);
#endinitclip
Symbol 207 MovieClip [puhi_menu] Frame 1
#initclip 14
Object.registerClass("puhi_menu", lang);
#endinitclip
Symbol 756 MovieClip [__Packages.lang] Frame 0
class lang extends MovieClip
{
var r, e;
function lang () {
super();
r._visible = _root.game_lang == 0;
e._visible = _root.game_lang == 1;
}
}
Symbol 757 MovieClip [__Packages.mx.behaviors.DepthControl] Frame 0
class mx.behaviors.DepthControl extends Object
{
function DepthControl () {
super();
}
static function sendToBack(target) {
var _local2 = false;
while (_local2 == false) {
sendBackward(target);
_local2 = target == getInstanceAtLowest(target._parent);
}
}
static function bringToFront(target) {
var _local2 = false;
while (_local2 == false) {
bringForward(target);
_local2 = target == getInstanceAtHighest(target._parent);
}
}
static function sendBackward(target) {
var _local2 = trackDepths(target._parent);
if (target != getInstanceAtLowest(target._parent)) {
target.swapDepths(getInstanceLowerThan(target));
}
}
static function bringForward(target) {
if (target != getInstanceAtHighest(target._parent)) {
target.swapDepths(getInstanceHigherThan(target));
}
}
static function trackDepths(mcParent) {
var _local4 = [];
for (var _local5 in mcParent) {
if (typeof(mcParent[_local5]) == "movieclip") {
_local4.push({mc:mcParent[_local5], depth:mcParent[_local5].getDepth()});
}
}
_local4.sort(orderFunc);
return(_local4);
}
static function orderFunc(a, b) {
var _local2 = Number(a.depth);
var _local1 = Number(b.depth);
if (_local2 > _local1) {
return(-1);
}
if (_local1 > _local2) {
return(1);
}
return(0);
}
static function getInstanceAtLowest(targetParent) {
var _local1 = trackDepths(targetParent);
return(_local1[_local1.length - 1].mc);
}
static function getInstanceAtHighest(targetParent) {
var _local1 = trackDepths(targetParent);
return(_local1[0].mc);
}
static function getInstanceLowerThan(target) {
var _local2 = trackDepths(target._parent);
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].mc == target) {
break;
}
_local1++;
}
return(_local2[_local1 + 1].mc);
}
static function getInstanceHigherThan(target) {
var _local2 = trackDepths(target._parent);
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].mc == target) {
break;
}
_local1++;
}
return(_local2[_local1 - 1].mc);
}
}
Symbol 227 Button
on (release) {
getURL ("http://www.blitzgamer.com/?gameref=honeydefense", "_blank");
}
Symbol 246 Button
on (release) {
getURL ("http://www.blitzgamer.com", "_blank");
}
Symbol 259 MovieClip Frame 1
stop();
Symbol 259 MovieClip Frame 20
stop();
Symbol 304 MovieClip Frame 1
this._visible = false;
_parent.stop();
Symbol 304 MovieClip Frame 2
this._visible = true;
Symbol 304 MovieClip Frame 52
var getloadprogress;
onEnterFrame = function () {
loadprogress = (this.getBytesLoaded() / this.getBytesTotal()) * 100;
if (loadprogress >= 100) {
play();
delete this.onEnterFrame;
}
loading.progressbar._xscale = loadprogress;
};
Symbol 304 MovieClip Frame 55
playGame.onPress = function () {
play();
};
Symbol 304 MovieClip Frame 131
tank.play();
Symbol 304 MovieClip Frame 173
_parent.play();
Symbol 304 MovieClip Frame 174
stop();
_parent.play();
Symbol 313 Button
on (release) {
getURL ("http://www.blitzgamer.com/?gameref=honeydefense", "_blank");
}
Symbol 337 MovieClip Frame 70
gotoAndPlay ("Static");
Symbol 337 MovieClip Frame 88
if (in_static) {
gotoAndPlay ("Static");
} else {
gotoAndPlay ("Panic");
}
Symbol 341 MovieClip Frame 15
gotoAndPlay ("Static");
Symbol 341 MovieClip Frame 33
gotoAndPlay ("Static");
Symbol 345 MovieClip Frame 15
gotoAndPlay ("Static");
Symbol 345 MovieClip Frame 33
gotoAndPlay ("Static");
Symbol 348 MovieClip Frame 15
gotoAndPlay ("Static");
Symbol 348 MovieClip Frame 36
gotoAndPlay ("Static");
Symbol 359 Button
on (press) {
_root.MySound = new Sound();
_root.MySound.attachSound("theme2.mp3");
_root.MySound.start(0, 9999);
_root.gotoAndStop("Game");
}
Symbol 360 Button
on (press) {
_root.MySound = new Sound();
_root.MySound.attachSound("theme2.mp3");
_root.MySound.start(0, 9999);
_root.RestartAll();
_root.gotoAndStop("Scene1");
}
Symbol 361 Button
on (press) {
_root.gotoAndStop("Scores");
}
Symbol 409 Button
on (press) {
_root.gotoAndStop("Game");
}
Symbol 410 Button
on (press) {
_root.RestartAll();
_root.gotoAndStop("Game");
}
Symbol 429 Button
on (press) {
_root.gotoAndStop("Credits");
}
Symbol 430 Button
on (press) {
getURL (url_string, "_blank");
}
Symbol 444 MovieClip Frame 15
gotoAndPlay ("Static");
Symbol 444 MovieClip Frame 33
gotoAndPlay ("Static");
Symbol 448 MovieClip Frame 15
gotoAndPlay ("Static");
Symbol 448 MovieClip Frame 36
gotoAndPlay ("Static");
Symbol 452 MovieClip Frame 15
gotoAndPlay ("Static");
Symbol 452 MovieClip Frame 33
gotoAndPlay ("Static");
Symbol 465 Button
on (press) {
_root.ActivateSpell1();
}
Instance of Symbol 467 MovieClip in Symbol 471 MovieClip Frame 1
onClipEvent (load) {
if (_root.game_lang != 0) {
_visible = false;
}
}
Instance of Symbol 469 MovieClip in Symbol 471 MovieClip Frame 1
onClipEvent (load) {
if (_root.game_lang != 1) {
_visible = false;
}
}
Instance of Symbol 470 MovieClip "Reload" in Symbol 471 MovieClip Frame 1
onClipEvent (load) {
this._parent.Button.enabled = false;
}
onClipEvent (enterFrame) {
if (_root.b_pause == true) {
return(undefined);
}
if (this._yscale > 0) {
this._yscale = this._yscale - _root.spell_reloading_1;
if (this._yscale < 0) {
this._yscale = 0;
}
if (this._yscale > 100) {
this._yscale = 100;
}
if (this._yscale == 0) {
_root.ActivateSpellEffect1._visible = true;
_root.ActivateSpellEffect1.gotoAndPlay(2);
}
} else {
this._parent.Button.enabled = true;
}
}
Symbol 472 Button
on (press) {
_root.ActivateSpell2();
}
Instance of Symbol 476 MovieClip in Symbol 479 MovieClip Frame 1
onClipEvent (load) {
if (_root.game_lang != 0) {
_visible = false;
}
}
Instance of Symbol 478 MovieClip in Symbol 479 MovieClip Frame 1
onClipEvent (load) {
if (_root.game_lang != 1) {
_visible = false;
}
}
Instance of Symbol 470 MovieClip "Reload" in Symbol 479 MovieClip Frame 1
onClipEvent (load) {
this._parent.Button.enabled = false;
}
onClipEvent (enterFrame) {
if (_root.b_pause == true) {
return(undefined);
}
if (this._yscale > 0) {
this._yscale = this._yscale - _root.spell_reloading_2;
if (this._yscale < 0) {
this._yscale = 0;
}
if (this._yscale > 100) {
this._yscale = 100;
}
if (this._yscale == 0) {
_root.ActivateSpellEffect2._visible = true;
_root.ActivateSpellEffect2.gotoAndPlay(2);
}
} else {
this._parent.Button.enabled = true;
}
}
Symbol 480 Button
on (press) {
_root.ActivateSpell3();
}
Instance of Symbol 482 MovieClip in Symbol 485 MovieClip Frame 1
onClipEvent (load) {
if (_root.game_lang != 0) {
_visible = false;
}
}
Instance of Symbol 484 MovieClip in Symbol 485 MovieClip Frame 1
onClipEvent (load) {
if (_root.game_lang != 1) {
_visible = false;
}
}
Instance of Symbol 470 MovieClip "Reload" in Symbol 485 MovieClip Frame 1
onClipEvent (load) {
this._parent.Button.enabled = false;
}
onClipEvent (enterFrame) {
if (_root.b_pause == true) {
return(undefined);
}
if (this._yscale > 0) {
this._yscale = this._yscale - _root.spell_reloading_3;
if (this._yscale < 0) {
this._yscale = 0;
}
if (this._yscale > 100) {
this._yscale = 100;
}
if (this._yscale == 0) {
_root.ActivateSpellEffect3._visible = true;
_root.ActivateSpellEffect3.gotoAndPlay(2);
}
} else {
this._parent.Button.enabled = true;
}
}
Symbol 498 MovieClip [GameLevelClip] Frame 1
#initclip 20
Object.registerClass("GameLevelClip", lang);
#endinitclip
Symbol 502 MovieClip Frame 1
stop();
this._visible = false;
Symbol 502 MovieClip Frame 2
if (_root.b_sound_on) {
_root.SoundSpell.start(0, 1);
}
Symbol 508 MovieClip [ComboStatic] Frame 1
#initclip 16
Object.registerClass("ComboStatic", lang);
#endinitclip
Symbol 509 MovieClip Frame 1
stop();
this._visible = false;
Symbol 514 MovieClip Frame 1
stop();
Symbol 528 Button
on (press) {
var need_money = _root.m_upgrades.m_bzz_num_cost[_root.m_upgrades.m_bzz_num_i];
if (_root.AddHoney(-need_money)) {
_root.m_upgrades.m_bzz_num_i++;
_root.UpdateUpgrades();
}
}
Instance of Symbol 530 MovieClip in Symbol 533 MovieClip Frame 1
onClipEvent (load) {
if (_root.game_lang != 0) {
_visible = false;
}
}
Instance of Symbol 532 MovieClip in Symbol 533 MovieClip Frame 1
onClipEvent (load) {
if (_root.game_lang != 1) {
_visible = false;
}
}
Symbol 545 Button
on (press) {
_root.AddFinalHoneyBonus();
_root.Statistika._visible = false;
_root.gotoAndStop("Upgrade");
}
Symbol 554 MovieClip [StText2] Frame 1
#initclip 17
Object.registerClass("StText2", lang);
#endinitclip
Symbol 559 MovieClip [StText3] Frame 1
#initclip 18
Object.registerClass("StText3", lang);
#endinitclip
Symbol 564 MovieClip [StText4] Frame 1
#initclip 19
Object.registerClass("StText4", lang);
#endinitclip
Symbol 569 Button
on (press) {
var need_money = _root.m_upgrades.m_bzz_attack_cost[_root.m_upgrades.m_bzz_attack_i];
if (_root.AddHoney(-need_money)) {
_root.m_upgrades.m_bzz_attack_i++;
_root.UpdateUpgrades();
}
}
Symbol 570 Button
on (press) {
var need_money = _root.m_upgrades.m_bzz_speed_cost[_root.m_upgrades.m_bzz_speed_i];
if (_root.AddHoney(-need_money)) {
_root.m_upgrades.m_bzz_speed_i++;
_root.UpdateUpgrades();
}
}
Symbol 582 MovieClip [BzzUpgradeClip] Frame 1
#initclip 25
Object.registerClass("BzzUpgradeClip", lang);
#endinitclip
Symbol 584 Button
on (press) {
SaveData();
_root.b_InUpgradeScreen = false;
_root.gotoAndStop("Game");
}
Symbol 585 Button
on (press) {
var need_money = _root.m_upgrades.m_pig_attack_cost[_root.m_upgrades.m_pig_attack_i];
if (_root.AddHoney(-need_money)) {
_root.m_upgrades.m_pig_attack_i++;
_root.UpdateUpgrades();
}
}
Symbol 586 Button
on (press) {
var need_money = _root.m_upgrades.m_pig_num_cost[_root.m_upgrades.m_pig_num_i];
if (_root.AddHoney(-need_money)) {
_root.m_upgrades.m_pig_num_i++;
_root.UpdateUpgrades();
}
}
Symbol 587 Button
on (press) {
var need_money = _root.m_upgrades.m_pig_speed_cost[_root.m_upgrades.m_pig_speed_i];
if (_root.AddHoney(-need_money)) {
_root.m_upgrades.m_pig_speed_i++;
_root.UpdateUpgrades();
}
}
Symbol 598 MovieClip [WeaponUpgradeClip] Frame 1
#initclip 21
Object.registerClass("WeaponUpgradeClip", lang);
#endinitclip
Symbol 604 MovieClip [PlayTextClip] Frame 1
#initclip 22
Object.registerClass("PlayTextClip", lang);
#endinitclip
Symbol 606 Button
on (press) {
var need_money = (1000 - _root.m_bzz_health);
if (_root.AddHoney(-need_money)) {
_root.m_bzz_health = 1000;
_root.BzzHealthBar.Text = _root.m_bzz_health;
_root.UpdateUpgrades();
_root.UpdateUley();
}
}
Symbol 623 MovieClip [UpgrLevelTextClip] Frame 1
#initclip 23
Object.registerClass("UpgrLevelTextClip", lang);
#endinitclip
Symbol 628 MovieClip [UpgrCostTextClip] Frame 1
#initclip 24
Object.registerClass("UpgrCostTextClip", lang);
#endinitclip
Symbol 632 Button
on (press) {
if (_root.m_upgrades.m_spell1_cost[_root.m_upgrades.m_spell1_i] == undefined) {
return(undefined);
}
var need_money = _root.m_upgrades.m_spell1_cost[_root.m_upgrades.m_spell1_i];
if (_root.AddHoney(-need_money)) {
_root.m_upgrades.m_spell1_i++;
_root.UpgradeSpell1.onRollOver();
}
}
Symbol 633 Button
on (press) {
if (_root.m_upgrades.m_spell2_cost[_root.m_upgrades.m_spell2_i] == undefined) {
return(undefined);
}
var need_money = _root.m_upgrades.m_spell2_cost[_root.m_upgrades.m_spell2_i];
if (_root.AddHoney(-need_money)) {
_root.m_upgrades.m_spell2_i++;
_root.UpgradeSpell2.onRollOver();
}
}
Symbol 634 Button
on (press) {
if (_root.m_upgrades.m_spell3_cost[_root.m_upgrades.m_spell3_i] == undefined) {
return(undefined);
}
var need_money = _root.m_upgrades.m_spell3_cost[_root.m_upgrades.m_spell3_i];
if (_root.AddHoney(-need_money)) {
_root.m_upgrades.m_spell3_i++;
_root.UpgradeSpell3.onRollOver();
}
}
Symbol 648 MovieClip [CreditsTextClip] Frame 1
#initclip 27
Object.registerClass("CreditsTextClip", lang);
#endinitclip
Symbol 651 Button
on (press) {
_root.gotoAndStop("Loading");
}
Symbol 656 MovieClip [BackTextClip] Frame 1
#initclip 26
Object.registerClass("BackTextClip", lang);
#endinitclip
Symbol 660 MovieClip [VictoryClip] Frame 1
#initclip 28
Object.registerClass("VictoryClip", lang);
#endinitclip
Symbol 664 MovieClip [LooserClip] Frame 1
#initclip 29
Object.registerClass("LooserClip", lang);
#endinitclip
Symbol 669 MovieClip Frame 30
_root.gotoAndStop("Scene1");
Symbol 675 MovieClip Frame 1
string5 = _root.string5;
Symbol 675 MovieClip Frame 65
_root.gotoAndStop("Scene2");
Symbol 676 Button
on (press) {
_root.Voice1.stop();
_root.Voice2.stop();
_root.Voice3.stop();
_root.gotoAndStop("Game");
}
Symbol 681 MovieClip [IntroSkipClip] Frame 1
#initclip 30
Object.registerClass("IntroSkipClip", lang);
#endinitclip
Symbol 687 MovieClip Frame 1
string6 = _root.string6;
Symbol 687 MovieClip Frame 90
string6 = _root.string6;
_root.gotoAndStop("Scene3");
Symbol 696 MovieClip [Tween 18] Frame 1
#initclip 32
Object.registerClass("Tween 18", lang);
#endinitclip
Symbol 706 MovieClip [Tween 20] Frame 1
#initclip 31
Object.registerClass("Tween 20", lang);
#endinitclip
Symbol 707 MovieClip Frame 1
string7 = _root.string7;
string8 = _root.string8;
Symbol 707 MovieClip Frame 164
_root.gotoAndStop("Scene4");
Symbol 709 MovieClip Frame 14
_root.gotoAndStop("Scene5");
Symbol 715 MovieClip [Symbol 7 copy] Frame 1
#initclip 34
Object.registerClass("Symbol 7 copy", lang);
#endinitclip
Symbol 720 MovieClip [Tween 16] Frame 1
#initclip 33
Object.registerClass("Tween 16", lang);
#endinitclip
Symbol 728 MovieClip Frame 1
string9Clip.string9 = _root.string9;
string10Clip.string10 = _root.string10;
string11 = _root.string11;
string12 = _root.string12;
string13 = _root.string13;
Symbol 728 MovieClip Frame 31
string10Clip.string10 = _root.string10;
Symbol 728 MovieClip Frame 180
_root.gotoAndStop("Game");
Symbol 735 Button
on (press) {
_root.gotoAndStop("Loading");
}
Symbol 748 Button
on (release) {
getURL (_root.SCORESPATH, "_blank");
}
Symbol 752 MovieClip Frame 1
loadMovie ("http://www.blitzgamer.com/blitz_HighScores/encrypted.swf", this);
this._alpha = 0;
Symbol 755 Button
on (release) {
getURL ("http://www.blitzgamer.com/?gameref=honeydefense", "_blank");
}