[Tools][Expand/Collapse All]Note that automatic extraction of ActionScript 3 is still pretty much unsupported by swfchan. AS1/AS2 works okay most of the time.Frame 2 (14.09 KiB) ● ●
function create_game() {
if ((_root.DIFFICULTY > 3) && (_root.DIFFICULTY < 27)) {
_root.game_running = 0;
removeMovieClip("player_field");
var difficulty = _root.DIFFICULTY;
var random_diff = new Number();
random_diff = 1 / difficulty;
var mrrandom = new Number();
mrrandom = 0;
var chosen = new Number();
var i;
var a;
i = 0;
while (i < 26) {
finished = 1;
chosen = _root.ColArray.length - 1;
while ((chosen >= 0) && (finished)) {
mrrandom = Math.random();
if ((mrrandom <= (1 / _root.ColArray.length)) || (chosen == 0)) {
if (_root.black_and_white == 1) {
_root.ChosenColArray[i] = _root.BWColArray[chosen];
} else {
_root.ChosenColArray[i] = _root.ColArray[chosen];
}
finished = 0;
alreadychosencount = 0;
alreadychosen = 0;
while ((alreadychosencount < i) && (alreadychosen == 0)) {
if (_root.ChosenColArray[alreadychosencount] == _root.ChosenColArray[i]) {
alreadychosen = 1;
finished = 1;
chosen = _root.ColArray.length - 1;
}
alreadychosencount++;
}
}
chosen--;
}
i++;
}
_root.game_creation = 1;
_root.al_game_creation = 1;
if (_root.hard_mode == 1) {
i = 0;
while (i < 25) {
removeMovieClip(i);
_root.HITBUTTON.duplicateMovieClip(i, setDepth());
chosen = difficulty - 1;
finished = 1;
while ((chosen >= 0) && (finished)) {
mrrandom = Math.random();
if ((mrrandom <= random_diff) || (chosen == 0)) {
_root.PicArray[i] = chosen;
finished = 0;
}
chosen--;
}
i++;
}
} else {
easy_letters = _root.difficulty;
if (easy_letters <= 5) {
easy_letters = 6;
}
chosen = 0;
i = 0;
while (i < 25) {
removeMovieClip(i);
_root.HITBUTTON.duplicateMovieClip(i, setDepth());
_root.PicArray[i] = chosen;
chosen++;
if (chosen > easy_letters) {
chosen = 0;
}
i++;
}
}
i = i;
while (i < 50) {
removeMovieClip("alpha" + i);
_root.alphabeto.duplicateMovieClip("alpha" + i, setDepth());
i++;
}
createdworms = 0;
tobecreated = Math.floor(difficulty / 2);
_root.phabwormsleft = tobecreated;
a = 0;
while (a < 25) {
removeMovieClip("phabworm" + a);
_root.PhabArray[a] = 0;
a++;
}
while (createdworms < tobecreated) {
mrrandom = Math.floor(Math.random() * 25);
if ((_root.PhabArray[mrrandom] != 1) && (mrrandom != 22)) {
_root.PhabArray[mrrandom] = 1;
createdworms++;
i++;
removeMovieClip("phabworm" + mrrandom);
_root.phabetwormprot.duplicateMovieClip("phabworm" + mrrandom, setDepth());
}
}
_root.activefield = 22;
i = 0;
while (i < int(_root.difficulty / (5 - (_root.hard_mode * 3)))) {
removeMovieClip("fire_copy" + i);
_root.fire_prot.duplicateMovieClip("fire_copy" + i, setDepth());
i++;
}
_root.shop_on_field_prot.swapDepths(setDepth());
_root.phaboulette_on_field_prot.swapDepths(setDepth());
_root.phab_tries = 15;
_root.inshop = 0;
_root.health = Number(_root.health) + Number(5 * difficulty);
if (_root.health > _root.max_health) {
_root.health = _root.max_health;
}
_root.player.duplicateMovieClip("player_field", setDepth());
_root.player_field.gotoAndPlay((_root.story_mode * 40) + 1);
_root.player_field._x = 185;
_root.player_field._y = 285;
_root.previousfield = -1;
_root.game_running = 1;
if (_root.fields_touched >= 25) {
_root.cash = _root.cash + (10 * _root.difficulty);
_root.field_bonus_movie.swapDepths(setDepth());
_root.field_bonus_movie.play();
fieldbonussound = new Sound();
fieldbonussound.attachSound("simple_puzzle_field_bonus");
fieldbonussound.start();
_root["statistic_field_bonus" + Number(_root.difficulty - 1)] = 1;
}
_root.fields_touched = 0;
_root.BeenThere = ["0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0", "0"];
if (_root.difficulty > 5) {
if (_root["statistic_worm_battle_hits" + Number(_root.difficulty - 1)] == 0) {
_root["statistic_perfect_wormbattles" + Number(_root.difficulty - 1)] = 1;
}
if (_root["statistic_phaboulette_oops" + Number(_root.difficulty - 1)] == 0) {
if (((((_root["statistic_phaboulette_okay" + Number(_root.difficulty - 1)] + _root["statistic_phaboulette_nice" + Number(_root.difficulty - 1)]) + _root["statistic_phaboulette_wow" + Number(_root.difficulty - 1)]) + _root["statistic_phaboulette_boom" + Number(_root.difficulty - 1)]) + _root["statistic_phaboulette_o_o" + Number(_root.difficulty - 1)]) >= 15) {
_root["statistic_perfect_phaboulette" + Number(_root.difficulty - 1)] = 1;
}
}
}
_root["statistic_field_bonus" + Number(_root.difficulty)] = 0;
_root["statistic_fire_hits" + Number(_root.difficulty)] = 0;
_root["statistic_wasders_used" + Number(_root.difficulty)] = 0;
_root["statistic_worm_battle_time" + Number(_root.difficulty)] = 0;
_root["statistic_jokers_used" + Number(_root.difficulty)] = 0;
_root["statistic_worm_battle_hits" + Number(_root.difficulty)] = 0;
_root["statistic_perfect_wormbattles" + Number(_root.difficulty)] = 0;
_root["statistic_perfect_phaboulette" + Number(_root.difficulty)] = 0;
_root["statistic_phaboulette_oops" + Number(_root.difficulty)] = 0;
_root["statistic_phaboulette_okay" + Number(_root.difficulty)] = 0;
_root["statistic_phaboulette_nice" + Number(_root.difficulty)] = 0;
_root["statistic_phaboulette_wow" + Number(_root.difficulty)] = 0;
_root["statistic_phaboulette_boom" + Number(_root.difficulty)] = 0;
_root["statistic_phaboulette_o_o" + Number(_root.difficulty)] = 0;
_level0.view_statistics.swapDepths(setDepth());
if (_root.DIFFICULTY > 5) {
levelupsound = new Sound();
levelupsound.attachSound("simple_puzzle_levelup");
levelupsound.start();
_root.level_up_movie.swapDepths(setDepth());
_root.level_up_movie.play();
}
} else if (_root.DIFFICULTY > 26) {
_root.game_over = 1;
}
}
function start_worm_attack() {
_root.fader.duplicateMovieClip("realfader", setDepth());
_root.realfader._x = -5;
_root.realfader._y = -5;
_root.realfader._xscale = 840;
_root.realfader._yscale = 840;
_root.worm_previous_letter = 0;
_root.stats_worm_timer = 0;
_root.phabetwormfight = 1;
worm_copies = 5;
worm_speed = _root.DIFFICULTY * 2;
i = 0;
while (i < _root.difficulty) {
if (Math.random() > 0.7) {
_root.money_prot.duplicateMovieClip("money_copy" + i, setDepth());
_root["money_copy" + i]._x = Math.random() * 400;
_root["money_copy" + i]._y = 40 + (Math.random() * 300);
}
if (Math.random() > 0.6) {
_root.health_prot.duplicateMovieClip("health_copy" + i, setDepth());
_root["health_copy" + i]._x = Math.random() * 400;
_root["health_copy" + i]._y = 40 + (Math.random() * 300);
}
i++;
}
worm = 0;
while (worm < worm_copies) {
_root.worm_alpha.duplicateMovieClip("worm_copy" + worm, setDepth());
worm++;
}
_root.worm_copy0.swapDepths(setDepth());
_root.active_phabworm_prot.duplicateMovieClip("active_phabworm_copy", setDepth());
_root.player_graph.duplicateMovieClip("worm_player", setDepth());
_root.worm_player._x = 200;
_root.worm_player._y = 200;
_root.active_worm = 0;
_root.active_worm_x = 0;
_root.active_worm_y = 0;
_root.active_worm_winkel = 0;
_level0.HUD_DISPLAY.swapDepths(setDepth());
_level0.HUD_DISPLAY._alpha = 65;
}
function end_worm_attack() {
realfader.play();
_root["statistic_worm_battle_time" + Number(_root.difficulty)] = _root["statistic_worm_battle_time" + Number(_root.difficulty)] + Number(int(_root.stats_worm_timer / 20));
_root.phabwormsleft--;
removeMovieClip("phabworm" + _root.activefield);
removeMovieClip("active_phabworm_copy");
_root.PhabArray[_root.activefield] = 0;
_root.phabetwormfight = 0;
wormwin = new Sound();
wormwin.attachSound("simple_puzzle_worm_win");
wormwin.start();
_level0.HUD_DISPLAY._alpha = 100;
}
function show_selection(sel_x, sel_y) {
if (!_root[("selection" + sel_x) + sel_y]) {
levelupsound = new Sound();
levelupsound.attachSound("simple_puzzle_selection");
levelupsound.start();
_root.selection_prot.duplicateMovieClip(("selection" + sel_x) + sel_y, setDepth());
_root[("selection" + sel_x) + sel_y]._x = sel_x;
_root[("selection" + sel_x) + sel_y]._y = sel_y;
}
}
function show_error_message(set_err_mess) {
_root.err_mess = String(set_err_mess);
_root.error_message.gotoAndPlay(2);
_root.error_message.swapDepths(setDepth());
}
function get_total_score(of_what) {
total = 0;
i = 5;
while (i < 27) {
total = total + Number(_root[of_what + i]);
i++;
}
return(total);
}
function string_check(to_check, no_numbers) {
allowed = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
if (no_numbers == 1) {
allowed = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
}
splitcheck = to_check.split("");
stringisokay = 1;
i = 0;
while (i < splitcheck.length) {
if (allowed.indexOf(splitcheck[i]) == -1) {
stringisokay = 0;
}
i++;
}
return(stringisokay);
}
function string_different_chars(to_check) {
different_chars = 0;
check_word = "";
splitted = to_check.split("");
i = 0;
while (i < splitted.length) {
if (check_word.indexOf(splitted[i]) == -1) {
different_chars++;
}
check_word = check_word + splitted[i];
i++;
}
return(different_chars);
}
Stage.showMenu = false;
_focusrect = false;
stop();
_global.globalDepth = 100000 /* 0x0186A0 */;
_global.setDepth = function () {
return(globalDepth++);
};
var pl_up = new Number(0);
var pl_down = new Number(0);
var pl_left = new Number(0);
var pl_right = new Number(0);
var BeenThere = new Array();
var PhabArray = new Array();
var KeyArray = new Array();
KeyArray = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"];
var ColArray = new Array();
ColArray = ["8A2BE2", "5F9EA0", "6495ED", "FF8C00", "8FBC8F", "FFFAF0", "FFD700", "808080", "ADFF2F", "ADD8E6", "800000", "191970", "9ACD32", "4169E1", "6A5ACD", "00FF7F", "696969", "008000", "4D5BDD", "B3DDB3", "B0B1E0", "FA7E7E", "F7F8A0", "AE02B0", "01D3D1", "6569FF", "B2B2C6"];
var BWColArray = new Array();
BWColArray = ["E2E2E2", "D9D9D9", "CCCCCC", "C8C8C8", "BEBEBE", "B4B4B4", "ADADAD", "A4A4A4", "989898", "909090", "848484", "767676", "6A6A6A", "676767", "5B5B5B", "C5CBCB", "D4D8D8", "BABEBE", "B1B7B7", "A7AFAF", "A0A8A8", "999F9F", "848E8D", "7A8685", "747C7C", "6F7777", "F9FBFB"];
var LibraryArr = new Array();
LibraryArr = ["definitely", "loser", "altogether", "existence", "obligatory", "ridiculous", "jealous", "standard", "awful", "intelligent", "something", "laboratory", "although", "you", "indifferent", "pedant", "indolent", "theory", "harassment", "suggestion", "surprise", "fast", "alphabet", "muddasheep", "spectacular", "cursor", "freedom", "seizure", "absence", "irregular", "irrelevant", "invaders", "emotion", "hopeless", "wireless", "fighter", "rogue", "impolite", "address", "sense", "actually", "basically", "eventually", "technically", "tree", "space", "gameboy", "playstation", "sonic", "advance", "surprisingly", "hopefully", "shakespeare", "history", "glory", "tissue", "coffee", "irresponsible", "masterpiece", "guybrush", "threepwood", "universe", "waterfall", "suffering", "entertainment", "responsibility", "ability", "rectangular", "triangular", "amazing", "egoistic", "altruistic", "fashion", "passion", "google", "newgrounds", "especially", "compatibility", "common", "shape", "calculator", "spectator", "nothing", "endless", "boredom", "lyrics", "poem", "story", "feature", "basement", "sometimes", "word", "hello", "randomness", "purpose", "dragon", "emptiness", "automatically", "ironically", "partially", "conversion", "increase", "decrease", "hollow", "divinity", "astrology", "comic", "cosmic", "speech", "peach", "peek", "disgrace", "panic", "kingdom", "mobile", "unusual", "transporter", "transformer", "teenager", "immature", "princess", "artistic", "influence", "bookstore", "musicstore", "captain", "illusion", "pirate", "secondary", "primary", "microphone", "minimize", "maximize", "revise", "mushroom", "imperfect", "present", "future", "purity", "pledge", "variable", "laughter", "slaughter", "katana", "verbally", "congenial", "complicated", "easily", "freeze", "approximately"];
var play_music = 1;
var PicArray = new Array();
var ChosenColArray = new Array();
var game_running = 0;
var phabetwormfight = 0;
var inshop = 0;
var game_over = 0;
var phabwormsleft = 0;
var create_x = 75;
var create_y = 75;
var game_creation = 0;
var al_create_x = 100;
var al_create_y = 100;
var al_game_creation = 0;
var nextcheck = 1;
var activefield = new Number(-1);
var previousfield = new Number(-1);
var stored_data = sharedobject.getLocal("phabetal");
if (_root.stored_data.data.Library == undefined) {
_root.stored_data.data.Library = new Array();
_root.stored_data.data.Library = LibraryArr;
_root.stored_data.flush();
}
if (_root.stored_data.data.username == undefined) {
_root.stored_data.data.likes_music = 1;
_root.stored_data.data.total_score = 0;
_root.stored_data.flush();
}
var black_and_white = 0;
var story_mode = 0;
var hard_mode = 0;
_root.phabetwormprot._visible = false;
_root.alphabeto._visible = false;
_root.HITBUTTON._visible = false;
_root.player._visible = false;
_root.player_graph._visible = false;
_root.fader._visible = false;
_root.money_plus_one_prot._visible = false;
_root.fire_prot._visible = false;
_root.fire_expl_prot._visible = false;
_root.worm_pl_rem_prot._visible = false;
_root.money_prot._visible = false;
_root.health_prot._visible = false;
_root.phab_alpha_prot._visible = false;
_root.selection_prot._visible = false;
_root.view_statistics._visible = false;
_root.worm_alpha._visible = false;
_root.active_phabworm_prot._visible = false;
_root.worm_pl_attack_prot._visible = false;
_root.worm_pl_tile_prot._visible = false;
_root.debug = "DIFF:" + string_different_chars("you");
Instance of Symbol 88 MovieClip "HUD_DISPLAY" in Frame 2 (99 B)
on (press) {
if (_root.game_running == 1) {
startDrag (this);
}
}
on (release) {
stopDrag();
}
Instance of Symbol 91 MovieClip "HITBUTTON" in Frame 2 (1.19 KiB) ●
onClipEvent (load) {
is_changing = 0;
var controlnumber = _root.PicArray[_name];
if (_root.game_creation == 1) {
this._x = _root.create_x;
this._y = _root.create_y;
_root.create_x = _root.create_x + 50;
if (_root.create_x > 275) {
_root.create_x = 75;
_root.create_y = _root.create_y + 50;
}
if (_root.create_y > 275) {
_root.create_x = 75;
_root.create_y = 75;
_root.game_creation = 0;
}
myColor = new Color(this);
myColor.setRGB("0x" + _root.ChosenColArray[_root.PicArray[_name]]);
}
}
onClipEvent (enterFrame) {
if (_root.game_over) {
removeMovieClip(this);
}
if (controlnumber != _root.PicArray[_name]) {
myColor.setRGB("0x" + _root.ChosenColArray[_root.PicArray[_name]]);
controlnumber = _root.PicArray[_name];
}
if (this.hitTest(_root.player_field)) {
_root.activefield = Number(_name);
}
if ((_root.activefield == Number(_name)) || ((((_root.pl_up == Number(_name)) || (_root.pl_down == Number(_name))) || (_root.pl_left == Number(_name))) || (_root.pl_right == Number(_name)))) {
if (is_changing == 0) {
setProperty(this, _alpha , 30);
is_changing = 1;
}
} else if (is_changing == 1) {
is_changing = 0;
setProperty(this, _alpha , 100);
}
}
Instance of Symbol 119 MovieClip "player" in Frame 2 (4.07 KiB) ●
onClipEvent (load) {
var ComparArr = new Array();
player_sound = new Sound();
player_sound.attachSound("simple_puzzle_mainmove");
}
onClipEvent (enterFrame) {
if (_root.game_over) {
removeMovieClip(this);
}
if ((_root.activefield - 5) >= 0) {
_root.pl_up = _root.activefield - 5;
} else {
_root.pl_up = -1;
}
if ((_root.activefield + 5) < 25) {
_root.pl_down = _root.activefield + 5;
} else {
_root.pl_down = -1;
}
if (((((((_root.activefield - 1) != 4) && ((_root.activefield - 1) > -1)) && ((_root.activefield - 1) != 9)) && ((_root.activefield - 1) != 14)) && ((_root.activefield - 1) != 19)) && ((_root.activefield - 1) != 24)) {
_root.pl_left = _root.activefield - 1;
} else {
_root.pl_left = -1;
}
if ((((((_root.activefield + 1) != 5) && ((_root.activefield + 1) != 10)) && ((_root.activefield + 1) != 15)) && ((_root.activefield + 1) != 20)) && ((_root.activefield + 1) != 25)) {
_root.pl_right = _root.activefield;
_root.pl_right++;
} else {
_root.pl_right = -1;
}
if (((_root.nextcheck <= 0) && (_root.phabetwormfight == 0)) && (_root.inshop == 0)) {
if (Key.isDown(32) && (_root.wasders > 0)) {
if (((((_root.PicArray[_root.pl_up] != 22) && (_root.pl_up > -1)) || ((_root.PicArray[_root.pl_left] != 0) && (_root.pl_left > -1))) || ((_root.PicArray[_root.pl_down] != 18) && (_root.pl_down > -1))) || ((_root.PicArray[_root.pl_right] != 3) && (_root.pl_right > -1))) {
_root.PicArray[_root.pl_up] = 22;
_root.PicArray[_root.pl_left] = 0;
_root.PicArray[_root.pl_down] = 18;
_root.PicArray[_root.pl_right] = 3;
_root.wasders = Number(_root.wasders) - 1;
_root["statistic_wasders_used" + Number(_root.difficulty)] = _root["statistic_wasders_used" + Number(_root.difficulty)] + 1;
}
}
if ((Key.isDown(Key.getCode()) && (Key.getAscii() == (_root.PicArray[_root.pl_up] + 97))) && (_root.pl_up > -1)) {
_root.player_field._y = _root.player_field._y - 50;
_root.nextcheck = 5;
} else if ((Key.isDown(Key.getCode()) && (Key.getAscii() == (_root.PicArray[_root.pl_down] + 97))) && (_root.pl_down > -1)) {
_root.player_field._y = _root.player_field._y + 50;
_root.nextcheck = 5;
} else if ((Key.isDown(Key.getCode()) && (Key.getAscii() == (_root.PicArray[_root.pl_left] + 97))) && (_root.pl_left > -1)) {
_root.player_field._x = _root.player_field._x - 50;
_root.nextcheck = 5;
} else if ((Key.isDown(Key.getCode()) && (Key.getAscii() == (_root.PicArray[_root.pl_right] + 97))) && (_root.pl_right > -1)) {
_root.player_field._x = _root.player_field._x + 50;
_root.nextcheck = 5;
} else {
_root.nextcheck = 0;
}
} else {
_root.nextcheck--;
if (_root.phabetwormfight == 1) {
_root.nextcheck = 28;
}
}
if ((_root.previousfield != _root.activefield) && (_root.game_running)) {
player_sound.start();
ComparArr = [_root.pl_up, _root.pl_down, _root.pl_left, _root.pl_right];
i = 0;
while (i < ComparArr.length) {
a = 0;
while (a < ComparArr.length) {
if ((ComparArr[i] > -1) && (ComparArr[a] > -1)) {
if ((i != a) && (Number(_root.PicArray[ComparArr[i]]) == Number(_root.PicArray[ComparArr[a]]))) {
_root.PicArray[ComparArr[i]] = Math.floor(Math.random() * _root.DIFFICULTY);
i = 0;
}
}
a++;
}
i++;
}
_root.previousfield = _root.activefield;
}
if (((_root.BeenThere[_root.activefield] != 1) && (_root.game_running == 1)) && (_root.activefield > -1)) {
field_discover_sound = new Sound();
field_discover_sound.attachSound("simple_puzzle_field_discover");
field_discover_sound.start();
_root.CASH++;
_root.BeenThere[_root.activefield] = 1;
_root.fields_touched++;
_root.money_plus_one_prot.duplicateMovieClip("money_up" + _root.activefield, setDepth());
_root["money_up" + _root.activefield]._x = _root.player_field._x + 10;
_root["money_up" + _root.activefield]._y = _root.player_field._y;
}
}
Instance of Symbol 146 MovieClip "alphabeto" in Frame 2 (830 B)
onClipEvent (load) {
if (_root.al_game_creation == 1) {
this._x = _root.al_create_x;
this._y = _root.al_create_y;
_root.al_create_x = _root.al_create_x + 50;
if (_root.al_create_x > 300) {
_root.al_create_x = 100;
_root.al_create_y = _root.al_create_y + 50;
}
if (_root.al_create_y > 300) {
_root.al_create_x = 100;
_root.al_create_y = 100;
_root.al_game_creation = 0;
}
var splitname = _name.split("ha");
splitname[1] = splitname[1] - 25;
this.gotoAndPlay(_root.PicArray[splitname[1]] + 1);
var controlnumber = _root.PicArray[splitname[1]];
}
}
onClipEvent (enterFrame) {
if (_root.game_over) {
removeMovieClip(this);
}
if (controlnumber != _root.PicArray[splitname[1]]) {
this.gotoAndPlay(_root.PicArray[splitname[1]] + 1);
controlnumber = _root.PicArray[splitname[1]];
}
}
Instance of Symbol 148 MovieClip in Frame 2 (1.62 KiB) ●
onClipEvent (load) {
newSound = new Sound();
newSound.attachSound("simple_puzzle_music");
music_is_playing = 0;
quality_set = 0;
next_check = 5;
if ((_root.stored_data.data.likes_music == 1) && (_root.game_running == 1)) {
newSound.start(0, 999999999);
music_is_playing = 1;
}
}
onClipEvent (enterFrame) {
_root.show_phabs_left = _root.phabwormsleft;
if (((_root.game_running == 1) && (music_is_playing == 0)) && (_root.stored_data.data.likes_music == 1)) {
newSound.start(0, 999999999);
music_is_playing = 1;
} else if ((_root.game_running == 0) && (music_is_playing == 1)) {
newSound.stop();
music_is_playing = 0;
} else if (_root.game_running == 1) {
if (next_check <= 0) {
next_check = 5;
if (Key.isDown(35) && (music_is_playing == 0)) {
newSound.start(0, 999999999);
music_is_playing = 1;
_root.stored_data.data.likes_music = 1;
} else if (Key.isDown(35) && (music_is_playing == 1)) {
newSound.stop();
music_is_playing = 0;
_root.stored_data.data.likes_music = 0;
} else {
next_check = 0;
}
} else {
next_check--;
}
}
if (_root.health <= 0) {
_root.game_over = 1;
}
if ((_root.game_running == 1) && (_root.phabwormsleft == 0)) {
_root.DIFFICULTY++;
_root.create_game();
}
if ((((_root.game_running == 1) && (Key.isDown(Key.getCode()))) && (Key.getAscii() >= 65)) && (Key.getAscii() <= 90)) {
_root.show_error_message("Watch out!\nYou're writing in all caps!\nPhabetal doesn't like that!");
}
_root.debug = (((_root._xmouse + " ") + _root._ymouse) + " ") + Key.getAscii();
}
Instance of Symbol 151 MovieClip "phabetwormprot" in Frame 2 (1.51 KiB) ●
onClipEvent (load) {
var splitname = _name.split("worm");
var controlname = splitname[1];
if (_name.indexOf("prot") == -1) {
splitname[1]++;
_x = 100;
_y = 115;
if (((((splitname[1] == 2) || (splitname[1] == 7)) || (splitname[1] == 12)) || (splitname[1] == 17)) || (splitname[1] == 22)) {
_x = (_x + 50);
} else if (((((splitname[1] == 3) || (splitname[1] == 8)) || (splitname[1] == 13)) || (splitname[1] == 18)) || (splitname[1] == 23)) {
_x = (_x + 100);
} else if (((((splitname[1] == 4) || (splitname[1] == 9)) || (splitname[1] == 14)) || (splitname[1] == 19)) || (splitname[1] == 24)) {
_x = (_x + 150);
} else if (((((splitname[1] == 5) || (splitname[1] == 10)) || (splitname[1] == 15)) || (splitname[1] == 20)) || (splitname[1] == 25)) {
_x = (_x + 200);
}
if ((splitname[1] >= 6) && (splitname[1] <= 10)) {
_y = (_y + 50);
} else if ((splitname[1] >= 11) && (splitname[1] <= 15)) {
_y = (_y + 100);
} else if ((splitname[1] >= 16) && (splitname[1] <= 20)) {
_y = (_y + 150);
} else if ((splitname[1] >= 21) && (splitname[1] <= 25)) {
_y = (_y + 200);
}
this.gotoandPlay(Math.round(Math.random() * _totalframes));
}
}
onClipEvent (enterFrame) {
if (_root.game_over) {
removeMovieClip(this);
}
if (_root.PhabArray[controlname] == 0) {
removeMovieClip(this);
}
if ((hitTest(_root.player_field) && (_root.phabetwormfight == 0)) && (_root.game_running == 1)) {
_root.start_worm_attack();
}
}
Instance of Symbol 153 MovieClip "player_graph" in Frame 2 (682 B)
onClipEvent (enterFrame) {
if (_name.indexOf("worm") > -1) {
if (_root.health <= 0) {
_root.phabetwormfight = 0;
_root.game_over = 1;
removeMovieClip(this);
}
if (_root.active_worm >= 5) {
_root.end_worm_attack();
removeMovieClip(this);
}
if (_root.inshop == 0) {
if (Key.isDown(38) && (_y >= 15)) {
_y = (_y - 10);
}
if (Key.isDown(37) && (_x >= 15)) {
_x = (_x - 10);
}
if (Key.isDown(39) && (_x <= 400)) {
_x = (_x + 10);
}
if (Key.isDown(40) && (_y <= 400)) {
_y = (_y + 10);
}
}
_rotation = _root.active_worm_winkel;
_root.stats_worm_timer++;
}
}
Instance of Symbol 77 MovieClip "worm_alpha" in Frame 2 (3.98 KiB) ●
onClipEvent (load) {
if (_name.indexOf("copy") > -1) {
its_a_copy = 1;
}
if (its_a_copy == 1) {
setspeed = 26 / _root.DIFFICULTY;
splitname = _name.split("copy");
speed = splitname[1] + 1;
hit = 0;
letter = Math.round(Math.random() * _root.DIFFICULTY);
if (splitname[1] > 0) {
while ((letter == _root.worm_previous_letter) || (letter == 0)) {
letter = Math.round(Math.random() * _root.DIFFICULTY);
}
}
if (letter == 0) {
letter = 1;
}
_root.worm_previous_letter = letter;
this.gotoAndStop(letter);
if (Math.random() > 0.5) {
_x = -25;
_y = 20;
} else if (Math.random() > 0.5) {
_x = -25;
_y = 425;
} else if (Math.random() > 0.5) {
_x = 425;
_y = 425;
} else {
_x = 425;
_y = 20;
}
}
}
onClipEvent (enterFrame) {
if (its_a_copy == 1) {
if (_root.game_over) {
removeMovieClip(this);
}
if (_root.phabetwormfight == 1) {
if (speed <= 0) {
if (_root.inshop == 0) {
if (_root.worm_player._x > _x) {
_x = (_x + 10);
}
if (_root.worm_player._x < _x) {
_x = (_x - 10);
}
if (_root.worm_player._y > _y) {
_y = (_y + 10);
}
if (_root.worm_player._y < _y) {
_y = (_y - 10);
}
}
if (_root.hard_mode == 0) {
speed = setspeed;
}
} else {
speed--;
}
distance_to_player = Math.abs(_root.worm_player._x - _x) + Math.abs(_root.worm_player._y - _y);
if (((((distance_to_player < 350) && (_y > 10)) && (Key.isDown(Key.getCode()))) && (Number(Key.getAscii()) == Number(letter + 96))) && (splitname[1] == _root.active_worm)) {
lightning = new Sound();
lightning.attachSound("simple_puzzle_worm_destroy");
lightning.start();
_root.active_worm++;
_root["worm_copy" + _root.active_worm].swapDepths(setDepth());
_root.active_phabworm_copy.swapDepths(setDepth());
if (_root.hard_mode == 0) {
_root.CASH = _root.CASH + int(_root.difficulty / 3);
}
_root.worm_pl_attack_prot.duplicateMovieClip("worm_pl_attack_copy", setDepth());
_root.worm_pl_tile_prot.duplicateMovieClip("worm_pl_tile_copy", setDepth());
removeMovieClip(this);
}
}
if (_root.active_worm == splitname[1]) {
if (distance_to_player < 350) {
setspeed = 1;
}
if (distance_to_player < 150) {
setspeed = 0;
}
if ((Key.isDown(32) && (_root.jokers > 0)) && (letter != 10)) {
letter = 10;
this.gotoAndStop(letter);
_root.jokers--;
_root["statistic_jokers_used" + Number(_root.difficulty)] = _root["statistic_jokers_used" + Number(_root.difficulty)] + 1;
}
if (this.hitTest(_root.worm_player) && (hit == 0)) {
wormtouch = new Sound();
wormtouch.attachSound("simple_puzzle_worm_touch");
wormtouch.start();
_root.active_worm++;
hit = 1;
_root["statistic_worm_battle_hits" + Number(_root.difficulty)] = _root["statistic_worm_battle_hits" + Number(_root.difficulty)] + 1;
_root["worm_copy" + _root.active_worm].swapDepths(setDepth());
_root.active_phabworm_copy.swapDepths(setDepth());
_root.worm_pl_rem_prot.duplicateMovieClip("worm_pl_rem_copy" + _root.active_worm, setDepth());
_root["worm_pl_rem_copy" + _root.active_worm]._x = _x;
_root["worm_pl_rem_copy" + _root.active_worm]._y = _y;
if (_root.hard_mode == 0) {
_root.health = _root.health - (_root.DIFFICULTY * 4);
} else {
_root.health = _root.health - (_root.DIFFICULTY * 5);
}
removeMovieClip(this);
}
_root.active_worm_x = _x;
_root.active_worm_y = _y;
_root.active_phabworm_copy._x = _x - 1;
_root.active_phabworm_copy._y = _y - 1;
ang_y = _y - _root.worm_player._y;
ang_x = _x - _root.worm_player._x;
_root.active_worm_winkel = Math.atan(ang_y / ang_x) / (Math.PI/180);
if (ang_x < 0) {
_root.active_worm_winkel = _root.active_worm_winkel + 180;
}
if ((ang_x >= 0) && (ang_y < 0)) {
_root.active_worm_winkel = _root.active_worm_winkel + 360;
}
}
}
}
Instance of Symbol 155 MovieClip "fader" in Frame 2 (178 B)
onClipEvent (enterFrame) {
if (_root.game_over && (_name.indexOf("realfader") > -1)) {
this.play();
}
if (_root.game_running == 0) {
removeMovieClip(this);
}
}
Instance of Symbol 157 MovieClip "active_phabworm_prot" in Frame 2 (145 B)
onClipEvent (enterFrame) {
if (_name.indexOf("active_phabworm_copy") > -1) {
if (_root.health <= 0) {
removeMovieClip(this);
}
}
}
Instance of Symbol 163 MovieClip "worm_pl_attack_prot" in Frame 2 (120 B)
onClipEvent (load) {
_x = _root.worm_player._x;
_y = _root.worm_player._y;
_rotation = _root.active_worm_winkel;
}
Instance of Symbol 168 MovieClip "worm_pl_tile_prot" in Frame 2 (118 B)
onClipEvent (load) {
_x = _root.active_worm_x;
_y = _root.active_worm_y;
_rotation = _root.active_worm_winkel;
}
Instance of Symbol 189 MovieClip "shop_on_field_prot" in Frame 2 (815 B)
onClipEvent (load) {
_y = 435;
_x = (100 + (50 * int(Math.random() * 5)));
next_spawn = _root.difficulty * 20;
}
onClipEvent (enterFrame) {
if ((((_root.inshop == 0) && (_root.game_running == 1)) && (_root.phabetwormfight == 0)) && (_y <= 430)) {
_y = (_y + 5);
}
if ((_root.phabetwormfight == 1) || (_root.game_running == 0)) {
_y = 431;
}
if ((this.hitTest(_root.player_field) && (_root.inshop == 0)) && (_root.phabetwormfight == 0)) {
_root.mr_shop.play();
_root.mr_shop.swapDepths(setDepth());
_root.inshop = 1;
_y = 431;
}
if ((_y > 430) && (_root.inshop == 0)) {
if (next_spawn <= 0) {
_y = -30;
_x = (100 + (50 * int(Math.random() * 5)));
next_spawn = _root.difficulty * 50;
} else {
next_spawn--;
}
}
}
Instance of Symbol 203 MovieClip "fire_prot" in Frame 2 (2.49 KiB) ●
onClipEvent (load) {
function setcoordinates() {
mrrandom = Math.floor(Math.random() * 25) + 1;
while (mrrandom == (_root.activefield + 1)) {
mrrandom = Math.floor(Math.random() * 25);
}
_x = 100;
_y = 115;
if (((((mrrandom == 2) || (mrrandom == 7)) || (mrrandom == 12)) || (mrrandom == 17)) || (mrrandom == 22)) {
_x = (_x + 50);
} else if (((((mrrandom == 3) || (mrrandom == 8)) || (mrrandom == 13)) || (mrrandom == 18)) || (mrrandom == 23)) {
_x = (_x + 100);
} else if (((((mrrandom == 4) || (mrrandom == 9)) || (mrrandom == 14)) || (mrrandom == 19)) || (mrrandom == 24)) {
_x = (_x + 150);
} else if (((((mrrandom == 5) || (mrrandom == 10)) || (mrrandom == 15)) || (mrrandom == 20)) || (mrrandom == 25)) {
_x = (_x + 200);
}
if ((mrrandom >= 6) && (mrrandom <= 10)) {
_y = (_y + 50);
} else if ((mrrandom >= 11) && (mrrandom <= 15)) {
_y = (_y + 100);
} else if ((mrrandom >= 16) && (mrrandom <= 20)) {
_y = (_y + 150);
} else if ((mrrandom >= 21) && (mrrandom <= 25)) {
_y = (_y + 200);
}
hit = 0;
}
var hit = 0;
if (_name.indexOf("copy") > -1) {
next_move = 50 - _root.difficulty;
its_a_copy = 1;
this.setcoordinates();
}
}
onClipEvent (enterFrame) {
if (its_a_copy) {
if (_root.game_running == 0) {
removeMovieClip(this);
}
if (this.hitTest(_root.player_field) && (hit == 0)) {
hit = 1;
firesound = new Sound();
firesound.attachSound("simple_puzzle_fire");
firesound.start();
_root["statistic_fire_hits" + Number(_root.difficulty)] = _root["statistic_fire_hits" + Number(_root.difficulty)] + 1;
_root.fire_expl_prot.duplicateMovieClip("fire_expl_copy", setDepth());
_root.fire_expl_copy._x = _x;
_root.fire_expl_copy._y = _y;
_root.health = Number(_root.health) - Number(_root.difficulty * 4);
this.setcoordinates();
}
if ((_root.phabetwormfight == 0) && (_root.inshop == 0)) {
if (next_move <= 0) {
next_move = (50 - _root.difficulty) - (_root.hard_mode * 10);
if ((Math.random() > 0.5) && ((_x - 50) >= 100)) {
_x = (_x - 50);
} else if ((Math.random() > 0.5) && ((_x + 50) <= 300)) {
_x = (_x + 50);
} else if ((Math.random() > 0.5) && ((_y - 50) >= 115)) {
_y = (_y - 50);
} else if ((Math.random() > 0.5) && ((_y + 50) <= 315)) {
_y = (_y + 50);
} else {
next_move = 0;
}
} else {
next_move--;
}
}
}
}
Instance of Symbol 215 MovieClip "money_prot" in Frame 2 (346 B)
onClipEvent (load) {
hit = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.worm_player) && (hit == 0)) {
moneysound = new Sound();
moneysound.attachSound("simple_puzzle_money");
moneysound.start();
_root.cash = _root.cash + 10;
hit = 1;
this.play();
}
if (_root.phabetwormfight == 0) {
removeMovieClip(this);
}
}
Instance of Symbol 233 MovieClip "phab_alpha_prot" in Frame 2 (360 B)
onClipEvent (load) {
if (_name.indexOf("copy") > -1) {
its_a_copy = 1;
splitname = _name.split("-");
_width = splitname[3];
_height = splitname[3];
_y = 285;
_x = (20 + (splitname[3] * splitname[2]));
}
}
onClipEvent (enterFrame) {
if (its_a_copy == 1) {
if (_currentframe == 4) {
this.gotoAndStop(Number(splitname[1]) + 5);
}
}
}
Instance of Symbol 46 MovieClip "phaboulette_on_field_prot" in Frame 2 (908 B)
onClipEvent (load) {
_x = 435;
_y = (100 + (50 * int(Math.random() * 5)));
next_spawn = (_root.difficulty * Math.random()) * 20;
}
onClipEvent (enterFrame) {
if (((((_root.phab_tries > 0) && (_root.inshop == 0)) && (_root.game_running == 1)) && (_root.phabetwormfight == 0)) && (_x <= 430)) {
_x = (_x + 5);
}
if ((_root.phabetwormfight == 1) || (_root.game_running == 0)) {
_x = 431;
}
if ((this.hitTest(_root.player_field) && (_root.inshop == 0)) && (_root.phabetwormfight == 0)) {
_root.play_phaboulette.play();
_root.play_phaboulette.swapDepths(setDepth());
_root.inshop = 1;
_x = 431;
}
if ((_x > 430) && (_root.inshop == 0)) {
if (next_spawn <= 0) {
_x = -30;
_y = (100 + (50 * int(Math.random() * 5)));
next_spawn = (_root.difficulty * Math.random()) * 50;
} else {
next_spawn--;
}
}
}
Instance of Symbol 235 MovieClip "health_prot" in Frame 2 (446 B)
onClipEvent (load) {
hit = 0;
}
onClipEvent (enterFrame) {
if (this.hitTest(_root.worm_player) && (hit == 0)) {
healthsound = new Sound();
healthsound.attachSound("simple_puzzle_health");
healthsound.start();
_root.health = Number(_root.health) + 15;
if (_root.health > _root.max_health) {
_root.health = _root.max_health;
}
hit = 1;
this.play();
}
if (_root.phabetwormfight == 0) {
removeMovieClip(this);
}
}
Instance of Symbol 276 MovieClip "view_statistics" in Frame 2 (237 B)
onClipEvent (enterFrame) {
if (Key.isDown(17) && (_root.phabetwormfight == 0)) {
this.play();
}
if (_root.game_running == 0) {
_root.view_statistics._visible = false;
} else {
_root.view_statistics._visible = true;
}
}
Instance of Symbol 285 MovieClip "show_game_over" in Frame 2 (239 B)
onClipEvent (enterFrame) {
if (_root.game_over == 1) {
_root.game_running = 0;
_root.game_over = 0;
_root.cash = 0;
_root.wasders = 0;
_root.jokers = 0;
_root.health = 100;
_root.max_health = 100;
this.gotoAndPlay(2);
}
}
Symbol 28 Button (31 B)
on (release) {
_root.play();
}
Symbol 29 MovieClip Frame 1 (193 B)
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
gotoAndStop (3);
}
Symbol 29 MovieClip Frame 2 (17 B)
gotoAndPlay (1);
Symbol 77 MovieClip Frame 1 (8 B)
stop();
Symbol 77 MovieClip Frame 2 (8 B)
stop();
Symbol 77 MovieClip Frame 3 (8 B)
stop();
Symbol 77 MovieClip Frame 4 (8 B)
stop();
Symbol 77 MovieClip Frame 5 (8 B)
stop();
Symbol 77 MovieClip Frame 6 (8 B)
stop();
Symbol 77 MovieClip Frame 7 (8 B)
stop();
Symbol 77 MovieClip Frame 8 (8 B)
stop();
Symbol 77 MovieClip Frame 9 (8 B)
stop();
Symbol 77 MovieClip Frame 10 (8 B)
stop();
Symbol 77 MovieClip Frame 11 (8 B)
stop();
Symbol 77 MovieClip Frame 12 (8 B)
stop();
Symbol 77 MovieClip Frame 13 (8 B)
stop();
Symbol 77 MovieClip Frame 14 (8 B)
stop();
Symbol 77 MovieClip Frame 15 (8 B)
stop();
Symbol 77 MovieClip Frame 16 (8 B)
stop();
Symbol 77 MovieClip Frame 17 (8 B)
stop();
Symbol 77 MovieClip Frame 18 (8 B)
stop();
Symbol 77 MovieClip Frame 19 (8 B)
stop();
Symbol 77 MovieClip Frame 20 (8 B)
stop();
Symbol 77 MovieClip Frame 21 (8 B)
stop();
Symbol 77 MovieClip Frame 22 (8 B)
stop();
Symbol 77 MovieClip Frame 23 (8 B)
stop();
Symbol 77 MovieClip Frame 24 (8 B)
stop();
Symbol 77 MovieClip Frame 25 (8 B)
stop();
Symbol 77 MovieClip Frame 26 (8 B)
stop();
Instance of Symbol 36 MovieClip in Symbol 88 MovieClip Frame 1 (134 B)
on (rollOver) {
if (_root.game_running == 1) {
_root.show_error_message("\nThis is your current cash.\n(Click to continue.)");
}
}
Instance of Symbol 38 MovieClip in Symbol 88 MovieClip Frame 1 (159 B)
on (rollOver) {
if (_root.game_running == 1) {
_root.show_error_message("This shows your current health.\nAnd your max health.\n(Click to continue.)");
}
}
Instance of Symbol 46 MovieClip in Symbol 88 MovieClip Frame 1 (131 B)
on (rollOver) {
if (_root.game_running == 1) {
_root.show_error_message("\nYour phaboulette tries.\n(Click to continue.)");
}
}
Instance of Symbol 48 MovieClip in Symbol 88 MovieClip Frame 1 (160 B)
on (rollOver) {
if (_root.game_running == 1) {
_root.show_error_message("This shows how many worms there are left on the field.\n(Click to continue.)");
}
}
Instance of Symbol 77 MovieClip in Symbol 88 MovieClip Frame 1 (189 B)
onClipEvent (load) {
this.gotoAndStop(10);
}
on (rollOver) {
if (_root.game_running == 1) {
_root.show_error_message("\nThe amount of jokers you've bought.\n(Click to continue.)");
}
}
Instance of Symbol 79 MovieClip in Symbol 88 MovieClip Frame 1 (144 B)
on (rollOver) {
if (_root.game_running == 1) {
_root.show_error_message("\nThe amount of wasders you've bought.\n(Click to continue.)");
}
}
Symbol 119 MovieClip Frame 40 (17 B)
gotoAndPlay (1);
Symbol 119 MovieClip Frame 80 (18 B)
gotoAndPlay (41);
Symbol 119 MovieClip Frame 120 (18 B)
gotoAndPlay (81);
Symbol 119 MovieClip Frame 160 (19 B)
gotoAndPlay (121);
Symbol 119 MovieClip Frame 200 (19 B)
gotoAndPlay (161);
Symbol 119 MovieClip Frame 240 (19 B)
gotoAndPlay (201);
Symbol 146 MovieClip Frame 1 (8 B)
stop();
Symbol 146 MovieClip Frame 2 (8 B)
stop();
Symbol 146 MovieClip Frame 3 (8 B)
stop();
Symbol 146 MovieClip Frame 4 (8 B)
stop();
Symbol 146 MovieClip Frame 5 (8 B)
stop();
Symbol 146 MovieClip Frame 6 (8 B)
stop();
Symbol 146 MovieClip Frame 7 (8 B)
stop();
Symbol 146 MovieClip Frame 8 (8 B)
stop();
Symbol 146 MovieClip Frame 9 (8 B)
stop();
Symbol 146 MovieClip Frame 10 (8 B)
stop();
Symbol 146 MovieClip Frame 11 (8 B)
stop();
Symbol 146 MovieClip Frame 12 (8 B)
stop();
Symbol 146 MovieClip Frame 13 (8 B)
stop();
Symbol 146 MovieClip Frame 14 (8 B)
stop();
Symbol 146 MovieClip Frame 15 (8 B)
stop();
Symbol 146 MovieClip Frame 16 (8 B)
stop();
Symbol 146 MovieClip Frame 17 (8 B)
stop();
Symbol 146 MovieClip Frame 18 (8 B)
stop();
Symbol 146 MovieClip Frame 19 (8 B)
stop();
Symbol 146 MovieClip Frame 20 (8 B)
stop();
Symbol 146 MovieClip Frame 21 (8 B)
stop();
Symbol 146 MovieClip Frame 22 (8 B)
stop();
Symbol 146 MovieClip Frame 23 (8 B)
stop();
Symbol 146 MovieClip Frame 24 (8 B)
stop();
Symbol 146 MovieClip Frame 25 (8 B)
stop();
Symbol 146 MovieClip Frame 26 (8 B)
stop();
Symbol 146 MovieClip Frame 27 (8 B)
stop();
Symbol 146 MovieClip Frame 28 (8 B)
stop();
Symbol 146 MovieClip Frame 29 (8 B)
stop();
Symbol 146 MovieClip Frame 30 (8 B)
stop();
Symbol 146 MovieClip Frame 31 (8 B)
stop();
Symbol 146 MovieClip Frame 32 (8 B)
stop();
Symbol 146 MovieClip Frame 33 (8 B)
stop();
Symbol 146 MovieClip Frame 34 (8 B)
stop();
Symbol 146 MovieClip Frame 35 (8 B)
stop();
Symbol 146 MovieClip Frame 36 (8 B)
stop();
Symbol 146 MovieClip Frame 37 (8 B)
stop();
Symbol 146 MovieClip Frame 38 (8 B)
stop();
Symbol 146 MovieClip Frame 39 (8 B)
stop();
Symbol 146 MovieClip Frame 40 (8 B)
stop();
Symbol 146 MovieClip Frame 41 (8 B)
stop();
Symbol 146 MovieClip Frame 42 (8 B)
stop();
Symbol 146 MovieClip Frame 43 (8 B)
stop();
Symbol 146 MovieClip Frame 44 (8 B)
stop();
Symbol 146 MovieClip Frame 45 (8 B)
stop();
Symbol 146 MovieClip Frame 46 (8 B)
stop();
Symbol 146 MovieClip Frame 47 (8 B)
stop();
Symbol 146 MovieClip Frame 48 (8 B)
stop();
Symbol 146 MovieClip Frame 49 (8 B)
stop();
Symbol 146 MovieClip Frame 50 (8 B)
stop();
Symbol 146 MovieClip Frame 51 (8 B)
stop();
Symbol 146 MovieClip Frame 52 (8 B)
stop();
Symbol 155 MovieClip Frame 10 (8 B)
stop();
Symbol 155 MovieClip Frame 20 (32 B)
stop();
removeMovieClip(this);
Symbol 163 MovieClip Frame 4 (23 B)
removeMovieClip(this);
Symbol 168 MovieClip Frame 10 (23 B)
removeMovieClip(this);
Symbol 184 MovieClip Frame 1 (8 B)
stop();
Symbol 184 MovieClip Frame 20 (8 B)
stop();
Instance of Symbol 183 MovieClip "shop_manager" in Symbol 184 MovieClip Frame 20 (5.01 KiB) ● ●
onClipEvent (load) {
_root.createTextField("shop_speech_bubble", setDepth(), 18, 105, 195, 20);
_root.shop_speech_bubble.textColor = 16777215 /* 0xFFFFFF */;
_root.shop_speech_bubble.backgroundColor = 16777215 /* 0xFFFFFF */;
_root.shop_speech_bubble.background = false;
_root.shop_speech_bubble.selectable = false;
meinTextformat = new TextFormat();
meinTextformat.align = String("center");
meinTextformat.font = String("Verdana");
keysound = new Sound();
keysound.attachSound("simple_puzzle_key");
if (Math.random() > 0.5) {
some_text = "How can I be of service?";
} else if (Math.random() > 0.5) {
some_text = "Please choose wisely.";
} else if (Math.random() > 0.5) {
some_text = "What will it be today?";
} else if (Math.random() > 0.5) {
some_text = "Spend your cash here.";
} else if (Math.random() > 0.5) {
some_text = "Save the trees.";
} else if (Math.random() > 0.5) {
some_text = "Nothing can stop us now.";
} else {
some_text = "This be my loot.";
}
_root.shop_speech_bubble.text = some_text;
_root.shop_speech_bubble.setTextFormat(meinTextformat);
is_purchasing = 0;
what_purchasing = 0;
amount_purchasing = 0;
next_input = 5;
}
onClipEvent (enterFrame) {
_root.debug = Key.getAscii();
if (is_purchasing == 0) {
if (((Key.isDown(Key.getCode()) && (Key.getAscii() == 120)) && (next_input <= 0)) || (_root.game_running == 0)) {
_root.show_selection(252, 252);
_root.mr_shop.play();
_root.shop_speech_bubble.removeTextField();
}
if (Key.isDown(Key.getCode()) && (Key.getAscii() == 97)) {
_root.show_selection(252, 77);
is_purchasing = 1;
what_purchasing = 1;
amount_purchasing = int(_root.cash / 25);
if ((Number(_root.max_health) + (Number(amount_purchasing) * 5)) > 995) {
amount_purchasing = int(Number(995 - _root.max_health) / 5);
}
}
if (Key.isDown(Key.getCode()) && (Key.getAscii() == 98)) {
_root.show_selection(252, 135);
is_purchasing = 1;
what_purchasing = 2;
amount_purchasing = int(_root.cash / 25);
}
if (Key.isDown(Key.getCode()) && (Key.getAscii() == 99)) {
_root.show_selection(252, 192);
is_purchasing = 1;
what_purchasing = 3;
amount_purchasing = int(_root.cash / 25);
}
} else if (is_purchasing == 1) {
_root.shop_speech_bubble.text = "Enter amount: " + amount_purchasing;
if (((Key.isDown(Key.getCode()) && (Key.getAscii() >= 48)) && (Key.getAscii() <= 57)) && (next_input <= 0)) {
if (amount_purchasing < 100) {
keysound.start();
amount_purchasing = 10 * (int(amount_purchasing) + ((Key.getAscii() - 48) / 10));
next_input = 2;
}
} else if (((_root.game_running == 0) || (Key.isDown(27))) || (Key.isDown(Key.getCode()) && (Key.getAscii() == 120))) {
_root.show_selection(252, 252);
is_purchasing = 0;
_root.shop_speech_bubble.text = "Choose your blues.";
next_input = 2;
} else if (Key.isDown(8) && (next_input <= 0)) {
keysound.start();
amount_purchasing = int(amount_purchasing / 10);
next_input = 2;
} else if (Key.isDown(13)) {
keysound.start();
if ((amount_purchasing > 0) && (amount_purchasing < 995)) {
if (what_purchasing == 1) {
if ((_root.cash >= (25 * amount_purchasing)) && ((Number(_root.max_health) + (Number(amount_purchasing) * 5)) <= 995)) {
_root.max_health = Number(_root.max_health) + Number(5 * amount_purchasing);
_root.cash = _root.cash - (25 * amount_purchasing);
_root.shop_speech_bubble.text = "You feel healthier but poorer.";
is_purchasing = 0;
} else if (_root.cash < (25 * amount_purchasing)) {
_root.shop_speech_bubble.text = "You can't afford that.";
} else if ((Number(_root.max_health) + (Number(amount_purchasing) * 5)) > 995) {
_root.shop_speech_bubble.text = "995 is enough!";
_root.show_error_message("\nSorry, you can't have more than 995 health.");
}
} else if (what_purchasing == 2) {
if (_root.cash >= (25 * amount_purchasing)) {
_root.jokers = Number(_root.jokers) + Number(amount_purchasing);
_root.cash = _root.cash - (25 * amount_purchasing);
_root.shop_speech_bubble.text = "The joker's yours!";
is_purchasing = 0;
} else {
_root.shop_speech_bubble.text = "And who pays for that?";
}
} else if (what_purchasing == 3) {
if (_root.cash >= (25 * amount_purchasing)) {
_root.wasders = Number(_root.wasders) + Number(amount_purchasing);
_root.cash = _root.cash - (25 * amount_purchasing);
_root.shop_speech_bubble.text = "Feel the power of WASD.";
is_purchasing = 0;
} else {
_root.shop_speech_bubble.text = "No. You need money first.";
}
}
} else if (amount_purchasing == 0) {
_root.shop_speech_bubble.text = "What else then?";
is_purchasing = 0;
} else {
_root.shop_speech_bubble.text = "Sorry, invalid amount!";
}
}
}
next_input--;
if (next_input < 0) {
next_input = 0;
}
_root.shop_speech_bubble.setTextFormat(meinTextformat);
}
Symbol 184 MovieClip Frame 37 (18 B)
_root.inshop = 0;
Symbol 193 MovieClip Frame 11 (23 B)
removeMovieClip(this);
Symbol 196 MovieClip Frame 1 (8 B)
stop();
Symbol 208 MovieClip Frame 11 (23 B)
removeMovieClip(this);
Symbol 211 MovieClip Frame 10 (23 B)
removeMovieClip(this);
Symbol 213 MovieClip Frame 1 (8 B)
stop();
Symbol 215 MovieClip Frame 1 (8 B)
stop();
Symbol 215 MovieClip Frame 5 (23 B)
removeMovieClip(this);
Symbol 228 MovieClip Frame 1 (8 B)
stop();
Symbol 228 MovieClip Frame 15 (27 B)
stop();
_root.inshop = 1;
Instance of Symbol 222 MovieClip in Symbol 228 MovieClip Frame 15 (4.69 KiB) ●
onClipEvent (load) {
var active_phaboulette = 0;
var active_end = 0;
var letter_width = 0;
var phab_timer = new Number(0);
var phab_total_time = new Number(0);
var split_phab_input = new Array();
}
onClipEvent (enterFrame) {
if (active_phaboulette == 0) {
if ((Key.isDown(Key.getCode()) && (Key.getAscii() == 120)) || (_root.game_running == 0)) {
_root.show_selection(249, 151);
_level0.play_phaboulette.phab_counter_ins.text = "";
_root.play_phaboulette.play();
_root.inshop = 0;
}
if ((Key.isDown(Key.getCode()) && (Key.getAscii() == 49)) && (active_phaboulette == 0)) {
if ((_root.cash >= 50) && (_root.phab_tries > 0)) {
_root.show_selection(249, 93);
active_phaboulette = 1;
_root.cash = _root.cash - 50;
_root.phab_tries--;
newword = oldword;
while (newword == oldword) {
newword = _root.stored_data.data.Library[Math.floor(Math.random() * _root.stored_data.data.Library.length)];
}
oldword = newword;
splitword = newword.split("");
active_end = splitword.length;
letter_width = int(330 / active_end);
if (letter_width > 40) {
letter_width = 40;
}
_root.debug = "";
i = 0;
while (i < splitword.length) {
a = 0;
while (splitword[i] != _root.KeyArray[a]) {
a++;
}
splitword[i] = a;
_root.phab_alpha_prot.duplicateMovieClip((((("phab_alpha_copy-" + splitword[i]) + "-") + i) + "-") + letter_width, setDepth());
i++;
}
active_number = 0;
phab_timer = int(active_end * 5) + (10 - active_end);
phab_total_time = phab_timer;
Selection.setFocus(_level0.play_phaboulette.phaboulette_input);
} else if (_root.cash < 50) {
_root.show_error_message("\nYou need more money to play phaboulette!");
} else if (_root.phab_tries < 1) {
_root.show_error_message("\nReach the next level to play again!");
}
}
} else {
phab_timer--;
_level0.play_phaboulette.phab_counter_ins.text = phab_timer;
if ((phab_timer < 0) || (_root.game_running == 0)) {
_level0.play_phaboulette.phab_counter_ins.text = "Oops";
_root["statistic_phaboulette_oops" + Number(_root.difficulty)] = _root["statistic_phaboulette_oops" + Number(_root.difficulty)] + 1;
while (active_number <= active_end) {
_root[(((("phab_alpha_copy-" + splitword[active_number]) + "-") + active_number) + "-") + letter_width].gotoAndPlay(32);
active_number++;
}
active_phaboulette = 0;
}
split_phab_input = new Array();
split_phab_input = _level0.play_phaboulette.phaboulette_input.text.split("");
keysound = new Sound();
keysound.attachSound("simple_puzzle_key");
i = 0;
while ((_root.KeyArray[splitword[active_number]] == split_phab_input[i]) && (active_phaboulette == 1)) {
keysound.start();
split_phab_input[i] = "";
_level0.play_phaboulette.phaboulette_input.text = split_phab_input.join("");
_root[(((("phab_alpha_copy-" + splitword[active_number]) + "-") + active_number) + "-") + letter_width].gotoAndPlay(32);
active_number++;
if (active_number >= active_end) {
if (phab_timer >= Math.round((phab_total_time * 50) / 100)) {
_root["statistic_phaboulette_o_o" + Number(_root.difficulty)] = _root["statistic_phaboulette_o_o" + Number(_root.difficulty)] + 1;
_level0.play_phaboulette.phab_counter_ins.text = "O_O";
_root.cash = _root.cash + (50 + Number(50));
} else if (phab_timer >= Math.round((phab_total_time * 35) / 100)) {
_root["statistic_phaboulette_boom" + Number(_root.difficulty)] = _root["statistic_phaboulette_boom" + Number(_root.difficulty)] + 1;
_level0.play_phaboulette.phab_counter_ins.text = "Boom";
_root.cash = _root.cash + (50 + Number(30));
} else if (phab_timer >= Math.round((phab_total_time * 30) / 100)) {
_root["statistic_phaboulette_wow" + Number(_root.difficulty)] = _root["statistic_phaboulette_wow" + Number(_root.difficulty)] + 1;
_level0.play_phaboulette.phab_counter_ins.text = "WOW";
_root.cash = _root.cash + (50 + Number(20));
} else if (phab_timer >= Math.round((phab_total_time * 20) / 100)) {
_root["statistic_phaboulette_nice" + Number(_root.difficulty)] = _root["statistic_phaboulette_nice" + Number(_root.difficulty)] + 1;
_level0.play_phaboulette.phab_counter_ins.text = "Nice";
_root.cash = _root.cash + (50 + Number(15));
} else if (phab_timer >= 0) {
_root["statistic_phaboulette_okay" + Number(_root.difficulty)] = _root["statistic_phaboulette_okay" + Number(_root.difficulty)] + 1;
_level0.play_phaboulette.phab_counter_ins.text = "Okay";
_root.cash = _root.cash + (50 + Number(10));
}
active_phaboulette = 0;
}
i++;
}
_level0.play_phaboulette.phaboulette_input.text = "";
}
}
Symbol 233 MovieClip Frame 5 (8 B)
stop();
Symbol 233 MovieClip Frame 6 (8 B)
stop();
Symbol 233 MovieClip Frame 7 (8 B)
stop();
Symbol 233 MovieClip Frame 8 (8 B)
stop();
Symbol 233 MovieClip Frame 9 (8 B)
stop();
Symbol 233 MovieClip Frame 10 (8 B)
stop();
Symbol 233 MovieClip Frame 11 (8 B)
stop();
Symbol 233 MovieClip Frame 12 (8 B)
stop();
Symbol 233 MovieClip Frame 13 (8 B)
stop();
Symbol 233 MovieClip Frame 14 (8 B)
stop();
Symbol 233 MovieClip Frame 15 (8 B)
stop();
Symbol 233 MovieClip Frame 16 (8 B)
stop();
Symbol 233 MovieClip Frame 17 (8 B)
stop();
Symbol 233 MovieClip Frame 18 (8 B)
stop();
Symbol 233 MovieClip Frame 19 (8 B)
stop();
Symbol 233 MovieClip Frame 20 (8 B)
stop();
Symbol 233 MovieClip Frame 21 (8 B)
stop();
Symbol 233 MovieClip Frame 22 (8 B)
stop();
Symbol 233 MovieClip Frame 23 (8 B)
stop();
Symbol 233 MovieClip Frame 24 (8 B)
stop();
Symbol 233 MovieClip Frame 25 (8 B)
stop();
Symbol 233 MovieClip Frame 26 (8 B)
stop();
Symbol 233 MovieClip Frame 27 (8 B)
stop();
Symbol 233 MovieClip Frame 28 (8 B)
stop();
Symbol 233 MovieClip Frame 29 (8 B)
stop();
Symbol 233 MovieClip Frame 30 (8 B)
stop();
Symbol 233 MovieClip Frame 39 (23 B)
removeMovieClip(this);
Symbol 235 MovieClip Frame 1 (8 B)
stop();
Symbol 235 MovieClip Frame 10 (23 B)
removeMovieClip(this);
Symbol 238 MovieClip Frame 8 (23 B)
removeMovieClip(this);
Symbol 244 MovieClip Frame 1 (8 B)
stop();
Symbol 244 MovieClip Frame 6 (1.01 KiB) ●
stop();
_level0.error_message.swapDepths(setDepth());
_level0.error_message.rest_text = "";
if (_root.err_mess.length > 130) {
splitted_text = _root.err_mess.split(" ");
_root.err_mess = "";
i = 0;
while ((i < splitted_text.length) && (_root.err_mess.length < 120)) {
_root.err_mess = _root.err_mess + (" " + splitted_text[i]);
splitted_text[i] = "";
i++;
}
_root.err_mess = _root.err_mess + " (...)";
_level0.error_message.rest_text = "(...) ";
i = i;
while (i < splitted_text.length) {
_level0.error_message.rest_text = _level0.error_message.rest_text + (splitted_text[i] + " ");
i++;
}
}
_level0.error_message.tf_error_ms.text = _root.err_mess;
errorsound = new Sound(this);
errorsound.attachSound("simple_puzzle_error");
errorsound.start();
if ((_root.viewing_message == undefined) || (_root.viewing_message == 0)) {
_root.viewing_message = 1;
if (_root.inshop == 1) {
_root.reset_inshop = 0;
} else {
_root.inshop = 1;
_root.reset_inshop = 1;
}
}
Instance of Symbol 242 MovieClip "err_to_end" in Symbol 244 MovieClip Frame 6 (639 B)
onClipEvent (load) {
mouse_clicked = 0;
start_checking = 1;
this.onMouseDown = function () {
mouse_clicked = 1;
};
this.onMouseUp = function () {
mouse_clicked = 0;
};
}
onClipEvent (enterFrame) {
if (start_checking <= 0) {
if (Key.isDown(Key.getCode()) || (mouse_clicked == 1)) {
if (_level0.error_message.rest_text == "") {
_level0.error_message.tf_error_ms.text = "";
_root.error_message.play();
_root.viewing_message = 0;
if (_root.reset_inshop == 1) {
_root.inshop = 0;
}
} else {
_root.show_error_message(_level0.error_message.rest_text);
}
}
} else {
start_checking--;
}
}
Symbol 259 MovieClip Frame 1 (8 B)
stop();
Symbol 259 MovieClip Frame 2 (8 B)
stop();
Symbol 261 MovieClip Frame 6 (95 B)
if (_root.stored_data.data.username != undefined) {
_level0.introduction.gotoAndPlay(21);
}
Symbol 261 MovieClip Frame 11 (268 B)
stop();
_root.show_error_message("Welcome to Phabetal!\nPlease enter your name in the field below. Press ENTER when you're finished and ready to proceed.");
Selection.setFocus(_level0.introduction.intro_enter_name);
_level0.introduction.intro_enter_name.text = "";
Instance of Symbol 246 MovieClip in Symbol 261 MovieClip Frame 11 (883 B)
onClipEvent (enterFrame) {
if (Key.isDown(13)) {
if (_root.string_check(_level0.introduction.intro_enter_name.text) == 0) {
Selection.setFocus(_level0.introduction.intro_enter_name);
_root.show_error_message("Your name contains invalid characters.\nPlease use only numbers and letters.\nThen try again!");
} else if (_level0.introduction.intro_enter_name.text == "") {
Selection.setFocus(_level0.introduction.intro_enter_name);
_root.show_error_message("\nPlease enter a name before trying to proceed.");
} else if (_level0.introduction.intro_enter_name.text.length > 15) {
Selection.setFocus(_level0.introduction.intro_enter_name);
_root.show_error_message("\nThe chosen name is too long.");
} else {
_root.stored_data.data.username = _level0.introduction.intro_enter_name.text;
_root.stored_data.flush();
_level0.introduction.play();
}
}
}
Symbol 261 MovieClip Frame 31 (8 B)
stop();
Instance of Symbol 119 MovieClip "menu_player_view" in Symbol 261 MovieClip Frame 31 (4.41 KiB) ●
onClipEvent (load) {
_level0.introduction.menu_player_name.text = _root.stored_data.data.username;
_level0.introduction.menu_player_score.text = _root.stored_data.data.total_score;
next_check = 2;
keysound = new Sound();
keysound.attachSound("simple_puzzle_key");
this.gotoAndPlay((_root.story_mode * 40) + 1);
_root.ignore_input_for_menu = 0;
}
onClipEvent (enterFrame) {
if ((next_check <= 0) && (_root.ignore_input_for_menu == 0)) {
next_check = 2;
if (Key.isDown(Key.getCode()) && (Key.getAscii() == 102)) {
keysound.start();
if (_root.stored_data.data.total_score >= 5000) {
_root.story_mode = 1;
this.gotoAndPlay(41);
} else {
_root.show_error_message("Sorry!\nYou need at least 5,000 points\nto unlock the first cover!");
}
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 103)) {
keysound.start();
if (_root.stored_data.data.total_score >= 15000) {
_root.story_mode = 2;
this.gotoAndPlay(81);
} else {
_root.show_error_message("Sorry!\nYou need at least 15,000 points\nto unlock the second cover!");
}
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 104)) {
keysound.start();
if (_root.stored_data.data.total_score >= 30000) {
_root.story_mode = 3;
this.gotoAndPlay(121);
} else {
_root.show_error_message("Sorry!\nYou need at least 30,000 points\nto unlock the third cover!");
}
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 105)) {
keysound.start();
if (_root.stored_data.data.total_score >= 45000) {
_root.story_mode = 4;
this.gotoAndPlay(161);
} else {
_root.show_error_message("Sorry!\nYou need at least 45,000 points\nto unlock the fourth cover!");
}
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 106)) {
keysound.start();
if (_root.stored_data.data.total_score >= 60000) {
_root.story_mode = 5;
this.gotoAndPlay(201);
} else {
_root.show_error_message("Sorry!\nYou need at least 60,000 points\nto unlock the fifth cover!");
}
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 107)) {
keysound.start();
_root.story_mode = 0;
this.gotoAndPlay(1);
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 109)) {
keysound.start();
if (_root.stored_data.data.total_score >= 0) {
_root.phab_library.swapDepths(setDepth());
_root.phab_library.play();
_root.ignore_input_for_menu = 1;
} else {
_root.show_error_message("Sorry!\nYou need at least 5000 points\nto unlock the Phaboulette Library!");
}
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 108)) {
keysound.start();
if (_root.stored_data.data.played_through == 1) {
getURL ("http://www.muddasheep.com/pics/phabetal_soundtrack.zip", "_blank");
} else {
_root.show_error_message("Sorry!\nYou need to win level 22\nto get the soundtrack!");
}
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 101)) {
keysound.start();
if (_root.stored_data.data.total_score >= 20000) {
getURL ("http://www.muddasheep.com/pics/phabetal_desktop1280x1024.png", "_blank");
} else {
_root.show_error_message("Sorry!\nYou need at least 20,000 points\nto get the wallpaper!");
}
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 100)) {
keysound.start();
if (_root.stored_data.data.total_score >= 30000) {
if (_root.black_and_white == 0) {
_root.black_and_white = 1;
} else {
_root.black_and_white = 0;
}
} else {
_root.show_error_message("Sorry!\nYou need at least 30,000 points\nto unlock black and white mode!");
}
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 99)) {
keysound.start();
if (_root.stored_data.data.total_score >= 20000) {
if (_root.hard_mode == 0) {
_root.hard_mode = 1;
} else {
_root.hard_mode = 0;
}
} else {
_root.show_error_message("Sorry!\nYou need at least 20,000 points\nto unlock hard mode!");
}
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 98)) {
keysound.start();
_root.show_selection(245, 145);
_level0.introduction.play();
_level0.tutorial.play();
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 97)) {
_root.show_selection(245, 145);
_level0.introduction.play();
} else {
next_check = 0;
}
} else if (next_check > 0) {
next_check--;
}
}
Instance of Symbol 259 MovieClip in Symbol 261 MovieClip Frame 31 (202 B)
onClipEvent (enterFrame) {
if ((_currentframe != 1) && (_root.hard_mode == 1)) {
gotoAndStop (1);
} else if ((_currentframe != 2) && (_root.hard_mode == 0)) {
gotoAndStop (2);
}
}
Instance of Symbol 259 MovieClip in Symbol 261 MovieClip Frame 31 (214 B)
onClipEvent (enterFrame) {
if ((_currentframe != 1) && (_root.black_and_white == 1)) {
gotoAndStop (1);
} else if ((_currentframe != 2) && (_root.black_and_white == 0)) {
gotoAndStop (2);
}
}
Instance of Symbol 259 MovieClip in Symbol 261 MovieClip Frame 31 (253 B)
onClipEvent (enterFrame) {
if ((_currentframe != 1) && (_root.stored_data.data.total_score >= 20000)) {
gotoAndStop (1);
} else if ((_currentframe != 2) && (_root.stored_data.data.total_score < 20000)) {
gotoAndStop (2);
}
}
Instance of Symbol 259 MovieClip in Symbol 261 MovieClip Frame 31 (204 B)
onClipEvent (enterFrame) {
if ((_currentframe != 1) && (_root.story_mode == 1)) {
gotoAndStop (1);
} else if ((_currentframe != 2) && (_root.story_mode != 1)) {
gotoAndStop (2);
}
}
Instance of Symbol 259 MovieClip in Symbol 261 MovieClip Frame 31 (204 B)
onClipEvent (enterFrame) {
if ((_currentframe != 1) && (_root.story_mode == 2)) {
gotoAndStop (1);
} else if ((_currentframe != 2) && (_root.story_mode != 2)) {
gotoAndStop (2);
}
}
Instance of Symbol 259 MovieClip in Symbol 261 MovieClip Frame 31 (204 B)
onClipEvent (enterFrame) {
if ((_currentframe != 1) && (_root.story_mode == 3)) {
gotoAndStop (1);
} else if ((_currentframe != 2) && (_root.story_mode != 3)) {
gotoAndStop (2);
}
}
Instance of Symbol 259 MovieClip in Symbol 261 MovieClip Frame 31 (204 B)
onClipEvent (enterFrame) {
if ((_currentframe != 1) && (_root.story_mode == 4)) {
gotoAndStop (1);
} else if ((_currentframe != 2) && (_root.story_mode != 4)) {
gotoAndStop (2);
}
}
Instance of Symbol 259 MovieClip in Symbol 261 MovieClip Frame 31 (204 B)
onClipEvent (enterFrame) {
if ((_currentframe != 1) && (_root.story_mode == 5)) {
gotoAndStop (1);
} else if ((_currentframe != 2) && (_root.story_mode != 5)) {
gotoAndStop (2);
}
}
Instance of Symbol 259 MovieClip in Symbol 261 MovieClip Frame 31 (204 B)
onClipEvent (enterFrame) {
if ((_currentframe != 1) && (_root.story_mode == 0)) {
gotoAndStop (1);
} else if ((_currentframe != 2) && (_root.story_mode != 0)) {
gotoAndStop (2);
}
}
Instance of Symbol 259 MovieClip in Symbol 261 MovieClip Frame 31 (254 B)
onClipEvent (enterFrame) {
if ((_currentframe != 1) && (_root.stored_data.data.played_through == 1)) {
gotoAndStop (1);
} else if ((_currentframe != 2) && (_root.stored_data.data.played_through == undefined)) {
gotoAndStop (2);
}
}
Symbol 261 MovieClip Frame 36 (21 B)
_root.create_game();
Symbol 261 MovieClip Frame 42 (8 B)
stop();
Symbol 266 MovieClip Frame 5 (8 B)
stop();
Symbol 267 MovieClip Frame 1 (1 B)
Instance of Symbol 266 MovieClip "show_map_spot" in Symbol 267 MovieClip Frame 1 (2.11 KiB) ●
onClipEvent (load) {
if (_name.indexOf("copy") > -1) {
its_a_copy = 1;
changed = 0;
splitname = _name.split("copy");
splitname[1]++;
_x = -50;
_y = -50;
if (((((splitname[1] == 2) || (splitname[1] == 7)) || (splitname[1] == 12)) || (splitname[1] == 17)) || (splitname[1] == 22)) {
_x = (_x + 20);
} else if (((((splitname[1] == 3) || (splitname[1] == 8)) || (splitname[1] == 13)) || (splitname[1] == 18)) || (splitname[1] == 23)) {
_x = (_x + 40);
} else if (((((splitname[1] == 4) || (splitname[1] == 9)) || (splitname[1] == 14)) || (splitname[1] == 19)) || (splitname[1] == 24)) {
_x = (_x + 60);
} else if (((((splitname[1] == 5) || (splitname[1] == 10)) || (splitname[1] == 15)) || (splitname[1] == 20)) || (splitname[1] == 25)) {
_x = (_x + 80);
}
if ((splitname[1] >= 6) && (splitname[1] <= 10)) {
_y = (_y + 20);
} else if ((splitname[1] >= 11) && (splitname[1] <= 15)) {
_y = (_y + 40);
} else if ((splitname[1] >= 16) && (splitname[1] <= 20)) {
_y = (_y + 60);
} else if ((splitname[1] >= 21) && (splitname[1] <= 25)) {
_y = (_y + 80);
}
if (_root.BeenThere[splitname[1] - 1] == 0) {
this.gotoAndPlay(1);
} else {
this.gotoAndStop(1);
changed = 1;
}
} else if (_name.indexOf("spot_player") > -1) {
its_the_player = 1;
player_col = new Color(this);
player_col.setRGB(4955851);
_x = _level0.view_statistics.show_map["spot_copy" + _root.activefield]._x;
_y = _level0.view_statistics.show_map["spot_copy" + _root.activefield]._y;
_alpha = 50;
this.gotoAndPlay(1);
} else {
this.gotoAndStop(1);
}
}
onClipEvent (enterFrame) {
if (its_a_copy == 1) {
if (changed == 0) {
if (_root.BeenThere[splitname[1] - 1] == 1) {
this.gotoAndStop(1);
changed = 1;
}
} else if (changed == 1) {
if (_root.BeenThere[splitname[1] - 1] == 0) {
this.gotoAndPlay(1);
changed = 0;
}
}
} else if (its_the_player == 1) {
_x = _level0.view_statistics.show_map["spot_copy" + _root.activefield]._x;
_y = _level0.view_statistics.show_map["spot_copy" + _root.activefield]._y;
}
}
Symbol 267 MovieClip Frame 2 (374 B)
stop();
i = 0;
while (i < 25) {
removeMovieClip(_level0.view_statistics.show_map["spot_copy" + i]);
_level0.view_statistics.show_map.show_map_spot.duplicateMovieClip("spot_copy" + i, setDepth());
i++;
}
removeMovieClip(_level0.view_statistics.show_map.spot_player);
_level0.view_statistics.show_map.show_map_spot.duplicateMovieClip("spot_player", setDepth());
Symbol 276 MovieClip Frame 1 (130 B)
stop();
_level0.view_statistics.swapDepths(setDepth());
if (_level0.view_statistics.reset_inshop == 1) {
_root.inshop = 0;
}
Instance of Symbol 267 MovieClip "show_map" in Symbol 276 MovieClip Frame 1 (99 B)
on (press) {
if (_root.game_running == 1) {
startDrag (this);
}
}
on (release) {
stopDrag();
}
Symbol 276 MovieClip Frame 2 (48 B)
_level0.view_statistics.swapDepths(setDepth());
Symbol 276 MovieClip Frame 5 (2.47 KiB) ●
stop();
_level0.view_statistics.reset_inshop = 1;
if (_root.inshop == 1) {
_level0.view_statistics.reset_inshop = 0;
} else {
_root.inshop = 1;
}
_level0.view_statistics.statistics_content_left.text = ("> Level " + (_root.difficulty - 4)) + "\n\nField Bonus:\nPerfect Wormbattles:\nPerfect Phaboulette:\nFire hits:\nWasders used:\nWorm battle time:\nJokers used:\nWorm battle hits:\nPhaboulette Misses:\nPhaboulette Okay:\nPhaboulette Nice:\nPhaboulette Wow:\nPhaboulette Boom:\nPhaboulette O_O:";
_level0.view_statistics.statistics_content_right.text = ((((((((((((((((((((((((((((((((((((((((((((((((((((((("\n\n" + _root["statistic_field_bonus" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_field_bonus")) + ")\n") + _root["statistic_perfect_wormbattles" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_perfect_wormbattles")) + ")\n") + _root["statistic_perfect_phaboulette" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_perfect_phaboulette")) + ")\n") + _root["statistic_fire_hits" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_fire_hits")) + ")\n") + _root["statistic_wasders_used" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_wasders_used")) + ")\n") + _root["statistic_worm_battle_time" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_worm_battle_time")) + ")\n") + _root["statistic_jokers_used" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_jokers_used")) + ")\n") + _root["statistic_worm_battle_hits" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_worm_battle_hits")) + ")\n") + _root["statistic_phaboulette_oops" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_phaboulette_oops")) + ")\n") + _root["statistic_phaboulette_okay" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_phaboulette_okay")) + ")\n") + _root["statistic_phaboulette_nice" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_phaboulette_nice")) + ")\n") + _root["statistic_phaboulette_wow" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_phaboulette_wow")) + ")\n") + _root["statistic_phaboulette_boom" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_phaboulette_boom")) + ")\n") + _root["statistic_phaboulette_o_o" + Number(_root.difficulty)]) + " (") + _root.get_total_score("statistic_phaboulette_o_o")) + ")";
Instance of Symbol 272 MovieClip in Symbol 276 MovieClip Frame 5 (243 B)
onClipEvent (enterFrame) {
if ((Key.isDown(Key.getCode()) && (Key.getAscii() == 57)) && (_root.view_statistics._currentframe == 5)) {
_root.health = 0;
_root.show_selection(152, 343);
_level0.view_statistics.play();
}
}
Symbol 285 MovieClip Frame 1 (8 B)
stop();
Symbol 285 MovieClip Frame 2 (18 B)
_root.inshop = 1;
Symbol 285 MovieClip Frame 6 (2.22 KiB) ●
stop();
_level0.show_game_over.swapDepths(setDepth());
this.gameover_scoreboard_right.text = "";
this.gameover_scoreboard_left.text = "";
this.gameover_finalscore.text = "";
leveltotal = new Number(0);
overalltotal = 0;
gameoversound = new Sound();
gameoversound.attachSound("simple_puzzle_gameover");
gameoversound.start();
i = 5;
while (i <= _root.difficulty) {
leveltotal = leveltotal + ((_root["statistic_field_bonus" + i] * i) * 10);
leveltotal = leveltotal - (_root["statistic_fire_hits" + i] * i);
leveltotal = leveltotal - (_root["statistic_wasders_used" + i] * i);
leveltotal = leveltotal - _root["statistic_worm_battle_time" + i];
leveltotal = leveltotal - (_root["statistic_jokers_used" + i] * i);
leveltotal = leveltotal - (_root["statistic_worm_battle_hits" + i] * i);
leveltotal = leveltotal + ((_root["statistic_perfect_wormbattles" + i] * i) * 10);
leveltotal = leveltotal + ((_root["statistic_perfect_phaboulette" + i] * i) * 10);
leveltotal = leveltotal - (_root["statistic_phaboulette_oops" + i] * i);
leveltotal = leveltotal + (_root["statistic_phaboulette_okay" + i] * i);
leveltotal = leveltotal + ((_root["statistic_phaboulette_nice" + i] * i) * 2);
leveltotal = leveltotal + ((_root["statistic_phaboulette_wow" + i] * i) * 3);
leveltotal = leveltotal + ((_root["statistic_phaboulette_boom" + i] * i) * 4);
leveltotal = leveltotal + ((_root["statistic_phaboulette_o_o" + i] * i) * 5);
overalltotal = overalltotal + Number(leveltotal);
this.gameover_scoreboard_right.text = this.gameover_scoreboard_right.text + (leveltotal + newline);
this.gameover_scoreboard_left.text = this.gameover_scoreboard_left.text + (("Level " + (i - 4)) + newline);
i++;
}
if (_root.stored_data.data.total_score == undefined) {
_root.stored_data.data.total_score = overalltotal;
} else {
_root.stored_data.data.total_score = _root.stored_data.data.total_score + Number(overalltotal);
}
if (_root.stored_data.data.total_score < 1) {
_root.stored_data.data.total_score = 1;
}
if (_root.difficulty >= 26) {
_level0.the_end.play();
}
_root.stored_data.flush();
this.gameover_finalscore.text = (("TOTAL SESSION SCORE\n" + overalltotal) + "\n\nNEW TOTAL SCORE\n") + _root.stored_data.data.total_score;
Instance of Symbol 279 MovieClip in Symbol 285 MovieClip Frame 6 (205 B)
onClipEvent (enterFrame) {
if (Key.isDown(Key.getCode()) && (Key.getAscii() == 120)) {
if (_root.difficulty < 26) {
_root.show_selection(252, 367);
_root.show_game_over.play();
}
}
}
Symbol 285 MovieClip Frame 10 (117 B)
_root.inshop = 0;
_root.difficulty = 5;
_level0.introduction.play();
_level0.introduction.swapDepths(setDepth());
Symbol 317 MovieClip Frame 1 (8 B)
stop();
Symbol 317 MovieClip Frame 2 (1 B)
Symbol 317 MovieClip Frame 867 (149 B)
_root.difficulty = 5;
_root.stored_data.data.played_through = 1;
_root.stored_data.flush();
_root.show_error_message("\nThank you for playing.");
Symbol 330 MovieClip Frame 1 (8 B)
stop();
Symbol 330 MovieClip Frame 2 (8 B)
stop();
Instance of Symbol 233 MovieClip in Symbol 330 MovieClip Frame 2 (90 B)
onClipEvent (enterFrame) {
if (_root.game_running == 1) {
_level0.tutorial.play();
}
}
Symbol 330 MovieClip Frame 3 (192 B)
stop();
_root.inshop = 1;
_level0.tutorial.swapDepths(setDepth());
_level0.tutorial.tutorial_text.text = ((_level0.tutorial._currentframe - 2) + "/") + (_level0.tutorial._totalframes - 3);
Instance of Symbol 233 MovieClip in Symbol 330 MovieClip Frame 3 (1.16 KiB) ●
onClipEvent (load) {
gotoAndStop (5);
next_check = 2;
}
onClipEvent (enterFrame) {
if (_root.game_running == 0) {
_level0.tutorial.gotoAndStop(1);
}
if (next_check <= 0) {
if ((Key.isDown(Key.getCode()) && (Key.getAscii() == 97)) && (_level0.tutorial._currentframe > 3)) {
_level0.tutorial.gotoAndStop(_level0.tutorial._currentframe - 1);
next_check = 2;
_level0.tutorial.tutorial_text.text = ((_level0.tutorial._currentframe - 2) + "/") + (_level0.tutorial._totalframes - 3);
} else if ((Key.isDown(Key.getCode()) && (Key.getAscii() == 100)) && (_level0.tutorial._currentframe < _level0.tutorial._totalframes)) {
_level0.tutorial.gotoAndStop(_level0.tutorial._currentframe + 1);
next_check = 2;
if (_level0.tutorial._currentframe < _level0.tutorial._totalframes) {
_level0.tutorial.tutorial_text.text = ((_level0.tutorial._currentframe - 2) + "/") + (_level0.tutorial._totalframes - 3);
}
} else if ((Key.isDown(Key.getCode()) && (Key.getAscii() == 115)) && (_level0.tutorial._currentframe > 1)) {
_root.health = 0;
} else {
next_check = 0;
}
} else {
next_check--;
}
}
Instance of Symbol 233 MovieClip in Symbol 330 MovieClip Frame 3 (45 B)
onClipEvent (load) {
this.gotoAndStop(23);
}
Instance of Symbol 233 MovieClip in Symbol 330 MovieClip Frame 3 (44 B)
onClipEvent (load) {
this.gotoAndStop(8);
}
Symbol 330 MovieClip Frame 8 (18 B)
_root.health = 0;
Symbol 339 MovieClip Frame 1 (8 B)
stop();
Symbol 339 MovieClip Frame 7 (8 B)
stop();
Instance of Symbol 222 MovieClip in Symbol 339 MovieClip Frame 7 (3.44 KiB) ●
onClipEvent (load) {
page = 1;
previous_page = 0;
total_pages = Math.round(_root.stored_data.data.Library.length / 10);
next_check = 2;
is_changing = -1;
_level0.phab_library.library_input.selectable = false;
keysound = new Sound();
keysound.attachSound("simple_puzzle_key");
}
onClipEvent (enterFrame) {
if (page != previous_page) {
_level0.phab_library.library_text.text = ((("Page " + page) + "/") + total_pages) + newline;
i = (page - 1) * 10;
while (i < (page * 10)) {
_level0.phab_library.library_text.text = _level0.phab_library.library_text.text + (newline + _root.stored_data.data.Library[i]);
i++;
}
_level0.phab_library.library_text.text = _level0.phab_library.library_text.text + "\n\nPress the number of a word you want to change. Type the new word and press ENTER. Press ESCAPE to abort. CONTROL + Number checks existence of word.";
previous_page = page;
}
if (is_changing < 0) {
if (next_check <= 0) {
next_check = 2;
if (((Key.isDown(Key.getCode()) && (Key.getAscii() >= 48)) && (Key.getAscii() <= 57)) && (Key.isDown(17))) {
keysound.start();
is_changing = Number((((page - 1) * 10) + Key.getAscii()) - 48);
getURL ("http://dictionary.reference.com/search?q=" + _root.stored_data.data.Library[is_changing], "_blank");
_root.show_error_message("New window has been opened.\nPlease click here again\nto reactivate Phabetal.");
is_changing = -1;
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 98)) {
_root.show_selection(245, 146);
page--;
if (page <= 0) {
page = total_pages;
}
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 97)) {
_root.show_selection(245, 88);
page++;
if (page > total_pages) {
page = 1;
}
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 120)) {
_root.show_selection(245, 202);
_level0.phab_library.play();
} else if ((Key.isDown(Key.getCode()) && (Key.getAscii() >= 48)) && (Key.getAscii() <= 57)) {
keysound.start();
is_changing = Number((((page - 1) * 10) + Key.getAscii()) - 48);
_level0.phab_library.library_input.selectable = true;
Selection.setFocus(_level0.phab_library.library_input);
_level0.phab_library.library_input.text = _root.stored_data.data.Library[is_changing];
} else {
next_check = 0;
}
} else {
next_check--;
}
} else if (Key.isDown(13)) {
if (_root.string_check(_level0.phab_library.library_input.text, 1) == 0) {
_root.show_error_message("Attention!\nThe new word contains illegal characters!\nPlease use letters only.");
} else if (_root.string_different_chars(_level0.phab_library.library_input.text) < 3) {
_root.show_error_message("Difficulty warning!\nThe new word needs at least\nthree different characters!");
} else {
_root.show_selection(374, 361);
_root.stored_data.data.Library[is_changing] = _level0.phab_library.library_input.text.toLowerCase();
_root.stored_data.flush();
_level0.phab_library.library_input.text = "";
_level0.phab_library.library_input.selectable = false;
Selection.setFocus(_level0.phab_library.junk);
previous_page = -1;
is_changing = -1;
}
} else if (Key.isDown(27)) {
_root.show_selection(374, 361);
_level0.phab_library.library_input.text = "";
_level0.phab_library.library_input.selectable = false;
Selection.setFocus(_level0.phab_library.junk);
previous_page = -1;
is_changing = -1;
}
}
Instance of Symbol 222 MovieClip in Symbol 339 MovieClip Frame 13 (2.77 KiB) ●
onClipEvent (load) {
page = 1;
previous_page = 0;
total_pages = Math.round(_root.stored_data.data.Library.length / 10);
next_check = 2;
is_changing = -1;
_level0.phab_library.library_input.selectable = false;
keysound = new Sound();
keysound.attachSound("simple_puzzle_key");
}
onClipEvent (enterFrame) {
if (page != previous_page) {
_level0.phab_library.library_text.text = ((("Page " + page) + "/") + total_pages) + newline;
i = (page - 1) * 10;
while (i < (page * 10)) {
_level0.phab_library.library_text.text = _level0.phab_library.library_text.text + (newline + _root.stored_data.data.Library[i]);
i++;
}
_level0.phab_library.library_text.text = _level0.phab_library.library_text.text + "\n\nPress the number of a word you want to change. Type the new word and press ENTER. Press ESCAPE if you don't want to change the word.";
previous_page = page;
}
if (is_changing < 0) {
if (next_check <= 0) {
next_check = 2;
if (Key.isDown(Key.getCode()) && (Key.getAscii() == 97)) {
_root.show_selection(245, 88);
page--;
if (page <= 0) {
page = total_pages;
}
} else if (Key.isDown(Key.getCode()) && (Key.getAscii() == 98)) {
_root.show_selection(245, 146);
page++;
if (page > total_pages) {
page = 1;
}
} else if ((Key.isDown(Key.getCode()) && (Key.getAscii() >= 48)) && (Key.getAscii() <= 57)) {
keysound.start();
is_changing = Number((((page - 1) * 10) + Key.getAscii()) - 48);
_level0.phab_library.library_input.selectable = true;
Selection.setFocus(_level0.phab_library.library_input);
_level0.phab_library.library_input.text = _root.stored_data.data.Library[is_changing];
} else {
next_check = 0;
}
} else {
next_check--;
}
} else if (Key.isDown(13)) {
if (_root.string_check(_level0.phab_library.library_input.text, 1) == 0) {
_root.show_error_message("Attention!\nThe new word contains illegal characters!\nPlease use letters only.");
} else if (_root.string_different_chars(_level0.phab_library.library_input.text) < 3) {
_root.show_error_message("Difficulty warning!\nThe new word needs at least\nthree different characters!");
} else {
_root.show_selection(374, 361);
_root.stored_data.data.Library[is_changing] = _level0.phab_library.library_input.text.toLowerCase();
_root.stored_data.flush();
_level0.phab_library.library_input.text = "";
_level0.phab_library.library_input.selectable = false;
Selection.setFocus(_level0.phab_library.junk);
previous_page = -1;
is_changing = -1;
}
} else if (Key.isDown(27)) {
_level0.phab_library.library_input.text = "";
_level0.phab_library.library_input.selectable = false;
Selection.setFocus(_level0.phab_library.junk);
previous_page = -1;
is_changing = -1;
}
}
Symbol 339 MovieClip Frame 14 (33 B)
_root.ignore_input_for_menu = 0;