Frame 1
function loadXMLConfig() {
function LOADXML(vXML) {
this=vXML;//parameter overwritten
delete this.onLoad;
i = 0;
while (i < this.firstChild.childNodes.length) {
switch (this.firstChild.childNodes[i].localName) {
case "buylink" :
_root.buyLink = this.firstChild.childNodes[i].firstChild.nodeValue;
break;
case "downloadlink" :
_root.downloadLink = this.firstChild.childNodes[i].firstChild.nodeValue;
break;
case "zoomfactor1" :
_global.zoomfactor1 = parseFloat(this.firstChild.childNodes[i].firstChild.nodeValue);
break;
case "zoomfactor2" :
_global.zoomfactor2 = parseFloat(this.firstChild.childNodes[i].firstChild.nodeValue);
break;
case "gui" :
_root.gui_texts = new Array();
j = 0;
while (j < this.firstChild.childNodes[i].childNodes.length) {
_root.gui_texts[this.firstChild.childNodes[i].childNodes[j].localName] = this.firstChild.childNodes[i].childNodes[j].firstChild.nodeValue;
j++;
}
break;
case "stages" :
_root.dialog_texts = new Array();
j = 0;
while (j < this.firstChild.childNodes[i].childNodes.length) {
_root.dialog_texts[j] = new Array();
k = 0;
while (k < this.firstChild.childNodes[i].childNodes[j].childNodes.length) {
_root.dialog_texts[j][k] = this.firstChild.childNodes[i].childNodes[j].childNodes[k].firstChild.nodeValue;
k++;
}
j++;
}
break;
}
i++;
}
if (_root.gui_texts.splashscreen == "1") {
_root.createEmptyMovieClip("nevosoft_back", 101);
_root.nevosoft_back.beginFill(6737151, 100);
_root.nevosoft_back.moveTo(0, 0);
_root.nevosoft_back.lineTo(550, 0);
_root.nevosoft_back.lineTo(550, 400);
_root.nevosoft_back.lineTo(0, 400);
_root.nevosoft_back.lineTo(0, 0);
_root.attachMovie("nevosoft_animated", "nevosoft_animated", 102, {_x:Stage.width / 2, _y:Stage.height / 2});
_root.cnt = 0;
_root.onEnterFrame = function () {
if (_root.cnt < 60) {
_root.cnt++;
} else {
delete _root.onEnterFrame;
_root.onFadeOut = function () {
removeMovieClip(_root.nevosoft_animated);
removeMovieClip(_root.nevosoft_back);
_root.gotoAndStop("loader");
_root.f.fadeIn();
};
_root.f.fadeOut();
}
};
} else {
_root.onFadeOut = function () {
_root.gotoAndStop("loader");
};
_root.f.fadeOut();
}
}
stop();
var _local4 = "http://www.playrix.com/mysteryville.html?utm_campaign=other&utm_medium=flash&utm_source=mysteryville";
var _local5 = ((("<?xml version=\"1.0\" encoding=\"utf-8\" ?><config><buylink>" + _local4) + "</buylink><downloadlink>") + _local4) + "</downloadlink><zoomfactor1>60</zoomfactor1><zoomfactor2>10</zoomfactor2><gui><splashscreen>1</splashscreen><btn_buy_on>0</btn_buy_on><btn_buy>Buy</btn_buy><btn_play>PLAY</btn_play><btn_download>Download full version</btn_download><btn_yes>Yes</btn_yes><btn_no>No</btn_no><skip_dialog>Skip dialog</skip_dialog><objects>Remain:</objects><time>Time:</time><paused>Paused</paused><menu>Menu</menu><final_msg>Download full version of the game and revel in exploring the world of magic adventures. 20 unique locations with 40 levels, excellent story, art and sound await you!</final_msg><victory_msg>Congratulations! You've passed a level!</victory_msg><timeout_msg>Time is out. You lost a level. Try again.</timeout_msg><penalty_msg>Penalty for random clicks!!!</penalty_msg><msg_menu_confirm>Do you realy want to exit?</msg_menu_confirm><btn_ok>OK</btn_ok><quest>Goal</quest><obj_1_2_1>candle</obj_1_2_1><obj_1_2_2>elephant</obj_1_2_2><obj_1_2_3>key</obj_1_2_3><obj_1_2_4>rose</obj_1_2_4><obj_1_2_5>sand-glass</obj_1_2_5><obj_1_2_6>tortoise</obj_1_2_6><obj_1_2_7>eye</obj_1_2_7><obj_1_2_8>dice</obj_1_2_8><obj_1_2_9>lipstick</obj_1_2_9><obj_1_2_10>butterfly</obj_1_2_10><obj_4_1_1>hammer</obj_4_1_1><obj_4_1_2>bowling ball</obj_4_1_2><obj_4_1_3>mouse</obj_4_1_3><obj_4_1_4>broom</obj_4_1_4><obj_4_1_5>plate</obj_4_1_5><obj_4_1_6>glass</obj_4_1_6><obj_4_1_7>saw</obj_4_1_7><obj_4_1_8>fax</obj_4_1_8><obj_4_1_9>knife</obj_4_1_9><obj_4_1_10>Einstein</obj_4_1_10><obj_4_1_11>owl</obj_4_1_11><obj_4_1_12>hat</obj_4_1_12><obj_4_1_13>dog</obj_4_1_13><obj_4_1_14>spider</obj_4_1_14><obj_4_1_15>monkey</obj_4_1_15><press_any_key>Click anywhere...</press_any_key></gui><stages><stage><text>1Hello! How can I help you?</text><text>2Hello. I'd like a cup of coffee, please.</text><text>1I'm sorry but we don't have coffee. We're all out of it.</text><text>2Then a cup of tea please.</text><text>1Just a second...</text><text>41pers1</text><text>2How odd - I've never seen a cafe with no coffee...</text><text>31pers1</text><text>1I'm afraid there is no coffee. Yesterday we had a party and the guests drank it all.</text><text>2But you must have something left to drink?</text><text>1We do have have wine - would you like some?</text><text>2Okay, I'll have some wine.</text><text>1I have a bottle of an excellent white wine, but I don't remember where it is. Would you help me find it?</text><text>0Collect all the bottles to help the bartender find the bottle of wine.</text><text>1Here you are. This is an excellent wine.</text><text>2Thanks.</text><text>1Just came to the town, huh?</text><text>2Yes, I arrived this morning. My name's Laura Winner.</text><text>2I'm a journalist and I want to write an article about Mysteryville. I write for Countryside Life magazine.</text><text>1Fat chance. There's nothing here of interest to write about.</text><text>2I can't believe there's nothing interesting here at all...</text><text>1Absolutely.</text><text>1Well... Several cats have disappeared lately; a couple were pets and a couple were town strays.</text><text>2Really? What's become of them?</text><text>1No one knows. But it all looks suspicious.</text><text>1Sorry, I have to put everything in order here. The bar is such a mess.</text><text>2If I help you, would you tell me more about the disappearance of the cats?</text><text>1Hmm... Sure!</text><text>0Help the bartender to put the bar in order. Find the items listed on the left side of the screen.</text><text>1Thank you for your help.</text><text>2You're welcome. Now, tell me about the disappearance of the cats.</text><text>1There lives a witch in our town. She works as a fortune teller. But I know she's a witch.</text><text>1I'm sure she's somehow involved in it.</text><text>2You think she is stealing the cats?</text><text>1I don't know that for certain but she's surely in on it.</text><text>2Well, thank you. That's interesting. I'll go to see her.</text></stage><stage><text>1Hi, Laura!</text><text>2How do you know my name?</text><text>1I know many things, dear. But honestly, you called and made an appointment with me for 5 p.m.</text><text>2Oh, sorry. My head is in a whirl... You see, my cat has disappeared. Can you help me learn something about him?</text><text>1I'll try to help you.</text><text>1I've got my cards scattered all over. Help me to collect them, and I'll read your fortune.</text><text>2Okay, I'll try.</text><text>0Collect the cards so that the fortune teller can tell your fortune.</text><text>1Thank you, Laura! Now we'll look at your fortune...</text><text>51back_2</text><text>1I see that you don't have a cat, Laura. Why did you lie to me?</text><text>2Sorry, I'm a journalist. I came here to write an article about your town.</text><text>2And I decided to investigate the case of disappearing cats.</text><text>2Do you have an idea why the cats are disappearing?</text><text>1I see that you are a good girl, Laura, though you've lied to me.</text><text>1I feel that we must find out more about your fortune.</text><text>1I need my dice for this...</text><text>1They are somewhere here in the room. Help me find them.</text><text>2Okay, I'll try...</text><text>0Collect the dice.</text><text>1The dice say you are heading towards a great challenge.</text><text>1If you cope with it, you'll become famous. And you'll find your true love.</text><text>2Right here, in this town?</text><text>1Perhaps. It will happen soon. I can't tell you more.</text><text>2But what should I do?</text><text>1Go to Dong Li's Asian Market. He feeds all the stray cats in the neighborhood. He can help you with the investigation.</text><text>2Thank you, I'm going there now!</text><text>1Good luck, Laura! Come back here when you find something out.</text></stage><stage><text>2Good day! Are you Mr. Li?</text><text>1Yes, I am Dong Li, owner of Dong Li's Asian Market.</text><text>2Jessica told me that you feed stray cats...</text><text>1It is my lucky day to have such an attractive woman walk in my door. But I have a problem...</text><text>1My recent order was mixed up - instead of lanterns, they sent me fruit!</text><text>1What am I to do? I can't eat this many!</text><text>2Give them a call and ask them to take the fruit back.</text><text>1Already called. They say, it is Dong's fault, that Dong Li didn't read the fine print!</text><text>2Well, read the fine print next time!</text><text>1Thank you. But old Dong has to eat all this fruit; Dong might die after.</text><text>2I can collect the fruit in three minutes, and then you can sell them. Let me try.</text><text>1Beautiful lady wants to help...this is a good thing.</text><text>0Help Dong Li put his shop in order. Collect all of the fruit.</text><text>1Oh, happiness! You have helped Dong Li very much.</text><text>1For this you deserve a Black Lotus Potion.</text><text>1The Black Lotus Potion will to open your eyes. You will see objects that others don't see.</text><text>2It's not dangerous, is it?</text><text>1You will see many objects that other people will not notice.</text><text>1This will come in very useful.</text><text>2Okay, I'll drink it!</text><text>51back_3_1</text><text>2...</text><text>2Oh, so bitter.</text><text>1Now you must check the Black Lotus Potion. Try to find things that you didn't see before in the shop.</text><text>0Find differences to verify that the Black Lotus Potion has taken effect.</text><text>1Now, Laura, you have extraordinary eyesight, like a cat.</text><text>2And why did the cats disappear?</text><text>1There are many people who have lost their cats.</text><text>1Someone is stealing them. Or the cats might have left themselves. This is unknown to Dong Li.</text><text>1You should visit Professor Steinbock.</text><text>1He is very, very strange. But he works at the animal refuge, so he may know something.</text><text>2Okay, I'll go to see him.</text><text>1A blessing of good luck on you, beautiful Laura!</text><text>2Thank you, Mr. Li!</text></stage><stage><text>2Are you Professor Steinbock?</text><text>1Yes, it's me. Steinbock.</text><text>2My name's Laura Winner. I am a journalist and I'm writing an article about your town.</text><text>1It's a really nice town. But the majority of the citizens are insane.</text><text>2And you, professor?</text><text>1Different case. I'm a genius, an utter genius.</text><text>2You are in charge of the refuge for stray animals?</text><text>1Yes, I love animals.</text><text>2People are saying that there is a maniac that steals cats in the town. What do you know about it?</text><text>1Oh, that's what you mean... You want to talk to the cat stealer?</text><text>2Do you know him? Am I talking with him now?</text><text>1No, Laura. But we can communicate with him. You should just free your consciousness.</text><text>1Now we'll have a hypnosis session.</text><text>2I'm hypnosis-resistant.</text><text>1Many people say so but then they yield.</text><text>2Okay, let's try.</text><text>1There will be two stages of hypnosis.</text><text>1First, you should get into trance. Relax...</text><text>51back_4</text><text>1And now look thoroughly at this room.</text><text>0Find the items listed on the left side of the screen.</text><text>1Perfect. We're near it.</text><text>1And now stage two. Going deeper to your subconsciousness.</text><text>51back_4</text><text>1Keep concentrating.</text><text>0To strengthen the hypnosis find the items shadowed on the left side of the screen.</text><text>1We are in quasispace, Laura. Now I'll call him.</text><text>1Cat stealer, I want to talk to you! Cat stealer, please respond!</text><text>1Journalist Laura Winner wants to talk with you!</text><text>1Speak, Laura.</text><text>2...</text></stage></stages></config>";
_root.vXML = new XML(_local5);
_root.vXML.ignoreWhite = true;
LOADXML(vXML);
}
function cheatCode(k) {
if (_root.cheat == undefined) {
_root.cheat = "";
}
_root.cheat = _root.cheat + k;
if (!(Key.getCode() === 32)) {
} else {
if (_root.__paused == undefined) {
_root.__paused = true;
} else {
_root.__paused = !_root.__paused;
}
trace(_root.__paused);
}
if (_root.cheat.length > 5) {
_root.cheat = _root.cheat.substring(1, 6);
}
switch (_root.cheat) {
case "IDDQD" :
trace(_root.cheat);
_root.nextlevel = true;
break;
case "IDKFA" :
trace(_root.cheat);
if (_root.gamebar == undefined) {
break;
}
_root.gamebar.elapsed = 0;
}
}
function formatButton(btn) {
btn.textbox.autoSize = "center";
while (btn.textbox._height > 50) {
fmt = btn.textbox.getTextFormat(0, 1);
fmt.size = fmt.size - 2;
btn.textbox.setTextFormat(fmt);
}
btn.textbox._y = (-btn.textbox._height) / 2;
}
function initGame() {
_root.__paused = false;
if (_root.cheat_listener == undefined) {
_root.cheat_listener = new Object();
_root.cheat_listener.onKeyUp = function () {
cheatCode(String.fromCharCode(Key.getCode()));
};
Key.addListener(_root.cheat_listener);
}
_root.useHandCursor = false;
if (_root._snd_music == undefined) {
_root._snd_music = new Sound();
_root._snd_music.attachSound("snd_music");
_root._snd_music.start(0, 9999);
}
if (_root._snd_levelcomplete == undefined) {
_root._snd_levelcomplete = new Sound();
_root._snd_levelcomplete.attachSound("snd_levelcomplete");
}
if (_root._snd_find == undefined) {
_root._snd_find = new Sound();
_root._snd_find.attachSound("snd_find");
}
if (_root._snd_click == undefined) {
_root._snd_click = new Sound();
_root._snd_click.attachSound("snd_click");
}
if (_root._snd_miss == undefined) {
_root._snd_miss = new Sound();
_root._snd_miss.attachSound("snd_miss");
}
if (_root._snd_gameover == undefined) {
_root._snd_gameover = new Sound();
_root._snd_gameover.attachSound("snd_gameover");
}
}
function pauseScreen() {
if (_root.__paused && (_root.pauseScreen_mc == undefined)) {
_root.createEmptyMovieClip("pauseScreen_mc", _root.getNextHighestDepth());
_root.onMsgBoxPress = function () {
_root.__paused = false;
};
_root.attachMovie("msgbox", "msgbox_mc", _root.getNextHighestDepth(), {_x:275, _y:200});
_root.msgbox_mc.txtfmt.size = 48;
_root.msgbox_mc.setText(_root.gui_texts.paused);
} else if ((!_root.__paused) && (_root.pauseScreen_mc != undefined)) {
removeMovieClip(_root.pauseScreen_mc);
if (_root.msgbox_mc != undefined) {
_root.msgbox_mc.kill();
}
delete _root.onMsgBoxPress;
}
}
function resetGame() {
if (_root.cursor_mc2 != undefined) {
removeMovieClip(_root.cursor_mc2);
}
_global.cDepth = 300;
_global.modePlay = false;
if (_root.gamebar != undefined) {
removeMovieClip(_root.gamebar);
}
if (_root.menu2 != undefined) {
removeMovieClip(_root.menu2);
}
i = 1;
while (i <= 20) {
if (_root[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"] != undefined) {
removeMovieClip(_root[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"]);
}
i++;
}
delete _root.onEnterFrame;
delete _root.__stage;
delete _root.__level;
delete _root.__l;
delete _root.__strings;
}
function loadStage(s) {
trace("Loading stage " + s);
_root.__stage = s;
_root.__level = 0;
_root.__l = 0;
delete _root.__strings;
_root.__strings = new Array();
i = 0;
while (i < _root.dialog_texts[_root.__stage - 1].length) {
_root.__strings[i] = _root.dialog_texts[_root.__stage - 1][i];
i++;
}
}
function skipDialog() {
while ((_root.__l < _root.__strings.length) and (_root.__strings[_root.__l].substr(0, 1) != "0")) {
_root.__l++;
}
showDialogText(_root.__stage);
}
function missClick() {
if (_ymouse > 25) {
if (_root.__paused) {
return(undefined);
}
_root._snd_miss.start(0, 1);
_root.attachMovie("missclick", "missclick", _root.getNextHighestDepth(), {_x:_xmouse, _y:_ymouse});
if (_root.miss_clicks == undefined) {
_root.miss_clicks = 0;
}
_root.miss_clicks++;
if (_root.miss_clicks >= 3) {
_root.miss_clicks = 0;
penalty = 20000;
if (_root.gamebar.elapsed < (_root.gamebar.fulltime - penalty)) {
_root.gamebar.elapsed = _root.gamebar.elapsed + penalty;
_root.attachMovie("penalty", "penalty_mc", _root.getNextHighestDepth(), {_x:Stage.width / 2, _y:Stage.height / 2});
}
}
}
}
function endLevel() {
if (_root.cursor_mc2 != undefined) {
removeMovieClip(_root.cursor_mc2);
}
b = undefined;
if (_root[(("back_" + _root.__stage) + "_") + _root.__level] != undefined) {
b = _root[(("back_" + _root.__stage) + "_") + _root.__level];
} else if (_root["back_" + _root.__stage] != undefined) {
b = _root["back_" + _root.__stage];
}
if (b != undefined) {
trace("Back fined. Reseting MISS_CLICK.");
delete b.onPress;
}
}
function setBrightness(target_mc) {
target_mc._alpha = 100;
delete target_mc.filters;
var _local3 = [1, 0, 0, 0, 255, 0, 1, 0, 0, 255, 0, 0, 1, 0, 255, 0, 0, 0, 1, 0];
var _local2 = new flash.filters.ColorMatrixFilter(_local3);
target_mc.filters = [_local2];
}
function addStaticStars(x, y) {
if (_global.countsprites == undefined) {
_global.countsprites = 0;
}
_global.countsprites++;
_root.attachMovie("stars", "stars_" + _global.countsprites, _root.getNextHighestDepth(), {_x:x, _y:y});
}
function addFlyingStars(x, y) {
var _local3 = 30;
var _local4 = x + (_local3 * Math.sin(Math.random() * Math.PI));
var _local5 = y + (_local3 * Math.sin(Math.random() * Math.PI));
if (_global.countsprites == undefined) {
_global.countsprites = 0;
}
_global.countsprites++;
_root.attachMovie("star1", "star1_" + _global.countsprites, _root.getNextHighestDepth(), {_x:_local4, _y:_local5});
}
function screenObjectClick(target) {
_root.miss_clicks = 0;
target.__finded = true;
target.__state = 1;
target.__speed = 10;
if (target.__posx == undefined) {
target.__posx = 80;
target.__posy = 10;
}
if (_global.animation == undefined) {
_global.animation = 0;
}
delete target.onPress;
target.onEnterFrame = function () {
switch (this.__state) {
case 1 :
if (this.__state2 != this.__state) {
trace((("OBJ_CLICKED " + this._name) + " state: ") + this.__state);
this.__state2 = this.__state;
}
_root._snd_find.start(0, 1);
_global.animation++;
this.__state++;
this.dr = 5;
this.dy = (this._y - this.__posy) / this.__speed;
this.dx = (this._x - this.__posx) / this.__speed;
addStaticStars(this._x, this._y);
this.rotcount = 0;
this.pulsecount = 20;
break;
case 2 :
if (this.__state2 != this.__state) {
trace((("OBJ_CLICKED " + this._name) + " state: ") + this.__state);
this.__state2 = this.__state;
}
this.pulsecount--;
this.rotcount = this.rotcount + this.dr;
this._rotation = this.rotcount;
this._xscale = 80 + (20 * Math.sin((((this.pulsecount / 20) * 2) * Math.PI) + (Math.PI/2)));
this._yscale = 80 + (20 * Math.sin((((this.pulsecount / 20) * 2) * Math.PI) + (Math.PI/2)));
if (this.pulsecount == 0) {
this.__state++;
this.k1 = 0;
this.pulsecount = this.__speed;
}
break;
case 3 :
if (this.__state2 != this.__state) {
trace((("OBJ_CLICKED " + this._name) + " state: ") + this.__state);
this.__state2 = this.__state;
}
addFlyingStars(this._x, this._y);
this.rotcount = this.rotcount + this.dr;
this.dr = this.dr + 5;
this._rotation = this.rotcount;
this._x = this._x - this.dx;
this._y = this._y - this.dy;
this._xscale = 100 - (this.k1 * 5);
this._yscale = 100 - (this.k1 * 5);
if (this.k1 < 10) {
this.k1++;
}
this.pulsecount--;
if (this.pulsecount <= 0) {
this.__state++;
}
break;
default :
if (this.__state2 != this.__state) {
trace((("OBJ_CLICKED " + this._name) + " state: ") + this.__state);
this.__state2 = this.__state;
}
this._visible = false;
_root.__objects--;
_global.animation--;
this.killed = true;
addStaticStars(this._x, this._y);
_root.gamebar.updateObjects();
switch (_root.levelType) {
case 2 :
updateObjects();
break;
case 3 :
updateObjects();
}
delete this.onPress;
delete this.onEnterFrame;
}
};
}
function checkGameOver() {
if (_root.gamebar.gameover) {
delete this.onEnterFrame;
endLevel();
if (_root.menu2 != undefined) {
removeMovieClip(_root.menu2);
}
if (_root.gamebar != undefined) {
removeMovieClip(_root.gamebar);
}
i = 1;
while (i <= 20) {
if (_root[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"] != undefined) {
removeMovieClip(_root[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"]);
}
i++;
}
_root.onEffectEnd = function () {
_root.onMsgBoxPress = function () {
initLevel(_root.levelType);
};
_root.attachMovie("msgbox", "msgbox_mc", _global.cDepth, {_x:275, _y:200});
_root.msgbox_mc.setText(_root.gui_texts.timeout_msg);
};
_root.e.effectsStart();
_root._snd_gameover.start(0, 1);
}
}
function updateObjects() {
j = 0;
py = 0;
i = 1;
while (i <= 20) {
if (_root.menu2[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"] != undefined) {
removeMovieClip(_root.menu2[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"]);
}
if (_root[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"] != undefined) {
removeMovieClip(_root[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"]);
}
if ((_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].killed == false) && (j < 3)) {
j++;
switch (_root.levelType) {
case 2 :
_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].__posx = 30;
_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].__posy = ((_root.menu2._y + 80) + (j * 10)) + py;
t = _root.menu2.createTextField(((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b", _root.menu2.getNextHighestDepth(), 10, (80 + (j * 10)) + py, 100, 30);
t.text = _root.gui_texts[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i];
fmt = new TextFormat();
fmt.color = 16777215 /* 0xFFFFFF */;
fmt.font = "Times New Roman";
fmt.size = 12;
t.setTextFormat(fmt);
t.selectable = false;
t.wordWrap = true;
t.autoSize = "left";
t._width = 70;
py = py + t._height;
_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].onPress = function () {
if (_root.__paused) {
return(undefined);
}
screenObjectClick(this);
};
break;
case 3 :
n = _root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].duplicateMovieClip(((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b", _root.getNextHighestDepth());
k = n._width / n._height;
if (n._width > 75) {
n._width = 75;
n._height = n._width / k;
}
setBrightness(n);
n._x = 45;
n._y = (50 + (n._height / 2)) + py;
_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].__posy = n._y;
_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].__posx = n._x;
trace((((((((((((n._name + " n._x=") + n._x) + "; ") + "n._y=") + n._y) + "; ") + "n._width=") + n._width) + "; ") + "n._height=") + n._height) + "; ");
py = py + (n._height + 15);
_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].onPress = function () {
if (_root.__paused) {
return(undefined);
}
screenObjectClick(this);
};
}
}
i++;
}
}
function showLeftMenu() {
if (_root.menu2 == undefined) {
_root.attachMovie("menu2", "menu2", _root.getNextHighestDepth());
_root.menu2._y = -400;
_root.menu2.onEnterFrame = function () {
if ((this._y + 30) < -30) {
this._y = this._y + 30;
} else {
this._y = -30;
delete this.onEnterFrame;
updateObjects();
}
};
}
}
function initLevel(type) {
_root.nextlevel = false;
_root.__paused = false;
_root.levelType = type;
trace((((("\u0418\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0443\u0440\u043E\u0432\u043D\u044F: " + _root.__stage) + "_") + _root.__level) + " \u0442\u0438\u043F ") + type);
b = undefined;
if (_root[(("back_" + _root.__stage) + "_") + _root.__level] != undefined) {
b = _root[(("back_" + _root.__stage) + "_") + _root.__level];
} else if (_root["back_" + _root.__stage] != undefined) {
b = _root["back_" + _root.__stage];
}
if (b != undefined) {
trace("Back fined. Initiating MISS_CLICK.");
b.useHandCursor = false;
b.onPress = function () {
missClick();
};
_root.e.targetmc = b;
}
_root.__objects = 0;
i = 1;
while (i <= 20) {
if (_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i] != undefined) {
o = _root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i];
if (o.killed) {
o._x = o.old_x;
o._y = o.old_y;
o._alpha = o.old_alpha;
o._rotation = o.old_rotation;
o._xscale = o.old_xscale;
o._yscale = o.old_yscale;
o._visible = true;
o.killed = false;
}
o.old_x = o._x;
o.old_y = o._y;
o.old_alpha = o._alpha;
o.old_rotation = o._rotation;
o.old_xscale = o._xscale;
o.old_yscale = o._yscale;
o.useHandCursor = false;
o.finded = false;
_root.__objects++;
switch (type) {
case 1 :
o.killed = false;
o.onPress = function () {
if (_root.__paused) {
return(undefined);
}
screenObjectClick(this);
};
break;
case 2 :
o.killed = false;
break;
case 3 :
o.killed = false;
break;
case 4 :
o.killed = false;
o.onPress = function () {
if (_root.__paused) {
return(undefined);
}
removeMovieClip(this.childObj);
screenObjectClick(this);
};
n = o.duplicateMovieClip(((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b", _root.getNextHighestDepth());
o.childObj = n;
n.parentObj = o;
n._alpha = 0;
n.useHandCursor = false;
n.onPress = function () {
if (_root.__paused) {
return(undefined);
}
screenObjectClick(this.parentObj);
removeMovieClip(this);
};
if (o._x >= 275) {
n._x = o._x - 275;
} else {
n._x = o._x + 275;
}
}
}
i++;
}
trace("\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432: " + _root.__objects);
switch (type) {
case 1 :
_root.onEnterFrame = function () {
pauseScreen();
if (_root.gamebar == undefined) {
_root.attachMovie("gamebar", "gamebar", _root.getNextHighestDepth());
_root.gamebar.fulltime = _global.fulltime;
_root.gamebar.updateTime();
_root.gamebar.updateObjects();
} else {
_root.gamebar.updateTime();
checkGameOver();
}
if (_root.nextlevel) {
trace("_root.nextlevel");
i = 1;
while (i <= 20) {
o = _root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i];
if (((o != undefined) && (o.finded == false)) && (o.onPress != undefined)) {
screenObjectClick(o);
}
i++;
}
}
if (_root.__objects == 0) {
delete this.onEnterFrame;
endLevel();
trace("Victory");
removeMovieClip(_root.gamebar);
_root._snd_levelcomplete.start(0, 1);
_root.onFadeOut = function () {
_root.onMsgBoxPress = function () {
_root.onFadeIn = function () {
gotoAndStop("dialog_" + _root.__stage);
};
_root.f2.fadeIn();
};
_root.attachMovie("msgbox", "msgbox_mc", 10005, {_x:275, _y:200});
_root.msgbox_mc.setText(_root.gui_texts.victory_msg);
};
_root.f2.fadeOut();
}
};
break;
case 2 :
_root.onEnterFrame = function () {
pauseScreen();
showLeftMenu();
if (_root.gamebar == undefined) {
_root.attachMovie("gamebar", "gamebar", _root.getNextHighestDepth());
_root.gamebar.fulltime = _global.fulltime;
_root.gamebar.updateTime();
_root.gamebar.updateObjects();
} else {
_root.gamebar.updateTime();
checkGameOver();
}
if (_root.nextlevel) {
trace("_root.nextlevel");
i = 1;
while (i <= 20) {
o = _root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i];
if (((o != undefined) && (o.finded == false)) && (o.onPress != undefined)) {
screenObjectClick(o);
}
i++;
}
}
if (_root.__objects == 0) {
delete this.onEnterFrame;
endLevel();
trace("Victory");
removeMovieClip(_root.menu2);
removeMovieClip(_root.gamebar);
_root._snd_levelcomplete.start(0, 1);
_root.onFadeOut = function () {
_root.onMsgBoxPress = function () {
_root.onFadeIn = function () {
gotoAndStop("dialog_" + _root.__stage);
};
_root.f2.fadeIn();
};
_root.attachMovie("msgbox", "msgbox_mc", 10005, {_x:275, _y:200});
_root.msgbox_mc.setText(_root.gui_texts.victory_msg);
};
_root.f2.fadeOut();
}
};
break;
case 3 :
_root.onEnterFrame = function () {
pauseScreen();
showLeftMenu();
if (_root.gamebar == undefined) {
_root.attachMovie("gamebar", "gamebar", _root.getNextHighestDepth());
_root.gamebar.fulltime = _global.fulltime;
_root.gamebar.updateTime();
_root.gamebar.updateObjects();
} else {
_root.gamebar.updateTime();
checkGameOver();
}
if (_root.nextlevel) {
trace("_root.nextlevel");
i = 1;
while (i <= 20) {
o = _root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i];
if (((o != undefined) && (o.finded == false)) && (o.onPress != undefined)) {
screenObjectClick(o);
}
i++;
}
}
if (_root.__objects == 0) {
delete this.onEnterFrame;
endLevel();
trace("Victory");
removeMovieClip(_root.menu2);
removeMovieClip(_root.gamebar);
_root._snd_levelcomplete.start(0, 1);
_root.onFadeOut = function () {
_root.onMsgBoxPress = function () {
_root.onFadeIn = function () {
gotoAndStop("dialog_" + _root.__stage);
};
_root.f2.fadeIn();
};
_root.attachMovie("msgbox", "msgbox_mc", 10005, {_x:275, _y:200});
_root.msgbox_mc.setText(_root.gui_texts.victory_msg);
};
_root.f2.fadeOut();
}
};
break;
case 4 :
if (_root.cursor_mc2 == undefined) {
_root.attachMovie("cursor", "cursor_mc2", 9998);
_root.cursor_mc2.onMouseMove = function () {
_root.cursor_mc2._x = _xmouse + (Stage.width / 2);
if (_root.cursor_mc2._x > Stage.width) {
_root.cursor_mc2._x = _root.cursor_mc2._x - Stage.width;
}
_root.cursor_mc2._y = _ymouse;
};
}
_root.onEnterFrame = function () {
pauseScreen();
if (_root.gamebar == undefined) {
_root.attachMovie("gamebar", "gamebar", _root.getNextHighestDepth());
_root.gamebar.fulltime = _global.fulltime;
_root.gamebar.updateTime();
_root.gamebar.updateObjects();
} else {
_root.gamebar.updateTime();
checkGameOver();
}
if (_root.nextlevel) {
trace("_root.nextlevel");
i = 1;
while (i <= 20) {
o = _root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i];
if (((o != undefined) && (o.finded == false)) && (o.onPress != undefined)) {
screenObjectClick(o);
}
i++;
}
}
if (_root.__objects == 0) {
delete this.onEnterFrame;
endLevel();
trace("Victory");
removeMovieClip(_root.gamebar);
_root._snd_levelcomplete.start(0, 1);
_root.onFadeOut = function () {
_root.onMsgBoxPress = function () {
_root.onFadeIn = function () {
gotoAndStop("dialog_" + _root.__stage);
};
_root.f2.fadeIn();
};
_root.attachMovie("msgbox", "msgbox_mc", 10005, {_x:275, _y:200});
_root.msgbox_mc.setText(_root.gui_texts.victory_msg);
};
_root.f2.fadeOut();
}
};
}
}
function showDialogText(s) {
if ((_root.__stage != s) || (_root.__l == 0)) {
loadStage(s);
}
trace((((("Stage: " + _root.__stage) + "; level: ") + _root.__level) + "; l: ") + _root.__l);
if (_root.flag_nextframe == undefined) {
_root.flag_nextframe = false;
}
if (_root.dlg_listener == undefined) {
_root.dlg_listener = new Object();
_root.dlg_listener.onMouseDown = function () {
if (_ymouse > 50) {
Mouse.removeListener(_root.dlg_listener);
showDialogText(_root.__stage);
}
};
}
Mouse.addListener(_root.dlg_listener);
if (_root.dlg_skip_dialog == undefined) {
_root.createEmptyMovieClip("dlg_skip_dialog", _root.getNextHighestDepth());
_root.dlg_skip_dialog.createTextField("textbox", _root.dlg_skip_dialog.getNextHighestDepth(), 0, 0, 200, 20);
_root.dlg_skip_dialog.autoSize = "left";
_root.dlg_skip_dialog.textbox.text = _root.gui_texts.skip_dialog;
fmt = new TextFormat();
fmt.font = "Arial";
fmt.color = 16777215 /* 0xFFFFFF */;
fmt.bold = true;
_root.dlg_skip_dialog.textbox.setTextFormat(fmt);
_root.dlg_skip_dialog.onPress = function () {
skipDialog();
};
}
this.baloon_mc.kill();
if (_root.__l < _root.__strings.length) {
if (_root.__strings[_root.__l].substr(0, 1) == "1") {
trace("\u0413\u043E\u0432\u043E\u0440\u0438\u0442 \u043F\u0435\u0440\u0441");
this.attachMovie("baloon", "baloon_mc", _global.cDepth, {_x:250, _y:100, _visible:false});
this.baloon_mc.setType(1);
this.baloon_mc.setWidth(270);
this.baloon_mc.setText(_root.__strings[_root.__l].substr(1, _root.__strings[_root.__l].length - 1));
} else if (_root.__strings[_root.__l].substr(0, 1) == "2") {
trace("\u0413\u043E\u0432\u043E\u0440\u044E \u044F");
this.attachMovie("baloon", "baloon_mc", _global.cDepth, {_x:0, _y:350, _visible:false});
this.baloon_mc.setType(2);
this.baloon_mc.setWidth(550);
this.baloon_mc.hideArrow();
this.baloon_mc.setText(_root.__strings[_root.__l].substr(1, _root.__strings[_root.__l].length - 1));
} else if (_root.__strings[_root.__l].substr(0, 1) == "0") {
_root.__level++;
this.baloon_mc.kill();
Mouse.removeListener(_root.dlg_listener);
trace((("Starting level " + _root.__level) + " at stage ") + _root.__stage);
delete _root.dlg_skip_dialog.onPress;
removeMovieClip(_root.dlg_skip_dialog);
_root.onMsgBoxPress = function () {
gotoAndStop((("level_" + _root.__stage) + "_") + _root.__level);
};
this.attachMovie("msgbox", "msgbox_mc", _global.cDepth, {_x:275, _y:200});
this.msgbox_mc.setText((_root.gui_texts.quest + ":\n") + _root.__strings[_root.__l].substr(1, _root.__strings[_root.__l].length - 1));
} else if (_root.__strings[_root.__l].substr(0, 1) == "3") {
effect = _root.__strings[_root.__l].substr(1, 1);
persname = _root.__strings[_root.__l].substr(2, _root.__strings[_root.__l].length - 2);
if (effect == 1) {
_root[persname]._visible = true;
_root[persname].onEnterFrame = function () {
if (this._x < this.oldx) {
this._x = this._x + 20;
} else {
this._x = this.oldx;
delete this.onEnterFrame;
}
};
}
_root.flag_nextframe = true;
} else if (_root.__strings[_root.__l].substr(0, 1) == "4") {
effect = _root.__strings[_root.__l].substr(1, 1);
persname = _root.__strings[_root.__l].substr(2, _root.__strings[_root.__l].length - 2);
if (effect == 1) {
_root[persname].oldx = _root[persname]._x;
_root[persname].onEnterFrame = function () {
if (this._x > -500) {
this._x = this._x - 20;
} else {
this._visible = false;
delete this.onEnterFrame;
}
};
}
_root.flag_nextframe = true;
} else if (_root.__strings[_root.__l].substr(0, 1) == "5") {
Mouse.removeListener(_root.dlg_listener);
effect = _root.__strings[_root.__l].substr(1, 1);
effectname = _root.__strings[_root.__l].substr(2, _root.__strings[_root.__l].length - 2);
_root.flag_nextframe = true;
_root.e.targetmc = _root[effectname];
_root.e.setType(effect);
_root.e.effectsStart();
} else {
trace("Unknown first symbol");
_root.flag_nextframe = true;
}
_root.__l++;
if (_root.flag_nextframe == true) {
_root.flag_nextframe = false;
if (_root.e.inEffect == true) {
trace("setting onEnterFrame");
_root.onEnterFrame = function () {
trace("onEnterFrame");
if (_root.e.inEffect == false) {
showDialogText(_root.__stage);
delete _root.onEnterFrame;
}
};
} else {
_root.flag_nextframe = false;
showDialogText(_root.__stage);
}
}
} else {
trace(("Stage " + _root.__stage) + " finished");
this.baloon_mc.kill();
Mouse.removeListener(_root.dlg_listener);
delete _root.dlg_skip_dialog.onPress;
removeMovieClip(_root.dlg_skip_dialog);
_root.__stage++;
_root.__level = 0;
_root.__l = 0;
_root.onFadeOut = function () {
_root.f.fadeIn();
gotoAndStop("dialog_" + _root.__stage);
};
_root.f.fadeOut();
}
}
stop();
_root.f = new fader();
_root.f.speed = 30;
_root.f2 = new fader2();
_root.f2.speed = 30;
_root.e = new effects();
loadXMLConfig();
Frame 2
_root.progres_bar_width = _root.progressbar._width;
this.onEnterFrame = function () {
if ((this.getBytesTotal() == this.getBytesLoaded()) && (!_root.fader.inFade)) {
trace("Loading complete. Initiating listener.");
_root.waitAnyKey = new Object();
_root.waitAnyKey.onMouseDown = (_root.waitAnyKey.onKeyDown = function () {
removeMovieClip(_root.press_any_key);
trace("Listener OK");
Mouse.removeListener(_root.waitAnyKey);
Key.removeListener(_root.waitAnyKey);
_root.onFadeOut = function () {
gotoAndPlay ("frame_menu");
_root.f.fadeIn();
};
_root.f.fadeOut();
});
Mouse.addListener(_root.waitAnyKey);
Key.addListener(_root.waitAnyKey);
delete this.onEnterFrame;
delete _root.loadPercent;
delete _root.progress_bar_width;
_root.attachMovie("press_any_key", "press_any_key", _root.getNextHighestDepth(), {_x:_root.progressbar._x + (_root.progressbar._width / 2), _y:_root.progressbar._y + (_root.progressbar._height / 2)});
_root.press_any_key.fmt = _root.press_any_key.textbox.getTextFormat();
_root.press_any_key.fmt.bold = true;
_root.press_any_key.textbox.text = _root.gui_texts.press_any_key;
_root.press_any_key.textbox.size = 16;
_root.press_any_key.textbox.setTextFormat(_root.press_any_key.fmt);
} else {
_root.loadPercent = (100 / this.getBytesTotal()) * this.getBytesLoaded();
_root.progressbar._width = (_root.progres_bar_width / 100) * _root.loadPercent;
}
};
stop();
Frame 3
initGame();
menu._y = -200;
menu.onEnterFrame = function () {
if (this._y < 200) {
this._y = this._y + 20;
} else {
delete this.onEnterFrame;
}
};
stop();
Frame 10
stop();
showDialogText(1);
Frame 20
stop();
_global.fulltime = 180000 /* 0x02BF20 */;
initLevel(1);
Frame 30
stop();
_global.fulltime = 180000 /* 0x02BF20 */;
initLevel(2);
Frame 40
stop();
showDialogText(2);
Frame 50
stop();
_global.fulltime = 120000 /* 0x01D4C0 */;
initLevel(1);
Frame 60
stop();
_global.fulltime = 120000 /* 0x01D4C0 */;
initLevel(1);
Frame 71
stop();
showDialogText(3);
Frame 81
stop();
_global.fulltime = 120000 /* 0x01D4C0 */;
initLevel(1);
Frame 91
stop();
_global.fulltime = 120000 /* 0x01D4C0 */;
initLevel(4);
Frame 101
stop();
showDialogText(4);
Frame 111
stop();
_global.fulltime = 120000 /* 0x01D4C0 */;
initLevel(2);
Frame 121
stop();
_global.fulltime = 120000 /* 0x01D4C0 */;
initLevel(3);
Frame 131
stop();
_root.onMsgBoxPress = function () {
getURL (_root.downloadLink, "_blank");
_root.resetGame();
_root.gotoAndStop("frame_menu");
};
this.attachMovie("msgbox", "msgbox_mc", _global.cDepth, {_x:275, _y:200});
this.msgbox_mc.setText(_root.gui_texts.final_msg);
Symbol 11 MovieClip [penalty] Frame 1
this.textbox.text = _root.gui_texts.penalty_msg;
this.textbox.autosize = "center";
Symbol 11 MovieClip [penalty] Frame 61
stop();
removeMovieClip(this);
Symbol 15 MovieClip [star1] Frame 1
this.onEnterFrame = function () {
this._y = this._y + 2;
};
Symbol 15 MovieClip [star1] Frame 12
this.onEnterFrame = function () {
};
stop();
removeMovieClip(this);
Symbol 19 MovieClip [stars] Frame 25
stop();
removeMovieClip(this);
Symbol 41 MovieClip [baloon] Frame 1
#initclip 11
Object.registerClass("baloon", baloon);
#endinitclip
Symbol 45 MovieClip [msgbox2] Frame 1
#initclip 8
Object.registerClass("msgbox2", msgbox2);
#endinitclip
Symbol 46 MovieClip [msgbox] Frame 1
#initclip 9
Object.registerClass("msgbox", msgbox);
#endinitclip
Symbol 59 MovieClip [gamebar] Frame 1
#initclip 10
Object.registerClass("gamebar", gamebar);
#endinitclip
Symbol 69 MovieClip [missclick] Frame 15
removeMovieClip(this);
stop();
Symbol 83 MovieClip [nevosoft_animated] Frame 40
stop();
Symbol 371 MovieClip [__Packages.fader] Frame 0
class fader extends MovieClip
{
var speed;
function fader () {
super();
speed = 10;
if (_root.fader != undefined) {
delete _root.fader;
}
_root.createEmptyMovieClip("fader", 9999);
_root.fader.inFade = false;
_root.fader._visible = false;
_root.fader.clear();
_root.fader.beginFill(0, 100);
_root.fader.moveTo(0, 0);
_root.fader.lineTo(550, 0);
_root.fader.lineTo(550, 400);
_root.fader.lineTo(0, 400);
_root.fader.lineTo(0, 0);
_root.fader._alpha = 0;
}
function fadeIn() {
_root.fader.inFade = true;
_root.fader.speed = speed;
_root.fader.frame = 0;
_root.fader._alpha = 100;
_root.fader._visible = true;
_root.fader.onEnterFrame = function () {
if (_root.fader.frame <= this.speed) {
_root.fader._alpha = 100 - (_root.fader.frame * (100 / this.speed));
_root.fader.frame++;
} else {
_root.fader.frame = 0;
_root.fader._visible = false;
delete this.onEnterFrame;
_root.fader.inFade = false;
if (_root.onFadeIn != undefined) {
_root.onFadeIn();
delete _root.onFadeIn;
}
}
};
}
function fadeOut() {
_root.fader.inFade = true;
_root.fader.speed = speed;
_root.fader.frame = 0;
_root.fader._alpha = 0;
_root.fader._visible = true;
_root.fader.onEnterFrame = function () {
if (_root.fader.frame <= this.speed) {
_root.fader._alpha = _root.fader.frame * (100 / this.speed);
_root.fader.frame++;
} else {
_root.fader.frame = 0;
delete this.onEnterFrame;
_root.fader.inFade = false;
if (_root.onFadeOut != undefined) {
_root.onFadeOut();
delete _root.onFadeOut;
}
}
};
}
}
Symbol 372 MovieClip [__Packages.fader2] Frame 0
class fader2 extends MovieClip
{
var speed;
function fader2 () {
super();
speed = 10;
if (_root.fader2 != undefined) {
delete _root.fader2;
}
_root.createEmptyMovieClip("fader2", 9997);
_root.fader2.inFade = false;
_root.fader2._visible = false;
_root.fader2.clear();
matrix = new flash.geom.Matrix();
matrix.createGradientBox(50, 50, 0, -25, -25);
var _local5 = "pad";
var _local6 = "RGB";
var _local4 = 0;
_root.fader2.beginGradientFill("radial", [0, 0, 0], [0, 70, 80], [0, 127, 255], matrix, _local5, _local6, _local4);
_root.fader2.moveTo(-275, -200);
_root.fader2.lineTo(275, -200);
_root.fader2.lineTo(275, 200);
_root.fader2.lineTo(-275, 200);
_root.fader2.lineTo(-275, -200);
_root.fader2.endFill();
_root.fader2._x = 275;
_root.fader2._y = 200;
_root.fader2._xscale = (_root.fader2._yscale = 1600);
_root.fader2._alpha = 0;
}
function fadeIn() {
trace("f2.fadeIn()");
_root.fader2.inFade = true;
_root.fader2.speed = speed;
_root.fader2.frame = 0;
_root.fader2._alpha = 100;
_root.fader2._xscale = (_root.fader2._yscale = 100);
_root.fader2._visible = true;
_root.fader2.onEnterFrame = function () {
trace("f2.onEnterFrame()");
if (this._alpha > 0) {
this._alpha = this._alpha - 5;
}
if (this._xscale < 3050) {
this._xscale = this._xscale + 150;
this._yscale = this._yscale + 150;
} else {
this._xscale = 3200;
this._yscale = 3200;
_root.fader2.frame = 0;
delete this.onEnterFrame;
_root.fader2.inFade = false;
if (_root.onFadeIn != undefined) {
trace("_root.onFadeIn();");
_root.onFadeIn();
delete _root.onFadeIn;
}
}
};
}
function fadeOut() {
_root.fader2.inFade = true;
_root.fader2.speed = speed;
_root.fader2.frame = 0;
_root.fader2._alpha = 0;
_root.fader2._xscale = (_root.fader2._yscale = 3200);
_root.fader2._visible = true;
_root.fader2.onEnterFrame = function () {
if (this._alpha < 100) {
this._alpha = this._alpha + 5;
}
if (this._xscale > 250) {
this._xscale = this._xscale - 150;
this._yscale = this._yscale - 150;
} else {
this._xscale = 100;
this._yscale = 100;
_root.fader2.frame = 0;
delete this.onEnterFrame;
_root.fader2.inFade = false;
if (_root.onFadeOut != undefined) {
trace("_root.onFadeOut();");
_root.onFadeOut();
delete _root.onFadeOut;
}
}
};
}
}
Symbol 373 MovieClip [__Packages.effects] Frame 0
class effects extends MovieClip
{
var newmc, targetmc;
function effects () {
super();
}
function setType(t) {
type = t;
}
function effectsStart() {
var s;
inEffect = true;
trace("effectsStart() type=" + type);
newmc = targetmc.duplicateMovieClip("effects", _root.getNextHighestDepth());
newmc.frame = 0;
newmc.effect = this;
newmc._alpha = 0;
newmc.t = type;
newmc.onEnterFrame = function () {
if (this.frame > 50) {
trace("Effects end");
if (_root.onEffectEnd != undefined) {
_root.onEffectEnd();
delete _root.onEffectEnd;
}
this.effect.inEffect = false;
(this.removeMovieClip());// not popped
delete this.onEnterFrame;
} else if (this.frame > 25) {
this._alpha = 0 + (2.4 * (50 - this.frame));
s = 30 * Math.sin(((this.k / 360) * Math.PI) * 2);
if (this.t == 2) {
this.k2 = this.k2 + 0.05;
this._rotation = this._rotation + this.k2;
}
this._xscale = 100 + s;
this._yscale = 100 + s;
this._x = (-(5.5 * s)) / 2;
this._y = (-(4 * s)) / 2;
if (this.t == 2) {
this._x = 275 - (this._width / 2);
this._y = 200 - (this._height / 2);
}
this.k = this.k - 1;
this.frame = this.frame + 0.5;
} else if (this.frame >= 1) {
this._alpha = 0 + (2.4 * this.frame);
s = 30 * Math.sin(((this.k / 360) * Math.PI) * 2);
if (this.t == 2) {
this.k2 = this.k2 + 0.05;
this._rotation = this._rotation + this.k2;
trace((("coords x, y=" + this._x) + " ") + this._y);
}
this._xscale = 100 + s;
this._yscale = 100 + s;
this._x = (-(5.5 * s)) / 2;
this._y = (-(4 * s)) / 2;
if (this.t == 2) {
this._x = 275 - (this._width / 2);
this._y = 200 - (this._height / 2);
}
this.k = this.k + 1;
this.frame = this.frame + 0.5;
} else {
this.k = 0;
this.k2 = 0.1;
this.frame++;
}
};
}
var inEffect = false;
var type = 1;
}
Symbol 374 MovieClip [__Packages.msgbox2] Frame 0
class msgbox2 extends MovieClip
{
var createEmptyMovieClip, getNextHighestDepth, attachMovie, createTextField, removeMovieClip;
function msgbox2 () {
super();
if (msgboxes < 1) {
msgboxes++;
txtfmt = new TextFormat();
txtfmt.color = 16777215 /* 0xFFFFFF */;
txtfmt.size = 20;
txtfmt.align = "center";
txtfmt.font = "Times New Roman";
msgbox_fill = createEmptyMovieClip("msgbox_fill", getNextHighestDepth());
with (msgbox_fill) {
clear();
beginFill(0, 70);
moveTo(-260, -150);
lineTo(260, -150);
lineTo(260, 150);
lineTo(-260, 150);
lineTo(-260, -150);
}
msgbox_back = attachMovie("msgbox_back", "msgbox_back", getNextHighestDepth());
msgbox_button = attachMovie("button", "msgbox_button", getNextHighestDepth(), {_x:-70, _y:100});
msgbox_button.textbox.text = _root.gui_texts.btn_yes;
msgbox_button2 = attachMovie("button", "msgbox_button2", getNextHighestDepth(), {_x:70, _y:100});
msgbox_button2.textbox.text = _root.gui_texts.btn_no;
formatButton(msgbox_button);
formatButton(msgbox_button2);
msgbox_button.onPress = function () {
_root.onMsgBoxPress();
delete _root.onMsgBoxPress;
this._parent.kill();
};
msgbox_button2.onPress = function () {
_root.onMsgBoxPress2();
delete _root.onMsgBoxPress2;
this._parent.kill();
};
createTextField("textbox", getNextHighestDepth(), -200, -100, 400, 150);
textbox.selectable = false;
textbox.wordWrap = true;
} else {
(removeMovieClip());// not popped
}
}
function formatButton(btn) {
btn.textbox.autoSize = "center";
while (btn.textbox._height > 54) {
fmt = btn.textbox.getTextFormat(0, 1);
fmt.size = fmt.size - 2;
btn.textbox.setTextFormat(fmt);
}
btn.textbox._y = (-btn.textbox._height) / 2;
}
function setText(txt) {
textbox.text = txt;
textbox.setTextFormat(txtfmt);
}
function kill() {
msgboxes = 0;
(removeMovieClip());// not popped
(removeMovieClip());// not popped
(removeMovieClip());// not popped
(removeMovieClip());// not popped
(removeMovieClip());// not popped
}
var msgbox_fill = undefined;
var msgbox_back = undefined;
var msgbox_button = undefined;
var msgbox_button2 = undefined;
var textbox = undefined;
var fmt = undefined;
var txtfmt = undefined;
static var msgboxes = 0;
}
Symbol 375 MovieClip [__Packages.msgbox] Frame 0
class msgbox extends MovieClip
{
var createEmptyMovieClip, getNextHighestDepth, attachMovie, createTextField, removeMovieClip;
function msgbox () {
super();
if (msgboxes < 1) {
msgboxes++;
txtfmt = new TextFormat();
txtfmt.color = 16777215 /* 0xFFFFFF */;
txtfmt.size = 20;
txtfmt.align = "center";
txtfmt.font = "Times New Roman";
msgbox_fill = createEmptyMovieClip("msgbox_fill", getNextHighestDepth());
with (msgbox_fill) {
clear();
beginFill(0, 70);
moveTo(-260, -150);
lineTo(260, -150);
lineTo(260, 150);
lineTo(-260, 150);
lineTo(-260, -150);
}
msgbox_back = attachMovie("msgbox_back", "msgbox_back", getNextHighestDepth());
msgbox_button = attachMovie("button", "msgbox_button", getNextHighestDepth(), {_x:0, _y:100});
msgbox_button.textbox.text = _root.gui_texts.btn_ok;
formatButton(msgbox_button);
msgbox_button.onPress = function () {
_root.onMsgBoxPress();
delete _root.onMsgBoxPress;
this._parent.kill();
};
createTextField("textbox", getNextHighestDepth(), -200, -100, 400, 150);
textbox.selectable = false;
textbox.wordWrap = true;
} else {
(removeMovieClip());// not popped
}
}
function formatButton(btn) {
btn.textbox.autoSize = "center";
while (btn.textbox._height > 54) {
fmt = btn.textbox.getTextFormat(0, 1);
fmt.size = fmt.size - 2;
btn.textbox.setTextFormat(fmt);
}
btn.textbox._y = (-btn.textbox._height) / 2;
}
function setText(txt) {
textbox.text = txt;
textbox.setTextFormat(txtfmt);
}
function kill() {
msgboxes = 0;
(removeMovieClip());// not popped
(removeMovieClip());// not popped
(removeMovieClip());// not popped
(removeMovieClip());// not popped
}
var msgbox_fill = undefined;
var msgbox_back = undefined;
var msgbox_button = undefined;
var textbox = undefined;
var fmt = undefined;
var txtfmt = undefined;
static var msgboxes = 0;
}
Symbol 376 MovieClip [__Packages.gamebar] Frame 0
class gamebar extends MovieClip
{
var btn_menu, progressbar, textbox_objects, textbox_time;
function gamebar () {
super();
gameover = false;
fmt = new TextFormat();
fmt.color = 16777215 /* 0xFFFFFF */;
fmt.bold = true;
fmt.size = 10;
btn_menu.textbox_menu.text = _root.gui_texts.menu;
btn_menu.textbox_menu.setTextFormat(fmt);
maxwidth = progressbar._width;
btn_menu.onPress = function () {
if (_root.__paused) {
return(undefined);
}
_root.in_dialog = true;
_root.onMsgBoxPress = function () {
_root.in_dialog = false;
trace("Reseting game");
_root.resetGame();
_root.gotoAndStop("frame_menu");
};
_root.onMsgBoxPress2 = function () {
_root.in_dialog = false;
(this.removeMovieClip());// not popped
};
_root.attachMovie("msgbox2", "msgbox2_mc", _global.cDepth, {_x:275, _y:200});
_root.msgbox2_mc.setText(_root.gui_texts.msg_menu_confirm);
};
}
function update() {
}
function updateObjects() {
textbox_objects.text = _root.gui_texts.objects + _root.__objects;
textbox_objects.setTextFormat(fmt);
}
function updateTime() {
if ((timestart == undefined) || (timestart == 0)) {
timestart = getTimer();
}
currenttime = getTimer();
if (_root.in_dialog == undefined) {
_root.in_dialog = false;
}
if (((!gameover) && (!_root.__paused)) && (!_root.in_dialog)) {
elapsed = elapsed + (currenttime - timestart);
}
if (elapsed >= fulltime) {
elapsed = fulltime;
gameover = true;
}
timestart = currenttime;
seconds = int((fulltime - elapsed) / 1000);
minutes = int(seconds / 60);
seconds = int(seconds - (minutes * 60));
if (seconds < 10) {
seconds = "0" + String(seconds);
}
minutes = String(minutes);
if (_root.__paused) {
textbox_time.text = _root.gui_texts.paused;
} else {
textbox_time.text = ((_root.gui_texts.time + minutes) + ":") + seconds;
}
textbox_time.setTextFormat(fmt);
progressbar._width = ((fulltime - elapsed) / fulltime) * maxwidth;
}
var fulltime = 120000;
var fmt = undefined;
var currenttime = 0;
var elapsed = 0;
var seconds = 0;
var minutes = 0;
var timestart = 0;
var maxwidth = 0;
var gameover = false;
}
Symbol 377 MovieClip [__Packages.baloon] Frame 0
class baloon extends MovieClip
{
var type, _visible, fmt, fill, createEmptyMovieClip, getNextHighestDepth, textbox, createTextField, bal_ar, attachMovie, bal_h1, bal_h2, bal_v1, bal_v2, bal_tr, bal_tl, bal_br, bal_bl, removeMovieClip, txt, txt_w, txt_h, _y, onEnterFrame;
function baloon () {
super();
if (baloons < 1) {
type = 1;
baloons++;
trace("Baloon constructor");
_visible = false;
fmt = new TextFormat();
fmt.font = "Times New Roman";
fmt.size = 16;
fmt.color = 16777215 /* 0xFFFFFF */;
fmt.align = "center";
fill = createEmptyMovieClip("fill", getNextHighestDepth());
textbox = createTextField("textbox", getNextHighestDepth(), 0, 0, 100, 100);
textbox.autoSize = "left";
textbox.wordWrap = true;
textbox.selectable = false;
textbox.border = false;
bal_ar = attachMovie("bal_ar", "bal_ar", getNextHighestDepth());
bal_h1 = attachMovie("bal_h", "bal_h1", getNextHighestDepth());
bal_h2 = attachMovie("bal_h", "bal_h2", getNextHighestDepth());
bal_v1 = attachMovie("bal_v", "bal_v1", getNextHighestDepth());
bal_v2 = attachMovie("bal_v", "bal_v2", getNextHighestDepth());
bal_tr = attachMovie("bal_tr", "bal_tr", getNextHighestDepth());
bal_tl = attachMovie("bal_tl", "bal_tl", getNextHighestDepth());
bal_br = attachMovie("bal_br", "bal_br", getNextHighestDepth());
bal_bl = attachMovie("bal_bl", "bal_bl", getNextHighestDepth());
} else {
(removeMovieClip());// not popped
}
}
function kill() {
trace("Baloon destructor");
baloons = 0;
(removeMovieClip());// not popped
}
function hideArrow() {
bal_ar._visible = false;
}
function refreshBaloon() {
textbox.text = txt;
textbox.setTextFormat(fmt);
txt_w = textbox._width;
txt_h = textbox._height;
if (txt_h < 40) {
txt_h = 40;
}
fill._x = (fill._y = 0);
fill.clear();
if (type == 1) {
bal_h1._x = (bal_h2._x = txt_w / 2);
bal_h1._y = -14;
bal_h2._y = txt_h + 14;
bal_h1._width = (bal_h2._width = txt_w - 36);
bal_v1._y = (bal_v2._y = txt_h / 2);
bal_v1._x = -14;
bal_v2._x = txt_w + 14;
bal_v1._height = (bal_v2._height = txt_h - 36);
bal_br._y = (bal_bl._y = txt_h);
bal_br._x = (bal_tr._x = txt_w);
bal_ar._x = -42;
bal_ar._y = txt_h;
bal_ar._xscale = (bal_ar._yscale = 50);
bal_ar._rotation = 160;
_y = _y + (40 - txt_h);
fill.beginFill(0, 70);
fill.moveTo(-14, 14);
fill.lineTo(-3, -3);
fill.lineTo(14, -14);
fill.lineTo(txt_w - 14, -14);
fill.lineTo(txt_w + 3, -3);
fill.lineTo(txt_w + 14, 14);
fill.lineTo(txt_w + 14, txt_h - 14);
fill.lineTo(txt_w + 3, txt_h + 3);
fill.lineTo(txt_w - 14, txt_h + 14);
fill.lineTo(14, txt_h + 14);
fill.lineTo(-3, txt_h + 3);
fill.lineTo(-14, txt_h - 14);
} else {
bal_h1._visible = (bal_h2._visible = (bal_v1._visible = (bal_v2._visible = true)));
bal_br._visible = (bal_bl._visible = (bal_tr._visible = (bal_tl._visible = false)));
bal_h1._x = (bal_h2._x = txt_w / 2);
bal_h1._y = -14;
bal_h2._y = txt_h + 14;
bal_h1._width = (bal_h2._width = txt_w + 29);
bal_v1._y = (bal_v2._y = txt_h / 2);
bal_v1._x = -14;
bal_v2._x = txt_w + 14;
bal_v1._height = (bal_v2._height = txt_h + 29);
fill.beginFill(0, 70);
fill.moveTo(-14, -14);
fill.lineTo(txt_w + 14, -14);
fill.lineTo(txt_w + 14, txt_h + 14);
fill.lineTo(-14, txt_h + 14);
fill.lineTo(-14, -14);
fill.endFill();
}
}
function setType(t) {
type = t;
}
function setWidth(w) {
txt_w = w;
textbox._width = w;
refreshBaloon();
}
function setText(s) {
step = 0;
txt = s;
refreshBaloon();
onEnterFrame = function () {
if (this.step <= 5) {
trace(this.step);
this._visible = true;
this._xscale = 20 * this.step;
this._yscale = 20 * this.step;
this.step++;
} else {
delete this.onEnterFrame;
}
};
}
static var baloons = 0;
var step = 0;
}
Symbol 94 MovieClip Frame 1
function cheatCode(k) {
if (_root.cheat == undefined) {
_root.cheat = "";
}
_root.cheat = _root.cheat + k;
if (!(Key.getCode() === 32)) {
} else {
if (_root.__paused == undefined) {
_root.__paused = true;
} else {
_root.__paused = !_root.__paused;
}
trace(_root.__paused);
}
if (_root.cheat.length > 5) {
_root.cheat = _root.cheat.substring(1, 6);
}
switch (_root.cheat) {
case "IDDQD" :
trace(_root.cheat);
_root.nextlevel = true;
break;
case "IDKFA" :
trace(_root.cheat);
if (_root.gamebar == undefined) {
break;
}
_root.gamebar.elapsed = 0;
}
}
function formatButton(btn) {
btn.textbox.autoSize = "center";
while (btn.textbox._height > 50) {
fmt = btn.textbox.getTextFormat(0, 1);
fmt.size = fmt.size - 2;
btn.textbox.setTextFormat(fmt);
}
btn.textbox._y = (-btn.textbox._height) / 2;
}
function initGame() {
_root.__paused = false;
if (_root.cheat_listener == undefined) {
_root.cheat_listener = new Object();
_root.cheat_listener.onKeyUp = function () {
cheatCode(String.fromCharCode(Key.getCode()));
};
Key.addListener(_root.cheat_listener);
}
_root.useHandCursor = false;
if (_root._snd_music == undefined) {
_root._snd_music = new Sound();
_root._snd_music.attachSound("snd_music");
_root._snd_music.start(0, 9999);
}
if (_root._snd_levelcomplete == undefined) {
_root._snd_levelcomplete = new Sound();
_root._snd_levelcomplete.attachSound("snd_levelcomplete");
}
if (_root._snd_find == undefined) {
_root._snd_find = new Sound();
_root._snd_find.attachSound("snd_find");
}
if (_root._snd_click == undefined) {
_root._snd_click = new Sound();
_root._snd_click.attachSound("snd_click");
}
if (_root._snd_miss == undefined) {
_root._snd_miss = new Sound();
_root._snd_miss.attachSound("snd_miss");
}
if (_root._snd_gameover == undefined) {
_root._snd_gameover = new Sound();
_root._snd_gameover.attachSound("snd_gameover");
}
}
function pauseScreen() {
if (_root.__paused && (_root.pauseScreen_mc == undefined)) {
_root.createEmptyMovieClip("pauseScreen_mc", _root.getNextHighestDepth());
_root.onMsgBoxPress = function () {
_root.__paused = false;
};
_root.attachMovie("msgbox", "msgbox_mc", _root.getNextHighestDepth(), {_x:275, _y:200});
_root.msgbox_mc.txtfmt.size = 48;
_root.msgbox_mc.setText(_root.gui_texts.paused);
} else if ((!_root.__paused) && (_root.pauseScreen_mc != undefined)) {
removeMovieClip(_root.pauseScreen_mc);
if (_root.msgbox_mc != undefined) {
_root.msgbox_mc.kill();
}
delete _root.onMsgBoxPress;
}
}
function resetGame() {
if (_root.cursor_mc2 != undefined) {
removeMovieClip(_root.cursor_mc2);
}
_global.cDepth = 300;
_global.modePlay = false;
if (_root.gamebar != undefined) {
removeMovieClip(_root.gamebar);
}
if (_root.menu2 != undefined) {
removeMovieClip(_root.menu2);
}
i = 1;
while (i <= 20) {
if (_root[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"] != undefined) {
removeMovieClip(_root[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"]);
}
i++;
}
delete _root.onEnterFrame;
delete _root.__stage;
delete _root.__level;
delete _root.__l;
delete _root.__strings;
}
function loadStage(s) {
trace("Loading stage " + s);
_root.__stage = s;
_root.__level = 0;
_root.__l = 0;
delete _root.__strings;
_root.__strings = new Array();
i = 0;
while (i < _root.dialog_texts[_root.__stage - 1].length) {
_root.__strings[i] = _root.dialog_texts[_root.__stage - 1][i];
i++;
}
}
function skipDialog() {
while ((_root.__l < _root.__strings.length) and (_root.__strings[_root.__l].substr(0, 1) != "0")) {
_root.__l++;
}
showDialogText(_root.__stage);
}
function missClick() {
if (_ymouse > 25) {
if (_root.__paused) {
return(undefined);
}
_root._snd_miss.start(0, 1);
_root.attachMovie("missclick", "missclick", _root.getNextHighestDepth(), {_x:_xmouse, _y:_ymouse});
if (_root.miss_clicks == undefined) {
_root.miss_clicks = 0;
}
_root.miss_clicks++;
if (_root.miss_clicks >= 3) {
_root.miss_clicks = 0;
penalty = 20000;
if (_root.gamebar.elapsed < (_root.gamebar.fulltime - penalty)) {
_root.gamebar.elapsed = _root.gamebar.elapsed + penalty;
_root.attachMovie("penalty", "penalty_mc", _root.getNextHighestDepth(), {_x:Stage.width / 2, _y:Stage.height / 2});
}
}
}
}
function endLevel() {
if (_root.cursor_mc2 != undefined) {
removeMovieClip(_root.cursor_mc2);
}
b = undefined;
if (_root[(("back_" + _root.__stage) + "_") + _root.__level] != undefined) {
b = _root[(("back_" + _root.__stage) + "_") + _root.__level];
} else if (_root["back_" + _root.__stage] != undefined) {
b = _root["back_" + _root.__stage];
}
if (b != undefined) {
trace("Back fined. Reseting MISS_CLICK.");
delete b.onPress;
}
}
function setBrightness(target_mc) {
target_mc._alpha = 100;
delete target_mc.filters;
var _local3 = [1, 0, 0, 0, 255, 0, 1, 0, 0, 255, 0, 0, 1, 0, 255, 0, 0, 0, 1, 0];
var _local2 = new flash.filters.ColorMatrixFilter(_local3);
target_mc.filters = [_local2];
}
function addStaticStars(x, y) {
if (_global.countsprites == undefined) {
_global.countsprites = 0;
}
_global.countsprites++;
_root.attachMovie("stars", "stars_" + _global.countsprites, _root.getNextHighestDepth(), {_x:x, _y:y});
}
function addFlyingStars(x, y) {
var _local3 = 30;
var _local4 = x + (_local3 * Math.sin(Math.random() * Math.PI));
var _local5 = y + (_local3 * Math.sin(Math.random() * Math.PI));
if (_global.countsprites == undefined) {
_global.countsprites = 0;
}
_global.countsprites++;
_root.attachMovie("star1", "star1_" + _global.countsprites, _root.getNextHighestDepth(), {_x:_local4, _y:_local5});
}
function screenObjectClick(target) {
_root.miss_clicks = 0;
target.__finded = true;
target.__state = 1;
target.__speed = 10;
if (target.__posx == undefined) {
target.__posx = 80;
target.__posy = 10;
}
if (_global.animation == undefined) {
_global.animation = 0;
}
delete target.onPress;
target.onEnterFrame = function () {
switch (this.__state) {
case 1 :
if (this.__state2 != this.__state) {
trace((("OBJ_CLICKED " + this._name) + " state: ") + this.__state);
this.__state2 = this.__state;
}
_root._snd_find.start(0, 1);
_global.animation++;
this.__state++;
this.dr = 5;
this.dy = (this._y - this.__posy) / this.__speed;
this.dx = (this._x - this.__posx) / this.__speed;
addStaticStars(this._x, this._y);
this.rotcount = 0;
this.pulsecount = 20;
break;
case 2 :
if (this.__state2 != this.__state) {
trace((("OBJ_CLICKED " + this._name) + " state: ") + this.__state);
this.__state2 = this.__state;
}
this.pulsecount--;
this.rotcount = this.rotcount + this.dr;
this._rotation = this.rotcount;
this._xscale = 80 + (20 * Math.sin((((this.pulsecount / 20) * 2) * Math.PI) + (Math.PI/2)));
this._yscale = 80 + (20 * Math.sin((((this.pulsecount / 20) * 2) * Math.PI) + (Math.PI/2)));
if (this.pulsecount == 0) {
this.__state++;
this.k1 = 0;
this.pulsecount = this.__speed;
}
break;
case 3 :
if (this.__state2 != this.__state) {
trace((("OBJ_CLICKED " + this._name) + " state: ") + this.__state);
this.__state2 = this.__state;
}
addFlyingStars(this._x, this._y);
this.rotcount = this.rotcount + this.dr;
this.dr = this.dr + 5;
this._rotation = this.rotcount;
this._x = this._x - this.dx;
this._y = this._y - this.dy;
this._xscale = 100 - (this.k1 * 5);
this._yscale = 100 - (this.k1 * 5);
if (this.k1 < 10) {
this.k1++;
}
this.pulsecount--;
if (this.pulsecount <= 0) {
this.__state++;
}
break;
default :
if (this.__state2 != this.__state) {
trace((("OBJ_CLICKED " + this._name) + " state: ") + this.__state);
this.__state2 = this.__state;
}
this._visible = false;
_root.__objects--;
_global.animation--;
this.killed = true;
addStaticStars(this._x, this._y);
_root.gamebar.updateObjects();
switch (_root.levelType) {
case 2 :
updateObjects();
break;
case 3 :
updateObjects();
}
delete this.onPress;
delete this.onEnterFrame;
}
};
}
function checkGameOver() {
if (_root.gamebar.gameover) {
delete this.onEnterFrame;
endLevel();
if (_root.menu2 != undefined) {
removeMovieClip(_root.menu2);
}
if (_root.gamebar != undefined) {
removeMovieClip(_root.gamebar);
}
i = 1;
while (i <= 20) {
if (_root[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"] != undefined) {
removeMovieClip(_root[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"]);
}
i++;
}
_root.onEffectEnd = function () {
_root.onMsgBoxPress = function () {
initLevel(_root.levelType);
};
_root.attachMovie("msgbox", "msgbox_mc", _global.cDepth, {_x:275, _y:200});
_root.msgbox_mc.setText(_root.gui_texts.timeout_msg);
};
_root.e.effectsStart();
_root._snd_gameover.start(0, 1);
}
}
function updateObjects() {
j = 0;
py = 0;
i = 1;
while (i <= 20) {
if (_root.menu2[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"] != undefined) {
removeMovieClip(_root.menu2[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"]);
}
if (_root[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"] != undefined) {
removeMovieClip(_root[((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b"]);
}
if ((_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].killed == false) && (j < 3)) {
j++;
switch (_root.levelType) {
case 2 :
_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].__posx = 30;
_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].__posy = ((_root.menu2._y + 80) + (j * 10)) + py;
t = _root.menu2.createTextField(((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b", _root.menu2.getNextHighestDepth(), 10, (80 + (j * 10)) + py, 100, 30);
t.text = _root.gui_texts[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i];
fmt = new TextFormat();
fmt.color = 16777215 /* 0xFFFFFF */;
fmt.font = "Times New Roman";
fmt.size = 12;
t.setTextFormat(fmt);
t.selectable = false;
t.wordWrap = true;
t.autoSize = "left";
t._width = 70;
py = py + t._height;
_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].onPress = function () {
if (_root.__paused) {
return(undefined);
}
screenObjectClick(this);
};
break;
case 3 :
n = _root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].duplicateMovieClip(((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b", _root.getNextHighestDepth());
k = n._width / n._height;
if (n._width > 75) {
n._width = 75;
n._height = n._width / k;
}
setBrightness(n);
n._x = 45;
n._y = (50 + (n._height / 2)) + py;
_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].__posy = n._y;
_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].__posx = n._x;
trace((((((((((((n._name + " n._x=") + n._x) + "; ") + "n._y=") + n._y) + "; ") + "n._width=") + n._width) + "; ") + "n._height=") + n._height) + "; ");
py = py + (n._height + 15);
_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i].onPress = function () {
if (_root.__paused) {
return(undefined);
}
screenObjectClick(this);
};
}
}
i++;
}
}
function showLeftMenu() {
if (_root.menu2 == undefined) {
_root.attachMovie("menu2", "menu2", _root.getNextHighestDepth());
_root.menu2._y = -400;
_root.menu2.onEnterFrame = function () {
if ((this._y + 30) < -30) {
this._y = this._y + 30;
} else {
this._y = -30;
delete this.onEnterFrame;
updateObjects();
}
};
}
}
function initLevel(type) {
_root.nextlevel = false;
_root.__paused = false;
_root.levelType = type;
trace((((("\u0418\u043D\u0438\u0446\u0438\u0430\u043B\u0438\u0437\u0430\u0446\u0438\u044F \u0443\u0440\u043E\u0432\u043D\u044F: " + _root.__stage) + "_") + _root.__level) + " \u0442\u0438\u043F ") + type);
b = undefined;
if (_root[(("back_" + _root.__stage) + "_") + _root.__level] != undefined) {
b = _root[(("back_" + _root.__stage) + "_") + _root.__level];
} else if (_root["back_" + _root.__stage] != undefined) {
b = _root["back_" + _root.__stage];
}
if (b != undefined) {
trace("Back fined. Initiating MISS_CLICK.");
b.useHandCursor = false;
b.onPress = function () {
missClick();
};
_root.e.targetmc = b;
}
_root.__objects = 0;
i = 1;
while (i <= 20) {
if (_root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i] != undefined) {
o = _root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i];
if (o.killed) {
o._x = o.old_x;
o._y = o.old_y;
o._alpha = o.old_alpha;
o._rotation = o.old_rotation;
o._xscale = o.old_xscale;
o._yscale = o.old_yscale;
o._visible = true;
o.killed = false;
}
o.old_x = o._x;
o.old_y = o._y;
o.old_alpha = o._alpha;
o.old_rotation = o._rotation;
o.old_xscale = o._xscale;
o.old_yscale = o._yscale;
o.useHandCursor = false;
o.finded = false;
_root.__objects++;
switch (type) {
case 1 :
o.killed = false;
o.onPress = function () {
if (_root.__paused) {
return(undefined);
}
screenObjectClick(this);
};
break;
case 2 :
o.killed = false;
break;
case 3 :
o.killed = false;
break;
case 4 :
o.killed = false;
o.onPress = function () {
if (_root.__paused) {
return(undefined);
}
removeMovieClip(this.childObj);
screenObjectClick(this);
};
n = o.duplicateMovieClip(((((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i) + "b", _root.getNextHighestDepth());
o.childObj = n;
n.parentObj = o;
n._alpha = 0;
n.useHandCursor = false;
n.onPress = function () {
if (_root.__paused) {
return(undefined);
}
screenObjectClick(this.parentObj);
removeMovieClip(this);
};
if (o._x >= 275) {
n._x = o._x - 275;
} else {
n._x = o._x + 275;
}
}
}
i++;
}
trace("\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u043E\u0431\u044A\u0435\u043A\u0442\u043E\u0432: " + _root.__objects);
switch (type) {
case 1 :
_root.onEnterFrame = function () {
pauseScreen();
if (_root.gamebar == undefined) {
_root.attachMovie("gamebar", "gamebar", _root.getNextHighestDepth());
_root.gamebar.fulltime = _global.fulltime;
_root.gamebar.updateTime();
_root.gamebar.updateObjects();
} else {
_root.gamebar.updateTime();
checkGameOver();
}
if (_root.nextlevel) {
trace("_root.nextlevel");
i = 1;
while (i <= 20) {
o = _root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i];
if (((o != undefined) && (o.finded == false)) && (o.onPress != undefined)) {
screenObjectClick(o);
}
i++;
}
}
if (_root.__objects == 0) {
delete this.onEnterFrame;
endLevel();
trace("Victory");
removeMovieClip(_root.gamebar);
_root._snd_levelcomplete.start(0, 1);
_root.onFadeOut = function () {
_root.onMsgBoxPress = function () {
_root.onFadeIn = function () {
gotoAndStop("dialog_" + _root.__stage);
};
_root.f2.fadeIn();
};
_root.attachMovie("msgbox", "msgbox_mc", 10005, {_x:275, _y:200});
_root.msgbox_mc.setText(_root.gui_texts.victory_msg);
};
_root.f2.fadeOut();
}
};
break;
case 2 :
_root.onEnterFrame = function () {
pauseScreen();
showLeftMenu();
if (_root.gamebar == undefined) {
_root.attachMovie("gamebar", "gamebar", _root.getNextHighestDepth());
_root.gamebar.fulltime = _global.fulltime;
_root.gamebar.updateTime();
_root.gamebar.updateObjects();
} else {
_root.gamebar.updateTime();
checkGameOver();
}
if (_root.nextlevel) {
trace("_root.nextlevel");
i = 1;
while (i <= 20) {
o = _root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i];
if (((o != undefined) && (o.finded == false)) && (o.onPress != undefined)) {
screenObjectClick(o);
}
i++;
}
}
if (_root.__objects == 0) {
delete this.onEnterFrame;
endLevel();
trace("Victory");
removeMovieClip(_root.menu2);
removeMovieClip(_root.gamebar);
_root._snd_levelcomplete.start(0, 1);
_root.onFadeOut = function () {
_root.onMsgBoxPress = function () {
_root.onFadeIn = function () {
gotoAndStop("dialog_" + _root.__stage);
};
_root.f2.fadeIn();
};
_root.attachMovie("msgbox", "msgbox_mc", 10005, {_x:275, _y:200});
_root.msgbox_mc.setText(_root.gui_texts.victory_msg);
};
_root.f2.fadeOut();
}
};
break;
case 3 :
_root.onEnterFrame = function () {
pauseScreen();
showLeftMenu();
if (_root.gamebar == undefined) {
_root.attachMovie("gamebar", "gamebar", _root.getNextHighestDepth());
_root.gamebar.fulltime = _global.fulltime;
_root.gamebar.updateTime();
_root.gamebar.updateObjects();
} else {
_root.gamebar.updateTime();
checkGameOver();
}
if (_root.nextlevel) {
trace("_root.nextlevel");
i = 1;
while (i <= 20) {
o = _root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i];
if (((o != undefined) && (o.finded == false)) && (o.onPress != undefined)) {
screenObjectClick(o);
}
i++;
}
}
if (_root.__objects == 0) {
delete this.onEnterFrame;
endLevel();
trace("Victory");
removeMovieClip(_root.menu2);
removeMovieClip(_root.gamebar);
_root._snd_levelcomplete.start(0, 1);
_root.onFadeOut = function () {
_root.onMsgBoxPress = function () {
_root.onFadeIn = function () {
gotoAndStop("dialog_" + _root.__stage);
};
_root.f2.fadeIn();
};
_root.attachMovie("msgbox", "msgbox_mc", 10005, {_x:275, _y:200});
_root.msgbox_mc.setText(_root.gui_texts.victory_msg);
};
_root.f2.fadeOut();
}
};
break;
case 4 :
if (_root.cursor_mc2 == undefined) {
_root.attachMovie("cursor", "cursor_mc2", 9998);
_root.cursor_mc2.onMouseMove = function () {
_root.cursor_mc2._x = _xmouse + (Stage.width / 2);
if (_root.cursor_mc2._x > Stage.width) {
_root.cursor_mc2._x = _root.cursor_mc2._x - Stage.width;
}
_root.cursor_mc2._y = _ymouse;
};
}
_root.onEnterFrame = function () {
pauseScreen();
if (_root.gamebar == undefined) {
_root.attachMovie("gamebar", "gamebar", _root.getNextHighestDepth());
_root.gamebar.fulltime = _global.fulltime;
_root.gamebar.updateTime();
_root.gamebar.updateObjects();
} else {
_root.gamebar.updateTime();
checkGameOver();
}
if (_root.nextlevel) {
trace("_root.nextlevel");
i = 1;
while (i <= 20) {
o = _root[(((("obj_" + _root.__stage) + "_") + _root.__level) + "_") + i];
if (((o != undefined) && (o.finded == false)) && (o.onPress != undefined)) {
screenObjectClick(o);
}
i++;
}
}
if (_root.__objects == 0) {
delete this.onEnterFrame;
endLevel();
trace("Victory");
removeMovieClip(_root.gamebar);
_root._snd_levelcomplete.start(0, 1);
_root.onFadeOut = function () {
_root.onMsgBoxPress = function () {
_root.onFadeIn = function () {
gotoAndStop("dialog_" + _root.__stage);
};
_root.f2.fadeIn();
};
_root.attachMovie("msgbox", "msgbox_mc", 10005, {_x:275, _y:200});
_root.msgbox_mc.setText(_root.gui_texts.victory_msg);
};
_root.f2.fadeOut();
}
};
}
}
function showDialogText(s) {
if ((_root.__stage != s) || (_root.__l == 0)) {
loadStage(s);
}
trace((((("Stage: " + _root.__stage) + "; level: ") + _root.__level) + "; l: ") + _root.__l);
if (_root.flag_nextframe == undefined) {
_root.flag_nextframe = false;
}
if (_root.dlg_listener == undefined) {
_root.dlg_listener = new Object();
_root.dlg_listener.onMouseDown = function () {
if (_ymouse > 50) {
Mouse.removeListener(_root.dlg_listener);
showDialogText(_root.__stage);
}
};
}
Mouse.addListener(_root.dlg_listener);
if (_root.dlg_skip_dialog == undefined) {
_root.createEmptyMovieClip("dlg_skip_dialog", _root.getNextHighestDepth());
_root.dlg_skip_dialog.createTextField("textbox", _root.dlg_skip_dialog.getNextHighestDepth(), 0, 0, 200, 20);
_root.dlg_skip_dialog.autoSize = "left";
_root.dlg_skip_dialog.textbox.text = _root.gui_texts.skip_dialog;
fmt = new TextFormat();
fmt.font = "Arial";
fmt.color = 16777215 /* 0xFFFFFF */;
fmt.bold = true;
_root.dlg_skip_dialog.textbox.setTextFormat(fmt);
_root.dlg_skip_dialog.onPress = function () {
skipDialog();
};
}
this.baloon_mc.kill();
if (_root.__l < _root.__strings.length) {
if (_root.__strings[_root.__l].substr(0, 1) == "1") {
trace("\u0413\u043E\u0432\u043E\u0440\u0438\u0442 \u043F\u0435\u0440\u0441");
this.attachMovie("baloon", "baloon_mc", _global.cDepth, {_x:250, _y:100, _visible:false});
this.baloon_mc.setType(1);
this.baloon_mc.setWidth(270);
this.baloon_mc.setText(_root.__strings[_root.__l].substr(1, _root.__strings[_root.__l].length - 1));
} else if (_root.__strings[_root.__l].substr(0, 1) == "2") {
trace("\u0413\u043E\u0432\u043E\u0440\u044E \u044F");
this.attachMovie("baloon", "baloon_mc", _global.cDepth, {_x:0, _y:350, _visible:false});
this.baloon_mc.setType(2);
this.baloon_mc.setWidth(550);
this.baloon_mc.hideArrow();
this.baloon_mc.setText(_root.__strings[_root.__l].substr(1, _root.__strings[_root.__l].length - 1));
} else if (_root.__strings[_root.__l].substr(0, 1) == "0") {
_root.__level++;
this.baloon_mc.kill();
Mouse.removeListener(_root.dlg_listener);
trace((("Starting level " + _root.__level) + " at stage ") + _root.__stage);
delete _root.dlg_skip_dialog.onPress;
removeMovieClip(_root.dlg_skip_dialog);
_root.onMsgBoxPress = function () {
gotoAndStop((("level_" + _root.__stage) + "_") + _root.__level);
};
this.attachMovie("msgbox", "msgbox_mc", _global.cDepth, {_x:275, _y:200});
this.msgbox_mc.setText((_root.gui_texts.quest + ":\n") + _root.__strings[_root.__l].substr(1, _root.__strings[_root.__l].length - 1));
} else if (_root.__strings[_root.__l].substr(0, 1) == "3") {
effect = _root.__strings[_root.__l].substr(1, 1);
persname = _root.__strings[_root.__l].substr(2, _root.__strings[_root.__l].length - 2);
if (effect == 1) {
_root[persname]._visible = true;
_root[persname].onEnterFrame = function () {
if (this._x < this.oldx) {
this._x = this._x + 20;
} else {
this._x = this.oldx;
delete this.onEnterFrame;
}
};
}
_root.flag_nextframe = true;
} else if (_root.__strings[_root.__l].substr(0, 1) == "4") {
effect = _root.__strings[_root.__l].substr(1, 1);
persname = _root.__strings[_root.__l].substr(2, _root.__strings[_root.__l].length - 2);
if (effect == 1) {
_root[persname].oldx = _root[persname]._x;
_root[persname].onEnterFrame = function () {
if (this._x > -500) {
this._x = this._x - 20;
} else {
this._visible = false;
delete this.onEnterFrame;
}
};
}
_root.flag_nextframe = true;
} else if (_root.__strings[_root.__l].substr(0, 1) == "5") {
Mouse.removeListener(_root.dlg_listener);
effect = _root.__strings[_root.__l].substr(1, 1);
effectname = _root.__strings[_root.__l].substr(2, _root.__strings[_root.__l].length - 2);
_root.flag_nextframe = true;
_root.e.targetmc = _root[effectname];
_root.e.setType(effect);
_root.e.effectsStart();
} else {
trace("Unknown first symbol");
_root.flag_nextframe = true;
}
_root.__l++;
if (_root.flag_nextframe == true) {
_root.flag_nextframe = false;
if (_root.e.inEffect == true) {
trace("setting onEnterFrame");
_root.onEnterFrame = function () {
trace("onEnterFrame");
if (_root.e.inEffect == false) {
showDialogText(_root.__stage);
delete _root.onEnterFrame;
}
};
} else {
_root.flag_nextframe = false;
showDialogText(_root.__stage);
}
}
} else {
trace(("Stage " + _root.__stage) + " finished");
this.baloon_mc.kill();
Mouse.removeListener(_root.dlg_listener);
delete _root.dlg_skip_dialog.onPress;
removeMovieClip(_root.dlg_skip_dialog);
_root.__stage++;
_root.__level = 0;
_root.__l = 0;
_root.onFadeOut = function () {
_root.f.fadeIn();
gotoAndStop("dialog_" + _root.__stage);
};
_root.f.fadeOut();
}
}
this.btn_play.textbox.text = _root.gui_texts.btn_play;
this.btn_buy._visible = false;
this.btn_download.textbox.text = _root.gui_texts.btn_download;
formatButton(this.btn_play);
formatButton(this.btn_download);
this.btn_play.onPress = function () {
_root._snd_click.start(0, 1);
_root.onFadeOut = function () {
resetGame();
_root.f.fadeIn();
_root.gotoAndStop("dialog_1");
};
_root.f.fadeOut();
};
this.btn_download.onPress = function () {
_root._snd_click.start(0, 1);
getURL (_root.downloadLink, "_blank");
};