Frame 1
function INIT_PARAMS() {
INFO_T.text = "V1.0 (7oct09)";
DownloadLink.value = "http://playrix.com/fishdom-spooky-splash.html";
_root.SaveGame.value = "false";
cheat.value = "false";
NagTime.value = "2";
MaxLevel.value = "24";
}
function Loading() {
INIT_PARAMS();
GlobalTime = getTimer();
if (!UseGraphics) {
UseGraphics = {};
UseGraphics.value = "false";
}
if (NagTime.value == "0") {
var _local2 = menu_buttons.length;
while (_local2 > 0) {
if (menu_buttons.funct == "FDownload") {
break;
}
menu_buttons[_local2].y = menu_buttons[_local2 - 1].y;
_local2--;
}
menu_buttons[1].x = -1000;
}
_root.onEnterFrame = LoadGame;
}
function LoadGame() {
var _local4 = 5000;
loadline._visible = true;
Load = _root.getBytesLoaded();
Total = _root.getBytesTotal();
var _local5 = getTimer() - GlobalTime;
if (Load >= ((Total * _local5) / _local4)) {
Load = (Total * _local5) / _local4;
}
var _local2 = (100 * Load) / Total;
KB.text = ((TextLoading.text + " (") + Math.floor(_local2)) + "%)";
var _local3 = loadline.line._width;
_local2 = _local2 / 100;
loadline.line._x = (_local2 * _local3) - _local3;
loadline.linem._x = (_local2 * _local3) / 2;
loadline.linemm._x = ((_local2 * _local3) / 2) - _local3;
if (Total <= Load) {
delete _root.onEnterFrame;
_root.gotoAndStop(3);
}
}
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
levelXML = "<?xml version=\"1.0\"?><Levels><Level id=\"01\" time=\"600\" chips=\"51234\"><Line>000AAAA000</Line><Line>00aaaaaa00</Line><Line>0aadaaaaa0</Line><Line>aaaaaadaaa</Line><Line>aaaaaaaaaa</Line><Line>aaaaaaaaaa</Line><Line>aadaaaaaaa</Line><Line>0aaaaadaa0</Line><Line>00aaaaaa00</Line><Line>000aaaa000</Line></Level><Level id=\"02\" time=\"300\" chips=\"05634\"><Line>00AAAAAAAAA00</Line><Line>0aaaaaaaaaaa0</Line><Line>aaaaaaaaaaaaa</Line><Line>aaaaaadaaaaaa</Line><Line>aaaaadddaaaaa</Line><Line>0aaadddddaaa0</Line><Line>00aaadddaaa00</Line><Line>000aaadaaa000</Line><Line>0000aaaaa0000</Line><Line>00000aaa00000</Line></Level><Level id=\"03\" time=\"500\" chips=\"01254\"><Line>00000AAA0000</Line><Line>000AaaaaaA00</Line><Line>00addd00aaa0</Line><Line>0addda00aaaa</Line><Line>addddaaaaa00</Line><Line>addddaaa0000</Line><Line>adddda00000A</Line><Line>0adddaaA0000</Line><Line>00adddaaaA00</Line><Line>000adddaaaaA</Line><Line>00000aaaa000</Line></Level><Level id=\"04\" time=\"450\" chips=\"52634\"><Line>AAAAAAAAAAA</Line><Line>aaadadadaaa</Line><Line>aadadadadaa</Line><Line>addddddddda</Line><Line>0bbbbbbbbb0</Line><Line>addddddddda</Line><Line>aadadadadaa</Line><Line>aaadadadaaa</Line><Line>aaaaaaaaaaa</Line></Level><Level id=\"05\" time=\"500\" chips=\"04635\"><Line>000000A000000</Line><Line>000000aa00000</Line><Line>000000b000000</Line><Line>00000ada00000</Line><Line>0000adgda0000</Line><Line>000addgdda000</Line><Line>00adddgddda00</Line><Line>0addddgdddda0</Line><Line>adddddeddddda</Line><Line>000000a000000</Line><Line>0000AaaaA0000</Line></Level><Level id=\"06\" time=\"500\" chips=\"01235\"><Line>0AAAA000AAAA0</Line><Line>aaadaa0aadaaa</Line><Line>aadddaaadddaa</Line><Line>addddddddddda</Line><Line>aaddddeddddaa</Line><Line>0aaddeeeddaa0</Line><Line>00aaddeddaa00</Line><Line>000aadddaa000</Line><Line>0000aadaa0000</Line><Line>00000aaa00000</Line><Line>000000a000000</Line></Level><Level id=\"07\" time=\"600\" chips=\"01254\"><Line>0000AAAAAAA</Line><Line>00000aaaaaa</Line><Line>000000aaaaa</Line><Line>000000baaaa</Line><Line>00000a00aaa</Line><Line>0000aaa00aa</Line><Line>000aadaa00a</Line><Line>00aadddaa00</Line><Line>0aadgggdaa0</Line><Line>aadgggggdaa</Line><Line>aadddddddaa</Line></Level><Level id=\"08\" time=\"500\" chips=\"01534\"><Line>00AA00000AA00</Line><Line>0aa0000000aa0</Line><Line>0aaa0A0A0aaa0</Line><Line>00a00a0a00a00</Line><Line>00a0adada0a00</Line><Line>0aaadddddaaa0</Line><Line>aaadddddddaaa</Line><Line>0adddgggddda0</Line><Line>aadddgggdddaa</Line><Line>0aadadddadaa0</Line><Line>0a00aadaa00a0</Line></Level><Level id=\"09\" time=\"500\" chips=\"05234\"><Line>AAAAAA00000</Line><Line>aaaaadb0000</Line><Line>aaaadd0a000</Line><Line>aaadde00a00</Line><Line>aaddg0a00a0</Line><Line>addgg00a0ad</Line><Line>0000000aadd</Line><Line>000000aaddg</Line><Line>00000aaddgg</Line><Line>0000aaddggg</Line><Line>000aaddgggg</Line></Level><Level id=\"10\" time=\"600\" chips=\"51234\"><Line>0AAAAAAAAA0</Line><Line>aggdaaadgga</Line><Line>agda00aadga</Line><Line>ada00aa0ada</Line><Line>aaaaddd00aa</Line><Line>aa0adada0aa</Line><Line>aa00dddaaaa</Line><Line>ada0aa00ada</Line><Line>agdaa00adga</Line><Line>aggdaaadgga</Line><Line>0aadddddaa0</Line></Level><Level id=\"11\" time=\"600\" chips=\"04635\"><Line>AAAAAAAAAAAA</Line><Line>0aaaaaaaaaa0</Line><Line>00aaaaaaaa00</Line><Line>000dddddd000</Line><Line>0000dddd0000</Line><Line>00000dd00000</Line><Line>0000adda0000</Line><Line>000bddddb000</Line><Line>00afddddfa00</Line><Line>0adhddddhda0</Line><Line>aaghgggghgaa</Line></Level><Level id=\"12\" time=\"525\" chips=\"02654\"><Line>000AAAAAAA000</Line><Line>00aaagdgaaa00</Line><Line>0aagddgddgaa0</Line><Line>aaaddg0gddaaa</Line><Line>aaidd000ddiaa</Line><Line>aedd00000ddea</Line><Line>aaidd000ddiaa</Line><Line>aaaddg0gddaaa</Line><Line>0aagddgddgaa0</Line><Line>00aaagdgaaa00</Line><Line>000aaaaaaa000</Line></Level><Level id=\"13\" time=\"675\" chips=\"05634\"><Line>00000DDDD0aa000</Line><Line>0AA0ddddddaa000</Line><Line>aaadddddddd0000</Line><Line>000dddddddd0AA0</Line><Line>00ddddiddddaaaa</Line><Line>0adddididddaaaa</Line><Line>00ddddiddddaaaa</Line><Line>000dddddddd0aa0</Line><Line>AAadddddddd0000</Line><Line>0aa0ddddddaa000</Line><Line>00000dddd0aa000</Line></Level><Level id=\"14\" time=\"500\" chips=\"52634\"><Line>000A0A0A0A0A000</Line><Line>00ddddaaadddd00</Line><Line>0dddaaagaaaddd0</Line><Line>ddddadagadadddd</Line><Line>0ddaaadgdaaadd0</Line><Line>0ddadggaggdadd0</Line><Line>0ddaaadgdaaadd0</Line><Line>ddddadagadadddd</Line><Line>0dddaaagaaaddd0</Line><Line>00ddddaaadddd00</Line><Line>000d0d0d0d0d000</Line></Level><Level id=\"15\" time=\"550\" chips=\"02634\"><Line>AAAAAAA0AAAAAAA</Line><Line>aaaaaa000aaaaaa</Line><Line>aaaaaa000aaaaaa</Line><Line>aaaaaa000aaaaaa</Line><Line>aaaaaa000aaaaaa</Line><Line>eeeeee000eeeeee</Line><Line>ddddddg0gdddddd</Line><Line>ddddddgggdddddd</Line><Line>ddddddgggdddddd</Line><Line>dddddddgddddddd</Line><Line>ddddd0d0d0ddddd</Line></Level><Level id=\"16\" time=\"550\" chips=\"01235\"><Line>00AAAAAAAAAAA00</Line><Line>0ddddddddddddd0</Line><Line>dddggggdggggddd</Line><Line>dddg00ggg00gddd</Line><Line>ddddg00g00gdddd</Line><Line>dddddg000gddddd</Line><Line>dddd0aaAaa0dddd</Line><Line>dddd00aaa00dddd</Line><Line>ddddd00000ddddd</Line><Line>0dddddAAAddddd0</Line><Line>00ddddddddddd00</Line></Level><Level id=\"17\" time=\"500\" chips=\"01254\"><Line>DDDDDDDDDDDDDDD</Line><Line>ddddddddddddddd</Line><Line>dgdddgdddgdddgd</Line><Line>dgdddddddgddddd</Line><Line>dgd00000dgd0000</Line><Line>ddd0DDD0ddd0DDD</Line><Line>0000dgd00000dgd</Line><Line>DDDddgddDDDddgd</Line><Line>dgdddgdddgdddgd</Line><Line>ddddddddddddddd</Line><Line>ddddddddddddddd</Line></Level><Level id=\"18\" time=\"500\" chips=\"01534\"><Line>CBAAAAAAAAA</Line><Line>bfhagdgagga</Line><Line>ahfbgggadga</Line><Line>aabcbaaaaaa</Line><Line>aggbfbgadga</Line><Line>adgabfbagda</Line><Line>aggagbfbdga</Line><Line>aaaaaabcbaa</Line><Line>agdagggbfha</Line><Line>aggagdgahfb</Line><Line>aaaaaaaaabc</Line></Level><Level id=\"19\" time=\"475\" chips=\"05234\"><Line>000A0A0A0A0A000</Line><Line>000ddddddddd000</Line><Line>0DggdddddddggD0</Line><Line>00ddddddddddd00</Line><Line>DgddddfffddddgD</Line><Line>0dddddfgfddddd0</Line><Line>dgddddfffddddgd</Line><Line>00ddddddddddd00</Line><Line>0dgdddddddddgd0</Line><Line>000gddgggddg000</Line><Line>000g0g000g0g000</Line></Level><Level id=\"20\" time=\"725\" chips=\"51234\"><Line>00DDDDDADDDDD00</Line><Line>0ddddddddddddd0</Line><Line>aadddddddddddaa</Line><Line>aaada00e00adaaa</Line><Line>aaaa00ddd00aaaa</Line><Line>0aa00ddddd00aa0</Line><Line>0a00ddddddd00a0</Line><Line>000dddgggddd000</Line><Line>00dddgggggddd00</Line><Line>0dddgggggggddd0</Line><Line>dddgggggggggddd</Line></Level><Level id=\"21\" time=\"725\" chips=\"05634\"><Line>00000DDDDDDDDDD</Line><Line>000000ddddddddd</Line><Line>0000000fddddddd</Line><Line>0000000fddddddd</Line><Line>000000gfddddddd</Line><Line>00000egfddddddd</Line><Line>0000gegfddddddd</Line><Line>000dgegffffffdd</Line><Line>00ddgegggggg0dd</Line><Line>0dddgeeeeee000d</Line><Line>ddddgggggg00000</Line></Level><Level id=\"22\" time=\"650\" chips=\"02654\"><Line>0000000D0000000</Line><Line>0000D00g00D0000</Line><Line>000dddgggddd000</Line><Line>0000gggdggg0000</Line><Line>00A0ggdddgg0A00</Line><Line>0ddggdgdgdggdd0</Line><Line>000dgggdgggd000</Line><Line>A00dggdddggd00A</Line><Line>dddggddgddggddd</Line><Line>0ddgddgggddgdd0</Line><Line>0ddddgdddgdddd0</Line></Level><Level id=\"23\" time=\"725\" chips=\"05634\"><Line>AAAAAAAAAAAAAAA</Line><Line>aaaaaaaaaaaaaaa</Line><Line>aaaaaaa0aaaaaaa</Line><Line>aaaaaa000aaaaaa</Line><Line>eeeee00000eeeee</Line><Line>ddddf00000fdddd</Line><Line>ddddfg000gfdddd</Line><Line>ddddfgg0ggfdddd</Line><Line>ddddfgggggfdddd</Line><Line>ddddfgggggfdddd</Line><Line>ddddfgggggfdddd</Line></Level><Level id=\"24\" time=\"675\" chips=\"52634\"><Line>000DDDDDDBBB000</Line><Line>0DdddddddbbbbB0</Line><Line>dddddddddbbbbbb</Line><Line>dddddddddbcbbbb</Line><Line>ddddddd00bbbbbb</Line><Line>dddddd000dddddd</Line><Line>hhhhhh00ddddddd</Line><Line>hhhhihddddddddd</Line><Line>hhhhhhddddddddd</Line><Line>0hhhhhddddddddd</Line><Line>000hhhddddddd00</Line></Level></Levels>";
textXML = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Texts><string id=\"DownloadLink\" value=\"http://playrix.com/fishdom-spooky-splash.html\"/><string id=\"SaveGame\" value=\"false\"/><string id=\"UseGraphics\" value=\"false\"/><string id=\"cheat\" value=\"false\"/><string id=\"NagTime\" value=\"2\"/><string id=\"MaxLevel\" value=\"24\"/><string id=\"DownTarget\" value=\"FDHH\"/><string id=\"SoundsVolumes\" bomb_s=\"50\" bonus_s=\"60\" button_s=\"60\" buy_s=\"60\" click_s=\"60\" comfort_s=\"60\" fall_s=\"500\" hint_s=\"60\" levelcomplete_s=\"30\" levelstart_s=\"30\" lock_s=\"60\" match_s=\"30\" move_s=\"100\" sell_s=\"60\" stats_s=\"60\" window_s=\"60\" wrong_s=\"60\" totalmoney_s=\"60\" counter_s=\"60\" clear_s=\"60\" music_fon=\"30\" music_match=\"30\"/><string id=\"StatsMoney\" silver=\"1\" gold=\"4\" scorekoef=\"0.01\" timekoef=\"0.15\" cup1=\"20\" cup2=\"50\" cup3=\"100\"/><string id=\"CupsUtility\" cup1=\"600\" cup2=\"1450\" cup3=\"2900\"/><string id=\"TextFishes\" text=\"Fish\"/><string id=\"TextComfort\" text=\"Comfort\"/><string id=\"TextBeauty\" text=\"Beauty\"/><string id=\"TextShop\" text=\"Shop\"/><string id=\"TextDownload\" text=\"Download\"/><string id=\"TextPlay\" text=\"Play\"/><string id=\"TextDone\" text=\"Done\"/><string id=\"TextMove\" text=\"Move\"/><string id=\"TextMenu\" text=\"Menu\"/><string id=\"TextScore\" text=\"Score:\"/><string id=\"TextMoney\" text=\"Money:\"/><string id=\"TextLevel\" text=\"Level\"/><string id=\"TextLoading\" text=\"Loading\"/><string id=\"TextBuy\" text=\"Buy\"/><string id=\"TextBought\" text=\"Bought\"/><string id=\"TextContinue\" text=\"Continue\"/><string id=\"TextRestart\" text=\"Restart\"/><string id=\"TextStatistic\" text=\"Statistic\"/><string id=\"TextClickToContinue\" text=\"Click to continue...\"/><string id=\"TextPrice\" text=\"Price:\"/><string id=\"TextOk\" text=\"Ok\"/><string id=\"TextYes\" text=\"Yes\"/><string id=\"TextNo\" text=\"No\"/><string id=\"TextDollar\" text=\"$\"/><string id=\"TextHelp\" text=\"Help\"/><string id=\"TextLevelComplete\" text=\"Level Complete!\"/><string id=\"TextLose\" text1=\"Out of time!\" text2=\"No more moves!\"/><string id=\"TextScoreBonus\" text=\"Score Bonus\"/><string id=\"TextTimeBonus\" text=\"Time Bonus\"/><string id=\"TextCupBonus\" text=\"Cup Bonus\"/><string id=\"TextLevelMoney\" text=\"Total:\"/><string id=\"TextNotMoney\" text1=\"Not enough money!\" text2=\"Continue to play through the levels to earn money.\" y1=\"30\" y2=\"60\"/><string id=\"TextBack\" text=\"Back\"/><string id=\"TextSkip\" text=\"Skip tutorial\"/><string id=\"TextYourMoney\" text=\"Your have:\"/><string id=\"TextNewGame\" text=\"Do you really want to start a new game?\"/><string id=\"TextWonCup\" text=\"Congratulations!|You won a %c!\" c1=\"Bronse Cup\" c2=\"Silver Cup\" c3=\"Golden Cup\"/><string id=\"TextCup1\" text=\"There's still plenty of work to be done.|Keep working on your aquarium to earn a silver cup.\"/><string id=\"TextCup2\" text=\"Your aquarium is so beautiful and comfortable now. But there's always room for perfection! Continue to improve your aquarium to earn a gold cup.\"/><string id=\"TextCup3\" text=\"Great! Your aquarium looks amazing. It really deserves a gold cup. You can keep working on this tank.\"/><string id=\"TextTutorial0\" P=\"0\" text=\"Before you dive in and begin creating your own aquarium, it's a good idea to become familiar with the basics of the game. Would you like a quick tutorial?\"/><string id=\"TextTutorial1\" P=\"-1\" text=\"This is your fish tank. But it has no fish in it! That's no good, let's fix it.|Click on Shop to enter the shopping area.\"/><string id=\"TextTutorial2\" P=\"-1\" text=\"This is the shop where you can buy everything you need for your fish tank. Click on the Fish tab to see the selection of fish.\"/><string id=\"TextTutorial3\" P=\"-1\" text=\"Now let's buy this fish.||To do that, click on '+'\"/><string id=\"TextTutorial4\" P=\"0\" text=\"Excellent!|Now the aquarium is coming to life. But look, the fish seems unhappy about something. It's no fun swimming around an empty tank, after all!\"/><string id=\"TextTutorial5\" P=\"0\" text=\"You need cash to buy ornaments for your tank but there isn't much left.\"/><string id=\"TextTutorial6\" P=\"-1\" text=\"It looks like you will have to earn some. Click Play to go to the game level where you can make some money to spend on your aquarium.\"/><string id=\"TextTutorial8\" P=\"-1\" text=\"Great! Now let's buy this water plant. To do that, click on it and drag it towards the sand in the tank.\"/><string id=\"TextTutorialOff\" text=\"The tutorial will help you learn the basics of the game.|Do you really want to skip it?\"/><trans/><menu_buttons><button text=\"Sound On\" x=\"175\" y=\"60\" funct=\"FSound\"/><button text=\"Download\" x=\"175\" y=\"100\" funct=\"FDownload\"/><button text=\"Exit to tank\" x=\"175\" y=\"140\" funct=\"FNew\"/><button text=\"New game\" x=\"175\" y=\"180\" funct=\"FNewGame\"/><button text=\"Resume\" x=\"175\" y=\"220\" funct=\"FResume\"/><button text=\"Sound Off\" x=\"175\" y=\"100\" funct=\"FSound\"/></menu_buttons><string id=\"TextTutorial10\" P=\"0\" text=\"Pay attention to these meters. Fill up the Fish, Beauty and Comfort meters to earn a cup.\"/><string id=\"TextTutorial11\" P=\"0\" text=\"Now you are ready to continue on your own! It's up to you to create your dream aquarium. Good luck!\"/><string id=\"TextSell\" text=\"Do you really want to sell it?|Sell price: \"/><string id=\"TextNagMoney\" text=\"Total cash earned: \"/><string id=\"TextNag\" x=\"30\" y=\"150\" format=\"300\" text=\"- Almost 200 cute fishies and accessories| to choose from||- Unlimited number of tanks| to create and design||- Endless replay value||- Fully interactive and customizable| environment||- Bonus screensaver featuring your aquarium\"/><string id=\"TextNagWin\" x=\"185\" y=\"150\" xs=\"185\" ys=\"280\" format=\"250\" text=\"Excellent job!||However that is all the free online version of Fishdom: Spooky Splash has to offer. If you had fun creating your dream aquarium, please try the Full version of the game.\"/><string id=\"TextNagNew\" x=\"185\" y=\"180\" xs=\"185\" ys=\"260\" format=\"200\" text=\"You are welcome to try again or get a fresh start in the Full version of Fishdom: Spooky Splash.\"/><trans/><string id=\"TextHint0\" text=\"Create matches of 3 or more in a row by clicking on adjacent pieces to swap. For example, these 2 pieces can be swapped.\"/><string id=\"TextHint1\" text=\"Pieces can only be swapped if it results in a match of 3 or more in a row.\"/><string id=\"TextHint2\" text=\"Create matches over golden tiles to collect them. The level is done when all the golden tiles have been cleared.\"/><string id=\"TextHint3\" text=\"This is a timer. It shows how much time you have left to complete the level.\"/><string id=\"TextHint5\" text=\"There are only a few golden tiles left. Collect the remaining ones to finish the level.\"/><string id=\"TextHint6\" text=\"To collect a tile of this kind, you need to make a match over it two times.\"/><string id=\"TextHint7\" text=\"Click on the eye to pause the game and enjoy the views of the underwater world.\"/><string id=\"TextHint8\" text=\"A locked piece. To break the lock, bring the other matching pieces to the locked one.\"/><string id=\"TextHint9\" text=\"A double-locked piece. You will need to break the lock twice.\"/><string id=\"TextHint10\" text=\"Firecracker. Destroys all within a radius of 1 tile. This explosive appears only as a result of a cascade match of 6 or more falling pieces and cannot be earned by a player's match.\"/><string id=\"TextHint11\" text=\"Depth bomb. Destroys all within a radius of 2 tiles and can be earned by a match of 5 pieces.\"/><string id=\"TextHint12\" text=\"Dynamite charge. Has a radius of 3 tiles and can be earned by a match of 6 pieces.\"/><string id=\"TextHint13\" text=\"Warhead. This powerful explosive destroys everything within a radius of 4 tiles and can be earned by a match of 7 or more pieces.\"/><string id=\"TextHelp1\" x=\"107\" y=\"65\" format=\"190\" text=\"The Eye button lets you enjoy your aquarium in all its beauty\" frame=\"10,40,200,80\" arrow1=\"110,110,60,45,15,15\"/><string id=\"TextHelp2\" x=\"400\" y=\"250\" format=\"150\" text=\"Click this button to go into the game mode and earn some cash to spend on your tank\" frame=\"300,230,200,100\" arrow1=\"380,380,420,325,360,360\" arrow2=\"\"/><string id=\"TextHelp3\" x=\"342\" y=\"130\" format=\"230\" text=\"These are your tank meters. By purchasing fish, ornaments and comfort items, you increase the relevant values for your tank.\" frame=\"220,100,250,120\" arrow1=\"465,490,490,160,160,110\" arrow2=\"250,250,290,105,70,70\"/><string id=\"TextHelp4\" x=\"110\" y=\"220\" format=\"190\" text=\"Click this button to enter the shopping area and buy everything you might need for your tank\" frame=\"10,180,200,120\" arrow1=\"130,130,295,320\" arrow2=\"\"/><string id=\"TextHelp5\" x=\"70\" y=\"220\" format=\"100\" text=\"Click on the tabs to switch between item categories\" frame=\"10,180,120,120\" arrow1=\"60,60,295,320\" arrow2=\"\"/><string id=\"TextHelp6\" x=\"330\" y=\"180\" format=\"100\" text=\"Click this button to leave the shop\" frame=\"270,140,120,120\" arrow1=\"370,370,410,410,255,280,280,295\"/><string id=\"TextHelp7\" x=\"190\" y=\"220\" format=\"100\" text=\"Use these buttons to scroll through the list of items\" frame=\"130,180,120,120\" arrow1=\"150,150,140,295,347,347\" arrow2=\"230,230,355,295,347,347\"/><string id=\"TextHelp8\" x=\"460\" y=\"130\" format=\"100\" text=\"Click this button to go into the game mode and earn some cash to spend on your tank\" frame=\"400,100,120,160\" arrow1=\"475,475,255,310\" arrow2=\"\"/><string id=\"TextHelp9\" x=\"60\" y=\"70\" format=\"120\" text=\"The Eye button allows you remove all distractions and enjoy your aquarium in all its beauty\" frame=\"0,50,125,120\" arrow1=\"20,20,55,40\"/><string id=\"TextHelp10\" x=\"205\" y=\"70\" format=\"140\" text=\"Your score increases when you create matches clearing the tiles. The higher your score is, the more money you receive.\" frame=\"130,50,155,140\" arrow1=\"215,215,55,40\"/><string id=\"TextHelp11\" x=\"370\" y=\"70\" format=\"140\" text=\"This meter shows how much money you have earned. You receive money for clearing golden and silver tiles.\" frame=\"295,50,150,120\" arrow1=\"355,355,55,40\"/><string id=\"TextHelp12\" x=\"205\" y=\"290\" format=\"170\" text=\"Create matches of 3 or more by swapping adjacent pieces\" frame=\"107,200,200,150\" clip=\"help_panel_0,165,220\"/><string id=\"TextHelp13\" x=\"410\" y=\"235\" format=\"100\" text=\"Finish the level by clearing all the golden tiles before the time runs out\" frame=\"350,200,120,160\" arrow1=\"465,475,300,300\"/><string id=\"Fish1\" Name=\"Yellow Tang\" idn=\"3\" cost=\"100\" stars=\"2\" utility=\"100\"/><string id=\"Fish2\" Name=\"Hawkfish\" idn=\"5\" cost=\"150\" stars=\"2\" utility=\"150\"/><string id=\"Fish3\" Name=\"Lionfish\" idn=\"9\" cost=\"200\" stars=\"3\" utility=\"200\"/><string id=\"Fish4\" Name=\"Sea Turtle\" idn=\"26\" cost=\"250\" stars=\"4\" utility=\"250\"/><string id=\"Fish5\" Name=\"Kaudern's Cardinal\" idn=\"21\" cost=\"300\" stars=\"5\" utility=\"300\"/><string id=\"Fish6\" Name=\"Zebra Pleco\" idn=\"13\" cost=\"350\" stars=\"5\" utility=\"350\"/><string id=\"Fish7\" Name=\"Picasso Triggerfish\" idn=\"11\" cost=\"400\" stars=\"5\" utility=\"400\"/><string id=\"Fish8\" Name=\"Halloween Fish\" idn=\"28\" cost=\"450\" stars=\"5\" utility=\"450\"/><string id=\"Item1\" idl=\"2\" idn=\"hw_v02\" Name=\"Ghost Water Plant\" cost=\"20\" stars=\"1\" utility=\"20\"/><string id=\"Item2\" idl=\"3\" idn=\"hw_v04\" Name=\"Fire Water Plant\" cost=\"20\" stars=\"1\" utility=\"20\"/><string id=\"Item3\" idl=\"7\" idn=\"hw_v12\" Name=\"Toadstool Coral\" cost=\"30\" stars=\"1\" utility=\"30\"/><string id=\"Item4\" idl=\"1\" idn=\"hw_v01\" Name=\"Fish Bones Water Plant\" cost=\"30\" stars=\"1\" utility=\"30\"/><string id=\"Item5\" idl=\"6\" idn=\"hw_v11\" Name=\"Pineapple Coral\" cost=\"40\" stars=\"2\" utility=\"40\"/><string id=\"Item6\" idl=\"4\" idn=\"hw_v09\" Name=\"Frog Acropora Coral\" cost=\"40\" stars=\"2\" utility=\"40\"/><string id=\"Item7\" idl=\"5\" idn=\"hw_v10\" Name=\"Membranos Water Plant\" cost=\"40\" stars=\"3\" utility=\"40\"/><string id=\"Item8\" idl=\"8\" idn=\"hw_v13\" Name=\"Monster Coral\" cost=\"75\" stars=\"3\" utility=\"75\"/><string id=\"Item9\" idl=\"9\" idn=\"hw_v16\" Name=\"Scale Coral\" cost=\"75\" stars=\"3\" utility=\"75\"/><string id=\"Item10\" idl=\"24\" idn=\"hw25\" Name=\"Skull\" cost=\"125\" stars=\"3\" utility=\"125\"/><string id=\"Item11\" idl=\"23\" idn=\"hw23\" Name=\"Witch Set\" cost=\"175\" stars=\"3\" utility=\"175\"/><string id=\"Item12\" idl=\"26\" idn=\"hw32\" Name=\"Treasure Chest\" cost=\"225\" stars=\"4\" utility=\"225\"/><string id=\"Item13\" idl=\"19\" idn=\"hw13\" Name=\"Pumpking Lamp\" cost=\"325\" stars=\"4\" utility=\"325\"/><string id=\"Item14\" idl=\"12\" idn=\"hw03\" Name=\"Grim Reaper Shark\" cost=\"375\" stars=\"4\" utility=\"375\"/><string id=\"Item15\" idl=\"10\" idn=\"hw01\" Name=\"Mask Seller\" cost=\"450\" stars=\"4\" utility=\"450\"/><string id=\"Item16\" idl=\"16\" idn=\"hw10\" Name=\"Ghost Singer\" cost=\"500\" stars=\"4\" utility=\"500\"/><string id=\"Item17\" idl=\"17\" idn=\"hw11\" Name=\"Witch\" cost=\"575\" stars=\"5\" utility=\"575\"/><string id=\"Item18\" idl=\"20\" idn=\"hw15\" Name=\"Well\" cost=\"625\" stars=\"5\" utility=\"625\"/><string id=\"Item19\" idl=\"21\" idn=\"hw17\" Name=\"Gloomy Gate\" cost=\"675\" stars=\"5\" utility=\"675\"/><string id=\"Item20\" idl=\"18\" idn=\"hw12\" Name=\"Jack-o'-Lantern House\" cost=\"750\" stars=\"5\" utility=\"750\"/><string id=\"Item21\" idl=\"25\" idn=\"hw26\" Name=\"Circus Tent\" cost=\"770\" stars=\"5\" utility=\"770\"/><string id=\"Item22\" idl=\"22\" idn=\"hw18\" Name=\"Clock\" cost=\"825\" stars=\"5\" utility=\"825\"/><string id=\"Comfort1\" Name=\"Back light\" idl=\"light\" cost=\"100\" stars=\"2\" utility=\"100\"/><string id=\"Comfort2\" Name=\"Jack-o'-Lantern Air Pump\" idl=\"comp1\" cost=\"175\" stars=\"2\" utility=\"175\"/><string id=\"Comfort3\" Name=\"Tower Air Pump\" idl=\"comp2\" cost=\"250\" stars=\"3\" utility=\"250\"/><string id=\"Comfort4\" Name=\"Feeder\" idl=\"feeder\" cost=\"325\" stars=\"3\" utility=\"325\"/><string id=\"Comfort5\" Name=\"Filter\" idl=\"filter\" cost=\"400\" stars=\"4\" utility=\"400\"/><string id=\"Comfort6\" Name=\"Aquarium Fish Vitamins\" idl=\"medic\" cost=\"475\" stars=\"4\" utility=\"475\"/><string id=\"Comfort7\" Name=\"Heater\" idl=\"termo\" cost=\"550\" stars=\"5\" utility=\"550\"/><string id=\"Comfort8\" Name=\"Aquarium Sand\" idl=\"dno\" cost=\"625\" stars=\"5\" utility=\"625\"/></Texts>";
stop();
Stage.scaleMode = "noScale";
Stage.showMenu = false;
this._lockroot = true;
loadline._visible = false;
var VersionPl = String($version).split(" ")[1].split(",")[0];
if (((VersionPl > 6) || (VersionPl < 3)) || (VersionPl == undefined)) {
var XMLLoader = (new GameClasses.LoadGameXML(this, "levelXML", "textXML", Loading));
}
TextDollar = {};
TextDollar.text = "";
INFO.onPress = function () {
INFO_T._x = 340;
};
__com_mochibot__("ab202842", this, 10301, true);
Frame 3
function TextShow(Inside, Str, l, W, H, C, WT, HT, format, underline, SC, EC, ROT, BOL) {
function Attach(STR) {
if (att) {
Inside.TEXT.attachMovie(l + STR, U, Inside.TEXT.getNextHighestDepth());
} else {
Inside.TEXT.createEmptyMovieClip(U, Inside.TEXT.getNextHighestDepth());
AttachLetter(Inside.TEXT[U], STR);
}
var _local1 = Inside.TEXT[U];
_local1._x = X + (_local1._width / 2);
_local1._y = Y;
if (Inside.TEXT[U]._width != undefined) {
wid = Inside.TEXT[U]._width;
X = X + (wid + W);
Len++;
}
}
function AttachLetter(InS, Str) {
InS.createTextField("TEXT", InS.getNextHighestDepth(), 0, -10, 0, 0);
InS.TEXT.multiline = true;
InS.TEXT.embedFonts = (l == "GameFont") || (l == BOL);
InS.TEXT.autoSize = "center";
InS.TEXT.selectable = false;
var format = new TextFormat();
format.font = l;
format.size = WT;
format.bold = true;
format.color = HT;
format.align = "center";
format.leftMargin = 0;
format.rightMargin = 0;
InS.TEXT.text = Str;
InS.TEXT.setTextFormat(format);
if ((InS.TEXT._width < 5) || (l == "gradient")) {
format.font = "GameFont";
InS.TEXT.embedFonts = true;
InS.TEXT.text = Str;
InS.TEXT.setTextFormat(format);
}
if (l == "gradient") {
var Wi = (InS.TEXT._width + 1);
var He = InS.TEXT._height;
InS.createEmptyMovieClip("s", -100);
with (InS.s) {
colors = [SC, EC];
alphas = [100, 100];
ratios = [0, 255];
lineStyle(1, 0);
matrix = {matrixType:"box", x:0, y:0, w:Wi, h:He, r:(ROT / 180) * Math.PI};
beginGradientFill("linear", colors, alphas, ratios, matrix);
moveTo(0, 0);
lineTo(0, He);
lineTo(Wi, He);
lineTo(Wi, 0);
lineTo(0, 0);
endFill();
}
InS.s._y = InS.s._y - ((He / 2) - 4);
if (WT > 30) {
InS.s._y = InS.s._y + 15;
}
InS.s._x = InS.s._x - (Wi / 2);
InS.s.setMask(InS.TEXT);
}
}
if ((!Inside) || (!Str)) {
return(undefined);
}
if ((l == undefined) || (l == "0")) {
l = "GameFont";
W = -3;
H = 12;
C = 1;
WT = 16;
HT = _root.FontWhite;
}
if ((H == 0) || (H == undefined)) {
H = 12;
}
if (l == "gradient") {
W = W - 1;
}
W = W - 0.5;
if ((format == undefined) || (format == 0)) {
format = 1000;
}
Letter = 0;
var Lines = 0;
var Len = 0;
Str = Str.split("'").join("'");
Str = Str.split(""").join("\"");
var X = 0;
var Y = 0;
var L = 0;
var wid = 0;
var mc = Inside.attachMovie(l + Str.substr(0, 1), "AAA", Inside.getNextHighestDepth(), {_x:-1000});
var att = ((mc._name != undefined) || (l == "c"));
mc.removeMovieClip();
Inside.TEXT.removeMovieClip();
Inside.createEmptyMovieClip("TEXT", Inside.getNextHighestDepth());
Inside.TEXT.Arr = new Array(Str.length);
Inside.TEXT.text_string = Str;
var i = 0;
while (i < Str.length) {
var j = Str.substr(i, 1);
if ((!att) && (j.charCodeAt(0) > 848)) {
j = String.fromCharCode(j.charCodeAt(0) - 848);
}
if (j == "|") {
if (Len > Letter) {
Letter = Len;
}
Len = 0;
if (C == 1) {
X = X / 2;
var k = 0;
while (k < Str.length) {
Inside.TEXT[(("t" + k) + "y") + L]._x = Inside.TEXT[(("t" + k) + "y") + L]._x - X;
k++;
}
} else if (C == 2) {
var k = 0;
while (k < Str.length) {
Inside.TEXT[(("t" + k) + "y") + L]._x = Inside.TEXT[(("t" + k) + "y") + L]._x - X;
k++;
}
}
L++;
X = 0;
Y = Y + H;
} else {
var U = ((("t" + i) + "y") + L);
if (j == " ") {
if (Inside.TEXT.t0y0._width > 0) {
X = X + (((Inside.TEXT.t0y0._width * 3) / 4) + W);
Len++;
}
} else if (X > format) {
var k = (i - 1);
while (k >= 0) {
if (Inside.TEXT[(("t" + k) + "y") + L]) {
X = X - (Inside.TEXT[(("t" + k) + "y") + L]._width + W);
}
Inside.TEXT[(("t" + k) + "y") + L].removeMovieClip();
Inside.TEXT[(("t" + k) + "y") + L].removeTextField();
if (Str.substr(k, 1) == " ") {
X = X - (((Inside.TEXT.t0y0._width * 3) / 4) + W);
Str = (Str.substr(0, k) + "|") + Str.substr(k + 1, Str.length);
i = k - 1;
break;
}
k--;
}
if (k < 0) {
Str = (Str.substr(0, i) + "|") + Str.substr(i + 1, Str.length);
i++;
}
} else {
Attach(String(j));
}
}
Inside.TEXT.Arr[i] = U;
i++;
}
if (C == 1) {
X = X / 2;
var k = 0;
while (k < Str.length) {
Inside.TEXT[(("t" + k) + "y") + L]._x = Inside.TEXT[(("t" + k) + "y") + L]._x - X;
k++;
}
} else if (C == 2) {
var k = 0;
while (k < Str.length) {
Inside.TEXT[(("t" + k) + "y") + L]._x = Inside.TEXT[(("t" + k) + "y") + L]._x - X;
k++;
}
}
if (Len > Letter) {
Letter = Len;
}
if (underline != null) {
var C = (underline < 0);
underline = Math.abs(underline);
var SHADOW = (new flash.filters.DropShadowFilter(0, 0, underline, 1, 2, 2, 1.5, 3, false, false, false));
var SHADOWs = (new flash.filters.DropShadowFilter(2, 45, underline, 0.5, 0, 0, 1, 3, false, false, false));
if (C) {
Inside.filters = [SHADOW];
} else {
Inside.filters = [SHADOW, SHADOWs];
}
}
return(L);
}
function ConvertText(hint) {
Lines = 0;
var _local4 = "";
var _local2 = 0;
var _local1 = 0;
while (_local1 < hint.length) {
var _local3 = hint.substr(_local1, 1);
if (_local3 == "|") {
if (_local2 > Letter) {
Letter = _local2;
}
_local2 = 0;
_local4 = _local4 + newline;
Lines++;
} else {
_local4 = _local4 + _local3;
_local2++;
}
_local1++;
}
if (_local2 > Letter) {
Letter = _local2;
}
return(_local4);
}
function InitSound() {
function AddSound(NameA, MC) {
var _local5 = "";
for (var _local6 in NameA) {
var _local3 = MC.createEmptyMovieClip(NameA[_local6], MC.getNextHighestDepth());
_root[NameA[_local6]] = new GameClasses.GameSound(NameA[_local6], _local3);
_root[NameA[_local6]].setVolume(int(_root.SoundsVolumes[NameA[_local6]]));
_local5 = _local5 + (((NameA[_local6] + "=\"") + _root.SoundsVolumes[NameA[_local6]]) + "\" ");
}
}
_root.createEmptyMovieClip("SoundsClip", 58);
var _local5 = ["bomb_s", "bonus_s", "button_s", "buy_s", "click_s", "comfort_s", "fall_s", "hint_s", "levelcomplete_s", "levelstart_s", "lock_s", "match_s", "move_s", "sell_s", "stats_s", "window_s", "wrong_s", "totalmoney_s", "counter_s", "clear_s", "music_fon", "music_match"];
AddSound(_local5, _root.SoundsClip);
}
function InitTank() {
tank.removeMovieClip();
_root.attachMovie("tank", "tank", 10, {money:TOTMONEY});
music_fon.stop();
music_match.stop();
music_fon.start(SoundOn, 0, 99999);
}
function GetBlack(MC, A, D, N) {
if (MC == undefined) {
MC = _root;
}
if (A == undefined) {
A = 0;
}
if (D == undefined) {
D = MC.getD();
}
if (N == undefined) {
N = "bl";
}
MC[N].removeMovieClip();
return(MC.attachMovie("black", N, D, {_alpha:A, _width:520, _height:390, onPress:null, useHandCursor:false}));
}
function InitRound() {
music_fon.stop();
music_match.stop();
music_match.start(SoundOn, 0, 99999);
Money_ADD = 0;
Start_Hint = -1;
level++;
Silver = (Gold = 0);
Failed = false;
LOCKTILES = new Array();
GameField = _root.createEmptyMovieClip("game_field", 11);
fon_pic = GameField.createEmptyMovieClip("fon_pic", GameField.getD());
bor = GameField.createEmptyMovieClip("bor", GameField.getD());
fon = GameField.createEmptyMovieClip("fon", GameField.getD());
game = GameField.createEmptyMovieClip("game", GameField.getD());
fly = GameField.createEmptyMovieClip("fly", GameField.getD());
upf = GameField.attachMovie("levelpanel", "upf", GameField.getD());
upf.help.onPress = GameClasses.GFunctions.create(this, FunctionHelp);
upf.menu_button.onLoad = function () {
this.InitText(_root.TextMenu.text);
};
upf.menu_button.onPress = MenuMain;
if (level != 0) {
HintArr[1] = 0;
}
upf.eye.onPress = GameClasses.GFunctions.create(this, MovePanel, 1);
TIME = upf.attachMovie("timer", "timer", 1111, {_x:474, _y:45});
TIME.SetTime(map[level].time * 1000);
redytoend = (Fall = false);
InitMatrix();
GlobalY = (421 - (Matrix.length * Size)) / 2;
GlobalX = (485 - (Matrix[0].length * Size)) / 2;
DrawFishFon();
DrawGameField();
DrawGameFon();
DrawGameBorder();
_root.TextShow(upf.level_name, (_root.TextLevel.text + " ") + int(level + 1), "GameFont", -3, 12, 1, 12, FontWhite, 300, 0);
_root.TextShow(upf.scoret, _root.TextScore.text, "GameFont", -3, 12, 1, 14, FontWhite, 300, FontBlue);
_root.TextShow(upf.moneyt, _root.TextMoney.text, "GameFont", -3, 12, 1, 14, FontWhite, 300, FontBlue);
if (Matrix.length) {
do {
var i = random(Matrix.length);
var j = random(Matrix[0].length);
} while (!fon[FindName(i, j)]);
}
GetBlack();
NTiles1 = 0;
Appear(i, j);
_root.levelstart_s.start(_root.SoundOn);
Tiles = (Matches = (matches = 0));
SCORE = new GameClasses.Score(upf.score, 0, null, null, true);
MONEY = new GameClasses.Score(upf.money, 0);
Fall = false;
}
function DrawFishFon() {
var _local4;
_local4 = fon_pic.attachMovie("level_p1", "l", 0);
_local4.gotoAndStop(random(_local4._totalframes) + 1);
fon_pic.mov = [];
var _local5;
var _local7;
var _local6;
_local5 = random(8) + 1;
_local7 = 50 + random(400);
_local6 = 30 + random(200);
_local4 = fon_pic.attachMovie("fish" + _local5, "fish1", 1, {_x:_local7, _y:_local6});
fon_pic.mov.push(_local4);
if (level > 3) {
_local7 = 50 + random(400);
_local6 = 50 + random(200);
_local5 = random(8) + 1;
_local4 = fon_pic.attachMovie("fish" + _local5, "fish2", 2, {_x:_local7, _y:_local6});
fon_pic.mov.push(_local4);
}
if (level > 10) {
_local7 = 50 + random(400);
_local6 = 50 + random(200);
_local5 = random(8) + 1;
_local4 = fon_pic.attachMovie("fish" + _local5, "fish2", 3, {_x:_local7, _y:_local6});
fon_pic.mov.push(_local4);
}
fon_pic.onEnterFrame = function () {
var _local3 = this.mov;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].type == "fish") {
_local3[_local2].MoveFish();
}
_local2++;
}
};
}
function Disapear(i, j) {
var _local2 = fon[FindName(i, j)];
var _local4 = (("clip_morgY" + i) + "X") + j;
if ((_local2._alpha >= 100) && (_local2)) {
_local2.onEnterFrame = Disapearing;
} else if (_root[_local4]) {
var _local3 = _root[_local4];
_local3.DEL = 1;
_local3._alpha = 100;
_local3.onEnterFrame = Disapearing;
}
}
function Appear(i, j) {
var _local2 = fon[FindName(i, j)];
var _local4 = (("clip_morgY" + i) + "X") + j;
if ((_local2._alpha <= 0) && (_local2)) {
_local2.onEnterFrame = Appearing;
} else if ((((((!_local2) && (i >= 0)) && (i < Matrix.length)) && (j >= 0)) && (j < Matrix[0].length)) && (!_root[_local4])) {
var _local3 = _root.createEmptyMovieClip(_local4, _root.getNextHighestDepth());
_local3.DEL = 1;
_local3._alpha = 0;
_local3.onEnterFrame = Appearing;
}
}
function Appearing() {
var _local3 = FindI(this._name);
var _local2 = FindJ(this._name);
this._alpha = this._alpha + 15;
var _local4 = this._alpha;
game[FindName(_local3, _local2)]._alpha = (bor[FindName(_local3, _local2)]._alpha = _local4);
if ((this._alpha >= 100) && (!this.DEL)) {
NTiles1++;
TIME.SetLevel(NTiles1 / NTiles);
if (NTiles1 == NTiles) {
NTiles1 = 0;
bl.removeMovieClip();
if ((level == 0) && (HintArr[0])) {
Start_Hint = 0;
} else if ((level == 1) && (HintArr[3])) {
Start_Hint = 3;
} else if ((level == 2) && (HintArr[7])) {
Start_Hint = 7;
}
if ((Start_Hint >= 0) && (HintArr[Start_Hint])) {
ShowHint(Start_Hint);
}
}
delete this.onEnterFrame;
} else if ((this._alpha > 50) || (this.DEL)) {
Appear(_local3 - 1, _local2);
Appear(_local3 + 1, _local2);
Appear(_local3, _local2 - 1);
Appear(_local3, _local2 + 1);
Appear(_local3 - 1, _local2 - 1);
Appear(_local3 + 1, _local2 + 1);
Appear(_local3 + 1, _local2 - 1);
Appear(_local3 - 1, _local2 + 1);
if (this.DEL) {
delete this.onEnterFrame;
}
}
}
function Disapearing() {
var _local3 = FindI(this._name);
var _local2 = FindJ(this._name);
this._alpha = this._alpha - 15;
var _local4 = this._alpha;
game[FindName(_local3, _local2)]._alpha = (bor[FindName(_local3, _local2)]._alpha = _local4);
if ((this._alpha <= 0) && (!this.DEL)) {
NTiles1++;
if (NTiles1 == NTiles) {
NTiles1 = 0;
if (!Failed) {
ShowStats();
TIME.StopTimer();
} else {
level--;
EndRound();
}
}
delete this.onEnterFrame;
} else if ((this._alpha < 50) || (this.DEL)) {
Disapear(_local3 - 1, _local2);
Disapear(_local3 + 1, _local2);
Disapear(_local3, _local2 - 1);
Disapear(_local3, _local2 + 1);
Disapear(_local3 - 1, _local2 - 1);
Disapear(_local3 + 1, _local2 + 1);
Disapear(_local3 + 1, _local2 - 1);
Disapear(_local3 - 1, _local2 + 1);
if (this.DEL) {
delete this.onEnterFrame;
}
}
}
function CanDrawTile(i, j) {
var _local3 = false;
if (Matrix[i][j] && ((((GetTile(i - 1, j).lock == "") || (GetTile(i - 1, j - 1).lock == "")) || (GetTile(i - 1, j + 1).lock == "")) || (((Matrix[i - 1][j] == "0") || (Matrix[i - 1][j] == undefined)) && (UpFall(i, j))))) {
_local3 = true;
}
return(_local3);
}
function InitMatrix() {
var _local4 = map[level].L;
Matrix = new Array(_local4.length);
var _local3 = 0;
while (_local3 < _local4.length) {
var _local2 = new Array(_local4[0].length);
var _local1 = 0;
while (_local1 < _local4[0].length) {
if (_local4[_local3][_local1] != 0) {
_local2[_local1] = 1;
} else {
_local2[_local1] = 0;
}
_local1++;
}
Matrix[_local3] = _local2;
_local3++;
}
}
function DrawGameField() {
NTiles = 0;
var _local4 = map[level].L;
var _local2 = 0;
while (_local2 < Matrix.length) {
var _local1 = 0;
while (_local1 < Matrix[0].length) {
if (CanDrawTile(_local2, _local1)) {
do {
var _local3 = FindRandomTile();
} while (!((!((GetTile(_local2 - 1, _local1).Name == _local3) && (GetTile(_local2 - 2, _local1).Name == _local3))) && (!((GetTile(_local2, _local1 - 1).Name == _local3) && (GetTile(_local2, _local1 - 2).Name == _local3)))));
if (level == 4) {
if ((((_local2 == 0) && (_local1 == 6)) || ((_local2 == 2) && (_local1 == 6))) || ((_local2 == 1) && (_local1 == 7))) {
_local3 = "slide6";
}
if ((_local2 == 1) && (_local1 == 6)) {
_local3 = "slide7";
}
}
var _local5 = game.attachMovie(_local3, FindName(_local2, _local1), GetDepth(_local2, _local1), {_alpha:0});
_local5._x = GlobalX + (_local1 * Size);
_local5._y = GlobalY + (_local2 * Size);
_local5.Name = _local3;
if (((_local4[_local2][_local1] == "b") || (_local4[_local2][_local1] == "e")) || (_local4[_local2][_local1] == "h")) {
AttachLock(_local2, _local1, "lock1");
if (HintArr[8]) {
Start_Hint = 8;
}
} else if (((_local4[_local2][_local1] == "c") || (_local4[_local2][_local1] == "f")) || (_local4[_local2][_local1] == "i")) {
if (HintArr[9]) {
Start_Hint = 9;
}
AttachLock(_local2, _local1, "lock2");
}
}
_local1++;
}
_local2++;
}
}
function AttachLock(i, j, l) {
game[FindName(i, j)].lock = l;
game[FindName(i, j)].attachMovie(l, "l", 10);
LOCKTILES.push({i:i, j:j});
}
function DrawGameBorder() {
var _local3 = 0;
while (_local3 < Matrix.length) {
var _local2 = 0;
while (_local2 < Matrix[0].length) {
if (Matrix[_local3][_local2]) {
var _local1 = bor.createEmptyMovieClip(FindName(_local3, _local2), GetDepth(_local3, _local2));
_local1._x = GlobalX + (_local2 * Size);
_local1._y = GlobalY + (_local3 * Size);
_local1._alpha = 0;
if (!Matrix[_local3 - 1][_local2]) {
var _local4 = _local1.attachMovie("border_u", "d", _local1.getD());
}
if (!Matrix[_local3 + 1][_local2]) {
var _local4 = _local1.attachMovie("border_d", "d", _local1.getD());
}
if (!Matrix[_local3][_local2 - 1]) {
var _local4 = _local1.attachMovie("border_l", "d", _local1.getD());
}
if (!Matrix[_local3][_local2 + 1]) {
var _local4 = _local1.attachMovie("border_r", "d", _local1.getD());
}
if ((!Matrix[_local3 - 1][_local2]) && (!Matrix[_local3][_local2 + 1])) {
var _local4 = _local1.attachMovie("border_ru", "d", _local1.getD());
}
if ((!Matrix[_local3 + 1][_local2]) && (!Matrix[_local3][_local2 + 1])) {
var _local4 = _local1.attachMovie("border_rd", "d", _local1.getD());
}
if ((!Matrix[_local3 - 1][_local2]) && (!Matrix[_local3][_local2 - 1])) {
var _local4 = _local1.attachMovie("border_lu", "d", _local1.getD());
}
if ((!Matrix[_local3 + 1][_local2]) && (!Matrix[_local3][_local2 - 1])) {
var _local4 = _local1.attachMovie("border_ld", "d", _local1.getD());
}
if ((!Matrix[_local3 - 1][_local2]) && (Matrix[_local3 - 1][_local2 + 1])) {
var _local4 = _local1.attachMovie("border_ird", "d", _local1.getD());
_local4._y = _local4._y - Size;
}
if ((!Matrix[_local3 - 1][_local2]) && (Matrix[_local3 - 1][_local2 - 1])) {
var _local4 = _local1.attachMovie("border_ild", "d", _local1.getD());
_local4._y = _local4._y - Size;
}
if ((!Matrix[_local3 + 1][_local2]) && (Matrix[_local3 + 1][_local2 + 1])) {
var _local4 = _local1.attachMovie("border_iru", "d", _local1.getD());
_local4._y = _local4._y + Size;
}
if ((!Matrix[_local3 + 1][_local2]) && (Matrix[_local3 + 1][_local2 - 1])) {
var _local4 = _local1.attachMovie("border_ilu", "d", _local1.getD());
_local4._y = _local4._y + Size;
}
if ((!Matrix[_local3][_local2 - 1]) && (Matrix[_local3 + 1][_local2 - 1])) {
var _local4 = _local1.attachMovie("border_ird", "d", _local1.getD());
_local4._x = _local4._x - Size;
}
if ((!Matrix[_local3][_local2 + 1]) && (Matrix[_local3 + 1][_local2 + 1])) {
var _local4 = _local1.attachMovie("border_ild", "d", _local1.getD());
_local4._x = _local4._x + Size;
}
if ((!Matrix[_local3][_local2 + 1]) && (Matrix[_local3 - 1][_local2 + 1])) {
var _local4 = _local1.attachMovie("border_ilu", "d", _local1.getD());
_local4._x = _local4._x + Size;
}
if ((!Matrix[_local3][_local2 - 1]) && (Matrix[_local3 - 1][_local2 - 1])) {
var _local4 = _local1.attachMovie("border_iru", "d", _local1.getD());
_local4._x = _local4._x - Size;
}
}
_local2++;
}
_local3++;
}
bor._x = bor._x - 1;
bor._y = bor._y - 1;
}
function DrawGameFon() {
var _local4 = map[level].L;
var _local2 = 0;
while (_local2 < Matrix.length) {
var _local1 = 0;
while (_local1 < Matrix[0].length) {
if (Matrix[_local2][_local1] != "0") {
NTiles++;
var _local3 = fon.attachMovie("fontile", FindName(_local2, _local1), GetDepth(_local2, _local1), {_alpha:0});
if (((_local4[_local2][_local1] == "d") || (_local4[_local2][_local1] == "e")) || (_local4[_local2][_local1] == "f")) {
Silver++;
_local3.gotoAndStop(2);
} else if (((_local4[_local2][_local1] == "g") || (_local4[_local2][_local1] == "h")) || (_local4[_local2][_local1] == "i")) {
Silver++;
Gold++;
_local3.gotoAndStop(3);
if (HintArr[6]) {
Start_Hint = 6;
}
} else {
_local3.gotoAndStop(1);
}
_local3._x = GlobalX + (_local1 * Size);
_local3._y = GlobalY + (_local2 * Size);
_local3.Name = T;
if (Gold == 0) {
plitka = upf.top;
upf.top._visible = true;
} else {
plitka = upf;
upf.top._visible = false;
}
}
_local1++;
}
_local2++;
}
GlobalGold = Gold;
GlobalSilver = Silver;
}
function FindRandomTile() {
var _local1 = map[level].chips;
var _local2 = int(_local1[random(_local1.length)]);
var _local3 = "slide" + int(_local2 + 1);
return(_local3);
}
function FindI(Name) {
var _local4;
var _local1 = Name.indexOf("Y");
var _local3 = (Name.indexOf("X") - _local1) - 1;
_local4 = Number(Name.substr(_local1 + 1, _local3));
return(_local4);
}
function FindJ(Name) {
var _local2;
var _local1 = Name.indexOf("X");
_local2 = Number(Name.substr(_local1 + 1, 2));
return(_local2);
}
function GetDepth(i, j) {
return((((i * Matrix[0].length) * 2) + j) + 500);
}
function FindName(i, j) {
return((("sY" + i) + "X") + j);
}
function GetTile(i, j) {
return(game[FindName(i, j)]);
}
function RemoveTiles(n1, n2) {
matches = 0;
var _local3 = game[n2];
var _local2 = game[n1];
GlobalS1 = _local3;
GlobalS2 = _local2;
clearInterval(_local3.moving);
_local2.inMove = (_local3.inMove = false);
clearInterval(_local2.moving);
_local3._x = (FindJ(n1) * Size) + GlobalX;
_local3._y = (FindI(n1) * Size) + GlobalY;
_local2._x = (FindJ(n2) * Size) + GlobalX;
_local2._y = (FindI(n2) * Size) + GlobalY;
_local3.Stop();
_local2.Stop();
_local3.active = false;
_local2.active = false;
if ((n1 == Blink) || (n2 == Blink)) {
Blink = "";
}
Release();
_local2._name = n2;
_local3._name = n1;
_local3.swapDepths(_local2);
if (!FindChain(0, [[FindI(n1), FindJ(n1)], [FindI(n2), FindJ(n2)]])) {
_root.wrong_s.start(_root.SoundOn);
_local2._name = n1;
_local3._name = n2;
_local3.swapDepths(_local2);
var _local9 = _local3._x;
var _local7 = _local2._x;
var _local8 = _local3._y;
var _local6 = _local2._y;
_local3.Move(_local9, _local8, _local7, _local6, SwapTime, _root.CheckMatches);
_local2.Move(_local7, _local6, _local9, _local8, SwapTime, GameClasses.GFunctions.create(_root, _root.FallRemoveCheck, [[FindI(n1), FindJ(n1)], [FindI(n2), FindJ(n2)]]));
ShowHint(1);
notBlock = true;
} else {
clearInterval(Falling1);
Falling1 = setInterval(FallDown, FallPauseTime);
}
}
function FallRemoveCheck(A) {
if (FindChain(0, A)) {
clearInterval(Falling1);
Falling1 = setInterval(FallDown, FallPauseTime);
}
}
function Release() {
Mouse.removeListener(oMouse);
}
function Dragging(str) {
var _local3 = _root._xmouse;
var _local2 = _root._ymouse;
if ((Math.abs(xmouse - _local3) > Step) || (Math.abs(ymouse - _local2) > Step)) {
Mouse.removeListener(oMouse);
if (notBlock) {
DragSlide(xmouse, _local3, ymouse, _local2, str);
}
}
}
function DragSlide(x, x1, y, y1, slide) {
var _local11 = game[slide];
var _local4 = 0;
var _local3 = 0;
if ((x > (x1 + Step)) && (Math.abs(x - x1) >= Math.abs(y - y1))) {
_local3 = -1;
} else if (((x + Step) < x1) && (Math.abs(x - x1) >= Math.abs(y - y1))) {
_local3 = 1;
} else if (((y + Step) < y1) && (Math.abs(x - x1) < Math.abs(y - y1))) {
_local4 = 1;
} else if ((y > (y1 + Step)) && (Math.abs(x - x1) < Math.abs(y - y1))) {
_local4 = -1;
}
var _local10 = FindI(slide);
var _local8 = FindJ(slide);
var _local9 = _local10 + _local4;
var _local7 = _local8 + _local3;
if (GetTile(_local9, _local7).inMove || (GetTile(_local10, _local8).inMove)) {
_local3 = 0;
_local4 = _local3;
}
if (((_local4 * _local4) + (_local3 * _local3)) == 0) {
notBlock = true;
} else {
var _local16 = FindName(_local9, _local7);
var _local2 = game[_local16];
if ((((_local2 != undefined) && (_local2.lock == "")) && (!_local11.inMove)) && (!_local2.inMove)) {
Blink = _local16;
x1 = (_local8 * Size) + GlobalX;
var _local14 = (_local7 * Size) + GlobalX;
y1 = (_local10 * Size) + GlobalY;
var _local12 = (_local9 * Size) + GlobalY;
_root.move_s.start(_root.SoundOn);
_local11.Move(x1, y1, _local14, _local12, SwapTime, GameClasses.GFunctions.create(_root, _root.RemoveTiles, _local11._name, _local2._name));
_local2.Move(_local14, _local12, x1, y1, SwapTime);
_local2.Play();
} else {
Blink = slide;
notBlock = true;
}
}
}
function CheckClick(name) {
Release();
if (Blink == "") {
return(true);
}
var _local5 = FindI(name);
var _local3 = FindJ(name);
var _local6 = Blink;
var _local4 = FindI(_local6);
var _local2 = FindJ(_local6);
if (((!GetTile(_local5, _local3).inMove) && (!GetTile(_local4, _local2).inMove)) && (((_local5 == _local4) && (Math.abs(_local3 - _local2) == 1)) || ((_local3 == _local2) && (Math.abs(_local5 - _local4) == 1)))) {
var _local11 = (_local3 * Size) + GlobalX;
var _local9 = (_local2 * Size) + GlobalX;
var _local10 = (_local5 * Size) + GlobalY;
var _local8 = (_local4 * Size) + GlobalY;
_root.move_s.start(_root.SoundOn);
game[name].Move(_local11, _local10, _local9, _local8, SwapTime, GameClasses.GFunctions.create(_root, _root.RemoveTiles, name, _local6));
game[Blink].Move(_local9, _local8, _local11, _local10, SwapTime);
} else {
if (((_local5 - _local4) == 0) && ((_local3 - _local2) == 0)) {
Blink = "";
Release();
notBlock = true;
return(true);
}
notBlock = true;
game[Blink].Stop();
return(true);
}
}
function Press() {
TIME.StartTimer();
fly.red.removeMovieClip();
if ((((!this.inMove) && (this.lock == "")) && (!swapping)) && (this._visible)) {
_root.click_s.start(_root.SoundOn);
this.Play();
if (Blink == this._name) {
Blink = "";
this.Stop();
Release();
if (this.bonus) {
this.BlowBomb(FindI(this._name), FindJ(this._name));
}
} else if (CheckClick(this._name)) {
Blink = this._name;
}
xmouse = _root._xmouse;
ymouse = _root._ymouse;
var temp = this._name;
if (Blink == this._name) {
oMouse = {};
Mouse.removeListener(oMouse);
oMouse.onMouseMove = function () {
Dragging(temp);
};
Mouse.addListener(oMouse);
}
}
}
function Decrease(MC) {
var _local5 = MC._currentframe;
MC.Block = false;
if (_local5 == 3) {
Gold--;
if (Gold <= 0) {
_root.TextShow(plitka.gold, "v", "w", -3, 12, 0, 12, 16777215);
} else {
_root.TextShow(plitka.gold, "x" + Gold, "w", -3, 12, 0, 12, 16777215);
}
} else if (_local5 == 2) {
Silver--;
if (Silver <= 0) {
_root.TextShow(plitka.silver, "v", "w", -3, 12, 0, 12, 16777215);
} else {
_root.TextShow(plitka.silver, "x" + Silver, "w", -3, 12, 0, 12, 16777215);
}
}
if (((Silver <= 0) && (Gold <= 0)) && (redytoend == false)) {
redytoend = true;
GetBlack();
fly.red.removeMovieClip();
clearInterval(showing_hint);
FromHint();
TIME.StopTimer();
FallDown();
levelcomplete_s.start(SoundOn);
music_match.stop();
} else if (Silver < 4) {
var _local3 = 0;
while (_local3 < Matrix.length) {
var _local2 = 0;
while (_local2 < Matrix[0].length) {
if (fon[FindName(_local3, _local2)]._currentframe > 1) {
var _local4 = fon[FindName(_local3, _local2)].e.attachMovie("fon_akcent", "a", 111);
_local4.gotoAndPlay(random(20) + 80);
}
_local2++;
}
_local3++;
}
}
}
function DisapRound() {
FromHint();
clearInterval(disdis);
clearInterval(showing_hint);
if (!Failed) {
STATS_MOVE.onEnterFrame = function () {
this._y = this._y - 5;
if (this._y <= 70) {
this._y = 70;
delete this.onEnterFrame;
}
};
}
if (NTiles1 == 0) {
do {
var i = random(Matrix.length);
var j = random(Matrix[0].length);
} while (!GetTile(i, j));
GetBlack();
Disapear(i, j);
}
}
function EndRound() {
if ((((level + 1) < int(_root.MaxLevel.value)) && (_root.NagTime.value != "0")) && (((level + 1) % int(_root.NagTime.value)) == 0)) {
ShowNag();
} else if ((level + 1) >= int(_root.MaxLevel.value)) {
ShowNag(1);
} else {
End_Round();
}
}
function End_Round() {
bl.removeMovieClip();
nag.removeMovieClip();
GameClasses.GFunctions.ClearAll(_root, 1, 1);
GameClasses.GFunctions.ClearAll(game_field, 1, 1);
GameClasses.GFunctions.ClearAll(stats, 1, 1);
InitTank();
}
function ShowScore(M, c) {
var _local3 = 0;
while (_local3 < M.length) {
if (GetTile(M[_local3].i, M[_local3].j).lock == "") {
var _local2 = fly.attachMovie("fly_text", ("l" + getTimer()) + random(99999), fly.getNextHighestDepth());
_local2._x = ((GlobalX + (Size / 2)) + (Size * M[_local3].j)) - 2;
_local2._y = ((GlobalY + (Size / 2)) + (Size * M[_local3].i)) - 4;
var _local6 = fon[FindName(M[_local3].i, M[_local3].j)];
var _local7 = _local6._currentframe;
if ((_local7 > 1) && (!_local6.Block)) {
var _local5 = ((_local7 - 2) * 3) + 1;
TextShow(_local2.e, _root.TextDollar.text + _local5, "gradient", -3, 10, 1, 14, 16737792, 200, 0, 16711680, 16776960, 80);
_local2._xscale = (_local2._yscale = 120);
_local2._y = _local2._y - 0;
MONEY.Add(_local5);
} else if (c) {
var _local5 = 4 + c;
TextShow(_local2.e, "+" + _local5, "GameFont", -3, 1, 1, 12, _root.FontWhite, 200, 0);
_local2._alpha = 80;
} else {
var _local5 = 5 + Math.min(M.length - 3, 4);
TextShow(_local2.e, "+" + _local5, "GameFont", -3, 1, 1, 12, _root.FontWhite, 200, 0);
_local2._alpha = 80;
}
SCORE.Add(_local5);
}
_local3++;
}
}
function Blow(i, j, c) {
var _local2 = GetTile(i, j);
if (!c) {
if (_local2.lock != "") {
_root.lock_s.start(_root.SoundOn);
_local2.lock = ((_local2.lock == "lock1") ? "" : "lock1");
_local2.l.removeMovieClip();
if (_local2.lock != "") {
_local2.attachMovie("lock1", "l", 10);
SCORE.Add(100);
} else {
SCORE.Add(50);
for (var _local6 in LOCKTILES) {
if ((LOCKTILES[_local6].i == i) && (LOCKTILES[_local6].j == j)) {
Matrix[LOCKTILES[_local6].i][LOCKTILES[_local6].j] = 1;
LOCKTILES[_local6] = null;
}
}
}
} else {
Tiles++;
if (_local2.bonus) {
_local2.removeMovieClip();
_local2.BlowBomb(i, j);
} else {
_local2.Delete(_local2._name);
}
var _local5 = fon[FindName(i, j)];
if ((_local5._currentframe > 1) && (!_local5.Block)) {
_local5.Block = true;
_local5.attachMovie("blow_fon", "l", 10);
}
}
}
}
function AttachBonus(i, j, M, C) {
if (((M == 5) && (Matrix[i][j] != 0)) && (C)) {
var _local4 = game.attachMovie("bomb", FindName(i, j), GetDepth(i, j));
_local4.bonus = 2;
if (HintArr[11]) {
Start_Hint = 11;
}
_root.bonus_s.start(_root.SoundOn);
} else if (((M == 6) && (Matrix[i][j] != 0)) && (C)) {
var _local4 = game.attachMovie("dyno", FindName(i, j), GetDepth(i, j));
_local4.bonus = 3;
if (HintArr[12]) {
Start_Hint = 12;
}
_root.bonus_s.start(_root.SoundOn);
} else if (((M > 6) && (Matrix[i][j] != 0)) && (C)) {
var _local4 = game.attachMovie("nuke", FindName(i, j), GetDepth(i, j));
_local4.bonus = 4;
if (HintArr[13]) {
Start_Hint = 13;
}
_root.bonus_s.start(_root.SoundOn);
} else if (((M > 5) && (Matrix[i][j] != 0)) && (!C)) {
var _local4 = game.attachMovie("rocket", FindName(i, j), GetDepth(i, j));
_local4.bonus = 1;
if (HintArr[10]) {
Start_Hint = 10;
}
_root.bonus_s.start(_root.SoundOn);
}
_local4._x = GlobalX + (j * Size);
_local4._y = GlobalY + (i * Size);
}
function FindBlow() {
var _local6 = 0;
while (_local6 < Matrix.length) {
var _local4 = 0;
while (_local4 < Matrix[0].length) {
if (game[FindName(_local6, _local4) + "A"] != undefined) {
var _local2 = game[FindName(_local6, _local4) + "A"];
_root.match_s.start(_root.SoundOn);
ShowScore(_local2);
var _local9 = 0;
var _local10 = 0;
var _local8 = GetMiddle(_local2);
var _local5 = false;
var _local3 = 0;
while (_local3 < _local2.length) {
i1 = Number(_local2[_local3].i);
j1 = Number(_local2[_local3].j);
_local9 = _local9 + i1;
_local10 = _local10 + j1;
var _local7 = fon[FindName(i1, j1)];
if ((!_local5) && (_local7._currentframe > 1)) {
_local5 = true;
_root.clear_s.start(_root.SoundOn && ((_root.clear_s.position == 0) || (_root.clear_s.position == _root.clear_s.duration)));
}
if (_local2.length < 4) {
Blow(i1, j1);
} else {
Blow(i1, j1);
}
_local3++;
}
AttachBonus(_local2[_local8].i, _local2[_local8].j, _local2.length, _local2.CanBlow);
delete game[FindName(_local6, _local4) + "A"];
}
_local4++;
}
_local6++;
}
}
function GetMiddle(M) {
var _local3 = 99;
var _local4 = 0;
var _local7 = 0;
var _local6 = 0;
var _local1 = 0;
while (_local1 < M.length) {
_local7 = _local7 + Number(M[_local1].i);
_local6 = _local6 + Number(M[_local1].j);
_local1++;
}
var _local9 = _local7 / M.length;
var _local8 = _local6 / M.length;
var _local5;
_local1 = 0;
while (_local1 < M.length) {
_local5 = Math.abs(_local9 - M[_local1].i) + Math.abs(_local8 - M[_local1].j);
if (_local5 < _local3) {
_local3 = _local5;
_local4 = _local1;
if (_local3 < 0.6) {
break;
}
}
_local1++;
}
if (M.length > 3) {
if (GetTile(M[_local4].i, M[_local4].j).lock == "") {
return(_local4);
}
if (_local4 > 0) {
return(_local4 - 1);
}
return(_local4 + 1);
}
}
function FindChain(chk, point) {
function ClearM(i, j, M) {
Matrix1[i][j] = "no";
var _local1 = new Array("i", "j");
_local1.i = i;
_local1.j = j;
M.push(_local1);
if (GetTile(i, j) == GlobalS1) {
M.CanBlow = true;
}
if (GetTile(i, j) == GlobalS2) {
M.CanBlow = true;
}
}
function FindMatch(i, j, M) {
var _local4 = GetTile(i, j).Name;
if (_local4.substr(0, 1) == "s") {
if ((((GetTile(i - 1, j).Name == _local4) && (GetTile(i + 1, j).Name == _local4)) && (!GetTile(i - 1, j).inMove)) && (!GetTile(i + 1, j).inMove)) {
if (Matrix1[i - 1][j] != "no") {
ClearM(i - 1, j, M);
FindMatch(i - 1, j, M);
}
if (Matrix1[i][j] != "no") {
ClearM(i, j, M);
FindMatch(i, j, M);
}
if (Matrix1[i + 1][j] != "no") {
ClearM(i + 1, j, M);
FindMatch(i + 1, j, M);
}
done = true;
}
if ((((GetTile(i + 2, j).Name == _local4) && (GetTile(i + 1, j).Name == _local4)) && (!GetTile(i + 2, j).inMove)) && (!GetTile(i + 1, j).inMove)) {
if (Matrix1[i + 2][j] != "no") {
ClearM(i + 2, j, M);
FindMatch(i + 2, j, M);
}
if (Matrix1[i][j] != "no") {
ClearM(i, j, M);
FindMatch(i, j, M);
}
if (Matrix1[i + 1][j] != "no") {
ClearM(i + 1, j, M);
FindMatch(i + 1, j, M);
}
done = true;
}
if ((((GetTile(i - 2, j).Name == _local4) && (GetTile(i - 1, j).Name == _local4)) && (!GetTile(i - 2, j).inMove)) && (!GetTile(i - 1, j).inMove)) {
if (Matrix1[i - 2][j] != "no") {
ClearM(i - 2, j, M);
FindMatch(i - 2, j, M);
}
if (Matrix1[i][j] != "no") {
ClearM(i, j, M);
FindMatch(i, j, M);
}
if (Matrix1[i - 1][j] != "no") {
ClearM(i - 1, j, M);
FindMatch(i - 1, j, M);
}
done = true;
}
if ((((GetTile(i, j + 2).Name == _local4) && (GetTile(i, j + 1).Name == _local4)) && (!GetTile(i, j + 2).inMove)) && (!GetTile(i, j + 1).inMove)) {
if (Matrix1[i][j + 2] != "no") {
ClearM(i, j + 2, M);
FindMatch(i, j + 2, M);
}
if (Matrix1[i][j] != "no") {
ClearM(i, j, M);
FindMatch(i, j, M);
}
if (Matrix1[i][j + 1] != "no") {
ClearM(i, j + 1, M);
FindMatch(i, j + 1, M);
}
done = true;
}
if ((((GetTile(i, j - 1).Name == _local4) && (GetTile(i, j + 1).Name == _local4)) && (!GetTile(i, j - 1).inMove)) && (!GetTile(i, j + 1).inMove)) {
if (Matrix1[i][j - 1] != "no") {
ClearM(i, j - 1, M);
FindMatch(i, j - 1, M);
}
if (Matrix1[i][j] != "no") {
ClearM(i, j, M);
FindMatch(i, j, M);
}
if (Matrix1[i][j + 1] != "no") {
ClearM(i, j + 1, M);
FindMatch(i, j + 1, M);
}
done = true;
}
if ((((GetTile(i, j - 2).Name == _local4) && (GetTile(i, j - 1).Name == _local4)) && (!GetTile(i, j - 2).inMove)) && (!GetTile(i, j - 1).inMove)) {
if (Matrix1[i][j - 2] != "no") {
ClearM(i, j - 2, M);
FindMatch(i, j - 2, M);
}
if (Matrix1[i][j] != "no") {
ClearM(i, j, M);
FindMatch(i, j, M);
}
if (Matrix1[i][j - 1] != "no") {
ClearM(i, j - 1, M);
FindMatch(i, j - 1, M);
}
done = true;
}
}
return(done);
}
var done = false;
var _local6 = false;
Matrix1 = new Array();
var _local2 = 0;
while (_local2 < Matrix.length) {
var _local5 = new Array();
var _local1 = 0;
while (_local1 < Matrix[_local2].length) {
_local5[_local1] = 0;
_local1++;
}
Matrix1[_local2] = _local5;
_local2++;
}
if (point == undefined) {
_local2 = 0;
while (_local2 < Matrix.length) {
var _local1 = 0;
while (_local1 < Matrix[_local2].length) {
if ((Matrix[_local2][_local1] != "0") && (GetTile(_local2, _local1) == undefined)) {
_local6 = true;
}
if (((Matrix1[_local2][_local1] != "no") && (Matrix[_local2][_local1] != "0")) && (!GetTile(_local2, _local1).inMove)) {
game[FindName(_local2, _local1) + "A"] = new Array();
done = FindMatch(_local2, _local1, game[FindName(_local2, _local1) + "A"]);
if (game[FindName(_local2, _local1) + "A"].length < 3) {
delete game[FindName(_local2, _local1) + "A"];
}
} else {
Matrix1[_local2][_local1] = "no";
}
_local1++;
}
_local2++;
}
} else {
var _local4 = 0;
while (_local4 < point.length) {
_local2 = point[_local4][0];
var _local1 = point[_local4][1];
var _local3 = GetTile(_local2, _local1);
if (((Matrix1[_local2][_local1] != "no") && (Matrix[_local2][_local1] != "0")) && (!_local3.inMove)) {
game[FindName(_local2, _local1) + "A"] = new Array();
done = FindMatch(_local2, _local1, game[FindName(_local2, _local1) + "A"]);
var _local8 = _local3.bonus;
if ((_local8 && ((_local3 == GlobalS1) || (_local3 == GlobalS2))) && (matches < 1)) {
_local3.BlowBomb(_local2, _local1);
done = true;
}
if (game[FindName(_local2, _local1) + "A"].length < 3) {
delete game[FindName(_local2, _local1) + "A"];
}
}
_local4++;
}
if ((!done) && (chk != 0)) {
_local2 = 0;
while (_local2 < Matrix.length) {
var _local1 = 0;
while (_local1 < Matrix[_local2].length) {
if (((Matrix[_local2][_local1] != "0") && (GetTile(_local2, _local1) == undefined)) && (((GetTile(_local2 - 1, _local1).lock == "") || (GetTile(_local2 - 1, _local1 - 1).lock == "")) || (GetTile(_local2 - 1, _local1 + 1).lock == ""))) {
_local6 = true;
break;
}
_local1++;
}
_local2++;
}
}
}
if (_local6 && (!done)) {
done = true;
FallTime = FallTimeShort;
} else {
FallTime = FallTimeLong;
}
GlobalS1 = null;
GlobalS2 = null;
return(done);
}
function CheckMatch(i1, j1) {
if (i1 == undefined) {
i1 = 0;
j1 = 0;
}
if (((!redytoend) && (!bl)) && (!stats)) {
var _local8 = 0;
while (_local8 < Matrix.length) {
var _local7 = 0;
while (_local7 < Matrix[0].length) {
var _local2 = (i1 + _local8) % Matrix.length;
var _local1 = (j1 + _local7) % Matrix.length;
var _local6 = FindName(_local2, _local1);
var _local5 = FindName(_local2 - 1, _local1);
var _local4 = game[_local6];
var _local3 = game[_local5];
if ((((((((_local4 && (_local3)) && (_local4.Name != _local3.Name)) && (_local4.lock == "")) && (_local3.lock == "")) && (!_local4.inMove)) && (!_local3.inMove)) && (!game[FindName(_local2, _local1) + "A"])) && (!game[FindName(_local2 - 1, _local1) + "A"])) {
_local4._name = _local5;
_local3._name = _local6;
if (FindChain(1, [[_local2, _local1], [_local2 - 1, _local1]])) {
_local4._name = _local6;
_local3._name = _local5;
delete game[FindName(_local2, _local1) + "A"];
delete game[FindName(_local2 - 1, _local1) + "A"];
return([_local4, _local3]);
}
_local4._name = _local6;
_local3._name = _local5;
}
_local6 = FindName(_local2, _local1);
_local5 = FindName(_local2, _local1 - 1);
_local4 = game[_local6];
_local3 = game[_local5];
if ((((((((_local4 && (_local3)) && (_local4.Name != _local3.Name)) && (_local4.lock == "")) && (_local3.lock == "")) && (!_local4.inMove)) && (!_local3.inMove)) && (!game[FindName(_local2, _local1) + "A"])) && (!game[FindName(_local2, _local1 - 1) + "A"])) {
_local4._name = _local5;
_local3._name = _local6;
if (FindChain(1, [[_local2, _local1], [_local2, _local1 - 1]])) {
_local4._name = _local6;
_local3._name = _local5;
delete game[FindName(_local2, _local1) + "A"];
delete game[FindName(_local2, _local1 - 1) + "A"];
return([_local4, _local3]);
}
_local4._name = _local6;
_local3._name = _local5;
}
_local7++;
}
_local8++;
}
}
return([]);
}
function FallDown() {
fly.red.removeMovieClip();
clearInterval(showing_hint);
if (!Fall) {
FindBlow();
FALLTILES = [];
Fall = true;
for (var _local4 in LOCKTILES) {
Matrix[LOCKTILES[_local4].i][LOCKTILES[_local4].j] = 0;
GetTile(LOCKTILES[_local4].i, LOCKTILES[_local4].j)._name = FindName(LOCKTILES[_local4].i, LOCKTILES[_local4].j) + "_l";
}
var _local2 = 0;
while (_local2 < Matrix[0].length) {
FallColomn(_local2);
_local2++;
}
var _local3 = Matrix.length - 1;
while (_local3 >= 0) {
FallDiag(_local3);
_local3--;
}
for (var _local4 in LOCKTILES) {
Matrix[LOCKTILES[_local4].i][LOCKTILES[_local4].j] = 1;
game[FindName(LOCKTILES[_local4].i, LOCKTILES[_local4].j) + "_l"]._name = FindName(LOCKTILES[_local4].i, LOCKTILES[_local4].j);
}
clearInterval(Falling1);
clearInterval(Falling);
Falling = setInterval(function () {
clearInterval(Falling);
Fall = false;
if (FindChain(1, FALLTILES)) {
Matches++;
matches++;
FallDown();
} else {
matches = 0;
notBlock = true;
CheckMatches();
if (redytoend || (Failed)) {
redytoend = false;
clearInterval(disdis);
disdis = setInterval(DisapRound, 2000);
_root.createEmptyMovieClip("STATS_MOVE", _root.getD());
STATS_MOVE._x = 240;
STATS_MOVE._y = 200;
if (!Failed) {
if (_root.UseGraphics.value == "false") {
_root.TextShow(STATS_MOVE, _root.TextLevelComplete.text, "gradient", -2, 18, 1, 26, 0, 300, 0, 65280, 16776960, 90);
var _local3 = new flash.filters.DropShadowFilter(0, 0, _root.FontWhite, 1, 4, 4, 32, 3);
var _local2 = STATS_MOVE.filters;
_local2.push(_local3);
STATS_MOVE.filters = _local2;
} else {
STATS_MOVE.attachMovie("levelcomplete", "l", 0);
}
} else {
_root.TextShow(STATS_MOVE, _root.TextLose["text" + Failed], "gradient", -2, 18, 1, 26, 0, 300, 0, 16711680, 16776960, 90);
}
} else if ((level == 0) && (HintArr[2])) {
ShowHint(2);
} else if (Start_Hint > 0) {
ShowHint(Start_Hint);
}
}
}, FallTime);
}
}
function CheckMatches(c) {
if (!int(c)) {
c = 7000;
}
if ((((!redytoend) && (!bl)) && (!stats)) && (!_root.sSssS)) {
clearInterval(showing_hint);
CheckMatches1(c);
}
}
function CheckMatches1(c) {
clearInterval(showing_hint);
var _local1 = CheckMatch();
if (_local1 != []) {
clearInterval(showing_hint);
showing_hint = setInterval(ShowSwap, c, _local1[0], _local1[1]);
} else {
Ressufle();
}
}
function Ressufle() {
_root.Failed = 2;
_root.FallDown();
_root.GetBlack();
}
function ShowSwap(S1, S2) {
fly.red.removeMovieClip();
clearInterval(showing_hint);
var _local1 = S1._x;
var _local3 = S2._x;
var _local2 = S1._y;
var _local4 = S2._y;
if (Math.abs(_local1 - _local3) < 5) {
_local1 = Math.min(_local1, _local3);
_local2 = Math.min(_local2, _local4);
fly.attachMovie("red_arrows", "red", fly.getD(), {_x:_local1 + (Size / 2), _y:_local2 + Size});
} else {
_local1 = Math.min(_local1, _local3);
_local2 = Math.min(_local2, _local4);
fly.attachMovie("red_arrows", "red", fly.getD(), {_x:_local1 + Size, _y:_local2 + (Size / 2), _rotation:90});
}
}
function UpFall(i1, j) {
var _local3 = false;
var _local1 = i1;
while ((Matrix[_local1][j] != 0) && (_local1 >= 0)) {
_local1--;
}
if ((NOTLOCK(_local1, j) && (((Matrix[_local1][j - 1] == 0) && (NOTLOCK(_local1, j - 1))) || (Matrix[_local1][j - 1] == undefined))) && (((Matrix[_local1][j + 1] == 0) && (NOTLOCK(_local1, j + 1))) || (Matrix[_local1][j + 1] == undefined))) {
_local3 = true;
}
return(_local3);
}
function NOTLOCK(i, j) {
for (var _local1 in LOCKTILES) {
if ((LOCKTILES[_local1].i == i) && (LOCKTILES[_local1].j == j)) {
return(false);
}
}
return(true);
}
function FallColomn(j, ii) {
var _local4 = 0;
var _local3;
var _local13 = false;
if (ii == undefined) {
_local3 = Matrix.length - 1;
} else {
_local3 = ii;
}
while ((_local3 >= 0) && (Matrix[_local3][j] == 0)) {
_local3--;
}
while (_local3 > -2) {
if ((Matrix[_local3][j] == 0) || (Matrix[_local3][j] == undefined)) {
var _local2 = _local3 + 1;
if (UpFall(_local2, j) && (_local4)) {
var _local9 = _local4;
while (_local4 > 0) {
while ((Matrix[_local2][j] == 0) && (_local2 < Matrix.length)) {
_local2++;
}
var _local8 = GetDepth(_local2 - 1, j);
var _local7 = FindRandomTile();
var _local6 = game.attachMovie(_local7, FindName(_local2 - 1, j), _local8, {_x:(Size * j) + GlobalX, _y:(Size * (((_local2 - 1) - _local9) + _local4)) + GlobalY, _alpha:0});
_local6.Name = _local7;
if (_local6._y > (GetTile(_local2 + 1, j)._y - Size)) {
_local6._y = GetTile(_local2 + 1, j)._y - Size;
}
ii = _local2 + 1;
while (((ii < Matrix.length) && (Matrix[ii][j] != 0)) && (GetTile(ii, j) == undefined)) {
ii++;
}
ii--;
MoveTile(_local2 - 1, j, ii, j, 1, FallTime);
_local4--;
}
_local4 = 0;
} else {
_local4 = 0;
}
} else if (GetTile(_local3, j) && (_local4)) {
ii = _local3 + 1;
while (((ii < Matrix.length) && (Matrix[ii][j] != 0)) && (GetTile(ii, j) == undefined)) {
ii++;
}
ii--;
MoveTile(_local3, j, ii, j, 0, FallTime);
} else if (GetTile(_local3, j) == undefined) {
_local4++;
}
_local3--;
}
}
function FallDiag(i) {
var _local1 = 0;
while (_local1 < Matrix[0].length) {
if (((!UpFall(i, _local1)) && (!GetTile(i, _local1))) && (Matrix[i][_local1] != 0)) {
if (GetTile(i - 1, _local1 - 1) && (!GetTile(i - 1, _local1 - 1).inMove)) {
MoveTile(i - 1, _local1 - 1, i, _local1, 0, FallTime);
FallColomn(_local1 - 1);
} else if (GetTile(i - 1, _local1 + 1) && (!GetTile(i - 1, _local1 + 1).inMove)) {
MoveTile(i - 1, _local1 + 1, i, _local1, 0, FallTime);
FallColomn(_local1 + 1);
}
}
_local1++;
}
}
function MoveTile(i1, j1, i2, j2, f, s) {
var _local6 = GetDepth(i2, j2);
var _local1 = GetTile(i1, j1);
var _local4 = FindName(i2, j2);
_local1._name = _local4;
_local1.inMove = true;
_local1.swapDepths(_local6);
var _local5 = 100;
if (f) {
_local5 = 0;
}
_local1.Move(_local1._x, _local1._y, (Size * j2) + GlobalX, (Size * i2) + GlobalY, s, EndMove);
}
function EndMove(Name) {
var _local2 = FindI(Name);
var _local3 = FindJ(Name);
var _local4 = game[Name];
if (((!GetTile(_local2 + 1, _local3)) && (Matrix[_local2 + 1][_local3] != 0)) && (_local2 < (Matrix.length - 1))) {
_local4.inMove = true;
}
_root.fall_s.start(_root.SoundOn && ((_root.fall_s.position == 0) || (_root.fall_s.position == _root.fall_s.duration)));
FALLTILES.push([_local2, _local3]);
}
function MovePanel(dir) {
var _local3 = getTimer();
blclick.removeMovieClip();
if (dir) {
TIME.StopTimer();
var _local2 = GetBlack(_root, 0, 99, "blclick");
_local2.useHandCursor = false;
_local2.onPress = MovePanel;
var _local5 = upf._y;
var _local4 = -50;
} else {
var _local5 = upf._y;
var _local4 = 0;
}
clearInterval(moving_panel);
moving_panel = setInterval(MovingPanel, 0, _local3, _local5, _local4);
}
function MovingPanel(T, y1, y2) {
var _local3 = 1000;
var _local2 = (getTimer() - T) / _local3;
if (_local2 > 1) {
_local2 = 1;
clearInterval(moving_panel);
}
var _local1 = y1 + ((y2 - y1) * _local2);
upf._y = _local1;
upf.timer._y = 45 - _local1;
upf.timer._x = 474 - _local1;
bor._alpha = (fon._alpha = (game._alpha = (fly._alpha = 100 + (_local1 * 2))));
}
function MenuMain() {
if (tank) {
menumain = _root.attachMovie("menumain", "menumain", 101, {skip_ret:true});
} else if (!redytoend) {
TIME.StopTimer();
menumain = GameField.attachMovie("menumain", "menumain", 101);
}
}
function FunctionSound() {
var _local1 = 0;
while (_local1 < (menu_buttons.length - 1)) {
if (menu_buttons[_local1].funct == "FSound") {
break;
}
_local1++;
}
var _local2 = menu_buttons[menu_buttons.length - 1].text;
menu_buttons[menu_buttons.length - 1].text = menu_buttons[_local1].text;
menu_buttons[_local1].text = _local2;
menumain["b" + _local1].InitText(_local2, 0, -2, "GameFont", -2, 20, 1, 16, 16777215, 1000, 0);
SoundOn = !SoundOn;
if (SoundOn) {
if (tank) {
music_fon.start(SoundOn, 0, 99999);
} else {
music_match.start(SoundOn, 0, 99999);
}
} else {
music_fon.stop();
music_match.stop();
}
}
function FunctionNew() {
level--;
Money_ADD = 0;
EndRound();
}
function FunctionResume() {
TIME.StartTimer();
menumain.removeMovieClip();
delete menumain;
}
function FunctionDownload() {
getURL (_root.DownloadLink.value, "_blank");
}
function ShowStats() {
FromHint();
var _local1 = (Failed == false) || ((GameClasses.Score == 0) && (Gold == 0));
if (!_local1) {
level--;
}
var _local2 = new GameClasses.GameStats(SCORE.score, GlobalSilver - Silver, GlobalGold - Gold, KUBOKN, _local1, TIME.GetTime());
}
function ShowHint(N) {
clearInterval(showing_hint1);
showing_hint1 = setInterval(ShowHint1, 100, N);
}
function ShowHint1(N) {
clearInterval(showing_hint1);
if ((((HintArr[N] && (!bl)) && (!redytoend)) && (!Fall)) && (!menumain)) {
HintArr[N] = 0;
GameClasses.GFunctions.ClearAll(_root.sSssS, 1, 1);
FromHint();
TIME.StopTimer();
Start_Hint = -1;
switch (N) {
case 0 :
CheckMatches(2);
var _local5 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 120, 250, FromHint);
break;
case 1 :
CheckMatches(2);
if (level == 0) {
HintArr[N] = 1;
}
_local5 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 120, 250, FromHint);
break;
case 2 :
var _local3 = FindGold(2);
var _local4 = fly.attachMovie("green_arrow", "green", fly.getD());
_local4._x = _local3._x + (Size / 2);
_local4._y = _local3._y - 10;
_local4._rotation = 90;
_local5 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 120, _local3._y + 40, FromHint);
break;
case 3 :
_local4 = fly.attachMovie("green_arrow", "green", fly.getD());
_local4._x = 450;
_local4._y = 170;
_local5 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 120, 150, FromHint);
break;
case 6 :
_local3 = FindGold(3);
_local4 = fly.attachMovie("green_arrow", "green", fly.getD());
_local4._x = _local3._x + (Size / 2);
_local4._y = _local3._y - 10;
_local4._rotation = 90;
_local5 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 120, _local3._y + 40, FromHint);
break;
case 7 :
_local4 = fly.attachMovie("green_arrow", "green", fly.getD());
_local4._x = 20;
_local4._y = 55;
_local4._rotation = -90;
_local5 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 120, 200, FromHint);
break;
case 8 :
_local3 = FindLock(1);
_local4 = fly.attachMovie("green_arrow", "green", fly.getD());
_local4._x = _local3._x + (Size / 2);
_local4._y = _local3._y - 10;
_local4._rotation = 90;
_local5 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 120, _local3._y + 40, FromHint);
break;
case 9 :
_local3 = FindLock(2);
_local4 = fly.attachMovie("green_arrow", "green", fly.getD());
_local4._x = _local3._x + (Size / 2);
_local4._y = _local3._y - 10;
_local4._rotation = 90;
_local5 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 120, _local3._y + 40, FromHint);
break;
case 10 :
_local3 = FindBonus(1);
if (_local3._x && (!_local3.inMove)) {
_local4 = fly.attachMovie("green_arrow", "green", fly.getD());
_local4._x = _local3._x + (Size / 2);
_local4._y = _local3._y - 10;
_local4._rotation = 90;
_local5 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 120, _local3._y + 40, FromHint);
} else {
HintArr[N] = 1;
FromHint();
}
break;
case 11 :
_local3 = FindBonus(2);
if (_local3._x && (!_local3.inMove)) {
_local4 = fly.attachMovie("green_arrow", "green", fly.getD());
_local4._x = _local3._x + (Size / 2);
_local4._y = _local3._y - 10;
_local4._rotation = 90;
_local5 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 150, _local3._y + 40, FromHint);
} else {
HintArr[N] = 1;
FromHint();
}
break;
case 12 :
_local3 = FindBonus(3);
if (_local3._x && (!_local3.inMove)) {
_local4 = fly.attachMovie("green_arrow", "green", fly.getD());
_local4._x = _local3._x + (Size / 2);
_local4._y = _local3._y - 10;
_local4._rotation = 90;
_local5 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 150, _local3._y + 40, FromHint);
} else {
HintArr[N] = 1;
FromHint();
}
break;
case 13 :
_local3 = FindBonus(4);
if (_local3._x && (!_local3.inMove)) {
_local4 = fly.attachMovie("green_arrow", "green", fly.getD());
_local4._x = _local3._x + (Size / 2);
_local4._y = _local3._y - 10;
_local4._rotation = 90;
_local5 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 150, _local3._y + 40, FromHint);
} else {
HintArr[N] = 1;
FromHint();
}
}
}
}
function FindGold(N) {
var _local2 = 0;
while (_local2 < Matrix.length) {
var _local1 = 0;
while (_local1 < Matrix[0].length) {
if (fon[FindName(_local2, _local1)]._currentframe == N) {
return(GetTile(_local2, _local1));
}
_local1++;
}
_local2++;
}
}
function FindLock(N) {
var _local2 = 0;
while (_local2 < Matrix.length) {
var _local1 = 0;
while (_local1 < Matrix[0].length) {
if (GetTile(_local2, _local1).lock == ("lock" + N)) {
return(GetTile(_local2, _local1));
}
_local1++;
}
_local2++;
}
}
function FindBonus(N) {
var _local2 = 0;
while (_local2 < Matrix.length) {
var _local1 = 0;
while (_local1 < Matrix[0].length) {
if (GetTile(_local2, _local1).bonus == N) {
return(GetTile(_local2, _local1));
}
_local1++;
}
_local2++;
}
}
function FromHint() {
fly.green.removeMovieClip();
clearInterval(showing_hint);
clearInterval(showing_hint1);
_root.sSssS.removeMovieClip();
CheckMatches();
}
function ShowNag(c) {
GameClasses.GFunctions.ClearAll(_root, 1, 1);
nag.removeMovieClip();
var nag = _root.attachMovie("nag", "nag", _root.getD());
var _local3;
var _local4 = 1;
if (c) {
if ((level + 1) >= _root.MaxLevel.value) {
_local3 = _root.TextNagWin;
} else {
_local3 = _root.TextNagNew;
}
nag.b1.onLoad = function () {
this.InitText(_root.TextRestart.text);
};
nag.b1.onPress = _root.Restart_All;
var _local6 = (_root.TextNagMoney.text + _root.TextDollar.text) + TOTPOINTS;
var _local5 = nag.createEmptyMovieClip("T2", 9);
_local5._x = _local3.xs;
_local5._y = _local3.ys;
_root.TextShow(_local5, _local6, "gradient", -3, 16, 1, 16, _root.FontWhite, 500, _root.FontBlue, 16711680, 16776960, -70);
} else {
_local4 = 0;
_local3 = _root.TextNag;
nag.b1.onLoad = function () {
this.InitText(_root.TextContinue.text);
};
nag.b1.onPress = _root.End_Round;
}
_root.TextShow(nag.text, _local3.text, "GameFont", -3, 14 + (_local4 * 2), _local4, 14 + (_local4 * 2), _root.FontWhite, int(_local3.format), _root.FontBlue);
nag.text._x = _local3.x;
nag.text._y = _local3.y;
nag.b2.onPress = FunctionDownload;
nag.b2.onLoad = function () {
this.InitText(_root.TextDownload.text);
};
if (_root.NagTime.value == "0") {
nag.b2._visible = false;
nag.b1._x = nag.b1._x - 60;
}
}
function FunctionHelp() {
TIME.StopTimer();
N = int(N);
var _local2 = this.createEmptyMovieClip("help", 345);
var _local3 = new GameClasses.BitmapHelp(_local2, "game");
}
function Restart_All() {
DepthArr = [];
Comfort = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
Indic = [0, 0, 0, 0, 0];
TOTPOINTS = (Money_ADD = 0);
TOTMONEY = 150;
level = -1;
KUBOKN = 0;
New__Game = true;
delete Matrix;
End_Round();
}
function FunctionNewGame() {
var _local2 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), TextNewGame.text, 134, 150, GameClasses.GFunctions.create(_root, ShowNag, 1), FromHint);
}
stop();
stop();
Stage.scaleMode = "noScale";
fscommand ("trappallkeys", "true");
_root.attachMovie("black", "root_black", 0, {_width:520, _height:390, _alpha:0});
_root.setMask(root_black);
MovieClip.prototype.getD = getNextHighestDepth;
var FontWhite = 16777215;
var FontBlue = 157149;
var FontBrown = 8934690;
var notBlock = true;
var SoundOn = true;
var Matrix;
var GlobalX = 0;
var GlobalY = 0;
var Size = 30;
var Step = 10;
var SwapTime = 200;
var FallPauseTime = 100;
var FallTime = 200;
var FallTimeLong = 200;
var FallTimeShort = 100;
var swapping = false;
var matches = 0;
var FALLTILES;
var LOCKTILES;
var DepthArr = [];
var Comfort = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var Indic = [0, 0, 0, 0, 0];
var TOTMONEY = 150;
var KUBOKN = 0;
var level = -1;
var HintArr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
var TOTPOINTS = 0;
var Failed = false;
var TankPos = "menu";
oKey = {};
oKey.onKeyDown = function () {
if (_root.cheat.value == "true") {
if (Key.isDown(35)) {
Silver = 0;
Gold = 0;
Decrease(2);
}
}
};
Key.addListener(oKey);
InitSound();
InitTank();
Symbol 1401 MovieClip [__Packages.GameClasses.LoadGameXML] Frame 0
class GameClasses.LoadGameXML
{
var MCRoot, Loading, LEVELxml, TEXTxml;
function LoadGameXML (MCRoot, levelPath, textPath, Loading) {
this.MCRoot = MCRoot;
this.Loading = Loading;
LEVELxml = new XML(MCRoot[levelPath]);
initcountXML(LEVELxml);
TEXTxml = new XML(MCRoot[textPath]);
initTEXTXML(TEXTxml);
}
function initcountXML(ThisXML) {
var _local8 = ThisXML.firstChild;
if (_local8 != undefined) {
MCRoot.loadbar._visible = true;
var _local7 = _local8.childNodes;
MCRoot.map = new Array(_local7.length);
var _local4 = 0;
while (_local4 < _local7.length) {
var _local2 = new Array();
_local2.name = _local7[_local4].attributes.id;
_local2.time = _local7[_local4].attributes.time;
_local2.chips = _local7[_local4].attributes.chips.toString().split("");
_local2.art = _local7[_local4].attributes.artefact_begin;
_local2.bonus = _local7[_local4].attributes.bonusLevel;
var _local5 = _local7[_local4].childNodes;
_local2.L = new Array();
_local2.C = new Array();
if (_local5.length > 11) {
trace(_local4 + " H");
}
var _local3 = 0;
while (_local3 < _local5.length) {
var _local6 = _local5[_local3].firstChild.toString().split("");
if (_local6.length > 15) {
trace(_local4 + " L");
}
if (_local5[_local3].nodeName == "Line") {
_local2.L.push(_local6);
}
if (_local5[_local3].nodeName == "Chip") {
_local2.C.push(_local6);
}
_local3++;
}
MCRoot.map[_local4] = _local2;
_local4++;
}
if (!(--XMLCount)) {
Loading();
}
} else {
Text();
}
}
function initTEXTXML(ThisXML) {
MCRoot.Dialogs = new Array();
var _local13 = ThisXML.firstChild;
if (_local13 != undefined) {
var _local4 = _local13.childNodes;
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3].nodeName == "text") {
var _local9 = "";
var _local12 = _local4[_local3].attributes.id;
var _local10 = _local4[_local3].childNodes;
var _local7 = 0;
while (_local7 < _local10.length) {
_local9 = _local9 + (_local10[_local7].attributes.text + "|");
_local7++;
}
_local9 = _local9.substr(0, -1);
MCRoot[_local12] = _local9;
} else if (_local4[_local3].nodeName == "string") {
var _local8 = (MCRoot[_local4[_local3].attributes.id] = {});
for (var _local12 in _local4[_local3].attributes) {
_local8[_local12] = _local4[_local3].attributes[_local12];
}
} else if (_local4[_local3].nodeName == "menu_buttons") {
MCRoot.menu_buttons = new Array();
var _local6 = _local4[_local3].childNodes;
var _local5 = 0;
while (_local5 < _local6.length) {
var _local8 = {};
for (var _local12 in _local6[_local5].attributes) {
_local8[_local12] = _local6[_local5].attributes[_local12];
}
MCRoot.menu_buttons.push(_local8);
_local5++;
}
} else if (_local4[_local3].nodeName == "logo") {
var _local8 = {};
for (var _local12 in _local4[_local3].attributes) {
_local8[_local12] = _local4[_local3].attributes[_local12];
}
var _local11 = _root.logos.createEmptyMovieClip(_local8.name, _root.logos.getNextHighestDepth());
_local11._x = _local8.x;
_local11._y = _local8.y;
_local11.loadMovie(_local8.path);
}
_local3++;
}
if (!(--XMLCount)) {
Loading();
}
} else {
Text();
}
}
function Text() {
MCRoot.KB.text = "Could not find game files";
}
var XMLCount = 2;
}
Symbol 1402 MovieClip [__Packages.GameClasses.Fish] Frame 0
class GameClasses.Fish extends MovieClip
{
var tank, _parent, useHandCursor, onPress, BlueColor, DefaultColor, xp, _x, yp, _y, _rotation, fish, _currentframe, gotoAndStop, moving, TurnTime, getDepth, _xscale, _yscale, swapDepths, NIDA, createEmptyMovieClip, dw, up, removeMovieClip;
function Fish () {
super();
tank = _parent._parent;
useHandCursor = false;
onPress = GameClasses.GFunctions.create(this, IncSpeed);
BlueColor = new Color(this);
DefaultColor = BlueColor.getTransform();
AddFish();
xp = _x;
yp = _y;
_rotation = 0;
}
function AttachNos(C, F, ID) {
if (F) {
var _local5 = fish.nos.attachMovie("fish_wish", "h", 0);
if ((_currentframe == 2) || (_currentframe == 4)) {
_local5._xscale = -100;
} else {
_local5._xscale = 100;
}
_local5.gotoAndPlay(F);
var _local4 = _local5.e.attachMovie(ID, "h", 0);
if (_local4.bl) {
var _local8 = 70 / _local4.bl._width;
var _local7 = 50 / _local4.bl._height;
var _local6 = Math.min(_local8, _local7);
_local4._xscale = 100 * _local6;
_local4._yscale = 100 * _local6;
_local4._x = ((-_local4.bl._width) / 4) - 5;
_local4._y = ((-_local4.bl._height) / 4) - 5;
} else {
var _local8 = 70 / _local4._width;
var _local7 = 50 / _local4._height;
var _local6 = Math.min(_local8, _local7);
_local4._xscale = 100 * _local6;
_local4._yscale = 100 * _local6;
_local4._x = (-_local4._width) / 2;
_local4._y = (-_local4._height) / 2;
}
_local5.ID = ID;
} else {
var _local5 = fish.nos.attachMovie("hearts", "h", 0);
_local5.TTT = getTimer();
var _local2 = 1;
while (_local2 < 6) {
var _local3 = _local5["h" + _local2];
_local3._rotation = 25 * ((2 * Math.random()) - 1);
_local3.gotoAndPlay(random(35));
_local2++;
}
}
_local5.onEnterFrame = function () {
if ((this.TTT + 5000) < getTimer()) {
this.removeMovieClip();
}
};
if (C) {
fish.nos.h.TTT = C;
}
}
function AppearFish(x, y) {
_root.buy_s.start(_root.SoundOn);
active = false;
gotoAndStop("moveright");
var _local6 = new GameClasses.Spline(260, 260 + ((x - 260) * 0.25), 260 + ((x - 260) * 0.5), 260 + ((x - 260) * 0.8), x);
var _local5 = new GameClasses.Spline(-50, (0.5 * (y + 50)) - 50, (0.8 * (y + 50)) - 50, (0.98 * (y + 50)) - 50, y);
clearInterval(moving);
if (x > 260) {
dir = "right";
_rotation = 60;
} else {
dir = "left";
_rotation = -60;
}
moving = setInterval(GameClasses.GFunctions.create(this, Appearing, getTimer(), _local6, _local5), 0);
var _local7 = new GameClasses.GameEffects("bubbles", this, _parent, getTimer() + 1000, 50, 50, 0);
}
function Appearing(T, SX, SY) {
var _local2 = (getTimer() - T) / 1000;
if (_local2 >= 0.9) {
_local2 = 0.9;
clearInterval(moving);
StartMove();
active = true;
}
_x = SX.getPoint(_local2);
_y = SY.getPoint(_local2);
}
function IncSpeed() {
speed++;
}
function AddFish() {
if (random(2) == 1) {
dir = "left";
}
StartMove();
}
function StartMove() {
TurnTime = (getTimer() + 5000) + random(5000);
GetY();
Depths = int(random(500) + 500);
position = 1;
speed = random(3) + 1;
var _local2 = fish.nos.h.TTT;
var _local3 = fish.nos.h.ID;
var _local4 = (_local3 ? (fish.nos.h._currentframe) : null);
gotoAndStop("move" + dir);
if (_local2) {
AttachNos(_local2, _local4, _local3);
}
UseFishInt = true;
}
function GetY() {
y = ((2 * Math.random()) - 1) / 4;
if (_y < 20) {
y = 0.5 + ((Math.random() * 2) / 3);
} else if (_y > 250) {
y = -0.5 - ((Math.random() * 2) / 3);
}
var _local2 = ((dir == "left") ? -1 : 1);
}
function MoveFish() {
if (!UseFishInt) {
return(undefined);
}
var _local7 = ((dir == "left") ? -1 : 1) * speed;
_x = _x + _local7;
_y = _y + y;
position = position + (speed / 3);
if (position >= fish._totalframes) {
position = position - fish._totalframes;
}
fish.gotoAndStop(int(position));
gotoAndStop("move" + dir);
if (Diam(xp, _x, yp, _y) > 2) {
var _local2 = (Math.atan2(_y - yp, _x - xp) * 180) / Math.PI;
if (_local2 > 90) {
_local2 = _local2 - 180;
if (!active) {
_local2 = Math.min(0, _local2);
}
} else if (_local2 < -90) {
_local2 = _local2 + 180;
if (!active) {
_local2 = Math.max(0, _local2);
}
}
var _local5 = _rotation;
var _local4 = _local2 / 3;
if (_local4 > (_local5 + 2)) {
_local4 = _local5 + 2;
}
if (_local4 < (_local5 - 2)) {
_local4 = _local5 - 2;
}
_rotation = _local4;
xp = _x;
yp = _y;
}
if (((((getTimer() > TurnTime) || (_x < 45)) || (_x > 475)) || ((_y < 20) && (active))) || (_y > 250)) {
Turn();
} else if (Math.abs(Depths - getDepth()) > 10) {
var _local3 = getDepth();
var _local9 = int((Depths - _local3) / 20);
var _local8 = true;
if (_local8) {
_local3 = SwapFishDepth(_local3, _local3 + _local9);
_xscale = (_yscale = (_local3 + 1000) / 20);
var _local6 = CopyColor(DefaultColor);
_local6.rb = _local6.rb - (Math.pow((1000 - _local3) / 1000, 2) * 150);
_local6.gb = _local6.gb - (Math.pow((1000 - _local3) / 1000, 2) * 60);
_local6.bb = _local6.bb + (Math.pow((1000 - _local3) / 1000, 2) * 75);
BlueColor.setTransform(_local6);
}
}
}
function Diam(x1, x2, y1, y2) {
return(Math.sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2))));
}
function Turn() {
if (_x < 45) {
_x = 45;
} else if (_x > 475) {
_x = 475;
}
var _local2 = fish.nos.h.TTT;
var _local3 = fish.nos.h.ID;
var _local4 = (_local3 ? (fish.nos.h._currentframe) : null);
gotoAndStop("turn1" + dir);
if (_local2) {
AttachNos(_local2, _local4, _local3);
}
dir = ((dir == "right") ? "left" : "right");
UseFishInt = false;
}
function SwapFishDepth(D1, D2) {
swapDepths(D2);
if (tank.DepthArr[NIDA]) {
tank.DepthArr[NIDA].Depth = D2;
tank.DepthArr[NIDA].x = _x;
tank.DepthArr[NIDA].y = _y;
}
return(D2);
}
function DelFish(t) {
_root.sell_s.start(_root.SoundOn);
clearInterval(moving);
var _local4 = createEmptyMovieClip("dw", 0);
var _local5 = createEmptyMovieClip("up", 2);
fish.swapDepths(1);
var _local3 = dw.attachMovie("sachok_dw", "b", 11);
_local3 = up.attachMovie("sachok_up", "b", 11);
dw._y = (up._y = -1000);
UseFishInt = false;
moving = setInterval(GameClasses.GFunctions.create(this, Removing, getTimer(), _y, t), 0);
}
function Removing(T, y, tt) {
var _local2 = (getTimer() - T) / 1500;
if (_local2 >= 1) {
_local2 = 1;
clearInterval(moving);
DelFish1(tt);
}
if (_local2 >= 0.333333333333333) {
dw._y = (up._y = 0);
_y = y - ((((50 + y) * 3) / 2) * (_local2 - 0.333333333333333));
} else {
dw._y = (up._y = -300 + (900 * _local2));
}
}
function DelFish1(t) {
if (tank.DepthArr[NIDA]) {
tank.DepthArr[NIDA] = 0;
}
clearInterval(moving);
tank.NFishes[t]--;
removeMovieClip();
}
function CopyColor(O1) {
var _local2 = {};
for (var _local3 in O1) {
_local2[_local3] = O1[_local3];
}
return(_local2);
}
function Wish() {
var _local5 = tank.money;
if (_local5) {
var _local4 = [];
var _local3 = 1;
_local3 = 1;
while (_local3 < 8) {
var _local6 = _root["Fish" + _local3];
if (_local6.cost <= _local5) {
_local6.ID = "fishico" + _local3;
_local4.push(_local6);
}
_local6 = _root["Item" + _local3];
if (_local6.cost <= _local5) {
_local6.ID = "item0" + _local6.idl;
_local4.push(_local6);
}
_local3++;
}
while (_local3 < 21) {
var _local6 = _root["Item" + _local3];
if (_local6.cost <= _local5) {
_local6.ID = "item0" + _local6.idl;
_local4.push(_local6);
}
_local3++;
}
if (_local4.length > 0) {
var _local6 = _local4[random(_local4.length)];
AttachNos(getTimer() + 10000, 1, _local6.ID);
}
}
}
var active = true;
var dir = "right";
var speed = 1;
var position = 1;
var y = 0;
var Depths = 0;
var type = "fish";
var UseFishInt = false;
}
Symbol 1403 MovieClip [__Packages.GameClasses.GFunctions] Frame 0
class GameClasses.GFunctions extends Object
{
function GFunctions () {
super();
}
static function create() {
var _local2 = function () {
var _local2 = arguments.callee.obj;
var _local3 = arguments.callee.func;
var _local4 = arguments.callee.arg;
return(_local3.apply(_local2, _local4));
};
_local2.obj = arguments[0];
_local2.func = arguments[1];
_local2.arg = arguments.splice(2, arguments.length - 1);
return(_local2);
}
static function ClearAll(mc, M, I, III) {
for (var _local5 in mc) {
if ((((typeof(mc[_local5]) == "movieclip") && (String(mc).split(".").length < String(mc[_local5]).split(".").length)) && (_local5 != "root_black")) && (_local5 != "SoundsClip")) {
ClearAll(mc[_local5], M, I);
if (M) {
mc[_local5].DELETE();
mc[_local5].removeMovieClip();
}
}
if (I) {
delete mc[_local5].onEnterFrame;
clearInterval(mc[_local5]);
}
}
if ((M && (!III)) && (mc != _root)) {
mc.removeMovieClip();
}
}
}
Symbol 1404 MovieClip [__Packages.GameClasses.Spline] Frame 0
class GameClasses.Spline
{
var keys;
function Spline () {
keys = new Array();
if (arguments.length > 0) {
InitSpline(arguments);
}
}
function GetKeys() {
return(keys);
}
function addKey(key) {
var _local2 = new Array(2);
_local2[0] = key;
_local2[1] = key;
keys.push(_local2);
}
function getFrame(i, t) {
return(SplineInterpolation(keys[i][0], keys[i + 1][0], keys[i][1], keys[i + 1][1], t));
}
function getGradient(i, t) {
return(GetGradient(keys[i][0], keys[i + 1][0], keys[i][1], keys[i + 1][1], t));
}
function getPoint(t) {
var _local3 = 1 / getSectors();
var _local2 = Math.floor(t / _local3);
if (_local2 >= getSectors()) {
return(keys[keys.length - 1][0]);
}
var _local4 = (t - (_local2 * _local3)) / _local3;
return(getFrame(_local2, _local4));
}
function getGlobalGradient(t) {
var _local3 = 1 / getSectors();
var _local2 = Math.floor(t / _local3);
if (_local2 >= getSectors()) {
return(keys[keys.length - 1][0]);
}
var _local4 = (t - (_local2 * _local3)) / _local3;
return(getGradient(_local2, _local4));
}
function getSectors() {
return(keys.length - 1);
}
function Calculate(cycled) {
if (cycled) {
keys.push(keys[0]);
}
var _local3;
var _local5;
var _local4;
if (cycled) {
_local3 = keys[0][0] - keys[keys.length - 2][0];
_local5 = keys[1][0] - keys[0][0];
_local4 = _local5 - _local3;
keys[0][1] = _local3 + (0.5 * _local4);
keys[keys.length - 1][1] = keys[0][1];
} else if (keys.length > 1) {
keys[0][1] = keys[1][0] - keys[0][0];
keys[keys.length - 1][1] = keys[keys.length - 1][0] - keys[keys.length - 2][0];
}
var _local2 = 1;
while (_local2 < (keys.length - 1)) {
_local3 = keys[_local2][0] - keys[_local2 - 1][0];
_local5 = keys[_local2 + 1][0] - keys[_local2][0];
_local4 = _local5 - _local3;
keys[_local2][1] = _local3 + (0.5 * _local4);
_local2++;
}
}
function SplineInterpolation(x1, x2, r1, r2, t) {
var _local1 = t * t;
var _local2 = _local1 * t;
var _local4 = (((x1 * (((2 * _local2) - (3 * _local1)) + 1)) + (r1 * ((_local2 - (2 * _local1)) + t))) + (x2 * ((-2 * _local2) + (3 * _local1)))) + (r2 * (_local2 - _local1));
return(_local4);
}
function GetGradient(x1, x2, r1, r2, t) {
var _local2 = t * t;
var _local3 = ((((6 * x1) * (_local2 - t)) + (r1 * (((3 * _local2) - (4 * t)) + 1))) + ((6 * x2) * (t - _local2))) + (r2 * ((3 * _local2) - (2 * t)));
return(_local3);
}
function InitSpline(A) {
var _local2 = 0;
while (_local2 < A.length) {
addKey(A[_local2]);
_local2++;
}
Calculate();
}
}
Symbol 1405 MovieClip [__Packages.GameClasses.GameEffects] Frame 0
class GameClasses.GameEffects
{
var StartBubbles_int, StartShine_int;
function GameEffects (s, MC1, MC2, Time1, Time2, X, Y) {
switch (s) {
case "bubbles" :
StartBubbles(MC1, MC2, Time1, Time2, X, Y);
break;
case "shine" :
StartShine(MC1, MC2, Time1, Time2, X, Y);
}
}
function StartBubbles(MC1, MC2, Time1, Time2, X, Y) {
clearInterval(StartBubbles_int);
if (getTimer() > Time1) {
return(undefined);
}
var _local2 = MC2.attachMovie("bubble_fish", "b", MC2.getNextHighestDepth());
var _local3 = random(50) + 50;
_local2._xscale = (_local2._yscale = _local3);
_local2._x = ((X / 2) - (Math.random() * X)) + MC1._x;
_local2._y = ((Y / 2) - (Math.random() * Y)) + MC1._y;
StartBubbles_int = setInterval(GameClasses.GFunctions.create(this, StartBubbles, MC1, MC2, Time1, Time2, X, Y), (Time2 + 50) - random(100));
}
function StartShine(MC1, MC2, Time1, Time2, X, Y) {
clearInterval(StartShine_int);
if (getTimer() > Time1) {
MC1.removeMovieClip();
return(undefined);
}
var _local2 = 0;
while (_local2 < X) {
var _local3 = MC1.attachMovie("starr_eff_run", "b", _local2);
_local3._rotation = ((360 * _local2) / X) + random(30);
_local2++;
}
StartShine_int = setInterval(GameClasses.GFunctions.create(this, StartShine, MC1, MC2, Time1, Time2, X, Y), Time2);
}
}
Symbol 1406 MovieClip [__Packages.GameClasses.Turtle] Frame 0
class GameClasses.Turtle extends MovieClip
{
var tank, _parent, useHandCursor, onPress, BlueColor, DefaultColor, xp, _x, yp, _y, _rotation, fish, _currentframe, gotoAndStop, moving, TurnTime, getDepth, _xscale, _yscale, swapDepths, NIDA, dw, up, removeMovieClip;
function Turtle () {
super();
tank = _parent._parent;
useHandCursor = false;
onPress = GameClasses.GFunctions.create(this, IncSpeed);
BlueColor = new Color(this);
DefaultColor = BlueColor.getTransform();
AddFish();
xp = _x;
yp = _y;
_rotation = 0;
}
function AttachNos(C, F, ID) {
if (F) {
var _local5 = fish.nos.attachMovie("fish_wish", "h", 0);
if ((_currentframe == 2) || (_currentframe == 4)) {
_local5._xscale = -100;
} else {
_local5._xscale = 100;
}
_local5.gotoAndPlay(F);
var _local4 = _local5.e.attachMovie(ID, "h", 0);
if (_local4.bl) {
var _local8 = 70 / _local4.bl._width;
var _local7 = 50 / _local4.bl._height;
var _local6 = Math.min(_local8, _local7);
_local4._xscale = 100 * _local6;
_local4._yscale = 100 * _local6;
_local4._x = ((-_local4.bl._width) / 4) - 5;
_local4._y = ((-_local4.bl._height) / 4) - 5;
} else {
var _local8 = 70 / _local4._width;
var _local7 = 50 / _local4._height;
var _local6 = Math.min(_local8, _local7);
_local4._xscale = 100 * _local6;
_local4._yscale = 100 * _local6;
_local4._x = (-_local4._width) / 2;
_local4._y = (-_local4._height) / 2;
}
_local5.ID = ID;
} else {
var _local5 = fish.nos.attachMovie("hearts", "h", 0);
_local5.TTT = getTimer();
var _local2 = 1;
while (_local2 < 6) {
var _local3 = _local5["h" + _local2];
_local3._rotation = 25 * ((2 * Math.random()) - 1);
_local3.gotoAndPlay(random(35));
_local2++;
}
}
_local5.onEnterFrame = function () {
if ((this.TTT + 5000) < getTimer()) {
this.removeMovieClip();
}
};
if (C) {
fish.nos.h.TTT = C;
}
}
function AppearFish(x, y) {
_root.buy_s.start(_root.SoundOn);
active = false;
gotoAndStop("moveright");
var _local6 = new GameClasses.Spline(260, 260 + ((x - 260) * 0.25), 260 + ((x - 260) * 0.5), 260 + ((x - 260) * 0.8), x);
var _local5 = new GameClasses.Spline(-50, (0.5 * (y + 50)) - 50, (0.8 * (y + 50)) - 50, (0.98 * (y + 50)) - 50, y);
clearInterval(moving);
if (x > 260) {
dir = "right";
_rotation = 60;
} else {
dir = "left";
_rotation = -60;
}
moving = setInterval(GameClasses.GFunctions.create(this, Appearing, getTimer(), _local6, _local5), 0);
var _local7 = new GameClasses.GameEffects("bubbles", this, _parent, getTimer() + 1000, 50, 50, 0);
}
function Appearing(T, SX, SY) {
var _local2 = (getTimer() - T) / 1000;
if (_local2 >= 0.9) {
_local2 = 0.9;
clearInterval(moving);
StartMove();
active = true;
}
_x = SX.getPoint(_local2);
_y = SY.getPoint(_local2);
}
function IncSpeed() {
speed++;
}
function AddFish() {
if (random(2) == 1) {
dir = "left";
}
StartMove();
}
function StartMove() {
IsRot = false;
TurnTime = (getTimer() + 3000) + random(6000);
GetY();
Depths = int(random(500) + 500);
position = 1;
speed = random(3) + 1;
var _local2 = fish.nos.h.TTT;
var _local3 = fish.nos.h.ID;
var _local4 = (_local3 ? (fish.nos.h._currentframe) : null);
gotoAndStop("move" + dir);
if (_local2) {
AttachNos(_local2, _local4, _local3);
}
UseFishInt = true;
}
function GetY() {
y = ((2 * Math.random()) - 1) / 4;
if (_y < 20) {
y = Math.abs(y) * 1.5;
} else if (_y > 250) {
y = (-Math.abs(y)) * 1.5;
}
var _local2 = ((dir == "left") ? -1 : 1);
}
function MoveFish() {
if (!UseFishInt) {
return(undefined);
}
var _local7 = ((dir == "left") ? -1 : 1) * speed;
_x = _x + _local7;
_y = _y + y;
position = position + (speed / 3);
if (IsRot) {
gotoAndStop("turn1" + dir);
} else {
gotoAndStop("move" + dir);
}
if (position >= fish._totalframes) {
position = position - fish._totalframes;
if (IsRot) {
StartMove();
}
}
fish.gotoAndStop(int(position));
if (Diam(xp, _x, yp, _y) > 2) {
var _local2 = (Math.atan2(_y - yp, _x - xp) * 180) / Math.PI;
if (_local2 > 90) {
_local2 = _local2 - 180;
if (!active) {
_local2 = Math.min(0, _local2);
}
} else if (_local2 < -90) {
_local2 = _local2 + 180;
if (!active) {
_local2 = Math.max(0, _local2);
}
}
var _local5 = _rotation;
var _local4 = _local2 / 3;
if (_local4 > (_local5 + 2)) {
_local4 = _local5 + 2;
}
if (_local4 < (_local5 - 2)) {
_local4 = _local5 - 2;
}
_rotation = _local4;
xp = _x;
yp = _y;
}
if ((_x < -50) || (_x > 570)) {
Turn2();
} else if (getTimer() > TurnTime) {
Turn();
} else if (Math.abs(Depths - getDepth()) > 10) {
var _local3 = getDepth();
var _local9 = int((Depths - _local3) / 20);
var _local8 = true;
if (_local8) {
_local3 = SwapFishDepth(_local3, _local3 + _local9);
_xscale = (_yscale = (_local3 + 1000) / 20);
var _local6 = CopyColor(DefaultColor);
_local6.rb = _local6.rb - (Math.pow((1000 - _local3) / 1000, 2) * 150);
_local6.gb = _local6.gb - (Math.pow((1000 - _local3) / 1000, 2) * 60);
_local6.bb = _local6.bb + (Math.pow((1000 - _local3) / 1000, 2) * 75);
BlueColor.setTransform(_local6);
}
}
}
function Diam(x1, x2, y1, y2) {
return(Math.sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2))));
}
function Turn() {
var _local2 = fish.nos.h.TTT;
var _local3 = fish.nos.h.ID;
var _local4 = (_local3 ? (fish.nos.h._currentframe) : null);
IsRot = true;
gotoAndStop("turn1" + dir);
if (_local2) {
AttachNos(_local2, _local4, _local3);
}
}
function Turn2() {
if (_x < -50) {
_x = -49;
} else if (_x > 570) {
_x = 569;
}
var _local2 = fish.nos.h.TTT;
var _local3 = fish.nos.h.ID;
var _local4 = (_local3 ? (fish.nos.h._currentframe) : null);
gotoAndStop("turn1" + dir);
if (_local2) {
AttachNos(_local2, _local4, _local3);
}
dir = ((dir == "right") ? "left" : "right");
UseFishInt = false;
StartMove();
}
function SwapFishDepth(D1, D2) {
swapDepths(D2);
if (tank.DepthArr[NIDA]) {
tank.DepthArr[NIDA].Depth = D2;
tank.DepthArr[NIDA].x = _x;
tank.DepthArr[NIDA].y = _y;
}
return(D2);
}
function DelFish(t) {
_root.sell_s.start(_root.SoundOn);
clearInterval(moving);
var _local3 = dw.attachMovie("sachok_dw", "b", 11);
_local3 = up.attachMovie("sachok_up", "b", 11);
dw._y = (up._y = -1000);
UseFishInt = false;
moving = setInterval(GameClasses.GFunctions.create(this, Removing, getTimer(), _y, t), 0);
}
function Removing(T, y, tt) {
var _local2 = (getTimer() - T) / 1500;
if (_local2 >= 1) {
_local2 = 1;
clearInterval(moving);
DelFish1(tt);
}
if (_local2 >= 0.333333333333333) {
dw._y = (up._y = 0);
_y = y - ((((50 + y) * 3) / 2) * (_local2 - 0.333333333333333));
} else {
dw._y = (up._y = -300 + (900 * _local2));
}
}
function DelFish1(t) {
if (tank.DepthArr[NIDA]) {
tank.DepthArr[NIDA] = 0;
}
clearInterval(moving);
tank.NFishes[t]--;
removeMovieClip();
}
function CopyColor(O1) {
var _local2 = {};
for (var _local3 in O1) {
_local2[_local3] = O1[_local3];
}
return(_local2);
}
function Wish() {
var _local5 = tank.money;
if (_local5) {
var _local4 = [];
var _local3 = 1;
_local3 = 1;
while (_local3 < 8) {
var _local6 = _root["Fish" + _local3];
if (_local6.cost <= _local5) {
_local6.ID = "fishico" + _local3;
_local4.push(_local6);
}
_local6 = _root["Item" + _local3];
if (_local6.cost <= _local5) {
_local6.ID = "item0" + _local6.idl;
_local4.push(_local6);
}
_local3++;
}
while (_local3 < 21) {
var _local6 = _root["Item" + _local3];
if (_local6.cost <= _local5) {
_local6.ID = "item0" + _local6.idl;
_local4.push(_local6);
}
_local3++;
}
if (_local4.length > 0) {
var _local6 = _local4[random(_local4.length)];
AttachNos(getTimer() + 10000, 1, _local6.ID);
}
}
}
var active = true;
var dir = "right";
var speed = 1;
var position = 1;
var y = 0;
var Depths = 0;
var type = "fish";
var IsRot = false;
var UseFishInt = false;
}
Symbol 1407 MovieClip [__Packages.GameClasses.GameButton] Frame 0
class GameClasses.GameButton extends MovieClip
{
var tabEnabled, _totalframes, _name, gotoAndStop, _x, _width, _y, _height, txt, createEmptyMovieClip;
function GameButton () {
super();
InitButton(this);
tabEnabled = false;
if (_totalframes > 5) {
_name = "FSound";
}
if (_name == "FSound") {
if (_root.SoundOn) {
gotoAndStop("n1");
} else {
gotoAndStop("n0");
}
} else {
gotoAndStop("n");
}
}
function ToCenter() {
_x = _x - (_width / 2);
_y = _y - (_height / 2);
}
function InitFunction(F) {
this.F = F;
}
function InitText(T, x, y, l, W, H, C, WT, HT) {
this.T = T;
if (!txt) {
txt = createEmptyMovieClip("txt", 10);
txt._x = _width / 2;
txt._y = _height / 2;
if (x != undefined) {
txt._x = txt._x + x;
} else {
txt._x = txt._x + sx;
}
if (y != undefined) {
txt._y = txt._y + y;
} else {
txt._y = txt._y + sy;
}
}
var _local3 = _width;
_root.TextShow(txt, T, l, W, H, C, WT, HT, 1000, 0);
if (txt._width > _local3) {
txt._xscale = (txt._yscale = 100 * (_local3 / txt._width));
}
}
function InitButton(B) {
if (B.onPress) {
F = B.onPress;
}
B.onRollOver = function () {
if (this._name == "FSound") {
if (_root.SoundOn) {
this.gotoAndStop("a1");
} else {
this.gotoAndStop("a0");
}
} else {
this.gotoAndStop("a");
}
};
B.onRollOut = function () {
if (this._name == "FSound") {
if (_root.SoundOn) {
this.gotoAndStop("n1");
} else {
this.gotoAndStop("n0");
}
} else {
this.gotoAndStop("n");
}
};
B.onReleaseOutside = function () {
if (this._name == "FSound") {
if (_root.SoundOn) {
this.gotoAndStop("n1");
} else {
this.gotoAndStop("n0");
}
} else {
this.gotoAndStop("n");
}
this.txt._alpha = 100;
this.txt._y = this.txt._y - 1;
};
B.onPress = function () {
_root.button_s.start(_root.SoundOn);
if (this._name == "FSound") {
if (_root.SoundOn) {
this.gotoAndStop("p1");
} else {
this.gotoAndStop("p0");
}
} else {
this.gotoAndStop("p");
}
this.txt._y = this.txt._y + 1;
this.txt._alpha = 70;
};
B.onRelease = function () {
this.F();
if (this._name == "FSound") {
if (_root.SoundOn) {
this.gotoAndStop("a1");
} else {
this.gotoAndStop("a0");
}
} else {
this.gotoAndStop("a");
}
this.txt._alpha = 100;
this.txt._y = this.txt._y - 1;
};
}
var T = "O";
var F = null;
var sx = -2;
var sy = -3;
}
Symbol 1408 MovieClip [__Packages.GameClasses.TileClass] Frame 0
class GameClasses.TileClass extends MovieClip
{
var root, FindI, FindJ, FindName, gotoAndStop, tabEnabled, useHandCursor, onPress, onRollOver, onRollOut, onRelease, onReleaseOutside, _visible, moving, _alpha, _x, _y, _name, gotoAndPlay, s, attachMovie, getNextHighestDepth, removeMovieClip, blowing;
function TileClass () {
super();
root = _root.game;
FindI = _root.FindI;
FindJ = _root.FindJ;
FindName = _root.FindName;
gotoAndStop(1);
tabEnabled = false;
useHandCursor = false;
onPress = GameClasses.GFunctions.create(this, _root.Press);
onRollOver = GameClasses.GFunctions.create(this, StartShine);
onRollOut = GameClasses.GFunctions.create(this, _root.OutMove);
onRelease = GameClasses.GFunctions.create(this, _root.Release);
onReleaseOutside = GameClasses.GFunctions.create(this, _root.Release);
}
function Move(x1, y1, x2, y2, TT, F, a1, a2, r) {
if (lock != "lll") {
inMove = true;
_visible = true;
clearInterval(moving);
var _local2 = getTimer();
if (F == undefined) {
F = null;
}
if (a1 == undefined) {
a1 = _alpha;
}
if (a2 == undefined) {
a2 = 100;
}
if (r == undefined) {
r = 0;
}
moving = setInterval(GameClasses.GFunctions.create(this, Moving, x1, y1, x2, y2, _local2, TT, F, a1, a2, r), 0);
}
}
function Moving(x1, y1, x2, y2, T, TT, F, a1, a2, r) {
var _local3 = getTimer();
if (_local3 >= (T + TT)) {
clearInterval(moving);
_x = x2;
_y = y2;
_alpha = a2;
var _local10 = _name;
var _local8 = _root.Blink;
inMove = false;
F(_local10, _local8);
} else {
var _local14 = x1 + (((x2 - x1) * (_local3 - T)) / TT);
var _local13 = y1 + (((y2 - y1) * (_local3 - T)) / TT);
_x = _local14;
_y = _local13;
if (a1 != a2) {
var _local9 = a1 + (((a2 - a1) * (_local3 - T)) / TT);
_alpha = _local9;
}
if (r != 0) {
var _local4 = int(1 + ((23 * (_local3 - T)) / TT));
_local4 = ((r < 0) ? (25 - _local4) : (_local4 * r));
gotoAndStop(_local4);
}
}
}
function Play() {
gotoAndPlay(1);
active = true;
}
function Stop() {
gotoAndStop(1);
active = false;
StopShine();
}
function StartShine() {
s.removeMovieClip();
attachMovie("shine", "s", getNextHighestDepth());
}
function StopShine() {
s.removeMovieClip();
}
function Remove() {
clearInterval(moving);
removeMovieClip();
}
function Delete(MC) {
var _local4 = _root.game[MC];
if (_local4.lock != "") {
_root.lock_s.start(_root.SoundOn);
_local4.lock = ((_local4.lock == "lock1") ? "" : "lock1");
_local4.l.removeMovieClip();
if (_local4.lock != "") {
_local4.attachMovie("lock1", "l", 10);
_root.SCORE.Add(100);
} else {
_root.SCORE.Add(50);
var _local3 = _root.LOCKTILES;
for (var _local5 in _local3) {
if ((_local3[_local5].i == FindI(_local4._name)) && (_local3[_local5].j == FindJ(_local4._name))) {
_root.Matrix[_local3[_local5].i][_local3[_local5].j] = 1;
_local3[_local5] = null;
}
}
}
} else {
_root.Tiles++;
_local4._name = _local4._name + ("D" + getTimer());
clearInterval(_local4.moving);
_local4.onEnterFrame = function () {
if (this._xscale < 10) {
clearInterval(this.moving);
this.removeMovieClip();
} else {
this._xscale = this._xscale - 10;
this._yscale = this._yscale - 10;
this._x = this._x + 1.5;
this._y = this._y + 1.5;
}
};
}
}
function DeleteFly(MC) {
clearInterval(_root.fly[MC].moving);
_root.fly[MC].removeMovieClip();
}
function BlowBomb(i, j) {
_root.bomb_s.start(_root.SoundOn);
bonust = bonus;
bonus = 0;
Blowing(i, j, 0);
_root.fly.attachMovie("bomb_ray", "b", _root.fly.getD(), {_x:_x + 15, _y:_y + 15, _xscale:bonust * 100, _yscale:bonust * 100});
if (_root.UseGraphics.value != "false") {
_root.fly.attachMovie("fly_bonus" + bonust, "b", _root.fly.getD(), {_x:_x + 15, _y:_y + 15});
}
}
function Blowing(i, j, b) {
clearInterval(blowing);
var _local10;
var _local11 = new Array();
var _local12 = new Array();
var _local7 = false;
var _local5 = i - b;
while (_local5 <= (i + b)) {
var _local3 = j - b;
while (_local3 <= (j + b)) {
_local10 = ((i - _local5) * (i - _local5)) + ((j - _local3) * (j - _local3));
if ((_local10 <= ((b + 0.4) * (b + 0.4))) && ((_local10 > ((b - 0.6) * (b - 0.6))) || (b == 0))) {
Blow(_local5, _local3);
_local11.push({i:_local5, j:_local3});
var _local6 = _root.fon[_root.FindName(_local5, _local3)];
if ((!_local7) && (_local6._currentframe > 1)) {
_local7 = true;
_root.clear_s.start(_root.SoundOn && ((_root.clear_s.position == 0) || (_root.clear_s.position == _root.clear_s.duration)));
}
}
_local3++;
}
_local5++;
}
_root.ShowScore(_local11, bonust);
if (b == bonust) {
EndBlow(i, j, b);
} else {
blowing = setInterval(GameClasses.GFunctions.create(this, Blowing, i, j, b + 1), 300 / bonust);
}
}
function BBLOW(B) {
for (var _local3 in B) {
var _local1 = B[_local3];
_local1.Block = true;
_local1.attachMovie("blow_fon", "l", 10);
}
}
function Blow(i, j) {
var _local4 = _root;
var _local3 = _local4.GetTile(i, j);
if (_local3.lock == "") {
_local3._visible = false;
_local3.inMove = true;
var _local5 = _local4.fon[_local4.FindName(i, j)];
if (_local5._currentframe > 1) {
_local5.attachMovie("blow_fon", "l", 10);
}
}
if (_local3.bonus && (this != _local3)) {
_local3.BlowBomb(i, j);
}
}
function EndBlow(i, j, b) {
var _local5 = i - b;
while (_local5 <= (i + b)) {
var _local3 = j - b;
while (_local3 <= (j + b)) {
if ((((i - _local5) * (i - _local5)) + ((j - _local3) * (j - _local3))) <= ((b + 0.4) * (b + 0.4))) {
var _local4 = _root.GetTile(_local5, _local3);
if ((this != _local4) && (!_local4.bonust)) {
Delete(_local4._name);
}
}
_local3++;
}
_local5++;
}
Remove();
_root.Falling1 = setInterval(_root.FallDown, _root.FallPauseTime + 500);
}
function InMove() {
return(inMove || (lock != ""));
}
var active = false;
var lock = "";
var Name = "";
var bonus = 0;
var bonust = 0;
var inMove = false;
}
Symbol 1409 MovieClip [__Packages.GameClasses.GameMenu] Frame 0
class GameClasses.GameMenu extends MovieClip
{
var e, _y, attachMovie, header, ramka;
function GameMenu (menu) {
super();
_root.GetBlack(e, 30);
_y = _y + 50;
e._y = e._y - 50;
var _local5 = _root.menu_buttons;
var _local6;
skip_int = _local5[2].y - _local5[1].y;
var _local4 = 0;
while (_local4 < (_local5.length - 1)) {
_local6 = attachMovie("button_green", "b" + _local4, (_local4 * 3) + 1);
_local6._x = _local5[_local4].x;
_local6._y = _local5[_local4].y;
if (was_skip && (skip_ret)) {
_local6._y = _local6._y - skip_int;
}
_local6.InitText(_local5[_local4].text, 0, -2, "GameFont", -2, 20, 1, 16, 16777215, 1000, 0);
_local6.InitFunction(_root["Function" + _local5[_local4].funct.substr(1, 100)]);
if (_local5[_local4].funct == "FNew") {
was_skip = true;
}
_local4++;
}
InitRamka(_local6._y + 30);
_root.TextShow(header, _root.TextMenu.text, "gradient", -2, 12, 1, 20, 0, 1000, 0, 16711680, 16776960, 90);
}
function InitRamka(y) {
ramka.up._y = 0;
ramka.md._y = 20;
ramka.dw._y = y - 50;
ramka.md._height = y - 40;
}
var skip_ret = false;
var was_skip = false;
var skip_int = 0;
}
Symbol 1410 MovieClip [__Packages.GameClasses.GameTimer] Frame 0
class GameClasses.GameTimer extends MovieClip
{
var t, krug, time, Tii, onEnterFrame, B, TI, E;
function GameTimer () {
super();
t = 0;
time._y = (krug._y = scale);
Tii = getTimer();
onEnterFrame = Appear;
krug.onEnterFrame = function () {
if (this._y > (300 - this._height)) {
this._visible = false;
} else {
this._visible = true;
}
};
}
function Appear() {
var _local2 = (getTimer() - Tii) / 1000;
if (_local2 >= 1) {
_local2 = 1;
delete onEnterFrame;
StopTimer();
B = getTimer();
}
time._y = (krug._y = (1 - _local2) * scale);
}
function SetTime(N) {
if (TI == undefined) {
B = getTimer();
} else {
var _local2 = getTimer();
B = _local2 - ((N * (_local2 - B)) / TI);
}
E = B + N;
TI = N;
}
function StartTimer() {
if (S > 0) {
E = E + (getTimer() - S);
B = B + (getTimer() - S);
S = 0;
}
onEnterFrame = ShowTime;
}
function StopTimer() {
_root.fly.red.removeMovieClip();
clearInterval(_root.showing_hint);
if (S == 0) {
S = getTimer();
delete onEnterFrame;
}
}
function ShowTime() {
t = (getTimer() - B) / (E - B);
if (t >= 1) {
t = 1;
delete onEnterFrame;
if (!_root.Failed) {
_root.Failed = 1;
_root.FallDown();
_root.GetBlack();
}
}
time._y = (krug._y = t * scale);
}
function GetTime() {
return(int(((1 - t) * TI) / 1000));
}
function CountDown() {
onEnterFrame = function () {
this.time._y = this.time._y + 3;
this.krug._y = this.time._y;
if (this.time._y >= this.scale) {
this.krug._y = (this.time._y = this.scale);
delete this.onEnterFrame;
}
};
}
var S = 0;
var scale = 300;
}
Symbol 1411 MovieClip [__Packages.GameClasses.Tank] Frame 0
class GameClasses.Tank extends MovieClip
{
var SHADOW, sellpanel, panel_down, leftarrow, tray_line, black, rightarrow, MouseL, panel_back, indicators, donebutton, panel_play, menupanel, panel_up, sellbutton, tray_click, showing, Tutor, attachMovie, hint, IsPressed, onEnterFrame, tank, MONEY, SO, wishing, moving, Move_comf, shine, feeder, medic, termometer, createEmptyMovieClip;
function Tank () {
super();
PanelPosition = _root.TankPos;
SHADOW = new flash.filters.DropShadowFilter(4, 45, 0, 1, 4, 4, 1, 3, false, false, false);
sellpanel = panel_down.sellpanel;
leftarrow = panel_down.left_arr;
tray_line = panel_down.tray;
black = panel_down.black;
rightarrow = panel_down.right_arr;
leftarrow.onPress = GameClasses.GFunctions.create(this, MoveLeft);
rightarrow.onPress = GameClasses.GFunctions.create(this, MoveRight);
MouseL = {};
MouseL.T = this;
MouseL.onMouseWheel = function (delta) {
this.T.MouseWheel(delta);
};
Mouse.addListener(MouseL);
leftarrow.tabEnabled = false;
rightarrow.tabEnabled = false;
leftarrow.onRelease = (leftarrow.onReleaseOutside = (rightarrow.onRelease = (rightarrow.onReleaseOutside = GameClasses.GFunctions.create(this, StopMove))));
panel_down.b1.onRelease = GameClasses.GFunctions.create(this, ShowPanel, 1);
panel_down.b2.onRelease = GameClasses.GFunctions.create(this, ShowPanel, 2);
panel_down.b3.onRelease = GameClasses.GFunctions.create(this, ShowPanel, 3);
panel_down.b1.tabEnabled = false;
panel_down.b2.tabEnabled = false;
panel_down.b3.tabEnabled = false;
panel_back.button_back.onLoad = function () {
this.InitText(_root.TextBack.text, 0, -2);
this.txt._yscale = 90;
};
panel_back.button_back.onPress = GameClasses.GFunctions.create(this, EYE);
panel_back.button_back.tabEnabled = false;
sellpanel.setMask(panel_down.black);
InitPanels();
ShowPanel();
TankShow();
StartFishes();
var _local4 = 0;
while (_local4 < 4) {
prevShop[_local4] = black._x;
_local4++;
}
_root.TextShow(panel_down.bb1, _root.TextFishes.text, "GameFont", -3, 20, 0, 12, _root.FontWhite, 1000, 0);
_root.TextShow(panel_down.bb2, _root.TextBeauty.text, "GameFont", -3, 20, 0, 12, _root.FontWhite, 1000, 0);
_root.TextShow(panel_down.bb3, _root.TextComfort.text, "GameFont", -3, 20, 0, 12, _root.FontWhite, 1000, 0);
_root.TextShow(indicators.bb1, _root.TextFishes.text, "GameFont", -3, 20, 2, 12, _root.FontWhite, 1000, 0);
_root.TextShow(indicators.bb2, _root.TextBeauty.text, "GameFont", -3, 20, 2, 12, _root.FontWhite, 1000, 0);
_root.TextShow(indicators.bb3, _root.TextComfort.text, "GameFont", -3, 20, 2, 12, _root.FontWhite, 1000, 0);
donebutton = panel_play.button_play;
var _local5 = donebutton.attachMovie("button_rg", "but", 0);
_local5.InitText(_root.TextPlay.text);
_local5.InitFunction(GameClasses.GFunctions.create(this, InitRound));
_local5.ToCenter();
_local5 = menupanel.button_shop.attachMovie("button", "but", 0);
_local5.InitText(_root.TextShop.text);
_local5.InitFunction(GameClasses.GFunctions.create(this, SwapPanels));
_local5.ToCenter();
panel_down.button_close.onPress = GameClasses.GFunctions.create(this, SwapPanels);
_local5 = menupanel.button_download.attachMovie("button", "but", 0);
if (_root.NagTime.value != "0") {
_local5.InitFunction(_root.FunctionDownload);
_local5.InitText(_root.TextDownload.text, -2, -1, "GameFont", -3, 0, 1, 12, 16777215);
} else {
_local5.InitFunction(GameClasses.GFunctions.create(this, FunctionHelp));
_local5.InitText(_root.TextHelp.text);
}
_local5.ToCenter();
}
function SwapPanels() {
if ((((panel_down._y != panel_down.dir1) && (panel_down._y != panel_down.dir2)) && (menupanel._y != menupanel.dir1)) && (menupanel._y != menupanel.dir2)) {
return(undefined);
}
var _local2;
var _local3 = [-1, 1];
if (PanelPosition == "menu") {
PanelPosition = "shop";
_local2 = [panel_down, menupanel];
MovePlaypanel(panel_play, panel_play.dir1, panel_play.dir3);
panel_play.dir1 = panel_play.dir3;
} else if (PanelPosition == "shop") {
PanelPosition = "menu";
_local2 = [menupanel, panel_down];
panel_play.dir1 = panel_play.dir4;
MovePlaypanel(panel_play, panel_play.dir3, panel_play.dir1);
}
MovePanel(_local2, _local3, 700);
}
function MovePlaypanel(MC, Y1, Y2) {
MC.onEnterFrame = GameClasses.GFunctions.create(this, MovingPlay, getTimer(), MC, Y1, Y2);
}
function MovingPlay(T, MC, Y1, Y2) {
var _local1 = (getTimer() - T) / 300;
if (_local1 >= 1) {
_local1 = 1;
delete MC.onEnterFrame;
}
MC._y = Y1 + ((Y2 - Y1) * _local1);
}
function MouseWheel(delta) {
IsScrolled = true;
if (delta > 0) {
MoveLeft(-6);
} else {
MoveRight(6);
}
}
function InitPanels() {
panel_down.dir1 = 310;
panel_down.dir2 = 400;
panel_play.dir2 = 400;
if (PanelPosition == "menu") {
panel_play.dir3 = 328;
panel_play.dir1 = (panel_play.dir4 = 338);
} else {
panel_play.dir1 = (panel_play.dir3 = 328);
panel_play.dir4 = 338;
}
menupanel.dir1 = 340;
menupanel.dir2 = 400;
panel_up.dir1 = 0;
panel_up.dir2 = -50;
panel_back.dir2 = 0;
panel_back.dir1 = -50;
sellbutton.dir1 = 490;
sellbutton.dir2 = 390;
sellbutton._y = sellbutton.dir1;
panel_down._y = panel_down.dir2;
menupanel._y = menupanel.dir2;
panel_play._y = panel_play.dir2;
panel_up._y = panel_up.dir2;
panel_back._y = panel_back.dir1;
indicators._alpha = 0;
panel_back._visible = false;
}
function ShowPanel(t) {
if (t) {
_root.button_s.start(_root.SoundOn);
} else {
t = 2;
}
if (position == t) {
return(undefined);
}
UnShowHint();
position = t;
sellpanel._x = prevShop[t];
tray_width = 0;
for (var _local4 in sellpanel) {
sellpanel[_local4].removeMovieClip();
}
panel_down.tabs.gotoAndStop(t);
switch (t) {
case 1 :
ShowFishes();
break;
case 2 :
ShowBeauty();
break;
case 3 :
ShowComfort();
}
InitTray();
}
function InitTray() {
sellpanel._x = 110;
sellpanel._x = prevShop[position];
leftarrow.gotoAndStop(2);
rightarrow.gotoAndStop(2);
if ((Math.abs(sellpanel._width - black._width) > 50) && (sellpanel._x > ((black._x - sellpanel._width) + black._width))) {
rightarrow.gotoAndStop(1);
}
if (sellpanel._x != black._x) {
leftarrow.gotoAndStop(1);
}
SetTray();
tray_click = panel_down.tray_click;
tray_click.onPress = (tray_line.onPress = GameClasses.GFunctions.create(this, TrayMove));
tray_click.tabEnabled = (tray_line.tabEnabled = false);
tray_click.onRelease = (tray_click.onReleaseOutside = (tray_line.onRelease = (tray_line.onReleaseOutside = GameClasses.GFunctions.create(this, TrayUnMove))));
}
function TrayMove() {
tray_line.onEnterFrame = GameClasses.GFunctions.create(this, TrayMoving);
}
function TrayMoving() {
var _local3 = 4;
if (tray_width > (black._width - 20)) {
return(undefined);
}
var _local4 = _root._xmouse - 10;
if (_local4 < ((_local3 + (tray_width / 2)) + black._x)) {
_local4 = (_local3 + (tray_width / 2)) + black._x;
} else if (_local4 > ((((-_local3) - (tray_width / 2)) + black._x) + black._width)) {
_local4 = (((-_local3) - (tray_width / 2)) + black._x) + black._width;
}
tray_line._x = _local4;
var _local5 = Math.round(black._x - (((((_local4 - black._x) - _local3) - (tray_width / 2)) / ((black._width - (_local3 * 2)) - tray_width)) * (sellpanel._width - black._width)));
sellpanel._x = _local5 - (_local5 % 3);
}
function TrayUnMove() {
delete tray_line.onEnterFrame;
if (((black._x - sellpanel._x) % 51) > 25) {
MoveLeft(-3);
} else {
MoveRight(3);
}
}
function SetTray() {
var _local12 = sellpanel._x;
var _local11 = black._x;
var _local10 = sellpanel._width;
var _local8 = black._width;
var _local9 = 4;
var _local3 = tray_width;
if (_local3 < 5) {
var _local2 = 0;
_local2 = 0;
while (_local2 < black._width) {
if (!tray_line["cent" + _local2]) {
break;
}
tray_line["cent" + _local2].removeMovieClip();
_local2++;
}
_local3 = int((_local8 * _local8) / _local10) - (2 * _local9);
tray_width = _local3;
var _local7 = (tray_line.side1._x = (-int(_local3 / 2)) - 1);
tray_line.side1._y = -4;
_local2 = 0;
while (_local2 < _local3) {
tray_line.attachMovie("center_shop_tray", "cent" + _local2, _local2, {_x:(_local7 + _local2) + 1, _y:-4, _yscale:70});
_local2++;
}
tray_line.side2._x = (_local7 + _local2) + 1;
tray_line.side2._y = -4;
tray_line.center.swapDepths(999);
tray_line.side2._yscale = (tray_line.side1._yscale = 70);
}
tray_line._x = ((_local11 + int((_local11 - _local12) * (_local8 / _local10))) + int(_local3 / 2)) + _local9;
}
function ShowFishes() {
var _local4 = 0;
while (_local4 < NoFishes) {
var _local3 = sellpanel.attachMovie("panelsell", "sell" + _local4, _local4, {_x:(_local4 * 51) + 2, _y:6});
_local3.gotoAndStop(1);
_local3.ID = _local4 + 1;
var _local6 = _local3.attachMovie("fishico" + _local3.ID, "ins", 1);
_local3.minus.swapDepths(2);
_local3.plus.swapDepths(3);
_local3.minus.onRollOver = (_local3.black.onRollOver = GameClasses.GFunctions.create(this, ShowHint, _local4, "Fish", _local3));
_local3.minus.onRollOut = (_local3.black.onRollOut = (_local3.black.onReleaseOutside = GameClasses.GFunctions.create(this, UnShowHint, _local4, _local3)));
_local3.black.onRelease = GameClasses.GFunctions.create(this, AddFish, _local4);
_local3.black.tabEnabled = false;
_local3.minus.onRelease = null;
_local3.minus.tabEnabled = false;
var _local5 = ((NFishes[_local4 + 1] > 0) ? (String(NFishes[_local4 + 1])) : " ");
_root.TextShow(_local3.num, _local5, "GameFont", -4, 0, 1, 14, _root.FontBlue, 100, _root.FontWhite);
_local3.num.swapDepths(99);
if (NFishes[_local3.ID] > 0) {
_local3.minus.onRelease = GameClasses.GFunctions.create(this, DelFish, _local4, _local3);
}
_local4++;
}
}
function ShowBeauty() {
var _local4 = 1;
while (_local4 <= NItem) {
var _local3 = sellpanel.attachMovie("panelsell", "sell" + _local4, _local4, {_x:((_local4 - 1) * 51) + 2, _y:6});
var _local5 = _root["Item" + _local4];
_local3.gotoAndStop(1);
_local3.ID = _local5.idl;
_local3.POS = _local4;
var _local6 = _local3.attachMovie("item0" + _local3.ID, "ins", 1);
_local3.minus._visible = (_local3.plus._visible = false);
_local3.black.onRollOver = GameClasses.GFunctions.create(this, ShowHint, _local4, "Item", _local3);
_local3.black.onRollOut = (_local3.black.onReleaseOutside = GameClasses.GFunctions.create(this, UnShowHint, _local4, _local3));
_local3.black.onPress = GameClasses.GFunctions.create(this, SmallPress, _local3);
_local3.black.tabEnabled = false;
_local4++;
}
}
function ShowComfort() {
var _local4 = 1;
while (_local4 <= 8) {
var _local3 = sellpanel.attachMovie("panelsell", "sell" + _local4, 5 + _local4, {_x:((_local4 - 1) * 51) + 2, _y:6});
var _local6 = _root["Comfort" + _local4];
_local3.gotoAndStop(1);
_local3.ID = _local6.idl;
_local3.POS = _local4;
var _local7 = _local3.attachMovie("tank_comf_" + _local6.idl, "ins", 1);
_local3.minus._visible = (_local3.plus._visible = false);
_local3.black.onRollOver = GameClasses.GFunctions.create(this, ShowHint, _local4, "Comfort", _local3);
_local3.black.onRollOut = (_local3.black.onReleaseOutside = GameClasses.GFunctions.create(this, UnShowHint, _local4, _local3));
_local3.black.tabEnabled = false;
var _local5 = _local3.createEmptyMovieClip("TEXT", 10);
_local5._x = _local3._width / 2;
_local5._y = _local3._height / 2;
_local5._rotation = -40;
if (Comfort[_local4] == 0) {
_local3.black.onRelease = GameClasses.GFunctions.create(this, ComfortPress, _local3);
} else if (Comfort[_local4] == 1) {
_root.TextShow(sellpanel["sell" + _local4].TEXT, _root.TextBought.text, "GameFont", -4, 9, 1, 12, 5322526, 100, 16777215);
}
_local4++;
}
}
function ComfortPress(mc) {
if (IsLock()) {
return(undefined);
}
UnShowHint();
var _local4 = ComfortUp(mc);
if (_local4 == 1) {
delete mc.black.onRelease;
_root.TextShow(mc.TEXT, _root.TextBought.text, "GameFont", -4, 9, 1, 12, 5322526, 100, 16777215);
}
}
function ShowHint(i, str, mc) {
_root.button_up_moving_s.start(_root.SoundOn);
UnShowHint();
if (mc) {
mc._x = mc._x - 2;
mc._y = mc._y - 2;
mc.black._x = mc.black._x + 2;
mc.black._y = mc.black._y + 2;
mc.filters = [SHADOW];
}
showing = setInterval(GameClasses.GFunctions.create(this, ShowHint1, i, str), 100);
}
function ShowHint1(i, str) {
UnShowHint();
if (Tutor.ram) {
return(undefined);
}
var _local4 = attachMovie("hintsell", "hint", 110, {_x:((sellpanel._x + sellpanel["sell" + i]._x) + (sellx / 2)) - 130, _y:panel_down._y - 80});
if (str == "Fish") {
i++;
}
var _local6 = _root[str + i];
var _local13 = _local6.Name;
var _local8 = _local6.cost;
var _local5 = _local6.stars;
_root.TextShow(_local4.Name, _local13, "gradient", -2, 15, 1, 14, _root.FontWhite, 180, 0, 16776960, 16711680, 90);
var _local3 = 1;
while (_local3 <= Math.min(int(_local5), 5)) {
_local4["star" + _local3].gotoAndStop(2);
_local3++;
}
if ((str == "Comfort") && (Comfort[i])) {
_root.TextShow(_local4.Price, _root.TextBought.text, "GameFont", -2, 15, 1, 14, _root.FontBlue, 180, 0);
return(undefined);
}
if (money >= _local8) {
_root.TextShow(_local4.Price, _root.TextPrice.text, "GameFont", -2, 15, 0, 14, _root.FontWhite, 180, 0, _root.FontWhite, _root.FontWhite, 90);
_root.TextShow(_local4.Cost, _root.TextDollar.text + _local8, "gradient", -2, 15, 0, 14, _root.FontWhite, 180, 0, 16776960, 16711680, 90);
} else {
_root.TextShow(_local4.Price, _root.TextPrice.text, "GameFont", -2, 15, 0, 14, 16724736, 180, -1);
_root.TextShow(_local4.Cost, _root.TextDollar.text + _local8, "GameFont", -2, 15, 0, 14, 16724736, 180, -1);
}
var _local10 = _local4.Price._x;
var _local11 = _local4.Price._width + _local4.Cost._width;
_local4.Price._x = ((-_local11) / 2) + _local10;
_local4.Cost._x = (_local4.Price._width - (_local11 / 2)) + _local10;
var _local9;
if (str == "Fish") {
_local4 = _local6.utility;
_local9 = 1;
} else if (str == "Item") {
_local4 = _local6.utility;
_local9 = 2;
} else if (str == "Comfort") {
_local4 = _local6.utility;
_local9 = 3;
}
Indicators2(_local9, _local4);
}
function UnShowHint(i, mc) {
Indicators(1, 0);
Indicators(2, 0);
Indicators(3, 0);
clearInterval(showing);
hint.removeMovieClip();
if (mc) {
mc._x = mc._x + 2;
mc._y = mc._y + 2;
mc.black._x = mc.black._x - 2;
mc.black._y = mc.black._y - 2;
mc.filters = [];
}
}
function StopMove() {
IsPressed = false;
}
function MoveLeft(c) {
dir = 3;
if (c) {
dir = c;
} else {
IsPressed = true;
_root.button_pressed_s.start(_root.SoundOn);
}
onEnterFrame = Moving;
}
function MoveRight(c) {
dir = -3;
if (c) {
dir = c;
} else {
IsPressed = true;
_root.button_pressed_s.start(_root.SoundOn);
}
onEnterFrame = Moving;
}
function Moving() {
var _local2 = 0;
if (((sellpanel._x + dir) <= black._x) && (((((sellpanel._width + sellpanel._x) - black._x) + dir) + 2) >= black._width)) {
if (IsPressed) {
sellpanel._x = sellpanel._x + dir;
} else {
_local2 = (black._x - sellpanel._x) % 51;
if ((_local2 > 2) || (IsScrolled)) {
sellpanel._x = sellpanel._x + dir;
IsScrolled = false;
} else {
sellpanel._x = sellpanel._x + _local2;
delete onEnterFrame;
}
}
} else {
delete onEnterFrame;
}
if (((sellpanel._x + dir) > black._x) || (sellpanel._x == black._x)) {
leftarrow.gotoAndStop(2);
sellpanel._x = black._x;
delete onEnterFrame;
} else {
leftarrow.gotoAndStop(1);
}
if ((((((sellpanel._width + sellpanel._x) - black._x) + dir) - 0) <= black._width) || (sellpanel._width <= (black._width + 50))) {
sellpanel._x = ((black._x - sellpanel._width) + black._width) - 4;
rightarrow.gotoAndStop(2);
delete onEnterFrame;
} else {
rightarrow.gotoAndStop(1);
}
SetTray();
prevShop[position] = sellpanel._x;
}
function AddFish(i) {
if (IsLock()) {
return(undefined);
}
UnShowHint();
var _local4 = sellpanel["sell" + i].ID;
var _local6 = Number(_root["Fish" + int(i + 1)].cost);
var _local9 = Number(_root["Fish" + int(i + 1)].utility);
if (((NFishes[_local4] < MaxFishes) && (DepthArr.length < MaxItems)) && (money >= _local6)) {
tank["fish" + NFishes[_local4]].removeMovieClip();
var _local3 = tank.attachMovie("fish" + _local4, ("fish" + _local4) + NFishes[_local4], random(100) + 1001, {_x:260, _y:-100, active:true});
_local3.LibName = "fish" + _local4;
_local3.type = "fish";
_local3.AppearFish(((random(100) + 50) * ((2 * random(2)) - 1)) + 260, (random(100) * ((2 * random(2)) - 1)) + 150);
NFishes[_local4]++;
var _local7 = ((NFishes[_local4] > 0) ? (String(NFishes[_local4])) : " ");
_root.TextShow(sellpanel["sell" + i].num, _local7, "GameFont", -4, 0, 1, 14, _root.FontBlue, 100, _root.FontWhite);
if (NFishes[_local4] >= 1) {
sellpanel["sell" + i].minus.onRelease = GameClasses.GFunctions.create(this, DelFish, i, sellpanel["sell" + i]);
}
var _local8 = _root.attachMovie("fly_text2", "tt", 97, {_x:_root._xmouse - 20, _y:_root._ymouse - 40});
_root.TextShow(_local8.e, ("-" + _root.TextDollar.text) + Math.abs(_local6), "gradient", -3, 20, 1, 20, 0, 1000, 0, 16711680, 16776960, 90);
MONEY.Add(-_local6);
Indicators(1, _local9);
DepthArr2.push(_local3);
_local3.NIDA = DepthArr.length;
CreateItem(_local3._name, _local3.LibName, "fish", _local3._x, _local3._y, _local3.getDepths(), i);
} else if (money < _local6) {
NotMoney();
}
}
function DelFish(i) {
UnShowHint();
var _local5 = sellpanel["sell" + i].ID;
var _local3 = Number(_root["Fish" + int(i + 1)].cost) >> 1;
ConfermSell(_local3, GameClasses.GFunctions.create(this, DelFish1, i));
}
function DelFish1(i) {
UnShowHint();
var _local3 = sellpanel["sell" + i].ID;
var _local7 = tank[("fish" + _local3) + int(NFishes[_local3] - 1)];
_local7.DelFish(_local3);
var _local5 = Number(_root["Fish" + int(i + 1)].cost);
var _local9 = Number(_root["Fish" + int(i + 1)].utility);
var _local8 = _root.attachMovie("fly_text2", "tt", 97, {_x:_root._xmouse, _y:_root._ymouse - 20});
_root.TextShow(_local8.e, ("+" + _root.TextDollar.text) + Math.abs(_local5 >> 1), "gradient", -3, 20, 1, 20, 0, 1000, 0, 16711680, 16776960, 90);
MONEY.Add(_local5 >> 1);
Indicators(1, -_local9);
var _local6 = ((NFishes[_local3] > 1) ? (String(NFishes[_local3] - 1)) : " ");
_root.TextShow(sellpanel["sell" + i].num, _local6, "GameFont", -4, 0, 1, 14, _root.FontBlue, 100, _root.FontWhite);
if (NFishes[_local3] <= 1) {
sellpanel["sell" + i].minus.onRelease = null;
}
}
function SmallPress(mc) {
if (IsLock()) {
return(undefined);
}
UnShowHint();
var _local6 = Number(_root["Item" + mc.POS].cost);
if ((DepthArr.length < (MaxItems + 10)) && (money >= _local6)) {
sellbutton.gotoAndStop(2);
var _local5 = mc.ID;
tank["item" + NItems].removeMovieClip();
var _local3 = tank.attachMovie("item" + _local5, "item" + NItems, 1001, {_x:_root._xmouse, _y:_root._ymouse + 30, fromShop:true});
NItems++;
_local3.LibName = "item" + _local5;
_local3.Nomer = mc.POS;
_local3.type = "item";
_local3.StartMove();
_local3.NIDA = DepthArr.length;
CreateItem(_local3._name, _local3.LibName, "item", _local3._x, _local3._y, _local3.getDepths(), mc.POS);
} else if (money < _local6) {
NotMoney();
}
}
function TankShow() {
if (_root.SaveGame.value != "false") {
SO = SharedObject.getLocal("Fishdom_hh");
}
indicators.morg._y = 1000;
DepthArr = [];
DepthArr2 = [];
attachMovie("black", "black", 1, {_width:520, _height:390, _alpha:0});
black.useHandCursor = false;
panel_up.button_move.onPress = GameClasses.GFunctions.create(this, EYE, 1);
panel_up.button_help.onPress = GameClasses.GFunctions.create(this, FunctionHelp);
panel_up.button_menu.onPress = _root.MenuMain;
panel_up.button_menu.onLoad = function () {
this.InitText(_root.TextMenu.text);
};
panel_up.button_help.tabEnabled = false;
panel_up.button_move.tabEnabled = false;
_root.show_kubok2 = 0;
LoadTank();
DrawItems();
InitComfort();
MONEY = new GameClasses.Score(panel_up.money, money, this, "money");
MONEY.Add(int(_root.Money_ADD));
if (_root.cheat.value == "true") {
panel_up.money.onPress = function () {
this._parent._parent.MONEY.Add(1000);
};
}
panel_up.button_menu.onPress = _root.MenuMain;
panel_up.button_menu.tabEnabled = false;
panel_up.money.tabEnabled = false;
panel_up.button_menu.onLoad = function () {
this.InitText(_root.TextMenu.text);
};
_root.TextShow(panel_up.textm, _root.TextYourMoney.text, "GameFont", -3.5, 0, 2, 14, _root.FontBrown, 300, _root.FontWhite);
Indicators(1, 0);
Indicators(2, 0);
Indicators(3, 0);
InitCups();
tank.p1.PS = ((Math.random() * 2) - 1) * 130;
tank.p2.PS = ((Math.random() * 2) - 1) * 130;
tank.p3.PS = ((Math.random() * 2) - 1) * 130;
tank.p1.onEnterFrame = (tank.p2.onEnterFrame = (tank.p3.onEnterFrame = RotatePropellers));
EYE(0);
clearInterval(wishing);
wishing = setInterval(GameClasses.GFunctions.create(this, Wish), 10000 + random(40000));
SaveTank();
InitEyes();
if ((_root.level == -1) || ((!_root.SkipTutor) && (money > 20))) {
Tutorial();
}
}
function RotatePropellers() {
var _local2 = this;
var _local3 = Math.sin((++_local2.PS) / 200);
_local2._rotation = _local2._rotation + (_local3 * 2);
}
function DDD() {
}
function ResetTank() {
DepthArr = [];
Comfort = [0, 0, 0, 0, 0, 0, 0, 0, 0];
NFishes = [0, 0, 0, 0, 0, 0, 0, 0, 0];
Indic = [0, 0, 0, 0];
Kubok = 0;
money = 150;
NItems = 0;
GameClasses.GFunctions.ClearAll(tank, 1, 1, 1);
}
function LoadTank() {
ResetTank();
if (_root.D2epthArr10) {
DepthArr = _root.DepthArr;
Comfort = _root.Comfort;
Indic = _root.Indic;
money = _root.TOTMONEY;
Kubok = _root.KUBOKN;
}
if (_root.New__Game) {
SaveTank();
_root.New__Game = false;
}
if (((_root.SaveGame.value != "false") && (!_root.D2epthArr10)) && (SO.data.DepthArr != undefined)) {
DepthArr = SO.data.DepthArr;
Comfort = SO.data.Comfort;
Indic = SO.data.Indic;
money = int(SO.data.money);
Kubok = int(SO.data.Kubok);
if (_root.Money_ADD == undefined) {
_root.level = int(SO.data.level);
_root.SkipTutor = int(SO.data.SkipTutor);
_root.hints_count = int(SO.data.hints_count);
_root.help_count = int(SO.data.help_count);
_root.HintArr = SO.data.HintArr;
_root.TOTPOINTS = int(SO.data.TOTPOINTS);
}
}
_root.D2epthArr10 = "1";
InitNewDA();
}
function InitNewDA() {
var _local2 = 0;
while (_local2 < DepthArr.length) {
if (DepthArr[_local2] == 0) {
DepthArr.splice(_local2, 1);
_local2--;
}
_local2++;
}
}
function SaveTank() {
SO.data.DepthArr = (_root.DepthArr = DepthArr);
SO.data.Comfort = (_root.Comfort = Comfort);
SO.data.Indic = (_root.Indic = Indic);
SO.data.money = (_root.TOTMONEY = money);
SO.data.Kubok = (_root.KUBOKN = Math.min(3, Kubok));
SO.data.HintArr = _root.HintArr;
SO.data.level = _root.level;
SO.data.SkipTutor = _root.SkipTutor;
SO.data.hints_count = _root.hints_count;
SO.data.help_count = _root.help_count;
SO.data.TOTPOINTS = _root.TOTPOINTS;
if (SO) {
SO.flush();
}
}
function CreateItem(Name1, LibName1, Type1, x, y, D, POS) {
var _local2 = {};
_local2.Name = Name1;
_local2.type = Type1;
_local2.Nomer = POS;
_local2.LibName = LibName1;
_local2.x = x;
_local2.y = y;
_local2.Depth = D;
DepthArr.push(_local2);
}
function TROBJ(O) {
var _local2 = "";
for (var _local3 in O) {
_local2 = _local2 + ((((" " + _local3) + ":") + O[_local3]) + " ");
}
trace(_local2);
}
function DrawItems() {
var _local3 = 0;
while (_local3 < DepthArr.length) {
var _local8 = DepthArr[_local3].Name;
var _local4 = DepthArr[_local3].Depth;
var _local10 = DepthArr[_local3].x;
var _local9 = DepthArr[_local3].y;
var _local6 = DepthArr[_local3].LibName;
var _local2 = tank.attachMovie(_local6, _local8, _local4, {_x:_local10, _y:_local9});
_local2.LibName = _local6;
_local2.Nomer = Number(_local6.substr(4, 4));
_local2.type = DepthArr[_local3].type;
var _local7;
if (DepthArr[_local3].type == "fish") {
_local7 = new Color(_local2);
NFishes[Number(_local2.LibName.substr(4, 1))]++;
_local2._xscale = (_local2._yscale = (_local4 + 1000) / 20);
DepthArr2.push(_local2);
} else {
_local2.Nomer = DepthArr[_local3].Nomer;
_local2._name = "item" + NItems;
_local7 = new Color(_local2.item);
NItems++;
_local2.SCALE();
_local2.Rotate(DepthArr[_local3].Rot);
_local4 = int((1000 * (_local2._y - _local2.upline)) / (_local2.downline - _local2.upline));
}
_local2.NIDA = _local3;
var _local5 = _local7.getTransform();
_local5.rb = _local5.rb - (Math.pow((1000 - _local4) / 1000, 2) * 75);
_local5.gb = _local5.gb - (Math.pow((1000 - _local4) / 1000, 2) * 30);
_local5.bb = _local5.bb + (Math.pow((1000 - _local4) / 1000, 2) * 37);
_local7.setTransform(_local5);
_local3++;
}
}
function NoClick(UpMove) {
black.onPress = null;
black.tabEnabled = false;
}
function Click() {
if (Math.abs(panel_back._y - panel_back.dir1) < 5) {
panel_back._visible = true;
}
delete black.onPress;
}
function MovePanel(Names, dirs, Speed) {
_root.window_s.start(_root.SoundOn);
var _local8 = getTimer();
var _local6 = [];
var _local5 = [];
var _local3 = 0;
while (_local3 < Names.length) {
if (dirs[_local3] > 0) {
_local6.push(Names[_local3].dir1);
_local5.push(Names[_local3].dir2);
} else {
_local6.push(Names[_local3].dir2);
_local5.push(Names[_local3].dir1);
}
_local3++;
}
clearInterval(moving);
moving = setInterval(GameClasses.GFunctions.create(this, MovingPanels, _local8, _local6, _local5, Names, Speed), 0);
}
function MovingPanels(T, Y1, Y2, Names, Speed) {
var _local5 = (getTimer() - T) / Speed;
if (_local5 > 1) {
_local5 = 1;
Click();
clearInterval(moving);
}
var _local2 = 0;
while (_local2 < Names.length) {
Names[_local2]._y = Y1[_local2] + ((Y2[_local2] - Y1[_local2]) * _local5);
if (Names[_local2] == panel_up) {
indicators._alpha = 2 * (50 + panel_up._y);
}
_local2++;
}
}
function EYE(C) {
clearInterval(Move_comf);
if ((((panel_down._y != panel_down.dir1) && (panel_down._y != panel_down.dir2)) && (menupanel._y != menupanel.dir1)) && (menupanel._y != menupanel.dir2)) {
return(undefined);
}
var _local3;
var _local4;
var _local2 = -1;
if (C) {
_local2 = 1;
}
if (PanelPosition == "menu") {
_local3 = [panel_up, panel_back, panel_play, menupanel];
_local4 = [_local2, _local2, _local2, _local2];
} else if (PanelPosition == "shop") {
_local3 = [panel_up, panel_back, panel_play, panel_down];
_local4 = [_local2, _local2, _local2, _local2];
}
if (C) {
tank.attachMovie("black", "bl", 0, {_width:640, _height:480, _alpha:0});
tank.bl.onPress = GameClasses.GFunctions.create(this, EYE, 0);
tank.bl.tabEnabled = false;
tank.bl.useHandCursor = false;
} else {
InitCups();
tank.bl.removeMovieClip();
}
MovePanel(_local3, _local4, 700);
}
function StartBubbles(N, W, A) {
var _local4 = 0;
while (_local4 < N) {
var _local2 = tank["bubbles" + W].attachMovie("bubble", "b" + _local4, _local4, {_y:random(200)});
_local2._xscale = (_local2._yscale = random(50) + 50);
_local2.SIN = random(100) + 1;
_local2.speed = (Math.random() * 3) + 1;
_local2.center = 200;
_local2.type = "bubble";
if (A) {
_local2._alpha = 0;
}
var _local5 = true;
var _local3 = 0;
while (_local3 < DepthArr2.length) {
if (DepthArr2[_local3] == _local2) {
_local5 = false;
break;
}
_local3++;
}
if (_local5) {
DepthArr2.push(_local2);
}
_local4++;
}
}
function BubbleTick(MC) {
var _local1 = MC;
_local1._y = _local1._y - _local1.speed;
if (_local1._y < -20) {
_local1._alpha = 100;
_local1._y = 200;
_local1.speed = random(3) + 1;
_local1._xscale = (_local1._yscale = random(20 * _local1.speed) + 50);
_local1.SIN = random(100) + 1;
_local1.center = 200;
}
var _local2 = _local1.SIN;
var _local3 = (Math.sin((_local1.center - _local1._y) / _local2) * _local2) / 5;
_local1._x = _local3;
}
function InitRound() {
clearInterval(wishing);
wishing = setInterval(GameClasses.GFunctions.create(this, StartLevel), 700);
EYE(1);
panel_back._visible = false;
_root.TankPos = PanelPosition;
if (IsLock()) {
return(undefined);
}
}
function StartLevel() {
clearInterval(wishing);
_root.sSss1._alpha = 1;
SaveTank();
DepthArr2 = [];
GameClasses.GFunctions.ClearAll(this, 1, 1);
_root.InitRound();
}
function InitShine(N) {
var _local3 = 0;
while (_local3 < N) {
var _local2 = shine.attachMovie("sun_ray", "S" + _local3, shine.getD());
_local2._rotation = 45 * ((2 * Math.random()) - 1);
_local2._alpha = random(100);
_local2.dir = (2 * (_local3 % 2)) - 1;
_local2.onEnterFrame = function () {
this._rotation = this._rotation + 0.01;
if (this.dir > 0) {
this._alpha = this._alpha + random(6);
if (this._alpha >= 100) {
this.dir = -1;
}
} else {
this._alpha = this._alpha - random(6);
if (this._alpha <= 0) {
this.dir = 1;
this._rotation = 45 * ((2 * Math.random()) - 1);
}
}
};
_local3++;
}
}
function InitComfort() {
if (Comfort[2]) {
tank.bubbles1._alpha = 100;
tank.bubbles2._alpha = 100;
tank.compr1.gotoAndStop(tank.compr1._totalframes);
StartBubbles(10, 1);
StartBubbles(10, 2);
if (Comfort[1]) {
tank.compr1.l.gotoAndStop(2);
} else {
tank.compr1.l.gotoAndStop(1);
}
}
if (Comfort[3]) {
tank.bubbles4._alpha = 100;
tank.bubbles3._alpha = 100;
tank.compr2.gotoAndStop(tank.compr2._totalframes);
StartBubbles(10, 3);
StartBubbles(5, 4);
}
if (Comfort[1]) {
tank.light.gotoAndStop(tank.light._totalframes);
tank.compr1.l.gotoAndStop(2);
}
if (Comfort[5]) {
tank.filter._alpha = 100;
tank.filter.gotoAndStop(tank.filter._totalframes);
}
if (Comfort[4]) {
feeder.gotoAndStop(feeder._totalframes);
}
if (Comfort[6]) {
medic.gotoAndStop(medic._totalframes);
}
if (Comfort[7]) {
termometer.gotoAndStop(termometer._totalframes);
}
if (Comfort[8]) {
tank.dno_up.gotoAndStop(tank.dno_up._totalframes);
}
}
function ComfortUp(MC) {
var _local8 = MC.POS;
var _local5 = _root["Comfort" + MC.POS];
var _local3 = -_local5.cost;
var _local6 = _local5.utility;
if (_local6 != undefined) {
if (money >= (-_local3)) {
var _local7 = _root.attachMovie("fly_text2", "tt", 97, {_x:_root._xmouse - 20, _y:_root._ymouse - 30});
_root.TextShow(_local7.e, ("-" + _root.TextDollar.text) + Math.abs(_local3), "gradient", -3, 20, 1, 20, 0, 1000, 0, 16711680, 16776960, 90);
MONEY.Add(_local3);
Indicators(3, _local6);
_root.comfort_s.start(_root.SoundOn);
SaveTank();
} else {
NotMoney();
return(0);
}
}
Comfort[MC.POS] = 1;
EYE(1);
panel_back._visible = false;
clearInterval(Move_comf);
Move_comf = setInterval(GameClasses.GFunctions.create(this, EYE), 3000);
switch (MC.ID) {
case "comp1" :
tank.bubbles1._alpha = 100;
tank.bubbles2._alpha = 100;
tank.compr1.gotoAndPlay(2);
StartBubbles(10, 1, 1);
StartBubbles(10, 2, 1);
if (Comfort[1]) {
tank.compr1.l.gotoAndStop(2);
} else {
tank.compr1.l.gotoAndStop(1);
}
return(1);
case "comp2" :
tank.bubbles3._alpha = 100;
tank.bubbles4._alpha = 100;
tank.compr2.gotoAndPlay(2);
StartBubbles(10, 3, 1);
StartBubbles(5, 4, 1);
return(1);
case "light" :
tank.light.gotoAndPlay(2);
tank.compr1.l.gotoAndStop(2);
return(1);
case "filter" :
tank.filter._alpha = 100;
tank.filter.gotoAndPlay(2);
return(1);
case "feeder" :
feeder.gotoAndPlay(2);
return(1);
case "medic" :
medic.gotoAndPlay(2);
return(1);
case "termo" :
termometer.gotoAndPlay(2);
return(1);
case "dno" :
tank.dno_up.gotoAndPlay(2);
return(1);
}
return(0);
}
function InitCups() {
delete indicators.cup1.onRelease;
delete indicators.cup2.onRelease;
delete indicators.cup3.onRelease;
if (Kubok > 0) {
indicators.cup1._alpha = 100;
indicators.cup1.gotoAndStop(Kubok + 1);
indicators._x = 315;
indicators.cup1.onRelease = GameClasses.GFunctions.create(this, ShowCupHint, Kubok);
if (Kubok > 2) {
indicators.cup2.onRelease = (indicators.cup3.onRelease = GameClasses.GFunctions.create(this, ShowCupHint, Kubok));
indicators.cup2._alpha = 100;
indicators.cup3._alpha = 100;
indicators.cup2.gotoAndStop(3);
indicators.cup3.gotoAndStop(2);
for (var _local3 in indicators) {
var _local2 = indicators[_local3];
if (((_local3 != "cup1") && (_local3 != "cup2")) && (_local3 != "cup3")) {
_local2._alpha = 0;
}
}
}
}
}
function ShowCupHint(N) {
var _local4 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSss", 77), (_root.TextWonCup.text.split("%c").join(_root.TextWonCup["c" + N]) + "|") + _root["TextCup" + N].text, 150, 160, DDD, null, N);
}
function InitEyes() {
var _local3 = 1;
while (_local3 < 9) {
var _local2 = tank["eye" + _local3];
_local2._alpha = 0;
_local2.R = random(10000);
_local2.P = 8000 + random(4000);
_local2.type = "eye";
DepthArr2.push(_local2);
_local2.useHandCursor = false;
_local2.onRollOver = function () {
this.R = (this.P / 4) - getTimer();
};
_local3++;
}
}
function MoveEyes(MC) {
var _local1 = MC.P;
var _local3 = ((Math.PI*2) * ((getTimer() + MC.R) % _local1)) / _local1;
MC._alpha = Math.min(100, Math.sin(_local3) * 200);
}
function NextK() {
if (Kubok == 0) {
return(Number(_root.CupsUtility.cup1));
}
if (Kubok == 1) {
return(Number(_root.CupsUtility.cup2));
}
if (Kubok == 2) {
return(Number(_root.CupsUtility.cup3));
}
return(Number(_root.CupsUtility.cup3) - 1);
}
function CurrK() {
if (Kubok == 0) {
return(0);
}
if (Kubok == 1) {
return(Number(_root.CupsUtility.cup1));
}
if (Kubok == 2) {
return(Number(_root.CupsUtility.cup2));
}
return(Number(_root.CupsUtility.cup2) - 1);
}
function NextKubok(H) {
var _local5 = NextK();
var _local4 = true;
var _local3 = 1;
while (_local3 < 4) {
if (Indic[_local3] < _local5) {
_local4 = false;
break;
}
_local3++;
}
if (_local4) {
Kubok++;
indicators.super._alpha = 100;
if (H && (Kubok < 4)) {
_root.KUBOKN = Kubok;
clearInterval(_root.show_kubok);
var _local7 = _root.createEmptyMovieClip("blcup", 76);
var _local8 = _root.GetBlack(_local7, 0, 0, "blcup");
var _local6 = _local7.createEmptyMovieClip("mc", 5);
_local6._x = 320;
_local6._y = 200;
EYE(1);
var _local9 = _root.TextWonCup.text.split("%c").join(_root.TextWonCup["c" + Kubok]);
_root.show_kubok = setInterval(GameClasses.GFunctions.create(this, ShowCup, Kubok), 1000);
}
}
return(_local4);
}
function ShowCup(N) {
if (_root.sSss) {
return(undefined);
}
if (panel_down._y != panel_down.dir2) {
EYE(1);
}
clearInterval(Move_comf);
clearInterval(_root.show_kubok);
var _local4 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSss", 77), (_root.TextWonCup.text.split("%c").join(_root.TextWonCup["c" + N]) + "|") + _root["TextCup" + N].text, 150, 160, GameClasses.GFunctions.create(this, EYE, 0), null, N);
InitCups();
}
function Indicators(N, H) {
N = Number(N);
H = Number(H);
if (Kubok < 3) {
Indic[N] = Indic[N] + H;
if (NextKubok(H)) {
var _local2 = 1;
while (_local2 < 4) {
SetIndLength(indicators["l" + _local2], Math.min(100, Math.max(0, ((Indic[_local2] - CurrK()) * 100) / (NextK() - CurrK()))));
SetIndLength(indicators[("l" + _local2) + "1"], Math.min(100, Math.max(0, ((Indic[_local2] - CurrK()) * 100) / (NextK() - CurrK()))));
_local2++;
}
Indicators(1, 0);
Indicators(2, 0);
Indicators(3, 0);
} else {
var _local5 = SetIndLength(indicators["l" + N], Math.min(100, Math.max(0, ((Indic[N] - CurrK()) * 100) / (NextK() - CurrK()))));
SetIndLength(indicators[("l" + N) + "1"], Math.min(100, Math.max(0, ((Indic[N] - CurrK()) * 100) / (NextK() - CurrK()))));
if (_local5 && (H > 0)) {
indicators.morg._y = indicators["l" + N]._y - 3;
indicators.morg.gotoAndPlay(2);
}
}
indicators.k.gotoAndStop(Kubok + 1);
}
}
function Indicators2(N, H) {
if (Kubok > 2) {
return(undefined);
}
N = Number(N);
H = Number(H);
SetIndLength(indicators[("l" + N) + "1"], Math.min(100, Math.max(0, (((Indic[N] + H) - CurrK()) * 100) / (NextK() - CurrK()))));
indicators[("l" + N) + "1"]._alpha = 100;
indicators[("l" + N) + "1"].onEnterFrame = function () {
if (this.D) {
this._alpha = this._alpha - 5;
if (this._alpha < 20) {
this.D = 0;
}
} else {
this._alpha = this._alpha + 5;
if (this._alpha > 80) {
this.D = 1;
}
}
};
}
function SetIndLength(MC, L) {
delete MC.onEnterFrame;
var _local7 = 1.54;
var _local6 = MC._width;
if (L < 2) {
MC._alpha = 0;
return(false);
}
MC._alpha = 100;
var _local4 = int(L * _local7) - 6;
if (_local4 < 5) {
_local4 = 5;
}
MC.l._x = 0;
MC.r._x = _local4;
var _local1 = 5;
while (_local1 < 150) {
if (_local1 < _local4) {
if (!MC["c" + _local1]) {
var _local3 = MC.c.duplicateMovieClip("c" + _local1, _local1);
_local3._x = _local1;
}
} else {
if (!MC["c" + _local1]) {
return((L == 100) && (_local6 < MC._width));
}
MC["c" + _local1].removeMovieClip();
}
_local1++;
}
return(false);
}
function ConfermSell(M, F1, F2) {
if (F2 == undefined) {
F2 = DDD;
}
var _local4 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSss1", 777), (_root.TextSell.text + _root.TextDollar.text) + M, 100, 200, F1, F2);
}
function NotMoney() {
var _local2 = new GameClasses.GameHint2(_root.createEmptyMovieClip("sSss1", 778), _root.TextNotMoney.text1, _root.TextNotMoney.text2, _root.TextNotMoney.y1, _root.TextNotMoney.y2);
}
function AttachNos() {
GetFish().AttachNos();
}
function GetFish() {
var _local3 = [];
var _local2 = 0;
while (_local2 < DepthArr.length) {
if ((DepthArr[_local2].Name.substr(0, 2) == "fi") && (!DepthArr[_local2].fish.nos.h)) {
_local3.push(tank[DepthArr[_local2].Name]);
}
_local2++;
}
return(_local3[random(_local3.length)]);
}
function Wish() {
clearInterval(wishing);
wishing = setInterval(GameClasses.GFunctions.create(this, Wish), 30000 + random(60000));
GetFish().Wish();
}
function FunctionHelp() {
var _local2 = createEmptyMovieClip("help_screen", 345);
var _local3 = new GameClasses.BitmapHelp(_local2, PanelPosition, Kubok);
}
function MoveHelpPanel(D, MC) {
_root.button_pressed_s.start(_root.SoundOn);
MC.pos = MC.pos + D;
if (MC.pos == 1) {
delete MC.l.onPress;
MC.l.gotoAndStop(1);
}
if (MC.pos == 4) {
delete MC.r.onPress;
MC.r.gotoAndStop(1);
}
var _local6 = MC.clip._x;
var _local4 = MC.ST - (442 * (MC.pos - 1));
var _local5 = 100;
if (Math.abs(_local6 - _local4) > 300) {
_local5 = 500;
}
MC.onEnterFrame = GameClasses.GFunctions.create(this, MovingHelpPanel, getTimer(), _local5, MC, _local6, _local4);
}
function MovingHelpPanel(T, TT, MC, x1, x2) {
var _local3 = (getTimer() - T) / TT;
if (_local3 >= 1) {
_local3 = 1;
delete MC.onEnterFrame;
if (MC.pos > 1) {
MC.l.onPress = GameClasses.GFunctions.create(this, MoveHelpPanel, -1, MC);
MC.l.gotoAndStop(2);
}
if (MC.pos < 4) {
MC.r.onPress = GameClasses.GFunctions.create(this, MoveHelpPanel, 1, MC);
MC.r.gotoAndStop(2);
}
}
MC.clip._x = x1 + ((x2 - x1) * _local3);
}
function GetSnapShot(Scale) {
if (!Scale) {
Scale = 1;
}
var _local3 = new flash.display.BitmapData(int(520 * Scale), int(Scale * 390));
var _local4 = new flash.geom.Matrix();
_local4.scale(Scale, Scale);
_local3.draw(this, _local4);
return(_local3);
}
function IsLock() {
if (button_lock > getTimer()) {
return(true);
}
button_lock = getTimer() + 1000;
return(false);
}
function Tutorial() {
if (_root.SkipTutor) {
return(undefined);
}
ShowPanel(2);
Tutor = _root.createEmptyMovieClip("Tutor", 777);
var _local4 = Tutor.attachMovie("black", "BL", 0, {_alpha:0, _width:640, _height:480});
_local4.onPress = null;
_local4.useHandCursor = false;
_local4.tabEnabled = false;
var _local6 = Tutor.createEmptyMovieClip("ram", 1);
var _local3 = Tutor.attachMovie("button_green", "SB", 2);
_local3.InitText(_root.TextSkip.text);
_local3.InitFunction(GameClasses.GFunctions.create(this, SkipTutorial, 1));
_local3._x = 10;
_local3._y = 40;
if ((_root.level < 0) && (!_root.Matrix)) {
InitMessage(0);
} else if (money > 20) {
InitMessage(7);
}
}
function InitMessage(N) {
if (!Tutor.ram) {
return(undefined);
}
var _local11 = 500;
if (((N == 2) || (N == 4)) || (N == 9)) {
_local11 = 1500;
}
Tutor.ram.r1.removeMovieClip();
if (_root.show_kubok2 == 0) {
clearInterval(_root.show_kubok2);
_root.show_kubok2 = 1;
_root.show_kubok2 = setInterval(GameClasses.GFunctions.create(this, InitMessage, N), _local11);
return(undefined);
}
clearInterval(_root.show_kubok2);
_root.show_kubok2 = 0;
var _local4 = _root["TextTutorial" + N];
var _local3 = Tutor.ram.createEmptyMovieClip("r1", 0);
var _local7 = 0;
var _local6 = 0;
var _local9 = 0;
switch (N) {
case 0 :
var _local12 = new GameClasses.GameHint(_local3, _local4.text, 150, 120, GameClasses.GFunctions.create(this, InitMessage, 1), GameClasses.GFunctions.create(this, SkipTutorial, 1), int(_local4.P));
delete _local3.ramka.onPress;
break;
case 1 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, 150, 120, GameClasses.GFunctions.create(this, InitMessage, 2), null, int(_local4.P));
delete _local3.ramka.onPress;
_local7 = 100;
_local6 = 235;
_local9 = 90;
var _local5 = _local3.attachMovie("oval_white", "BL", 98, {_alpha:0, _width:60, _height:50});
_local5._x = 100 - _local3._x;
_local5._y = 330 - _local3._y;
_local5.tabEnabled = false;
var TMC = menupanel.button_shop.but;
_local5.TMC = TMC;
_local5.T = this;
_local5.onRollOver = function () {
this.TMC.onRollOver();
};
_local5.onRollOut = function () {
this.TMC.onRollOut();
};
_local5.onPress = function () {
this.TMC.onPress();
};
_local5.onReleaseOutside = function () {
this.TMC.onReleaseOutside();
};
_local5.onRelease = function () {
this.TMC.onRelease();
this.T.InitMessage(2);
};
break;
case 2 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, 150, 120, GameClasses.GFunctions.create(this, InitMessage, 2), null, int(_local4.P));
delete _local3.ramka.onPress;
_local7 = 35;
_local6 = 205;
_local9 = 90;
_local5 = _local3.attachMovie("black", "BL", 98, {_alpha:0, _width:80, _height:20});
_local5._x = 10 - _local3._x;
_local5._y = 315 - _local3._y;
_local5.tabEnabled = false;
var TMC = panel_down.b1;
_local5.TMC = TMC;
_local5.T = this;
_local5.onRelease = function () {
this.TMC.onRelease();
this.T.InitMessage(3);
};
break;
case 3 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, 150, 120, GameClasses.GFunctions.create(this, InitMessage, 3), null, int(_local4.P));
delete _local3.ramka.onPress;
_local7 = 125;
_local6 = 220;
_local5 = _local3.attachMovie("black", "BL", 98, {_alpha:0, _width:50, _height:40});
_local5._x = 120 - _local3._x;
_local5._y = 327 - _local3._y;
_local5.tabEnabled = false;
var TMC = sellpanel.sell0.black;
_local5.onRollOver = TMC.onRollOver;
_local5.onRollOut = TMC.onRollOut;
_local5.TMC = TMC;
_local5.T = this;
_local5.onRelease = function () {
this.TMC.onRelease();
this.TMC.onRollOut();
this.T.InitMessage(4);
};
break;
case 4 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, 150, 120, GameClasses.GFunctions.create(this, InitMessage, 5), null, int(_local4.P));
delete _local3.ramka.onPress;
break;
case 5 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, 150, 120, GameClasses.GFunctions.create(this, InitMessage, 6), null, int(_local4.P));
delete _local3.ramka.onPress;
_local7 = 460;
_local6 = 130;
_local9 = 180;
break;
case 6 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, 150, 120, GameClasses.GFunctions.create(this, InitMessage, 7), null, int(_local4.P));
delete _local3.ramka.onPress;
_local7 = 455;
_local6 = 220;
_local9 = 0;
_local5 = _local3.attachMovie("oval_white", "BL", 98, {_alpha:0, _width:60, _height:50});
_local5._x = 445 - _local3._x;
_local5._y = 322 - _local3._y;
_local5.tabEnabled = false;
var TMC = donebutton.but;
_local5.TMC = TMC;
_local5.T = this;
_local5.onRollOver = function () {
this.TMC.onRollOver();
};
_local5.onRollOut = function () {
this.TMC.onRollOut();
};
_local5.onPress = function () {
this.TMC.onPress();
};
_local5.onReleaseOutside = function () {
this.TMC.onReleaseOutside();
};
_local5.onRelease = function () {
this.TMC.onRelease();
this.TMC.onRollOut();
this.T.Tutor.removeMovieClip();
};
break;
case 17 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, 150, 120, GameClasses.GFunctions.create(this, InitMessage, int(N + 1)), null, int(_local4.P));
delete _local3.ramka.onPress;
break;
case 8 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, 150, 120, GameClasses.GFunctions.create(this, InitMessage, int(N + 1)), null, int(_local4.P));
delete _local3.ramka.onPress;
_local7 = 125;
_local6 = 220;
_local5 = _local3.attachMovie("black", "BL", 98, {_alpha:0, _width:50, _height:40});
_local5._x = 120 - _local3._x;
_local5._y = 327 - _local3._y;
_local5.tabEnabled = false;
var TMC = sellpanel.sell1.black;
_local5.TMC = TMC;
_local5.T = this;
_local5.onRollOver = function () {
this.TMC.onRollOver();
};
_local5.onRollOut = function () {
this.TMC.onRollOut();
};
_local5.onPress = function () {
this.TMC.onPress();
this.T.UnShowHint(999, this.TMC._parent);
this.T.Tutor.ram.r1.removeMovieClip();
};
_local5.onReleaseOutside = function () {
this.TMC.onReleaseOutside();
};
_local5.onRelease = function () {
this.TMC.onRelease();
this.TMC.onRollOut();
this.T.Tutor.ram.r1.removeMovieClip();
};
break;
case 19 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, 150, 120, GameClasses.GFunctions.create(this, InitMessage, int(N + 1)), null, int(_local4.P));
delete _local3.ramka.onPress;
break;
case 10 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, 150, 120, GameClasses.GFunctions.create(this, InitMessage, int(N + 1)), null, int(_local4.P));
delete _local3.ramka.onPress;
_local7 = 460;
_local6 = 180;
_local9 = 180;
break;
case 11 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, 150, 120, GameClasses.GFunctions.create(this, SkipTutorial), null, int(_local4.P));
delete _local3.ramka.onPress;
break;
default :
InitMessage(int(N + 1));
}
_local3.BLACK.removeMovieClip();
if ((_local7 > 0) && (_local6 > 0)) {
var _local10 = _local3.attachMovie("hint_arrow", "HA", 99);
if ((_local9 == 90) || (_local9 == -90)) {
_local7 = _local7 + 140;
_local6 = _local6 + 110;
_local10._xscale = 50;
_local10._yscale = 80;
}
_local10._x = _local7 - _local3._x;
_local10._y = _local6 - _local3._y;
_local10._rotation = _local9;
}
}
function CheckTutorial() {
if (Tutor && (!Tutor.ram.r1)) {
InitMessage(1);
}
}
function SkipTutorial(C) {
if (C) {
var _local3 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 1222), _root.TextTutorialOff.text, 150, 120, GameClasses.GFunctions.create(this, SkipTutorial), GameClasses.GFunctions.create(this, CheckTutorial));
return(undefined);
}
_root.SkipTutor = true;
Tutor.removeMovieClip();
}
function StartFishes() {
var _local2 = createEmptyMovieClip("FishInterval", 9991);
_local2.onEnterFrame = GameClasses.GFunctions.create(this, FishStart);
}
function FishStart() {
var _local2 = 0;
while (_local2 < DepthArr2.length) {
if (DepthArr2[_local2].type == "fish") {
DepthArr2[_local2].MoveFish();
} else if (DepthArr2[_local2].type == "bubble") {
BubbleTick(DepthArr2[_local2]);
} else if (DepthArr2[_local2].type == "eye") {
MoveEyes(DepthArr2[_local2]);
} else {
DepthArr2.splice(_local2, 1);
}
_local2++;
}
}
var DepthArr = [];
var DepthArr2 = [];
var active = false;
var position = 0;
var NFishes = [0, 0, 0, 0, 0, 0, 0, 0, 0];
var Comfort = [0, 0, 0, 0, 0, 0, 0, 0, 0];
var Indic = [0, 0, 0, 0];
var MaxFishes = 9;
var MaxItems = 30;
var NItems = 0;
var Kubok = 0;
var money = 0;
var IsScrolled = false;
var NItem = 22;
var NoFishes = 8;
var dir = 0;
var sellx = 48;
var selly = 40;
var tray_width = 0;
var prevShop = new Array(4);
var button_lock = 0;
var PanelPosition = "menu";
}
Symbol 1412 MovieClip [__Packages.GameClasses.Score] Frame 0
class GameClasses.Score
{
var ScoreClip, ROOT, NameVar, Doll, start_time, EndFunction, start_score;
function Score (ScoreClip, sc, ROOT, NameVar, DollarOut) {
this.ScoreClip = ScoreClip;
this.ROOT = ROOT;
this.NameVar = NameVar;
score = sc;
AddScore = 0;
if (DollarOut) {
Doll = "";
} else {
Doll = _root.TextDollar.text;
}
ShowScore();
}
function ScoreAddScore(chk) {
var _local2 = (getTimer() - start_time) / tot_time;
if (_local2 >= 1) {
_local2 = 1;
delete ScoreClip.onEnterFrame;
if (EndFunction) {
EndFunction();
EndFunction = null;
}
}
score = int(start_score + (AddScore * _local2));
ShowScore();
if (_local2 >= 1) {
AddScore = 0;
}
}
function ShowScore() {
_root.TextShow(ScoreClip, Doll + String(score), "gradient", -3, 0, 1, 15, 0, 1000, 0, 16776960, 16711680, 90);
}
function Add(Score1, chk) {
delete ScoreClip.onEnterFrame;
if (AddScore != 0) {
score = start_score + AddScore;
}
_root.counter_s.start((_root.SoundOn && (ScoreClip._parent._name == "panel_up")) && (Score1 != 0));
if (ROOT) {
ROOT[NameVar] = score + Score1;
}
start_score = score;
start_time = getTimer();
AddScore = Score1;
ScoreClip.onEnterFrame = GameClasses.GFunctions.create(this, ScoreAddScore);
}
function Reduce(F) {
EndFunction = F;
Add(-score);
}
var score = 0;
var AddScore = 0;
var tot_time = 1000;
}
Symbol 1413 MovieClip [__Packages.GameClasses.GameHint] Frame 0
class GameClasses.GameHint extends Object
{
var This, Text, X, Y, F1, F2, ramka, text, b1, BLACK, showt, b2, xs, ys;
function GameHint (This, Text, X, Y, F1, F2, K, M) {
super();
_root.blcup.removeMovieClip();
_root.hint_s.start(_root.SoundOn);
this.This = This;
this.Text = Text;
this.X = X;
this.Y = Y;
this.F1 = F1;
this.F2 = F2;
ramka = This.attachMovie("ramka_tip", "ramka", 10, {useHandCursor:false});
text = This.createEmptyMovieClip("text", 20);
_root.TextShow(text, Text, "GameFont", -3, 14, 1, 14, _root.FontWhite, 200, 0);
var _local17 = text._width;
var _local5 = text._height;
text._x = 125;
if (K > 0) {
This.attachMovie("kubok_big", "kubok", 11, {_x:125, _y:70}).gotoAndStop(K + 1);
text._y = 140;
_local5 = _local5 + 130;
} else {
text._y = 20;
}
if (K >= 0) {
b1 = This.attachMovie("button_B", "b1", 30);
}
BLACK = This.attachMovie("black", "BLACK", 0, {_x:-2000, _y:-2000, _width:4000, _height:4000, _alpha:0, useHandCursor:false});
if ((F2 == null) || (F2 == undefined)) {
BLACK.onPress = null;
clearInterval(showt);
showt = setInterval(GameClasses.GFunctions.create(this, BLclick), 1000);
b1._x = 125 - (b1._width / 2);
b1._y = _local5 + 8;
b1.InitText(_root.TextOk.text, -3, -3);
} else {
b2 = This.attachMovie("button_B", "b2", 40);
BLACK.onPress = null;
b1._x = (125 - b1._width) - 5;
b2._x = 130;
b1._y = (b2._y = _local5 + 8);
b1.InitText(_root.TextYes.text);
b2.InitText(_root.TextNo.text);
}
b1.InitFunction(GameClasses.GFunctions.create(this, AGA));
b2.InitFunction(GameClasses.GFunctions.create(this, NEA));
if (K == -1) {
clearInterval(showt);
BLACK.onPress = null;
_local5 = _local5 - 28;
}
InitRamka(_local5 + 53);
This._x = X;
This._y = Y;
if ((This._y + ramka._height) > 380) {
This._y = 20;
}
}
function BLclick() {
clearInterval(showt);
BLACK.onPress = GameClasses.GFunctions.create(this, AGA);
}
function DeleteTip() {
clearInterval(showt);
GameClasses.GFunctions.ClearAll(This, 1, 1);
}
function AGA() {
F1();
DeleteTip();
}
function NEA() {
F2();
DeleteTip();
}
function InitRamka(y) {
ramka.up._y = 0;
ramka.md._y = 20;
ramka.dw._y = y - 50;
ramka.md._height = y - 40;
ramka.onPress = GameClasses.GFunctions.create(this, Follow);
ramka.onRelease = (ramka.onReleaseOutside = GameClasses.GFunctions.create(this, UnFollow));
}
function Follow() {
xs = This._x - _root._xmouse;
ys = This._y - _root._ymouse;
This.onEnterFrame = GameClasses.GFunctions.create(this, Moving);
}
function UnFollow() {
delete This.onEnterFrame;
}
function Moving() {
This._x = _root._xmouse + xs;
This._y = _root._ymouse + ys;
}
}
Symbol 1414 MovieClip [__Packages.GameClasses.GameHint2] Frame 0
class GameClasses.GameHint2 extends Object
{
var This, ramka, moving;
function GameHint2 (This, Text1, Text2, Y1, Y2) {
super();
This._x = 150;
This._y = 150;
this.This = This;
_root.hint_s.start(_root.SoundOn);
var _local4 = This.createEmptyMovieClip("text1", 20);
ramka = This.attachMovie("ramka_tip", "ramka", 10, {useHandCursor:false});
_root.TextShow(_local4, Text1, "gradient", -5, 15, 1, 16, _root.FontWhite, 200, 0, 16711680, 16776960, 90);
_local4._y = Y1;
_local4._x = 125;
_local4 = This.createEmptyMovieClip("text2", 21);
_root.TextShow(_local4, Text2, "GameFont", -3, 12, 1, 14, _root.FontWhite, 200, 0);
_local4._y = Y2;
_local4._x = 125;
InitRamka();
if ((This._y + ramka._height) > 380) {
This._y = 50;
}
clearInterval(moving);
moving = setInterval(GameClasses.GFunctions.create(this, Disap), 2000);
}
function Disap() {
clearInterval(moving);
This.onEnterFrame = GameClasses.GFunctions.create(this, Disap);
This._alpha = This._alpha - 1;
if (This._alpha < 5) {
delete This.onEnterFrame;
This.removeMovieClip();
}
}
function InitRamka() {
ramka.up._y = 0;
ramka.md._x = -1000;
ramka.dw._y = 50;
}
}
Symbol 1415 MovieClip [__Packages.GameClasses.BitmapHelp] Frame 0
class GameClasses.BitmapHelp
{
var Clip, Kubok, BMD, Black;
function BitmapHelp (MC, type, KubokN) {
Clip = MC;
Kubok = KubokN;
Clip._alpha = 0;
GetBlack(type);
BMD = flash.display.BitmapData.loadBitmap("help_window");
if (type == "game") {
DrawGame();
} else if (type == "shop") {
DrawShop();
} else if (type == "menu") {
DrawMenu();
}
InitText();
BMD.dispose();
}
function InitText() {
var _local6 = 1;
while (_local6 < 15) {
var _local5 = Clip["txt" + _local6];
if (_local5) {
var _local4 = _root["TextHelp" + _local6];
if (_local4) {
_root.TextShow(_local5, _local4.text, "GameFont", -2, 15, 1, 14, _root.FontWhite, _local4.format, _root.FontBlue);
_local5._x = _local4.x;
_local5._y = _local4.y;
var _local3;
var _local7;
if (_local4.frame) {
_local3 = ConvertArray(_local4.frame);
DrawRamka(_local3[0], _local3[1], _local3[2], _local3[3]);
}
if (_local4.arrow1) {
_local3 = ConvertArray(_local4.arrow1);
_local7 = _local3.splice(0, _local3.length / 2);
DrawLineFull(_local7, _local3);
}
if (_local4.arrow2) {
_local3 = ConvertArray(_local4.arrow2);
_local7 = _local3.splice(0, _local3.length / 2);
DrawLineFull(_local7, _local3);
}
if (_local4.clip) {
_local3 = _local4.clip.split(",");
DrawImage(_local3[0], int(_local3[1]), int(_local3[2]));
}
}
}
_local6++;
}
}
function DrawImage(Name, x, y) {
var _local3 = Clip.attachMovie(Name, Name, Depths++, {_x:x, _y:y});
}
function ConvertArray(S) {
var _local2 = S.split(",");
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = int(_local2[_local1]);
_local1++;
}
return(_local2);
}
function GetBlack(type) {
Black = Clip.attachMovie("black", "bl", 0, {_width:520, _height:390, _alpha:0});
var _local2 = Clip.attachMovie("help_for_" + type, "T", 1);
Black.useHandCursor = false;
Black.tabEnabled = false;
Black.onPress = null;
MoveBlack(GameClasses.GFunctions.create(this, InitBlack), 0, 100);
if (Kubok == 0) {
_local2.gotoAndStop(1);
} else if (Kubok == 3) {
_local2.gotoAndStop(3);
} else {
_local2.gotoAndStop(2);
}
}
function InitBlack() {
Black.onPress = GameClasses.GFunctions.create(this, UnInitBlack);
}
function UnInitBlack() {
MoveBlack(GameClasses.GFunctions.create(this, BlackPress), 100, 0);
Black.onPress = null;
}
function MoveBlack(F, A1, A2) {
var _local2 = (Black.move = {});
_local2.F = F;
_local2.A1 = A1;
_local2.A2 = A2;
_local2.T = getTimer();
Black.onEnterFrame = GameClasses.GFunctions.create(this, MovingBlack);
}
function MovingBlack() {
var _local2 = Black.move;
var _local3 = (getTimer() - _local2.T) / 500;
if (_local3 >= 1) {
_local3 = 1;
delete Black.onEnterFrame;
_local2.F();
}
Clip._alpha = _local2.A1 + ((_local2.A2 - _local2.A1) * _local3);
}
function BlackPress() {
Clip.removeMovieClip();
}
function DrawMenu() {
Clip.createEmptyMovieClip("txt1", 100 + (Depths++));
Clip.createEmptyMovieClip("txt2", 100 + (Depths++));
if (Kubok < 3) {
Clip.createEmptyMovieClip("txt3", 100 + (Depths++));
}
Clip.createEmptyMovieClip("txt4", 100 + (Depths++));
}
function DrawShop() {
Clip.createEmptyMovieClip("txt1", 100 + (Depths++));
Clip.createEmptyMovieClip("txt5", 100 + (Depths++));
Clip.createEmptyMovieClip("txt6", 100 + (Depths++));
Clip.createEmptyMovieClip("txt7", 100 + (Depths++));
Clip.createEmptyMovieClip("txt8", 100 + (Depths++));
}
function DrawGame() {
Clip.createEmptyMovieClip("txt9", 100 + (Depths++));
Clip.createEmptyMovieClip("txt10", 100 + (Depths++));
Clip.createEmptyMovieClip("txt11", 100 + (Depths++));
Clip.createEmptyMovieClip("txt12", 100 + (Depths++));
Clip.createEmptyMovieClip("txt13", 100 + (Depths++));
}
function DrawLineFull(Ax, Ay) {
var _local7 = Clip.createEmptyMovieClip("CLIP", Depths++);
var _local5 = 8;
var _local8 = 0;
var _local6;
var _local12;
var _local11;
var _local10;
var _local9;
var _local2 = 1;
while (_local2 < Ax.length) {
_local9 = ((Ay[_local2] == Ay[_local2 - 1]) ? 0 : 90);
_local12 = Math.abs(((_local9 == 0) ? (Ax[_local2] - Ax[_local2 - 1]) : (Ay[_local2] - Ay[_local2 - 1])));
_local11 = ((Ax[_local2] > Ax[_local2 - 1]) ? (Ax[_local2 - 1]) : (Ax[_local2]));
_local10 = ((Ay[_local2] > Ay[_local2 - 1]) ? (Ay[_local2 - 1]) : (Ay[_local2]));
_local6 = _local7.createEmptyMovieClip("I", _local8++);
if (_local9) {
DrawLine(_local6, _local11 + (_local5 / 2), _local10 + (_local5 / 2), _local9, _local12 - _local5);
} else {
DrawLine(_local6, _local11 + (_local5 / 2), _local10 - (_local5 / 2), _local9, _local12 - _local5);
}
if (_local2 < (Ax.length - 1)) {
if (((Ax[_local2 - 1] < Ax[_local2]) && (Ay[_local2 + 1] < Ay[_local2])) || ((Ay[_local2 - 1] < Ay[_local2]) && (Ax[_local2 + 1] < Ax[_local2]))) {
_local6 = _local7.createEmptyMovieClip("I", _local8++);
DrawRot(_local6, Ax[_local2] - (_local5 / 2), Ay[_local2] - (_local5 / 2), 0);
} else if (((Ax[_local2 - 1] > Ax[_local2]) && (Ay[_local2 + 1] < Ay[_local2])) || ((Ay[_local2 - 1] < Ay[_local2]) && (Ax[_local2 + 1] > Ax[_local2]))) {
_local6 = _local7.createEmptyMovieClip("I", _local8++);
DrawRot(_local6, Ax[_local2] + (_local5 / 2), Ay[_local2] - (_local5 / 2), 90);
} else if (((Ax[_local2 - 1] > Ax[_local2]) && (Ay[_local2 + 1] > Ay[_local2])) || ((Ay[_local2 - 1] > Ay[_local2]) && (Ax[_local2 + 1] > Ax[_local2]))) {
_local6 = _local7.createEmptyMovieClip("I", _local8++);
DrawRot(_local6, Ax[_local2] + (_local5 / 2), Ay[_local2] + (_local5 / 2), 180);
} else if (((Ax[_local2 - 1] < Ax[_local2]) && (Ay[_local2 + 1] > Ay[_local2])) || ((Ay[_local2 - 1] > Ay[_local2]) && (Ax[_local2 + 1] < Ax[_local2]))) {
_local6 = _local7.createEmptyMovieClip("I", _local8++);
DrawRot(_local6, Ax[_local2] - (_local5 / 2), Ay[_local2] + (_local5 / 2), -90);
}
}
_local2++;
}
_local6 = _local7.createEmptyMovieClip("I", _local8++);
if (_local9) {
if (Ay[Ay.length - 1] > Ay[Ay.length - 2]) {
DrawArrow(_local6, Ax[Ax.length - 1] - _local5, Ay[Ay.length - 1] + (_local5 * 2.5), -90);
} else {
DrawArrow(_local6, Ax[Ax.length - 1] + _local5, Ay[Ay.length - 1] - (_local5 * 2.5), 90);
}
} else if (Ax[Ax.length - 1] > Ax[Ax.length - 2]) {
DrawArrow(_local6, Ax[Ax.length - 1] + (2.5 * _local5), Ay[Ay.length - 1] + _local5, 180);
} else {
DrawArrow(_local6, Ax[Ax.length - 1] - (_local5 * 2.5), Ay[Ay.length - 1] - _local5, 0);
}
}
function DrawArrow(CL, x, y, rot) {
CL.attachBitmap(GetArrow(), 0, "auto", true);
CL._x = x;
CL._y = y;
CL._rotation = rot;
}
function DrawLine(CL, x, y, rot, w) {
CL.attachBitmap(GetLine(), 0, "auto", true);
CL._x = x;
CL._y = y;
CL._width = w;
CL._rotation = rot;
}
function DrawRot(CL, x, y, rot) {
CL.attachBitmap(GetRot(), 0, "auto", true);
CL._x = x;
CL._y = y;
CL._rotation = rot;
}
function DrawRamka(x, y, w, h) {
var _local4 = Clip.createEmptyMovieClip("CLIP", Depths++);
var _local3;
var _local2 = 8;
var _local5 = 0;
_local3 = _local4.createEmptyMovieClip("I", _local5++);
DrawCorner(_local3, (x + w) - _local2, (y + h) - _local2, 0);
_local3 = _local4.createEmptyMovieClip("I", _local5++);
DrawCorner(_local3, x + _local2, y + _local2, 180);
_local3 = _local4.createEmptyMovieClip("I", _local5++);
DrawCorner(_local3, (x + w) - _local2, y + _local2, -90);
_local3 = _local4.createEmptyMovieClip("I", _local5++);
DrawCorner(_local3, x + _local2, (y + h) - _local2, 90);
_local3 = _local4.createEmptyMovieClip("I", _local5++);
DrawBorder(_local3, x + _local2, y + _local2, h - (2 * _local2), 90);
_local3 = _local4.createEmptyMovieClip("I", _local5++);
DrawBorder(_local3, (x + w) - _local2, (y + h) - _local2, h - (2 * _local2), -90);
_local3 = _local4.createEmptyMovieClip("I", _local5++);
DrawBorder(_local3, x + _local2, (y + h) - _local2, w - (2 * _local2), 0);
_local3 = _local4.createEmptyMovieClip("I", _local5++);
DrawBorder(_local3, (x + w) - _local2, y + _local2, w - (2 * _local2), 180);
_local3 = _local4.createEmptyMovieClip("I", _local5++);
_local3.attachBitmap(GetMiddle(), 0);
_local3._x = x + _local2;
_local3._y = y + _local2;
_local3._width = w - (2 * _local2);
_local3._height = h - (2 * _local2);
}
function DrawCorner(INCL, x, y, rot) {
INCL.attachBitmap(GetCorner(), 0, "auto", true);
INCL._x = x;
INCL._y = y;
INCL._rotation = rot;
}
function DrawBorder(INCL, x, y, w, rot) {
INCL.attachBitmap(GetBorder(), 0, "auto", true);
INCL._x = x;
INCL._y = y;
INCL._width = w;
INCL._rotation = rot;
}
function GetCorner() {
return(GetBitMap(8, 8, 8, 8, BMD));
}
function GetBorder() {
return(GetBitMap(0, 8, 8, 8, BMD));
}
function GetMiddle() {
return(GetBitMap(0, 0, 8, 8, BMD));
}
function GetArrow() {
return(GetBitMap(0, 16, 24, 16, BMD));
}
function GetLine() {
return(GetBitMap(16, 0, 8, 8, BMD));
}
function GetRot() {
return(GetBitMap(16, 8, 8, 8, BMD));
}
function GetBitMap(x, y, w, h, clip) {
var _local1 = new flash.geom.Matrix();
_local1.translate(-x, -y);
var _local2 = new flash.display.BitmapData(w, h, true, 16711680);
_local2.draw(clip, _local1);
return(_local2);
}
var Depths = 10;
}
Symbol 1416 MovieClip [__Packages.GameClasses.ItemTank] Frame 0
class GameClasses.ItemTank extends MovieClip
{
var tank, _parent, BlueColor, item, DefaultColor, onPress, onMouseUp, _xscale, mc, NIDA, Stx, _x, Sty, _y, krest, Nomer, removeMovieClip, getDepth, onEnterFrame, _name, _visible, LibName, attachMovie, _height, swapDepths, _yscale;
function ItemTank () {
super();
WasMove = false;
up_timer = getTimer() + 500;
tank = _parent._parent;
BlueColor = new Color(item);
DefaultColor = BlueColor.getTransform();
onPress = SSMove;
onMouseUp = SSMove1;
}
function Rotate(N) {
if (!N) {
N = 1;
}
if (Rot != N) {
Rot = N;
_xscale = _xscale * -1;
mc._xscale = mc._xscale * -1;
tank.DepthArr[NIDA].Rot = N;
}
}
function MoveLi() {
return(Math.max(Math.abs(_x - Stx), Math.abs(_y - Sty)));
}
function SSMove() {
var _local2 = ((tank.PanelPosition == "menu") ? (tank.menupanel) : (tank.panel_down));
if ((_local2._y != _local2.dir1) && (_local2._y != _local2.dir2)) {
return(undefined);
}
if (sxp == 0) {
if (!active) {
StartMove();
}
}
}
function SSMove1() {
if (up_timer > getTimer()) {
return(undefined);
}
if (sxp == 0) {
if ((active && (!krest)) && (!tank.sellbutton.hit.hitTest(_root._xmouse, _root._ymouse, false))) {
if (fromShop && (MoveLi() > 5)) {
if (_root.help_count < 1) {
_root.help_count = 1;
tank.helptext.T3._y = tank.helptext.T3._y + 1000;
tank.helptext.T4._y = tank.helptext.T4._y - 1000;
} else if (!fromShop) {
_root.help_count = 2;
tank.helptext._visible = false;
}
} else if (MoveLi() > 5) {
_root.help_count = 2;
tank.helptext._visible = false;
}
tank.helptext._alpha = 0;
StopMove();
} else if (tank.sellbutton.hit.hitTest(_root._xmouse, _root._ymouse, false) && (active)) {
tank.helptext._visible = false;
tank.sellbutton.fff.removeMovieClip();
if (fromShop) {
fromShop = false;
StopMove(Nomer);
_root.sell_s.start(_root.SoundOn);
removeMovieClip();
} else {
fromShop = false;
var _local4 = _root["Item" + Nomer];
var _local3 = _local4.cost >> 1;
sxp = 1;
tank.ConfermSell(_local3, GameClasses.GFunctions.create(this, Sell), GameClasses.GFunctions.create(this, UnSell));
}
}
if (wasatsell) {
wasatsell = false;
tank.sellbutton.fff.removeMovieClip();
tank.sellbutton.top.gotoAndPlay("close");
}
}
}
function UnSell() {
sxp = 0;
}
function Sell() {
var _local4 = _root["Item" + Nomer];
var _local3 = _local4.cost >> 1;
var _local6 = -Number(_local4.utility);
_root.sell_s.start(_root.SoundOn);
var _local5 = _root.attachMovie("fly_text2", "tt", 977, {_x:_root._xmouse, _y:_root._ymouse - 20});
_root.TextShow(_local5.e, ("+" + _root.TextDollar.text) + Math.abs(_local3), "gradient", -3, 20, 1, 20, 0, 1000, 0, 16711680, 16776960, 90);
tank.MONEY.Add(_local3);
tank.Indicators(2, _local6);
StopMove(Nomer);
if (tank.DepthArr[NIDA]) {
tank.DepthArr[NIDA] = 0;
}
removeMovieClip();
}
function StartMove() {
WasMove = false;
Stx = _x;
Sty = _y;
tank.sellbutton.top.gotoAndStop("open");
var _local3 = getDepth();
onEnterFrame = Moving;
sx = _x - _root._xmouse;
sy = _y - _root._ymouse;
tank.active = (active = true);
}
function MovePanels() {
if (((_root.help_count == 1) && (!fromShop)) || ((_root.help_count == 0) && (fromShop))) {
tank.helptext._alpha = 100;
}
WasMove = true;
var _local4 = [tank.sellbutton];
var _local3 = ((tank.PanelPosition == "menu") ? (tank.menupanel) : (tank.panel_down));
if (_local3._y == _local3.dir1) {
_local4.push(_local3, tank.panel_play);
}
tank.MovePanel(_local4, [1, 1, 1], 300);
}
function StopMove(c) {
if (fromShop) {
var _local6 = _root["Item" + Nomer];
var _local5 = -_local6.cost;
var _local10 = Number(_local6.utility);
tank.MONEY.Add(_local5);
tank.Indicators(2, _local10);
tank.AttachNos();
var _local9 = _root.attachMovie("fly_text2", "tt", 97, {_x:_root._xmouse, _y:_root._ymouse - 20});
_root.TextShow(_local9.e, ("-" + _root.TextDollar.text) + Math.abs(_local5), "gradient", -3, 20, 1, 20, 0, 1000, 0, 16711680, 16776960, 90);
_root.buy_s.start(_root.SoundOn);
mc.R = -getTimer();
tank.InitMessage(9);
}
fromShop = false;
tank.active = (active = false);
delete onEnterFrame;
if (c == undefined) {
if (tank.DepthArr[NIDA]) {
tank.DepthArr[NIDA].Depth = getDepth();
tank.DepthArr[NIDA].x = _x;
tank.DepthArr[NIDA].y = _y;
}
} else {
_name = "delitem" + c;
tank.NItems--;
var mc = tank.tank["item" + tank.NItems];
mc._name = "item" + c;
}
var _local7 = MoveLi();
var _local3 = ((tank.PanelPosition == "menu") ? (tank.menupanel) : (tank.panel_down));
if ((_local7 > 5) || ((_local3._y == _local3.dir2) && (tank.panel_up._y == tank.panel_up.dir1))) {
var _local4 = [tank.sellbutton];
if (tank.panel_up._y == tank.panel_up.dir1) {
_local4.push(_local3, tank.panel_play);
}
tank.MovePanel(_local4, [-1, -1, -1], 300);
tank.sellbutton.gotoAndStop(1);
tank.SaveTank();
} else if (_local7 < 2) {
Rotate(Rot * -1);
}
if (!_root.SkipTutor) {
}
}
function Moving() {
if ((!WasMove) && (MoveLi() > 5)) {
MovePanels();
}
if (sxp == 0) {
_x = _root._xmouse + sx;
_y = _root._ymouse + sy;
if (tank.sellbutton.hit.hitTest(_root._xmouse, _root._ymouse, false) && (active)) {
_visible = false;
if (!wasatsell) {
var _local6 = (LibName.substr(0, 4) + "0") + LibName.substr(4, 10);
var _local5 = tank.sellbutton.attachMovie(_local6, "fff", 11, {_alpha:0});
_local5.onEnterFrame = function () {
this._alpha = 100;
this._x = (_root._xmouse - this._parent._x) - (this._width / 2);
this._y = (_root._ymouse - this._parent._y) - (this._height / 2);
};
wasatsell = true;
tank.sellbutton.top.gotoAndPlay("open");
}
} else {
_visible = true;
if (wasatsell) {
tank.sellbutton.fff.removeMovieClip();
wasatsell = false;
tank.sellbutton.top.gotoAndPlay("close");
}
}
if (((_y < upline) || (_y > downline)) || (!_parent.hit.hitTest(_x, _y, true))) {
krest.removeMovieClip();
attachMovie("itemkrest", "krest", 1, {_y:(-20 * _height) / 50});
krest._xscale = (krest._yscale = 100 / (_xscale / 100));
} else {
krest.removeMovieClip();
var _local3 = CopyColor(DefaultColor);
var _local4 = int((1000 * (_y - upline)) / (downline - upline));
SCALE();
swapDepths(_local4);
_local3.rb = _local3.rb - (Math.pow((1000 - _local4) / 1000, 2) * 75);
_local3.gb = _local3.gb - (Math.pow((1000 - _local4) / 1000, 2) * 30);
_local3.bb = _local3.bb + (Math.pow((1000 - _local4) / 1000, 2) * 37);
BlueColor.setTransform(_local3);
}
}
}
function SCALE() {
scale = int(60 + ((40 * (_y - upline)) / (downline - upline)));
_xscale = (_yscale = scale);
_xscale = _xscale * Rot;
}
function CopyColor(O1) {
var _local2 = {};
for (var _local3 in O1) {
_local2[_local3] = O1[_local3];
}
return(_local2);
}
var active = false;
var wasatsell = false;
var sx = 0;
var sy = 0;
var sxp = 0;
var scale = 100;
var upline = 200;
var downline = 380;
var blue = 0;
var type = "item";
var fromShop = false;
var up_timer = 0;
var WasMove = false;
var Rot = 1;
}
Symbol 1417 MovieClip [__Packages.GameClasses.GameStats] Frame 0
class GameClasses.GameStats extends Object
{
var SA, stats, DollText, head, left, mid, right, moving;
function GameStats (score, silver, gold, kubok, STR, Time) {
super();
InitFIN();
SA = [score, silver, gold, kubok, STR, Time];
stats = _root.createEmptyMovieClip("stats", 67);
stats._x = 250;
stats._y = 70;
var _local5 = 10;
DollText = _root.TextDollar.text;
head = stats.createEmptyMovieClip("head", 199);
head._x = head._x - 10;
left = [];
mid = [];
right = [];
var _local4 = 0;
while (_local4 < 6) {
_local5 = _local5 + 40;
left[_local4] = stats.createEmptyMovieClip("l" + _local4, _local4 * 3);
mid[_local4] = stats.createEmptyMovieClip("m" + _local4, (_local4 * 3) + 1);
right[_local4] = stats.createEmptyMovieClip("r" + _local4, (_local4 * 3) + 2);
left[_local4]._x = -3;
mid[_local4]._x = -3;
right[_local4]._x = 6;
left[_local4]._y = _local5;
mid[_local4]._y = _local5;
right[_local4]._y = _local5;
_local4++;
}
GetScoreString(1);
if (SA[4]) {
} else {
_root.STATS_MOVE.removeMovieClip();
_root.TextShow(head, _root.TextLose["text" + _root.Failed], "gradient", -2, 18, 1, 26, 0, 300, 0, 16711680, 16776960, 90);
}
_root.bl.onPress = EndScore;
}
function InitFIN() {
if (_root.StatsMoney) {
FIN = _root.StatsMoney;
}
if (!FIN.silver) {
FIN.silver = 1;
}
if (!FIN.gold) {
FIN.gold = 4;
}
if (!FIN.scorekoef) {
FIN.scorekoef = 0.01;
}
if (!FIN.timekoef) {
FIN.timekoef = 0.15;
}
if (!FIN.cup1) {
FIN.cup1 = 40;
}
if (!FIN.cup2) {
FIN.cup2 = 60;
}
if (!FIN.cup3) {
FIN.cup3 = 80;
}
}
function GetScoreString(C) {
if (C > 0) {
ShowString();
} else {
_root.bl.onPress = _root.EndRound;
}
}
function ShowString() {
NAi++;
NA++;
var _local12 = 500;
switch (NA) {
case 0 :
if (SA[1] > 0) {
NA++;
_root.stats_s.start(_root.SoundOn);
var _local8 = left[NAi].createEmptyMovieClip("D", 0);
var _local4 = left[NAi].createEmptyMovieClip("D1", 1);
var _local7 = right[NAi].createEmptyMovieClip("D", 0);
var _local5 = _local8.createEmptyMovieClip("D2", 0);
var _local17 = _local8.createEmptyMovieClip("D1", 1);
var _local6 = _local5.attachMovie("fontile", "d", 0, {_x:-35, _y:-15});
_root.TextShow(_local17, "x" + SA[1], "GameFont", -2, 0, 0, 16, _root.FontWhite, 300, 0);
_root.TextShow(mid[NAi], ":", "GameFont", 0, 0, 0, 20, _root.FontWhite, 300, 0);
var _local3 = Math.ceil(SA[1] * Number(FIN.silver));
_root.TextShow(_local7, DollText + String(_local3), "gradient", -3, 20, 0, 20, 0, 300, 0, 16711680, 16776960, 90);
_local6.gotoAndStop(2);
_local8._x = (-_local8._width) + 33;
_local8._y = _local8._y + 2;
if (SA[2] > 0) {
_local5 = _local4.createEmptyMovieClip("D1", 0);
_local17 = _local4.createEmptyMovieClip("D2", 1);
_local6 = _local5.attachMovie("fontile", "d", 0, {_x:-35, _y:-15});
_local6.gotoAndStop(3);
_root.TextShow(mid[NAi], ":", "GameFont", 0, 0, 0, 20, _root.FontWhite, 300, 0);
_root.TextShow(_local17, "x" + SA[2], "GameFont", -2, 0, 0, 16, _root.FontWhite, 300, 0);
_local3 = _local3 + Math.ceil(SA[2] * Number(FIN.gold));
_local4._x = (-_local4._width) + 33;
_local4._y = _local4._y + 2;
_local8._x = _local8._x - _local4._width;
}
TM = TM + _local3;
var _local10 = _root.MONEY.score;
_root.MONEY.Reduce(GameClasses.GFunctions.create(this, GetScoreString, 1));
if (!_root.Cancel) {
Reduce(null, _local7, null, ["gradient", -3, 20, 0, 20, 0, 300, 0, 16711680, 16776960, 90], _local10, 0, 0, _local3, 0);
} else {
ShowString();
}
} else {
NAi--;
GetScoreString(1);
}
break;
case 2 :
if (SA[0] > 0) {
_root.stats_s.start(_root.SoundOn);
var _local8 = left[NAi].createEmptyMovieClip("D", 0);
var _local7 = right[NAi].createEmptyMovieClip("D", 0);
_root.TextShow(_local8, _root.TextScoreBonus.text, "GameFont", -3, 0, 0, 20, _root.FontWhite, 300, 0);
_root.TextShow(mid[NAi], ":", "GameFont", 0, 0, 0, 20, _root.FontWhite, 300, 0);
var _local3 = Math.ceil(SA[0] * Number(FIN.scorekoef));
TM = TM + _local3;
_root.TextShow(_local7, DollText + String(_local3), "gradient", -3, 20, 0, 20, 0, 300, 0, 16711680, 16776960, 90);
_local8._x = -_local8._width;
if (!_root.Cancel) {
Reduce(null, _local7, null, ["gradient", -3, 20, 0, 20, 0, 300, 0, 16711680, 16776960, 90], _root.SCORE.score, 0, 0, _local3, 0);
} else {
ShowString();
}
_root.SCORE.Reduce(GameClasses.GFunctions.create(this, GetScoreString, 1));
} else {
NAi--;
GetScoreString(1);
}
break;
case 3 :
if (SA[5] > 0) {
_root.stats_s.start(_root.SoundOn);
var _local8 = left[NAi].createEmptyMovieClip("D", 0);
var _local7 = right[NAi].createEmptyMovieClip("D", 0);
_root.TextShow(_local8, _root.TextTimeBonus.text, "GameFont", -3, 0, 0, 20, _root.FontWhite, 300, 0);
_root.TextShow(mid[NAi], ":", "GameFont", 0, 0, 0, 20, _root.FontWhite, 300, 0);
var _local3 = Math.ceil(SA[5] * (Number(FIN.timekoef) + (_root.level / 100)));
TM = TM + _local3;
_root.TextShow(_local7, DollText + String(_local3), "gradient", -3, 20, 0, 20, 0, 300, 0, 16711680, 16776960, 90);
_local8._x = -_local8._width;
if (!_root.Cancel) {
Reduce(null, _local7, null, ["gradient", -3, 20, 0, 20, 0, 300, 0, 16711680, 16776960, 90], 300 * int(1 - _root.TIME.t), 0, 300, _local3, 1);
} else {
_root.TIME.time._y = (_root.TIME.krug._y = 300);
ShowString();
}
} else {
NAi--;
GetScoreString(1);
}
break;
case 4 :
if ((SA[4] > 0) && (SA[3])) {
_root.stats_s.start(_root.SoundOn);
var _local8 = left[NAi].createEmptyMovieClip("D", 0);
var _local7 = right[NAi].createEmptyMovieClip("D", 0);
var _local5 = _local8.createEmptyMovieClip("D1", 0);
var _local17 = _local8.createEmptyMovieClip("D2", 1);
var _local16 = _local8.createEmptyMovieClip("D3", 2);
var _local15 = _local8.createEmptyMovieClip("D4", 3);
var _local14 = _local8.createEmptyMovieClip("D5", 4);
var _local13 = _local8.createEmptyMovieClip("D6", 5);
var _local11 = _local8.createEmptyMovieClip("D7", 6);
var _local9 = 0;
_root.TextShow(_local5, _root.TextCupBonus.text, "GameFont", -3, 0, 0, 20, _root.FontWhite, 300, 0);
_root.TextShow(mid[NAi], ":", "GameFont", 0, 0, 0, 20, _root.FontWhite, 300, 0);
_local9 = _local5._width + 10;
var _local3 = 0;
if (SA[3] > 0) {
_local3 = Number(FIN.cup1);
}
if (SA[3] > 1) {
_local3 = Number(FIN.cup2);
}
if (SA[3] > 2) {
_local3 = Number(FIN.cup3);
}
TM = TM + _local3;
_root.TextShow(_local7, DollText + String(_local3), "gradient", -3, 20, 0, 20, 0, 300, 0, 16711680, 16776960, 90);
_local8._x = -_local8._width;
if (!_root.Cancel) {
Reduce(null, _local7, null, ["gradient", -3, 20, 0, 20, 0, 300, 0, 16711680, 16776960, 90], 0, 0, 0, _local3, 1);
} else {
ShowString();
}
} else {
NAi--;
GetScoreString(1);
}
break;
case 5 :
_root.totalmoney_s.start(_root.SoundOn);
var _local8 = left[NAi].createEmptyMovieClip("D", 0);
var _local7 = right[NAi].createEmptyMovieClip("D", 0);
var _local4 = left[NAi].createEmptyMovieClip("D1", 1);
_local4._alpha = -100;
_local4.P = 10;
_root.Money_ADD = TM;
_root.TOTPOINTS = _root.TOTPOINTS + TM;
_root.TextShow(_local8, DollText + String(TM), "gradient", -3, 20, 1, 24, 0, 300, 0, 16711680, 16776960, 90);
_root.TextShow(_local4, DollText + String(TM), "gradient", -3, 20, 1, 24, 0, 300, 0, 16777215, 16764108, 90);
_local4.onEnterFrame = function () {
this._alpha = this._alpha + this.P;
if ((this._alpha < 10) && (this.P < 0)) {
delete this.onEnterFrame;
this._alpha = 0;
} else if (this._alpha > 80) {
this.P = -10;
}
};
_root.TextShow(_local7, _root.TextLevelMoney.text, "GameFont", -3, 0, 1, 20, _root.FontWhite, 300, 0);
left[NAi]._x = 0;
right[NAi]._x = 0;
left[NAi]._y = left[NAi]._y + 25;
var _local5 = stats.createEmptyMovieClip("dfdf", stats.getD());
_root.TextShow(_local5, _root.TextClickToContinue.text, "GameFont", -3, 0, 1, 14, _root.FontWhite, 400, 0);
_local5._y = 300;
GetScoreString(0);
}
}
function Reduce(MC1, MC2, T1, T2, O1, O2, N1, N2, isT) {
clearInterval(moving);
var _local3 = Math.max(Math.max(O1, O2), Math.max(N1, N2));
if (_local3 < 50) {
_local3 = 500;
_root.counter_s.start(_root.SoundOn);
} else {
_local3 = 1500;
_root.counter_s.start(_root.SoundOn, 0, 2);
}
moving = setInterval(GameClasses.GFunctions.create(this, Reducing, getTimer(), MC1, MC2, T1, T2, O1, O2, N1, N2, isT, _local3), 0);
}
function Reducing(T, MC1, MC2, T1, T2, O1, O2, N1, N2, isT, k) {
var _local4 = (getTimer() - T) / k;
if ((_local4 >= 1) || (_root.Cancel)) {
_local4 = 1;
clearInterval(moving);
if (isT) {
GetScoreString(1);
}
}
var _local5 = int(O1 + ((N1 - O1) * _local4));
var _local6 = int(O2 + ((N2 - O2) * _local4));
if (isT && (_root.TIME.time._y < 300)) {
_root.TIME.time._y = (_root.TIME.krug._y = _local5);
}
_root.TextShow(MC2, DollText + String(_local6), T2[0], T2[1], T2[2], T2[3], T2[4], T2[5], T2[6], T2[7], T2[8], T2[9], T2[10], T2[11]);
}
function EndScore() {
_root.attachMovie("black", "Cancel", 2, {_x:-100});
ShowString();
}
var NA = -1;
var NAi = -1;
var TM = 0;
var Cancel = false;
var FIN = {};
}
Symbol 1418 MovieClip [__Packages.GameClasses.GameSound] Frame 0
class GameClasses.GameSound extends Sound
{
var position, duration, interval;
function GameSound (s, MC) {
super(MC);
super.attachSound(s);
}
function start(SoundOn, s, l) {
var _local2 = true;
var _local3 = ((C == 1) || (position <= 0)) || (position >= duration);
_local2 = SoundOn && (_local3);
if (_local2) {
clearInterval(interval);
interval = setInterval(GameClasses.GFunctions.create(this, STRT, s, l), 1);
}
}
function STRT(s, l) {
clearInterval(interval);
super.start(s, l);
}
var C = 1;
}
Symbol 128 MovieClip Frame 27
this._parent.StartMove();
Symbol 129 MovieClip [fish1] Frame 1
#initclip 71
Object.registerClass("fish1", GameClasses.Fish);
#endinitclip
Symbol 193 MovieClip Frame 33
this._parent.StartMove();
Symbol 194 MovieClip [fish2] Frame 1
#initclip 19
Object.registerClass("fish2", GameClasses.Fish);
#endinitclip
Symbol 258 MovieClip Frame 33
this._parent.StartMove();
Symbol 259 MovieClip [fish8] Frame 1
#initclip 20
Object.registerClass("fish8", GameClasses.Fish);
#endinitclip
Symbol 349 MovieClip Frame 27
this._parent.StartMove();
Symbol 350 MovieClip [fish4] Frame 1
#initclip 21
Object.registerClass("fish4", GameClasses.Turtle);
#endinitclip
Symbol 414 MovieClip Frame 33
this._parent.StartMove();
Symbol 415 MovieClip [fish5] Frame 1
#initclip 22
Object.registerClass("fish5", GameClasses.Fish);
#endinitclip
Symbol 479 MovieClip Frame 33
this._parent.StartMove();
Symbol 480 MovieClip [fish6] Frame 1
#initclip 23
Object.registerClass("fish6", GameClasses.Fish);
#endinitclip
Symbol 544 MovieClip Frame 33
this._parent.StartMove();
Symbol 545 MovieClip [fish7] Frame 1
#initclip 24
Object.registerClass("fish7", GameClasses.Fish);
#endinitclip
Symbol 609 MovieClip Frame 33
this._parent.StartMove();
Symbol 610 MovieClip [fish3] Frame 1
#initclip 25
Object.registerClass("fish3", GameClasses.Fish);
#endinitclip
Symbol 615 MovieClip [button_close] Frame 1
#initclip 26
Object.registerClass("button_close", GameClasses.GameButton);
#endinitclip
Symbol 621 MovieClip [button_green] Frame 1
#initclip 27
Object.registerClass("button_green", GameClasses.GameButton);
#endinitclip
Symbol 628 MovieClip [button_big] Frame 1
#initclip 28
Object.registerClass("button_big", GameClasses.GameButton);
#endinitclip
stop();
Symbol 657 MovieClip [bomb_ray] Frame 15
stop();
this.removeMovieClip();
Symbol 660 MovieClip [nuke] Frame 1
#initclip 29
Object.registerClass("nuke", GameClasses.TileClass);
#endinitclip
Symbol 672 MovieClip [kubok] Frame 1
stop();
Symbol 713 MovieClip [slide6] Frame 1
#initclip 30
Object.registerClass("slide6", GameClasses.TileClass);
#endinitclip
Symbol 713 MovieClip [slide6] Frame 23
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 719 MovieClip [button_B] Frame 1
#initclip 31
Object.registerClass("button_B", GameClasses.GameButton);
#endinitclip
Symbol 720 MovieClip [menumain] Frame 1
#initclip 32
Object.registerClass("menumain", GameClasses.GameMenu);
#endinitclip
Symbol 721 MovieClip [fly_text] Frame 20
stop();
this.removeMovieClip();
Symbol 722 MovieClip [fly_text2] Frame 25
stop();
this.removeMovieClip();
Symbol 723 MovieClip [fly_bonus3] Frame 25
stop();
this.removeMovieClip();
Symbol 724 MovieClip [fly_bonus4] Frame 25
stop();
this.removeMovieClip();
Symbol 729 MovieClip [button_help] Frame 1
#initclip 33
Object.registerClass("button_help", GameClasses.GameButton);
#endinitclip
Symbol 733 MovieClip [shine] Frame 15
stop();
this.removeMovieClip();
Symbol 740 MovieClip [eyebutton] Frame 1
#initclip 34
Object.registerClass("eyebutton", GameClasses.GameButton);
#endinitclip
Symbol 746 MovieClip [button_small] Frame 1
#initclip 35
Object.registerClass("button_small", GameClasses.GameButton);
#endinitclip
Symbol 755 MovieClip [blow_fon] Frame 8
stop();
_root.Decrease(this._parent);
this._parent.gotoAndStop(this._parent._currentframe - 1);
this.removeMovieClip();
Symbol 759 MovieClip [dyno] Frame 1
#initclip 36
Object.registerClass("dyno", GameClasses.TileClass);
#endinitclip
Symbol 777 MovieClip [timer] Frame 1
#initclip 37
Object.registerClass("timer", GameClasses.GameTimer);
#endinitclip
Symbol 799 MovieClip [rocket] Frame 1
#initclip 38
Object.registerClass("rocket", GameClasses.TileClass);
#endinitclip
Symbol 802 MovieClip [bomb] Frame 1
#initclip 39
Object.registerClass("bomb", GameClasses.TileClass);
#endinitclip
Symbol 812 MovieClip [button] Frame 1
#initclip 40
Object.registerClass("button", GameClasses.GameButton);
#endinitclip
stop();
Symbol 823 MovieClip Frame 1
stop();
Symbol 823 MovieClip Frame 66
stop();
Symbol 827 MovieClip Frame 1
stop();
Symbol 827 MovieClip Frame 66
stop();
Symbol 858 MovieClip Frame 1
stop();
Symbol 858 MovieClip Frame 2
stop();
Symbol 859 MovieClip Frame 1
stop();
Symbol 859 MovieClip Frame 76
stop();
Symbol 863 MovieClip Frame 1
stop();
Symbol 863 MovieClip Frame 76
stop();
Symbol 873 MovieClip Frame 1
vint.vint.onEnterFrame = function () {
this._rotation = this._rotation + 1;
};
Symbol 874 MovieClip Frame 1
stop();
Symbol 874 MovieClip Frame 76
stop();
Symbol 879 MovieClip Frame 1
stop();
Symbol 879 MovieClip Frame 62
stop();
Symbol 883 MovieClip Frame 1
stop();
Symbol 883 MovieClip Frame 61
stop();
Symbol 887 MovieClip Frame 1
stop();
Symbol 887 MovieClip Frame 83
stop();
MC.T = getTimer();
MC.onEnterFrame = function () {
var _local2 = getTimer() - this.T;
var _local3 = 5000 + Math.min(5000, _local2 / 10);
var _local4 = (_local2 % _local3) / _local3;
this._rotation = Math.sin((_local4 * Math.PI) * 2) * Math.max(5, 10 - (_local2 / 2000));
};
Symbol 906 MovieClip Frame 1
stop();
Symbol 906 MovieClip Frame 15
stop();
Symbol 909 MovieClip Frame 1
stop();
Symbol 909 MovieClip Frame 2
stop();
Symbol 927 MovieClip Frame 1
stop();
Symbol 992 MovieClip Frame 1
stop();
Symbol 992 MovieClip Frame 70
stop();
this.gotoAndStop(1);
Symbol 997 MovieClip [tank] Frame 1
#initclip 41
Object.registerClass("tank", GameClasses.Tank);
#endinitclip
Symbol 1012 MovieClip [item10] Frame 1
#initclip 42
Object.registerClass("item10", GameClasses.ItemTank);
#endinitclip
Symbol 1016 MovieClip [item8] Frame 1
#initclip 43
Object.registerClass("item8", GameClasses.ItemTank);
#endinitclip
Symbol 1020 MovieClip [item6] Frame 1
#initclip 44
Object.registerClass("item6", GameClasses.ItemTank);
#endinitclip
Symbol 1024 MovieClip [item12] Frame 1
#initclip 45
Object.registerClass("item12", GameClasses.ItemTank);
#endinitclip
Symbol 1028 MovieClip [item16] Frame 1
#initclip 46
Object.registerClass("item16", GameClasses.ItemTank);
#endinitclip
Symbol 1032 MovieClip [item17] Frame 1
#initclip 47
Object.registerClass("item17", GameClasses.ItemTank);
#endinitclip
Symbol 1036 MovieClip [item9] Frame 1
#initclip 48
Object.registerClass("item9", GameClasses.ItemTank);
#endinitclip
Symbol 1040 MovieClip [item7] Frame 1
#initclip 49
Object.registerClass("item7", GameClasses.ItemTank);
#endinitclip
Symbol 1044 MovieClip [item1] Frame 1
#initclip 50
Object.registerClass("item1", GameClasses.ItemTank);
#endinitclip
Symbol 1048 MovieClip [item3] Frame 1
#initclip 51
Object.registerClass("item3", GameClasses.ItemTank);
#endinitclip
Symbol 1052 MovieClip [item2] Frame 1
#initclip 52
Object.registerClass("item2", GameClasses.ItemTank);
#endinitclip
Symbol 1077 MovieClip [slide1] Frame 1
#initclip 53
Object.registerClass("slide1", GameClasses.TileClass);
#endinitclip
Symbol 1077 MovieClip [slide1] Frame 23
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1102 MovieClip [slide2] Frame 1
#initclip 54
Object.registerClass("slide2", GameClasses.TileClass);
#endinitclip
Symbol 1102 MovieClip [slide2] Frame 23
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1126 MovieClip [slide3] Frame 1
#initclip 55
Object.registerClass("slide3", GameClasses.TileClass);
#endinitclip
Symbol 1126 MovieClip [slide3] Frame 23
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1151 MovieClip [slide4] Frame 1
#initclip 56
Object.registerClass("slide4", GameClasses.TileClass);
#endinitclip
Symbol 1151 MovieClip [slide4] Frame 23
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1175 MovieClip [slide5] Frame 1
#initclip 57
Object.registerClass("slide5", GameClasses.TileClass);
#endinitclip
Symbol 1175 MovieClip [slide5] Frame 23
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1179 MovieClip [item4] Frame 1
#initclip 58
Object.registerClass("item4", GameClasses.ItemTank);
#endinitclip
Symbol 1183 MovieClip [item5] Frame 1
#initclip 59
Object.registerClass("item5", GameClasses.ItemTank);
#endinitclip
Symbol 1207 MovieClip [slide7] Frame 1
#initclip 60
Object.registerClass("slide7", GameClasses.TileClass);
#endinitclip
Symbol 1207 MovieClip [slide7] Frame 23
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1227 MovieClip Frame 1
stop();
Symbol 1234 MovieClip [item19] Frame 1
#initclip 61
Object.registerClass("item19", GameClasses.ItemTank);
#endinitclip
mc.R = random(8000);
mc.onEnterFrame = function () {
var _local2 = 8000;
var _local3 = ((Math.PI*2) * ((getTimer() + this.R) % _local2)) / _local2;
this._alpha = Math.min(100, Math.sin(_local3) * 100);
};
Symbol 1240 MovieClip [item23] Frame 1
#initclip 62
Object.registerClass("item23", GameClasses.ItemTank);
#endinitclip
mc.R = random(18000);
mc.onEnterFrame = function () {
var _local2 = 18000;
var _local3 = ((Math.PI*2) * ((getTimer() + this.R) % _local2)) / _local2;
this._alpha = Math.min(100, Math.sin(_local3) * 100);
};
Symbol 1246 MovieClip [item24] Frame 1
#initclip 63
Object.registerClass("item24", GameClasses.ItemTank);
#endinitclip
mc.R = random(20000);
mc.onEnterFrame = function () {
var _local2 = 20000;
var _local3 = ((Math.PI*2) * ((getTimer() + this.R) % _local2)) / _local2;
this._alpha = Math.min(100, Math.sin(_local3) * 200);
};
Symbol 1250 MovieClip [item20] Frame 1
#initclip 64
Object.registerClass("item20", GameClasses.ItemTank);
#endinitclip
Symbol 1254 MovieClip [item21] Frame 1
#initclip 65
Object.registerClass("item21", GameClasses.ItemTank);
#endinitclip
Symbol 1258 MovieClip [item25] Frame 1
#initclip 66
Object.registerClass("item25", GameClasses.ItemTank);
#endinitclip
Symbol 1262 MovieClip [item26] Frame 1
#initclip 67
Object.registerClass("item26", GameClasses.ItemTank);
#endinitclip
Symbol 1268 MovieClip [item18] Frame 1
#initclip 68
Object.registerClass("item18", GameClasses.ItemTank);
#endinitclip
mc.R = random(12000);
mc.onEnterFrame = function () {
var _local2 = 12000;
var _local3 = ((Math.PI*2) * ((getTimer() + this.R) % _local2)) / _local2;
this._alpha = Math.min(100, Math.sin(_local3) * 100);
};
Symbol 1278 MovieClip [item22] Frame 1
#initclip 69
Object.registerClass("item22", GameClasses.ItemTank);
#endinitclip
mc1.R = random(10000);
mc1.onEnterFrame = function () {
var _local2 = 4000;
var _local3 = ((Math.PI*2) * ((getTimer() + this.R) % _local2)) / _local2;
this._rotation = Math.sin(_local3) * 8;
};
mc2.R = random(10000);
mc2.onEnterFrame = function () {
var _local2 = 5000;
var _local3 = ((Math.PI*2) * ((getTimer() + this.R) % _local2)) / _local2;
this._rotation = Math.sin(_local3) * 12;
};
Symbol 1301 MovieClip Frame 1
stop();
Symbol 1306 MovieClip [button_rg] Frame 1
#initclip 70
Object.registerClass("button_rg", GameClasses.GameButton);
#endinitclip
stop();