Frame 1
function INIT_PARAMS() {
DownloadLink.value = "http://www.playrix.com/games/pc/fishdom-2.html?utm_campaign=newgrounds&utm_medium=online_games&utm_source=fishdom-2";
NagTime.value = 5;
MaxLevel.value = 20;
cheat.value = "false";
MoreGames.value = 1;
showPlayrix.value = "true";
showBonusMoney.value = "true";
BonusLevel.value = 1;
InitMochiBot("35bfc46d");
var _local1 = "6136f190cd7504a4";
}
function INIT_PARAMS() {
DownloadLink.value = "http://www.playrix.com/games/pc/fishdom-2.html?utm_campaign=newgrounds&utm_medium=online_games&utm_source=fishdom-2";
NagTime.value = 5;
MaxLevel.value = 20;
cheat.value = "false";
MoreGames.value = 1;
showPlayrix.value = "true";
showBonusMoney.value = "true";
BonusLevel.value = 1;
InitMochiBot("35bfc46d");
var _local1 = "6136f190cd7504a4";
}
function Loading() {
if (cheatsEnabled) {
_root.cheat.value = cheatsEnabled;
}
if (downloadableURL) {
_root.DownloadLink.value = downloadableURL;
}
INIT_PARAMS();
GlobalTime = getTimer();
_root.onEnterFrame = LoadGame;
}
function Loading2() {
var _local2 = new GameClasses.LoadGameXML(this, levelXML, textXML, Loading);
}
function LoadGame() {
var _local5 = 500;
loadline._visible = true;
Load = _root.getBytesLoaded();
Total = _root.getBytesTotal();
var _local6 = getTimer() - GlobalTime;
if (Load >= ((Total * _local6) / _local5)) {
Load = (Total * _local6) / _local5;
}
var _local3 = (100 * Load) / Total;
KB.text = ((TextLoading.text + " (") + Math.floor(_local3)) + "%)";
var _local4 = loadline.line._width;
_local3 = _local3 / 100;
loadline.line._x = (_local3 * _local4) - _local4;
loadline.linem._x = (_local3 * _local4) / 2;
loadline.linemm._x = ((_local3 * _local4) / 2) - _local4;
if (Total <= Load) {
delete _root.onEnterFrame;
if (use_api) {
GameClasses.MyRealGamesApi.getInstance().__set__gameBegin(GameClasses.GFunctions.create(this, goGame));
GameClasses.MyRealGamesApi.getInstance().gameReady();
} else {
_root.gotoAndStop(3);
}
}
}
function goGame() {
_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);
}
function InitMochiBot(GameID) {
__com_mochibot__(GameID, this, 10301, true);
}
stop();
stop();
Stage.scaleMode = "noScale";
System.security.allowDomain("*.playrix.com");
System.security.allowInsecureDomain("*.playrix.com");
Stage.scaleMode = "noScale";
Stage.showMenu = false;
this._lockroot = true;
loadline._visible = false;
var load_png = 0;
var use_api = false;
if (use_api) {
GameClasses.MyRealGamesApi.getInstance().Init(this);
GameClasses.MyRealGamesApi.getInstance().__set__swfReadyHand(GameClasses.GFunctions.create(this, Loading2));
}
var flvars;
if (use_api) {
flvars = GameClasses.MyRealGamesApi.getInstance().flVars;
}
if (!language) {
language = "en";
if (flvars != null) {
language = flvars.language;
}
}
if (!country) {
country = "US";
if (flvars != null) {
country = flvars.language;
}
}
if (cheatsEnabled) {
}
if (downloadableURL) {
}
var Path = (_url.substr(0, _url.indexOf(".swf") + 4).split("/").slice(0, -1).join("/") + "/");
var local = ((language + "-") + country);
levelXML = Path + "levels.xml";
textXML = ((Path + "localized/") + local) + "/text/text.xml";
trace(((Path + "localized/") + local) + "/text/text.xml");
var VersionPl = String($version).split(" ")[1].split(",")[0];
LinkURL = "http://www.playrix.com/fishdom.html?sdfsdfsdf=ssssfdxzf";
levelXML = "<?xml version=\"1.0\" encoding=\"windows-1251\"?><Levels><Level id=\"01\" time=\"550\" chips=\"04621\"><Line>00a000000a00</Line><Line>0aaaaaaaaaa0</Line><Line>aaaaaaaaaaaa</Line><Line>0aaaadaaaaa0</Line><Line>0aaaaaaaaaa0</Line><Line>0aadaaaadaa0</Line><Line>0aaaaaaaaaa0</Line><Line>0aaaaadaaaa0</Line><Line>aaaaaaaaaaaa</Line><Line>0aaaaaaaaaa0</Line><Line>00a000000a00</Line></Level><!--<Level id=\"01\" time=\"550\" chips=\"04621\"><Line>00a000000a00</Line><Line>0aaaaaaaaaa0</Line><Line>aaaaaaaaaaaa</Line><Line>0aaaaaaaaaa0</Line><Line>0aaaaaaaaaa0</Line><Line>0aaaaaaaaaa0</Line><Line>0aaaaaaaaaa0</Line><Line>0aaaaadaaaa0</Line><Line>aaaaaaaaaaaa</Line><Line>0aaaaaaaaaa0</Line><Line>00a000000a00</Line></Level>--><Level id=\"02\" time=\"420\" chips=\"01635\"><!--24--><Line>aaaaaaa0aaa0000</Line><Line>aaaaaaaaaaaaa00</Line><Line>0aaaaddaddaaaa0</Line><Line>00aadddadddaaa0</Line><Line>00aadddadddaaaa</Line><Line>00aaaaadaaaaaaa</Line><Line>00aadddadddaaaa</Line><Line>00aadddadddaaa0</Line><Line>0aaaaddaddaaaa0</Line><Line>aaaaaaaaaaaaa00</Line><Line>aaaaaaa0aaa0000</Line></Level><Level id=\"03\" time=\"400\" chips=\"02345\"><!--16--><Line>0aaaaa000aaaaa0</Line><Line>0aaaaaa0aaddaa0</Line><Line>00aaaddddddda00</Line><Line>00aadddddddaaa0</Line><Line>0aaddddadda0aaa</Line><Line>aadddadada000aa</Line><Line>0aaddddadda0aaa</Line><Line>00aadddddddaaa0</Line><Line>00aaaddddddda00</Line><Line>0aaaaaa0aaddaa0</Line><Line>0aaaaa000aaaaa0</Line></Level><Level id=\"04\" time=\"400\" chips=\"64135\"><!--02--><Line>0dadadadadad0</Line><Line>dadadadadadad</Line><Line>adadadadadada</Line><Line>dadadadadadad</Line><Line>adadad0dadada</Line><Line>dadaa000aadad</Line><Line>adadad0dadada</Line><Line>dadadadadadad</Line><Line>adadadadadada</Line><Line>dadadadadadad</Line><Line>0dadadadadad0</Line></Level><Level id=\"05\" time=\"380\" chips=\"65240\"><!--13--><Line>aaaaaaaaaaaaaa</Line><Line>0aaaaaddaaaaa0</Line><Line>00aaddddddaa00</Line><Line>00beeeeeeeeb00</Line><Line>0aaddeeeeddaa0</Line><Line>aadddeeeedddaa</Line><Line>aaadddeedddaaa</Line><Line>aaaaaddddaaaaa</Line><Line>aaaaaaddaaaaaa</Line><Line>0aaaaddddaaaa0</Line><Line>00aaddddddaa00</Line></Level><Level id=\"06\" time=\"380\" chips=\"65130\"><!--45--><Line>00addddgdddda00</Line><Line>0adddddgddddda0</Line><Line>adddaddgddaadda</Line><Line>adaaaadgdaaaada</Line><Line>dgdaa0bhb0aadgd</Line><Line>ada000aga000ada</Line><Line>aaa00aagaa00aaa</Line><Line>a000aadgdaa000a</Line><Line>a00aaddgddaa00a</Line><Line>00aadddgdddaa00</Line><Line>0aaddddgddddaa0</Line></Level><Level id=\"07\" time=\"466\" chips=\"01245\"><!--36--><Line>aaaaadddddaaaaa</Line><Line>aaa00adgda00aaa</Line><Line>daa0aaaeaaa0aad</Line><Line>ddaaaabbbaaaadd</Line><Line>ddgaabbgbbaagdd</Line><Line>ddaaaabbbaaaadd</Line><Line>daaaaaabaaaaaad</Line><Line>aa00aaagaaa00aa</Line><Line>a0000aggga0000a</Line><Line>00000ddgdd00000</Line><Line>0000000a0000000</Line></Level><Level id=\"08\" time=\"410\" chips=\"62135\"><!--04--><Line>0a0a0a0a0a0a0</Line><Line>0addddddddda0</Line><Line>addddddddddda</Line><Line>0dddd00ddddd0</Line><Line>addddggg0ddda</Line><Line>0ddd0ggg0ddd0</Line><Line>addd0gggdddda</Line><Line>0ddddd00dddd0</Line><Line>addddddddddda</Line><Line>0ddddddddddd0</Line><Line>0a0a0a0a0a0a0</Line></Level><Level id=\"09\" time=\"500\" chips=\"02346\"><!--15--><Line>aaa00aaaaa000000</Line><Line>0aaa000aaaa00000</Line><Line>0daaa000dddd0000</Line><Line>00daa0ddddddd000</Line><Line>00dddddddddddd00</Line><Line>00ddgdgdgdgdgdg0</Line><Line>00dgdgdgdgdgdgdd</Line><Line>00dddddddddddddd</Line><Line>0ddaa0ddddddddd0</Line><Line>0aaa0000ddddd000</Line><Line>aaa000aaaa000000</Line></Level><Level id=\"10\" time=\"440\" chips=\"31056\"><!--24--><Line>aaaaaaaaaaaaaaa</Line><Line>0addddddddddda0</Line><Line>00daaaaaaaaad00</Line><Line>00ecefefefece00</Line><Line>0adaegggggeada0</Line><Line>aadaeggiggeadaa</Line><Line>aadaegggggeadaa</Line><Line>aaddeeeeeeeddaa</Line><Line>0addddddddddda0</Line><Line>0addddddddddda0</Line><Line>aaaa0d0d0d0aaaa</Line></Level><Level id=\"11\" time=\"470\" chips=\"32104\"><!--56--><Line>ggggggggggggggg</Line><Line>ggggggggggggggg</Line><Line>ggggggggggggggg</Line><Line>ggggggggggggggg</Line><Line>ggggggggggggggg</Line><Line>ggggggggggggggg</Line><Line>ggggggggggggggg</Line><Line>ggggggggggggggg</Line><Line>ggggggggggggggg</Line><Line>ggggggggggggggg</Line><Line>ggggggggggggggg</Line></Level><Level id=\"12\" time=\"480\" chips=\"21065\"><!--34--><Line>daaaaaa0dddddaa</Line><Line>ddaaaaaadddddaa</Line><Line>0daaaaaaaaa0000</Line><Line>00daaaaadddddaa</Line><Line>dddaaaaadddddaa</Line><Line>0dddaaaadddddaa</Line><Line>00ddaaaa0000000</Line><Line>000ddaaadddddaa</Line><Line>dddddaaadddddaa</Line><Line>0dddddaadddddaa</Line><Line>00dddddadddddaa</Line></Level><Level id=\"13\" time=\"480\" chips=\"34560\"><!--12--><Line>000aaaddaaa000</Line><Line>000aa0aa0aa000</Line><Line>0aadddaadddaa0</Line><Line>aaddddddddddaa</Line><Line>dddd0d00d0dddd</Line><Line>ddddeh00hedddd</Line><Line>dddddddddddddd</Line><Line>dd0gggggggg0dd</Line><Line>da0gggggggg0ad</Line><Line>000dddggddd000</Line><Line>000ada00ada000</Line></Level><Level id=\"14\" time=\"490\" chips=\"15243\"><!--06--><Line>dgggddddd000000</Line><Line>ddgggdddd000000</Line><Line>dddgggddc000000</Line><Line>ddddggga0a00000</Line><Line>0ddddgc000a0000</Line><Line>00ddda0a0add000</Line><Line>000dc000agddd00</Line><Line>00000a0agggddd0</Line><Line>000000addgggddd</Line><Line>000000ddddgggdd</Line><Line>000000dddddgggd</Line></Level><Level id=\"15\" time=\"490\" chips=\"04136\"><!--25--><Line>ddddddddddddd</Line><Line>0ddddddddddd0</Line><Line>00ddddddddd00</Line><Line>000iiiiiii000</Line><Line>00dddgigddd00</Line><Line>0ddddgigdddd0</Line><Line>00dddiiiddd00</Line><Line>0dddddiddddd0</Line><Line>ddddddidddddd</Line><Line>0ddd0did0ddd0</Line><Line>aada0ddd0adaa</Line></Level><Level id=\"16\" time=\"766\" chips=\"23456\"><!--01--><Line>0ddd00a0a00ddd0</Line><Line>dggdd0d0d0ddggd</Line><Line>dgggd0ddd0dgggd</Line><Line>ddgggdddddgggdd</Line><Line>0ddgdddddddgdd0</Line><Line>00ddddddddddd00</Line><Line>000ddddddddd000</Line><Line>00ddddddddddd00</Line><Line>0aggdddddddgga0</Line><Line>0aggd00d00dgga0</Line><Line>00aa000a000aa00</Line></Level><Level id=\"17\" time=\"500\" chips=\"62130\"><!--45--><Line>000dd0000dd000</Line><Line>00dddd00dddd00</Line><Line>0dddddddddddd0</Line><Line>dddddddddddddd</Line><Line>dddd00gg00dddd</Line><Line>dddddd00dddddd</Line><Line>ddddddggdddddd</Line><Line>0dddddddddddd0</Line><Line>0dddddddddddd0</Line><Line>00fffdffdfff00</Line><Line>00ggg0gg0ggg00</Line><Line>00ggg0000ggg00</Line></Level><Level id=\"18\" time=\"600\" chips=\"45601\"><!--23--><Line>0ddddddgdddddd0</Line><Line>dddddgggggddddd</Line><Line>ddgggggggggggdd</Line><Line>dgd0d00d00d0dgd</Line><Line>dg00d00d00d00gd</Line><Line>ggdddddddddddgg</Line><Line>dg00d00d00d00gd</Line><Line>dgd0d00d00d0dgd</Line><Line>ddgggggggggggdd</Line><Line>dddddgggggddddd</Line><Line>0ddddddgdddddd0</Line></Level><Level id=\"19\" time=\"450\" chips=\"65432\"><!--01--><Line>ddddddd0ddddddd</Line><Line>ddddddd0ddddddd</Line><Line>ddddddd0ddddddd</Line><Line>ddddddd0ddddddd</Line><Line>eeeeeee0eeeeeee</Line><Line>ddddddeiedddddd</Line><Line>dddddeg0geddddd</Line><Line>ddddegg0ggedddd</Line><Line>dddeggg0gggeddd</Line><Line>ddegggg0ggggedd</Line><Line>deggggg0ggggged</Line></Level><Level id=\"20\" time=\"650\" chips=\"54130\"><!--26--><Line>0dagdidididgad0</Line><Line>dad0idididi0dad</Line><Line>ada0dididid0ada</Line><Line>dad0idididi0dad</Line><Line>ada0dididid0ada</Line><Line>dad0idididi0dad</Line><Line>ada0aiaiaia0ada</Line><Line>dadadagagadadad</Line><Line>adadagagagadada</Line><Line>dadgdgdgdgdgdad</Line><Line>0dgdgdgdgdgdgd0</Line></Level><Level id=\"21\" time=\"660\" chips=\"04621\"><Line>000aaagagaaa000</Line><Line>00agddgdgddga00</Line><Line>0aadgggagggdaa0</Line><Line>aaadgaagaagdaaa</Line><Line>gggggag0gaggggg</Line><Line>0aadag000gadaa0</Line><Line>gggggag0gaggggg</Line><Line>aaadgaagaagdaaa</Line><Line>0aadgggagggdaa0</Line><Line>00agddgdgddga00</Line><Line>000aaag0gaaa000</Line></Level><Level id=\"22\" time=\"766\" chips=\"01635\"><Line>000a0000000a000</Line><Line>0000a00000a0000</Line><Line>000dd00000dd000</Line><Line>00dddd000dddd00</Line><Line>0dddddg0gddddd0</Line><Line>dddffigggiffddd</Line><Line>dddfiigggiifddd</Line><Line>dddiiigggiiiddd</Line><Line>ddggggg0gggggdd</Line><Line>dgggggg0ggggggd</Line></Level><Level id=\"23\" time=\"700\" chips=\"02345\"><Line>00000eadae00000</Line><Line>000fdddddddf000</Line><Line>0edgdgdgdgdgdh0</Line><Line>gdgdgdgdgdgdgdg</Line><Line>dgdgdgdgdgdgdgd</Line><Line>fififif0fififif</Line><Line>dgdgdgdgdgdgdgd</Line><Line>gdgdgdgdgdgdgdg</Line><Line>0gdgdgdgdgdgdg0</Line><Line>000ddddddddd000</Line><Line>00000ddddd00000</Line></Level><Level id=\"24\" time=\"650\" chips=\"64135\"><Line>0ddddddddddddd0</Line><Line>adgggggggggggda</Line><Line>addddddddddddda</Line><Line>b0b0b0b0b0b0b0b</Line><Line>addddddddddddda</Line><Line>adgdgdgdgdgdgda</Line><Line>addddddddddddda</Line><Line>0b0b0b0b0b0b0b0</Line><Line>addddddddddddda</Line><Line>adgggggggggggda</Line><Line>0ddddddddddddd0</Line></Level><Level id=\"25\" time=\"650\" chips=\"65240\"><Line>0a0a0a000a0a0a0</Line><Line>0d0d0d000d0d0d0</Line><Line>ddgdgdg0gdgdgdd</Line><Line>0gddddd0dddddg0</Line><Line>ddddddd0ddddddd</Line><Line>0gdeieeeeeiedg0</Line><Line>dddeiiiiiiieddd</Line><Line>0gdeiiiiiiiedg0</Line><Line>dddeieeeeeieddd</Line><Line>0gdddddddddddg0</Line><Line>ddgggggggggggdd</Line><Line>0ddddddddddddd0</Line></Level><Level id=\"26\" time=\"600\" chips=\"65130\"><Line>00idddddddddd</Line><Line>0hefddddddddd</Line><Line>gdheidddddddd</Line><Line>dgdhefddddddd</Line><Line>gdgdheidddddd</Line><Line>dgdgdhefddddd</Line><Line>gdgdgdheidddd</Line><Line>dgdgdgdhefddd</Line><Line>gdgdgdgdheidd</Line><Line>dgdgdgdgdhef0</Line><Line>gdgdgdgdgdh00</Line></Level><Level id=\"27\" time=\"500\" chips=\"01245\"><Line>daaaaaaaaaaad</Line><Line>aaaaaadaaaaaa</Line><Line>aaaaadddaaaaa</Line><Line>aaadddddddaaa</Line><Line>aaaadddddaaaa</Line><Line>aaaaadddaaaaa</Line><Line>aaaaaa0aaaaaa</Line><Line>aaaaa0d0aaaaa</Line><Line>aaaaaa0aaaaaa</Line><Line>aaaaaaaaaaaaa</Line><Line>daaaaaaaaaaad</Line></Level><Level id=\"28\" time=\"700\" chips=\"62135\"><Line>aahaaaaaaaahaa</Line><Line>aahbggbdggdhaa</Line><Line>aahbbbbddddhaa</Line><Line>aaheddebbbbhaa</Line><Line>aahdggdbggbhaa</Line><Line>aahdggdbggbhaa</Line><Line>aaheddebbbbhaa</Line><Line>aahbbbbeddehaa</Line><Line>aahbggbdggdhaa</Line><Line>aahbggbdggdhaa</Line><Line>aahbbbbeddehaa</Line></Level><Level id=\"29\" time=\"700\" chips=\"02346\"><Line>0aadgdgdgdgdaa0</Line><Line>dgdgdgdgdgdgdgd</Line><Line>gdgdaaaaaaadgdg</Line><Line>dgdga0c0c0agdgd</Line><Line>gdgda0eee0adgdg</Line><Line>dgdga0ege0agdgd</Line><Line>gdgda0eee0adgdg</Line><Line>dgdga00000agdgd</Line><Line>gdgdaaaaaaadgdg</Line><Line>dgdgdgdgdgdgdgd</Line><Line>0aadgdgdgdgdaa0</Line></Level><Level id=\"30\" time=\"700\" chips=\"31056\"><Line>00ddd0ddd0ddd00</Line><Line>0add00dad00add0</Line><Line>a0ddd0ddd0ddd0a</Line><Line>0a0d0a0a0a0d0a0</Line><Line>agdddgdddgdddga</Line><Line>addddddddddddda</Line><Line>dddddddgddddddd</Line><Line>dddddgggggddddd</Line><Line>efeeefeeefeeefe</Line><Line>ddgggggggggggdd</Line><Line>ddddddddddddddd</Line></Level><BonusLevel id=\"1\"><InsertWaterPlantControl item=\"gems_4\" x=\"638\" y=\"107\"/><InsertWaterPlantControl item=\"gems_1\" x=\"717\" y=\"116\"/><InsertWaterPlantControl item=\"item34\" x=\"664\" y=\"121\"/><InsertWaterPlantControl item=\"gems_9\" x=\"723\" y=\"134\"/><InsertWaterPlantControl item=\"item16\" x=\"344\" y=\"156\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_7\" x=\"355\" y=\"157\"/><InsertWaterPlantControl item=\"item13\" x=\"115\" y=\"178\"/><InsertWaterPlantControl item=\"gems_7\" x=\"126\" y=\"181\"/><InsertWaterPlantControl item=\"item3\" x=\"775\" y=\"196\"/><InsertWaterPlantControl item=\"item11\" x=\"521\" y=\"198\"/><InsertWaterPlantControl item=\"gems_6\" x=\"537\" y=\"204\"/><InsertWaterPlantControl item=\"item3\" x=\"365\" y=\"214\"/><InsertWaterPlantControl item=\"item28\" x=\"274\" y=\"216\"/><InsertWaterPlantControl item=\"gems_2\" x=\"364\" y=\"217\"/><InsertWaterPlantControl item=\"item11\" x=\"198\" y=\"225\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_8\" x=\"208\" y=\"226\"/><InsertWaterPlantControl item=\"gems_6\" x=\"319\" y=\"227\"/><InsertWaterPlantControl item=\"item6\" x=\"50\" y=\"228\" mirror=\"true\"/><InsertWaterPlantControl item=\"item9\" x=\"85\" y=\"234\"/><InsertWaterPlantControl item=\"gems_4\" x=\"28\" y=\"235\"/><InsertWaterPlantControl item=\"item11\" x=\"152\" y=\"246\"/></BonusLevel><BonusLevel id=\"2\"><InsertWaterPlantControl item=\"item3\" x=\"96\" y=\"78\"/><InsertWaterPlantControl item=\"gems_4\" x=\"120\" y=\"89\"/><InsertWaterPlantControl item=\"item8\" x=\"742\" y=\"180\"/><InsertWaterPlantControl item=\"item25\" x=\"548\" y=\"120\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_8\" x=\"545\" y=\"161\"/><InsertWaterPlantControl item=\"gems_8\" x=\"190\" y=\"166\"/><InsertWaterPlantControl item=\"item3\" x=\"580\" y=\"169\"/><InsertWaterPlantControl item=\"item28\" x=\"249\" y=\"162\"/><InsertWaterPlantControl item=\"item13\" x=\"198\" y=\"181\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_2\" x=\"570\" y=\"181\"/><InsertWaterPlantControl item=\"gems_3\" x=\"286\" y=\"183\"/><InsertWaterPlantControl item=\"item31\" x=\"508\" y=\"187\"/><InsertWaterPlantControl item=\"gems_4\" x=\"221\" y=\"189\"/><InsertWaterPlantControl item=\"item13\" x=\"255\" y=\"193\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_5\" x=\"504\" y=\"197\" mirror=\"true\"/><InsertWaterPlantControl item=\"item13\" x=\"348\" y=\"198\"/><InsertWaterPlantControl item=\"item21\" x=\"666\" y=\"198\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_9\" x=\"677\" y=\"199\"/><InsertWaterPlantControl item=\"gems_4\" x=\"761\" y=\"202\"/><InsertWaterPlantControl item=\"item15\" x=\"69\" y=\"207\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_6\" x=\"30\" y=\"210\"/><InsertWaterPlantControl item=\"gems_1\" x=\"368\" y=\"213\"/><InsertWaterPlantControl item=\"gems_3\" x=\"242\" y=\"228\"/></BonusLevel><BonusLevel id=\"3\"><InsertWaterPlantControl item=\"gems_4\" x=\"200\" y=\"67\"/><InsertWaterPlantControl item=\"gems_1\" x=\"620\" y=\"91\"/><InsertWaterPlantControl item=\"item10\" x=\"668\" y=\"95\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_5\" x=\"705\" y=\"102\"/><InsertWaterPlantControl item=\"item20\" x=\"383\" y=\"107\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_6\" x=\"357\" y=\"123\"/><InsertWaterPlantControl item=\"item10\" x=\"582\" y=\"124\"/><InsertWaterPlantControl item=\"gems_9\" x=\"140\" y=\"130\"/><InsertWaterPlantControl item=\"item10\" x=\"702\" y=\"135\" mirror=\"true\"/><InsertWaterPlantControl item=\"item33\" x=\"452\" y=\"142\" mirror=\"true\"/><InsertWaterPlantControl item=\"item4\" x=\"256\" y=\"146\"/><InsertWaterPlantControl item=\"item10\" x=\"652\" y=\"150\"/><InsertWaterPlantControl item=\"item14\" x=\"332\" y=\"151\"/><InsertWaterPlantControl item=\"gems_8\" x=\"281\" y=\"153\"/><InsertWaterPlantControl item=\"gems_10\" x=\"418\" y=\"155\"/><InsertWaterPlantControl item=\"gems_5\" x=\"541\" y=\"159\"/><InsertWaterPlantControl item=\"item10\" x=\"607\" y=\"160\"/><InsertWaterPlantControl item=\"item4\" x=\"180\" y=\"160\"/><InsertWaterPlantControl item=\"item14\" x=\"388\" y=\"161\"/><InsertWaterPlantControl item=\"item4\" x=\"114\" y=\"168\"/><InsertWaterPlantControl item=\"gems_7\" x=\"138\" y=\"170\"/><InsertWaterPlantControl item=\"item4\" x=\"568\" y=\"173\"/><InsertWaterPlantControl item=\"item35\" x=\"741\" y=\"177\"/><InsertWaterPlantControl item=\"item10\" x=\"710\" y=\"182\"/><InsertWaterPlantControl item=\"item14\" x=\"348\" y=\"185\"/><InsertWaterPlantControl item=\"item4\" x=\"257\" y=\"188\"/><InsertWaterPlantControl item=\"item4\" x=\"402\" y=\"189\" mirror=\"true\"/><InsertWaterPlantControl item=\"item4\" x=\"327\" y=\"198\"/><InsertWaterPlantControl item=\"item4\" x=\"83\" y=\"201\"/><InsertWaterPlantControl item=\"item4\" x=\"132\" y=\"204\" mirror=\"true\"/><InsertWaterPlantControl item=\"item2\" x=\"660\" y=\"207\"/><InsertWaterPlantControl item=\"gems_10\" x=\"44\" y=\"214\"/><InsertWaterPlantControl item=\"item4\" x=\"198\" y=\"216\" mirror=\"true\"/></BonusLevel><BonusLevel id=\"4\"><InsertWaterPlantControl item=\"item7\" x=\"782\" y=\"21\"/><InsertWaterPlantControl item=\"gems_10\" x=\"743\" y=\"45\"/><InsertWaterPlantControl item=\"item13\" x=\"131\" y=\"95\" mirror=\"true\"/><InsertWaterPlantControl item=\"item13\" x=\"103\" y=\"95\"/><InsertWaterPlantControl item=\"item24\" x=\"370\" y=\"103\"/><InsertWaterPlantControl item=\"item15\" x=\"738\" y=\"107\"/><InsertWaterPlantControl item=\"gems_5\" x=\"783\" y=\"115\"/><InsertWaterPlantControl item=\"gems_10\" x=\"42\" y=\"130\"/><InsertWaterPlantControl item=\"item28\" x=\"113\" y=\"135\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_1\" x=\"329\" y=\"137\"/><InsertWaterPlantControl item=\"item9\" x=\"64\" y=\"151\"/><InsertWaterPlantControl item=\"item31\" x=\"725\" y=\"154\" mirror=\"true\"/><InsertWaterPlantControl item=\"item25\" x=\"472\" y=\"154\" mirror=\"true\"/><InsertWaterPlantControl item=\"item19\" x=\"227\" y=\"161\"/><InsertWaterPlantControl item=\"gems_9\" x=\"251\" y=\"168\"/><InsertWaterPlantControl item=\"gems_6\" x=\"508\" y=\"174\"/><InsertWaterPlantControl item=\"item3\" x=\"717\" y=\"178\"/><InsertWaterPlantControl item=\"item33\" x=\"610\" y=\"188\"/><InsertWaterPlantControl item=\"item20\" x=\"421\" y=\"189\"/><InsertWaterPlantControl item=\"gems_3\" x=\"718\" y=\"194\"/><InsertWaterPlantControl item=\"item3\" x=\"55\" y=\"194\"/><InsertWaterPlantControl item=\"item5\" x=\"183\" y=\"195\"/><InsertWaterPlantControl item=\"gems_3\" x=\"404\" y=\"204\"/><InsertWaterPlantControl item=\"item7\" x=\"101\" y=\"210\"/><InsertWaterPlantControl item=\"gems_5\" x=\"65\" y=\"222\"/><InsertWaterPlantControl item=\"gems_8\" x=\"176\" y=\"227\"/></BonusLevel><BonusLevel id=\"5\"><InsertWaterPlantControl item=\"gems_7\" x=\"212\" y=\"126\"/><InsertWaterPlantControl item=\"item25\" x=\"220\" y=\"140\"/><InsertWaterPlantControl item=\"item8\" x=\"715\" y=\"142\"/><InsertWaterPlantControl item=\"gems_8\" x=\"729\" y=\"144\"/><InsertWaterPlantControl item=\"item1\" x=\"168\" y=\"156\" mirror=\"true\"/><InsertWaterPlantControl item=\"item14\" x=\"688\" y=\"161\"/><InsertWaterPlantControl item=\"item32\" x=\"523\" y=\"166\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_1\" x=\"609\" y=\"168\"/><InsertWaterPlantControl item=\"item7\" x=\"494\" y=\"179\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_4\" x=\"482\" y=\"182\"/><InsertWaterPlantControl item=\"gems_4\" x=\"735\" y=\"193\"/><InsertWaterPlantControl item=\"item7\" x=\"99\" y=\"195\"/><InsertWaterPlantControl item=\"gems_1\" x=\"411\" y=\"198\"/><InsertWaterPlantControl item=\"gems_7\" x=\"73\" y=\"199\"/><InsertWaterPlantControl item=\"gems_6\" x=\"43\" y=\"205\"/><InsertWaterPlantControl item=\"item15\" x=\"47\" y=\"211\"/><InsertWaterPlantControl item=\"item6\" x=\"308\" y=\"222\"/><InsertWaterPlantControl item=\"item10\" x=\"284\" y=\"225\"/><InsertWaterPlantControl item=\"gems_9\" x=\"324\" y=\"225\"/></BonusLevel><BonusLevel id=\"6\"><InsertWaterPlantControl item=\"item2\" x=\"50\" y=\"90\"/><InsertWaterPlantControl item=\"gems_6\" x=\"20\" y=\"102\"/><InsertWaterPlantControl item=\"item31\" x=\"664\" y=\"150\" mirror=\"true\"/><InsertWaterPlantControl item=\"item10\" x=\"622\" y=\"154\"/><InsertWaterPlantControl item=\"gems_8\" x=\"646\" y=\"158\"/><InsertWaterPlantControl item=\"item9\" x=\"716\" y=\"161\"/><InsertWaterPlantControl item=\"gems_10\" x=\"687\" y=\"161\"/><InsertWaterPlantControl item=\"gems_1\" x=\"294\" y=\"180\"/><InsertWaterPlantControl item=\"gems_6\" x=\"561\" y=\"195\"/><InsertWaterPlantControl item=\"item24\" x=\"494\" y=\"197\" mirror=\"true\"/><InsertWaterPlantControl item=\"item3\" x=\"538\" y=\"199\"/><InsertWaterPlantControl item=\"gems_7\" x=\"446\" y=\"204\"/><InsertWaterPlantControl item=\"item7\" x=\"73\" y=\"210\"/><InsertWaterPlantControl item=\"item8\" x=\"277\" y=\"231\"/><InsertWaterPlantControl item=\"gems_6\" x=\"290\" y=\"233\"/><InsertWaterPlantControl item=\"item19\" x=\"157\" y=\"236\"/><InsertWaterPlantControl item=\"item19\" x=\"122\" y=\"238\"/><InsertWaterPlantControl item=\"gems_1\" x=\"95\" y=\"241\"/><InsertWaterPlantControl item=\"gems_9\" x=\"139\" y=\"243\"/><InsertWaterPlantControl item=\"gems_5\" x=\"184\" y=\"245\"/></BonusLevel><BonusLevel id=\"7\"><InsertWaterPlantControl item=\"gems_4\" x=\"634\" y=\"123\"/><InsertWaterPlantControl item=\"item31\" x=\"606\" y=\"134\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_9\" x=\"507\" y=\"153\"/><InsertWaterPlantControl item=\"item11\" x=\"127\" y=\"172\"/><InsertWaterPlantControl item=\"gems_10\" x=\"126\" y=\"174\"/><InsertWaterPlantControl item=\"item11\" x=\"789\" y=\"176\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_5\" x=\"584\" y=\"182\"/><InsertWaterPlantControl item=\"item24\" x=\"326\" y=\"197\"/><InsertWaterPlantControl item=\"item6\" x=\"398\" y=\"201\"/><InsertWaterPlantControl item=\"gems_4\" x=\"775\" y=\"204\"/><InsertWaterPlantControl item=\"gems_8\" x=\"385\" y=\"204\"/><InsertWaterPlantControl item=\"item8\" x=\"48\" y=\"206\"/><InsertWaterPlantControl item=\"item4\" x=\"676\" y=\"211\"/><InsertWaterPlantControl item=\"gems_1\" x=\"661\" y=\"213\"/><InsertWaterPlantControl item=\"gems_10\" x=\"284\" y=\"215\"/><InsertWaterPlantControl item=\"gems_7\" x=\"57\" y=\"226\"/><InsertWaterPlantControl item=\"item2\" x=\"269\" y=\"229\" mirror=\"true\"/><InsertWaterPlantControl item=\"item9\" x=\"93\" y=\"234\"/><InsertWaterPlantControl item=\"item7\" x=\"130\" y=\"236\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_6\" x=\"123\" y=\"238\"/><InsertWaterPlantControl item=\"item5\" x=\"163\" y=\"240\" mirror=\"true\"/></BonusLevel><BonusLevel id=\"8\"><InsertWaterPlantControl item=\"item6\" x=\"792\" y=\"21\"/><InsertWaterPlantControl item=\"gems_3\" x=\"779\" y=\"71\"/><InsertWaterPlantControl item=\"gems_5\" x=\"149\" y=\"83\"/><InsertWaterPlantControl item=\"item14\" x=\"225\" y=\"96\" mirror=\"true\"/><InsertWaterPlantControl item=\"item14\" x=\"159\" y=\"98\"/><InsertWaterPlantControl item=\"item14\" x=\"62\" y=\"105\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_1\" x=\"571\" y=\"106\"/><InsertWaterPlantControl item=\"item14\" x=\"268\" y=\"122\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_9\" x=\"378\" y=\"123\"/><InsertWaterPlantControl item=\"item3\" x=\"761\" y=\"123\" mirror=\"true\"/><InsertWaterPlantControl item=\"eg_koryaga7\" x=\"423\" y=\"124\"/><InsertWaterPlantControl item=\"item14\" x=\"192\" y=\"130\" mirror=\"true\"/><InsertWaterPlantControl item=\"item3\" x=\"680\" y=\"131\"/><InsertWaterPlantControl item=\"item14\" x=\"296\" y=\"144\" mirror=\"true\"/><InsertWaterPlantControl item=\"item14\" x=\"243\" y=\"146\"/><InsertWaterPlantControl item=\"item14\" x=\"104\" y=\"146\" mirror=\"true\"/><InsertWaterPlantControl item=\"item14\" x=\"381\" y=\"147\"/><InsertWaterPlantControl item=\"gems_3\" x=\"38\" y=\"153\"/><InsertWaterPlantControl item=\"item12\" x=\"443\" y=\"154\"/><InsertWaterPlantControl item=\"item14\" x=\"190\" y=\"159\"/><InsertWaterPlantControl item=\"item14\" x=\"61\" y=\"166\"/><InsertWaterPlantControl item=\"item3\" x=\"734\" y=\"171\"/><InsertWaterPlantControl item=\"item14\" x=\"220\" y=\"176\" mirror=\"true\"/><InsertWaterPlantControl item=\"item14\" x=\"286\" y=\"176\" mirror=\"true\"/><InsertWaterPlantControl item=\"item14\" x=\"369\" y=\"177\"/><InsertWaterPlantControl item=\"gems_10\" x=\"733\" y=\"182\"/><InsertWaterPlantControl item=\"item3\" x=\"652\" y=\"184\" mirror=\"true\"/><InsertWaterPlantControl item=\"item11\" x=\"482\" y=\"188\"/><InsertWaterPlantControl item=\"gems_4\" x=\"491\" y=\"189\"/><InsertWaterPlantControl item=\"item14\" x=\"111\" y=\"191\"/><InsertWaterPlantControl item=\"gems_6\" x=\"662\" y=\"202\"/><InsertWaterPlantControl item=\"item14\" x=\"182\" y=\"204\"/><InsertWaterPlantControl item=\"item14\" x=\"255\" y=\"213\"/><InsertWaterPlantControl item=\"gems_8\" x=\"327\" y=\"218\"/><InsertWaterPlantControl item=\"item12\" x=\"225\" y=\"222\"/><InsertWaterPlantControl item=\"gems_2\" x=\"136\" y=\"229\"/><InsertWaterPlantControl item=\"item5\" x=\"86\" y=\"235\"/><InsertWaterPlantControl item=\"item6\" x=\"245\" y=\"237\"/><InsertWaterPlantControl item=\"item7\" x=\"204\" y=\"240\"/></BonusLevel><BonusLevel id=\"9\"><InsertWaterPlantControl item=\"item6\" x=\"795\" y=\"20\"/><InsertWaterPlantControl item=\"item13\" x=\"570\" y=\"23\"/><InsertWaterPlantControl item=\"item13\" x=\"607\" y=\"23\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_10\" x=\"761\" y=\"27\"/><InsertWaterPlantControl item=\"item13\" x=\"686\" y=\"44\" mirror=\"true\"/><InsertWaterPlantControl item=\"item13\" x=\"482\" y=\"47\"/><InsertWaterPlantControl item=\"item2\" x=\"755\" y=\"47\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_1\" x=\"600\" y=\"56\"/><InsertWaterPlantControl item=\"item13\" x=\"407\" y=\"67\"/><InsertWaterPlantControl item=\"item15\" x=\"280\" y=\"87\"/><InsertWaterPlantControl item=\"gems_6\" x=\"776\" y=\"92\"/><InsertWaterPlantControl item=\"item13\" x=\"338\" y=\"92\" mirror=\"true\"/><InsertWaterPlantControl item=\"item9\" x=\"322\" y=\"103\"/><InsertWaterPlantControl item=\"item10\" x=\"354\" y=\"107\" mirror=\"true\"/><InsertWaterPlantControl item=\"item8\" x=\"308\" y=\"107\" mirror=\"true\"/><InsertWaterPlantControl item=\"item8\" x=\"366\" y=\"109\"/><InsertWaterPlantControl item=\"item4\" x=\"46\" y=\"110\"/><InsertWaterPlantControl item=\"item9\" x=\"373\" y=\"113\"/><InsertWaterPlantControl item=\"item10\" x=\"286\" y=\"115\"/><InsertWaterPlantControl item=\"item8\" x=\"349\" y=\"117\"/><InsertWaterPlantControl item=\"item10\" x=\"317\" y=\"123\"/><InsertWaterPlantControl item=\"item9\" x=\"361\" y=\"130\"/><InsertWaterPlantControl item=\"item9\" x=\"280\" y=\"133\"/><InsertWaterPlantControl item=\"item25\" x=\"672\" y=\"155\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_10\" x=\"514\" y=\"159\"/><InsertWaterPlantControl item=\"gems_10\" x=\"641\" y=\"164\"/><InsertWaterPlantControl item=\"gems_8\" x=\"402\" y=\"165\"/><InsertWaterPlantControl item=\"gems_2\" x=\"206\" y=\"168\"/><InsertWaterPlantControl item=\"item19\" x=\"557\" y=\"175\"/><InsertWaterPlantControl item=\"gems_9\" x=\"582\" y=\"181\"/><InsertWaterPlantControl item=\"item8\" x=\"37\" y=\"181\" mirror=\"true\"/><InsertWaterPlantControl item=\"gems_6\" x=\"47\" y=\"187\"/><InsertWaterPlantControl item=\"item5\" x=\"592\" y=\"196\"/><InsertWaterPlantControl item=\"item6\" x=\"505\" y=\"200\"/><InsertWaterPlantControl item=\"item3\" x=\"61\" y=\"204\"/><InsertWaterPlantControl item=\"item7\" x=\"22\" y=\"225\"/><InsertWaterPlantControl item=\"item3\" x=\"98\" y=\"228\"/><InsertWaterPlantControl item=\"gems_9\" x=\"120\" y=\"229\"/><InsertWaterPlantControl item=\"item7\" x=\"126\" y=\"239\"/></BonusLevel></Levels>";
textXML = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Texts><menu_buttons><button text=\"Download|FULL version\" funct=\"FDownload\" type=\"0\" color=\"yellow\"/><button text=\"More Games|BY playrix\" funct=\"FMoreGames\" type=\"0\" color=\"yellow\" /><button text=\"Restart\" funct=\"FRestartLevel\" type=\"2\"/><button text=\"Exit to tank\" funct=\"FNew\" type=\"2\"/><button text=\"New game\" funct=\"FNewGame\" type=\"1\"/><button text=\"Resume\" funct=\"FResume\" type=\"0\"/></menu_buttons><logo name=\"logo1\" path=\"logo1.png\" x=\"493\" y=\"412\"/><!--<logo name=\"logo2\" path=\"logo2.png\" x=\"20\" y=\"389\"/>--><string id=\"DownloadLink\" value=\"http://www.playrix.com/games/fishdom-2.html?ref=flash-download%2Ffishdom-2\"/><string id=\"SpecLink\" value=\"false\"/><string id=\"DownloadLinkDop\" value=\"http://www.playrix.com\"/><string id=\"DownloadLinkMoreGames1\" value=\"http://www.playrix.com/games/fishdom.html?ref=flashmoregames%2ffishdom-2%2ffishdom\"/><string id=\"DownloadLinkMoreGames2\" value=\"http://www.playrix.com/games/fishdom-h2o-hidden-odyssey.html?ref=flashmoregames%2ffishdom-2%2ffishdom-h2o-hidden-odyssey\"/><string id=\"DownloadLinkMoreGames3\" value=\"http://www.playrix.com/games/gardenscapes.html?ref=flashmoregames%2ffishdom-2%2fgardenscapes\"/><string id=\"DownloadLinkMoreGames4\" value=\"http://www.playrix.com/games/fishdom-spooky-splash.html?ref=flashmoregames%2ffishdom-2%2ffishdom-spooky-splash\"/><string id=\"DownloadLinkMoreGames5\" value=\"http://www.playrix.com/games/royal-envoy.html?ref=flashmoregames%2ffishdom-2%2froyal-envoy\"/><string id=\"DownloadLinkMoreGames6\" value=\"http://www.playrix.com/games/fishdom-frosty-splash.html?ref=flashmoregames%2ffishdom-2%2ffishdom-frosty-splash\"/><string id=\"SaveGame\" value=\"true\"/><string id=\"CupsUtility\" cup1=\"200\" cup2=\"450\" cup3=\"700\"/><!-- 200 450 700--><string id=\"cheat\" value=\"false\"/><string id=\"showPlayrix\" value=\"true\"/><string id=\"showBonusMoney\" value=\"true\"/><string id=\"NagTime\" value=\"5\"/><string id=\"MoreGames\" value=\"1\"/><string id=\"BonusTime\" value=\"3\"/><string id=\"BonusLevel\" value=\"1\"/><string id=\"NumBonusLevel\" value=\"30\"/><string id=\"MaxLevel\" value=\"20\"/><string id=\"DownTarget\" value=\"FD2\"/><string id=\"UseGraphics\" value=\"false\"/><string id=\"SoundsVolumes\" button_up_moving_s=\"60\" item_up_bubble_s=\"60\" wrong_click_s=\"60\" timer_appear_s=\"80\" time_out_s=\"60\" time_is_out_s=\"50\" success_click_s=\"60\" sell_s=\"60\" press_hint_button_s=\"60\" panel_moving_s=\"100\" level_start_gold=\"60\" level_start_dive=\"60\" level_start_search=\"60\" level_start_collect=\"60\" level_complete_s=\"60\" item_up_s=\"50\" hint_show_s=\"60\" hint_found_s=\"60\" counter_s=\"50\" comfort_s=\"50\" buy_s=\"60\" button_pressed_s=\"60\"/><string id=\"HintInterval\" value=\"30000\"/><string id=\"WebMoneyMulti\" value=\"3.0\"/><string id=\"TextFishes\" text=\"Fish\"/><string id=\"TextComfort\" text=\"Comfort\"/><string id=\"TextBeauty\" text=\"Beauty\"/><string id=\"TextShop\" text=\"Shop\"/><string id=\"TextMoreGames1\" text=\"Solve immersive puzzles to earn cash and then use it to buy eye-candy fish and awesome ornaments. Create an award-winning virtual aquarium of your dreams!\"/><string id=\"TextMoreGames2\" text=\"Help Jennifer, a young marine biologist, win the Best Aquarium Award. Dive to the bottom of the sea, find various hidden items and assemble your dream tank.\"/><string id=\"TextMoreGames3\" text=\"Create the perfect garden! Comb the rooms of a gorgeous mansion for hidden items and restore a once stunning garden to its former glory.\"/><string id=\"TextMoreGames4\" text=\"Build up your spooky Fishdom! Complete addictive tile-swapping levels to earn cash and then use it to buy quirky fish and boo-tiful ornaments. Create your spooktacular tank!\"/><string id=\"TextMoreGames5\" text=\"Construct and upgrade homes and buildings for the island citizens and become the chief city planner of marvelous Islandshire.\"/><string id=\"TextMoreGames6\" text=\"Build up your frosty Fishdom! Progress through compelling match-3 levels and earn cash to create your sparkling and snowy tank!\"/><string id=\"TextMore\" text=\"More\"/><string id=\"TextTryMore\" text=\"Try more games at\"/><string id=\"TextGames\" text=\"Games\"/><string id=\"TextDFW\" text=\"Download|Full|Version\"/><string id=\"txt_nag2\" text=\"This is all the free online version of Fishdom 2 has to offer.\"/><string id=\"txt_nag_dop\" text=\"Had fun creating your dream aquarium?\"/><string id=\"txt_nag3\" text=\"With the full game, you can:\"/><string id=\"txt_nag4\" text=\"Unlimited number of utterly addictive levels|4 uniquely themed tanks to unlock|Stunning variety of fish types and accessories|Bonus screensaver, exclusive wallpapers\"/><string id=\"txt_nag41\" text=\"Unlock and decorate 4 uniquely-themed tanks|Play an unlimited number of levels|Have a variety of fish species and decor items|Get a bonus screensaver and exclusive wallpapers\"/><string id=\"txt_nag5\" text=\"and Fishpedia\"/><string id=\"txt_nag51\" text=\"... and a lot more!\"/><string id=\"txt_finish1\" text=\"That's it!\"/><string id=\"txt_finish2\" text=\"You have completed all the levels of this web game\"/><string id=\"txt_finish3\" text=\"Get a free trial of the full downloadable game. Let your imagination run wild as you create the aquarium of your dreams!\"/><string id=\"txt_mail1\" text=\"Sign up for the playrix newsletter and unlock 10 exclusive bonus levels!\"/><string id=\"txt_mail2\" text=\"Ready to give it one more dive?\"/><string id=\"txt_gold1\" text=\"Sign up for the Playrix|newsletter and get $1000|free Fishdom coins!\"/><string id=\"valid_mail\" text=\"Please enter a valid email address\"/><string id=\"your_mail\" text=\"Enter your e-mail\"/><string id=\"TextCPanelRealx\" text=\"Relaxed.|No timer\"/><string id=\"TextCPanelClock\" text=\"Against the Clock.| Timed\"/><string id=\"TextCPanelUp\" text=\"Choose the game mode\"/><string id=\"TextCPanelDown\" text=\"Click on th Options button to change| the game mode any time you wish\"/><string id=\"TextCPanelButtonRelax\" text=\"Relaxed\"/><string id=\"TextGetReward\" text=\"Bonus level complete! Here's your reward\"/><string id=\"MagnificentText\" text=\"Magnificent\"/><string id=\"TextCPanelButtonClock\" text=\"Against|the Clock\"/><string id=\"TextHintBonusLevel\" text=\"BONUS LEVEL!\"/><string id=\"TextHintBonusLevelString\" text=\"Collect gems to get a unique trophy for your tank!\"/><string id=\"TextDownload\" text=\"Download\"/><string id=\"TextDownloadFull\" text=\"Download|Full|Version\"/><string id=\"TextPlayrix\" text=\"More||Games\"/><string id=\"TextDownloadBonus\" text=\"Try the|FULL version\"/><string id=\"TextPlay\" text=\"Play\"/><string id=\"TextDone\" text=\"Done\"/><string id=\"TextMove\" text=\"Move\"/><string id=\"TextMenu\" text=\"Menu\"/><string id=\"TextRelaxed\" text=\"Relaxed mode\"/><string id=\"TextShowHints\" text=\"Show hints\"/><string id=\"TextSound\" text=\"Sound\"/><string id=\"TextMusic\" text=\"Music\"/><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=\"TextHints\" text=\"Hints: \" text1=\"out of \"/><string id=\"TextOk\" text=\"Ok\"/><string id=\"TextYes\" text=\"Yes\"/><string id=\"TextNo\" text=\"No\"/><string id=\"TextDollar\" text=\"$\"/><string id=\"TextHelp\" text=\"How to play\" text2=\"Help\"/><string id=\"TextLevelComplete\" text=\"Level Complete!\"/><string id=\"TextLose\" text1=\"Out of time!\" text2=\"No more moves!\"/><string id=\"TextItemsBonus\" text=\"Items Found\"/><string id=\"TextHintsBonus\" text=\"Hint Bonus\"/><string id=\"TextTimeBonus\" text=\"Time Bonus\"/><string id=\"TextSpeedBonus\" text=\"Speed Bonus\"/><string id=\"TextScoreBonus\" text=\"Score Bonus\"/><string id=\"TextLevelTime\" text=\"Level Time\"/><string id=\"TextLevelMoney\" text=\"Total:\"/><string id=\"TextNotMoney\" text1=\"Not enough money!\" text2=\"Continue to play through the levels to earn money.\" y1=\"39\" y2=\"80\"/><string id=\"TextBack\" text=\"Back\"/><string id=\"TextBackToTank\" text=\"Back to Tank\"/><string id=\"TextBonusSkip\" text=\"Skip\"/><string id=\"TextBonusHint\" text=\"Hint\"/><string id=\"TextSkip\" text=\"Skip tutorial\"/><string id=\"TextNewGame2\" text=\"New Game\"/><string id=\"TextGetCoins\" text=\"Get Coins\"/><string id=\"TextBonusLevel\" text=\"Start|Bonus Levels\"/><string id=\"TextBonusLevel2\" text=\"Play Bonus|Levels\"/><string id=\"TextYourMoney\" text=\"You have\"/><string id=\"TextBonusGems\" text=\"Gems to collect\"/><string id=\"TextNewGame\" text=\"Do you really want to start a new game?\"/><string id=\"TextHintMeters1\" text=\"your tank meters\"/><string id=\"TextHintMeters2\" text=\"Fill up all the meters to 100% to earn a\"/><string id=\"TextEndBonusLevel\" text=\"Do you really want to skip the bonus level?\"/><string id=\"TextWonCup\" text=\"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.\"/><trans/><string id=\"TextSell\" text=\"Do you really want to sell it? Sell price: \"/><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=\"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=\"TextTutorialOff\" text=\"The tutorial will help you learn the basics of the game.|Do you really want to skip it?\"/><string id=\"TextNagMoney\" text=\"Total cash earned: \"/> <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=\"TextHint14\" text=\"At times gems can be|spotted in your tank|collect them|to earn some money\"/><string id=\"TextHelp1\" x=\"86\" y=\"67\" format=\"80\" text=\"Click this button to go into the view area\" frame=\"26,52,120,100\" arrow1=\"126,126,76,57,22,22\"/><string id=\"TextHelp2\" x=\"555\" y=\"280\" format=\"120\" text=\"Click this button to play the next game level\" frame=\"485,260,145,90\" arrow1=\"580,580,345,385\" arrow2=\"\"/><string id=\"TextHelp3\" x=\"315\" y=\"145\" format=\"225\" text=\"Every aquarium can earn a bronze, silver and gold cup. To earn the next cup fill up the Fish, Beauty and Comfort meters\" frame=\"190,125,250,100\" arrow1=\"435,480,480,185,185,130\"/><string id=\"TextHelp4\" x=\"385\" y=\"280\" format=\"170\" text=\"Click this button to go into the shopping area and buy all that you may need for your tank\" frame=\"290,260,190,105\" arrow1=\"380,380,333,360,435,435\" arrow2=\"\"/><string id=\"TextHelp5\" x=\"97\" y=\"280\" format=\"130\" text=\"Click on the tabs to switch between item categories\" frame=\"22,260,150,90\" arrow1=\"72,72,345,365\" arrow2=\"\"/><string id=\"TextHelp6\" x=\"405\" y=\"280\" format=\"100\" text=\"Use this button to leave the shop\" frame=\"345,260,120,90\" arrow1=\"425,425,469,345,390,390\" arrow2=\"\"/><string id=\"TextHelp7\" x=\"240\" y=\"280\" format=\"100\" text=\"Click on the button to scroll\" frame=\"180,260,120,90\" arrow1=\"195,195,157,345,417,417\" arrow2=\"275,275,444,345,417,417\"/><string id=\"TextHelp8\" x=\"555\" y=\"280\" format=\"120\" text=\"Click this button to play the next game level\" frame=\"485,260,145,90\" arrow1=\"580,580,345,378\" arrow2=\"\"/><string id=\"TextHelp9\" x=\"52\" y=\"80\" format=\"80\" text=\"Click this button to go into the view area\" frame=\"0,60,105,100\" arrow1=\"33,33,65,50\"/><string id=\"TextHelp10\" x=\"255\" y=\"80\" format=\"100\" text=\"This is score area. More you have - more you get :) Good luck!\" frame=\"190,60,140,120\" arrow1=\"265,265,65,50\"/><string id=\"TextHelp11\" x=\"450\" y=\"80\" format=\"100\" text=\"This is money panel. Destroy gold tiles to get more money!\" frame=\"380,60,140,120\" arrow1=\"435,435,65,50\"/><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=\"520\" y=\"305\" format=\"100\" text=\"Finish the level by clearing all the golden tiles before the time runs out\" frame=\"460,275,120,160\" arrow1=\"575,585,370,370\"/><string id=\"TextHelp14\" x=\"565\" y=\"170\" format=\"100\" text=\"Click this button to go to the Main Menu\" frame=\"510,150,110,90\" arrow1=\"595,595,155,48\" /><string id=\"TextHelp15\" x=\"180\" y=\"20\" format=\"80\" text=\"Click this button to go into the view area\" frame=\"120,5,120,100\" arrow1=\"125,80,15,15\"/><string id=\"TextHelp16\" x=\"80\" y=\"280\" format=\"130\" text=\"Click this button to try the free trial version of the game.\" frame=\"5,260,150,90\" arrow1=\"75,75,345,385\" arrow2=\"\"/><string id=\"TextHelp17\" x=\"223\" y=\"280\" format=\"100\" text=\"Check out other great games by Playrix.\" frame=\"163,260,120,90\" arrow1=\"185,185,345,385\"/><string id=\"Fish1\" Name=\"Yellow Tang\" idn=\"fish1\" cost=\"105\" stars=\"2\" utility=\"13\"/><string id=\"Fish2\" Name=\"Longnose Hawkfish\" idn=\"fish2\" cost=\"125\" stars=\"2\" utility=\"18\"/><string id=\"Fish3\" Name=\"Rabbitfish\" idn=\"fish4\" cost=\"150\" stars=\"3\" utility=\"21\"/><string id=\"Fish4\" Name=\"Sea Turtle\" idn=\"fish5\" cost=\"250\" stars=\"4\" utility=\"25\"/><string id=\"Fish5\" Name=\"Kaudern's Kardinal\" idn=\"fish7\" cost=\"300\" stars=\"4\" utility=\"30\"/><string id=\"Fish6\" Name=\"Zebra Pleco\" idn=\"fish12\" cost=\"350\" stars=\"4\" utility=\"43\"/><string id=\"Fish7\" Name=\"Picasso Triggerfish\" idn=\"fish25\" cost=\"400\" stars=\"5\" utility=\"65\"/><string id=\"Fish8\" Name=\"Lionfish\" idn=\"fish25\" cost=\"500\" stars=\"5\" utility=\"75\"/><string id=\"Item1\" idl=\"1\" idn=\"cnw2\" Name=\"Odonthalia Dentata\" cost=\"70\" stars=\"2\" utility=\"10\"/><string id=\"Item2\" idl=\"2\" idn=\"cnw2\" Name=\"Echinodorus Rubin\" cost=\"70\" stars=\"2\" utility=\"10\"/><string id=\"Item3\" idl=\"3\" idn=\"cnw5\" Name=\"Acetabularia\" cost=\"70\" stars=\"2\" utility=\"10\"/><string id=\"Item4\" idl=\"4\" idn=\"cnw5\" Name=\"Agarum Cribrosum\" cost=\"70\" stars=\"2\" utility=\"10\"/><string id=\"Item5\" idl=\"5\" idn=\"cnw3\" Name=\"Cryptocoryne Wendtii\" cost=\"70\" stars=\"2\" utility=\"10\"/><string id=\"Item6\" idl=\"6\" idn=\"cn06\" Name=\"Polyides Rotundus\" cost=\"70\" stars=\"2\" utility=\"10\"/><string id=\"Item7\" idl=\"7\" idn=\"cn23\" Name=\"Aponogeton Longiplumulosus\" cost=\"80\" stars=\"2\" utility=\"12\"/><string id=\"Item8\" idl=\"8\" idn=\"cn02\" Name=\"Yellow Acropora Coral\" cost=\"90\" stars=\"2\" utility=\"15\"/><string id=\"Item9\" idl=\"9\" idn=\"cn22\" Name=\"Amber Coral\" cost=\"90\" stars=\"2\" utility=\"15\"/><string id=\"Item10\" idl=\"10\" idn=\"cn21\" Name=\"Red Bush Coral\" cost=\"90\" stars=\"2\" utility=\"15\"/><string id=\"Item11\" idl=\"11\" idn=\"cn24\" Name=\"Wooden Basket\" cost=\"120\" stars=\"3\" utility=\"20\"/><string id=\"Item12\" idl=\"12\" idn=\"cn25\" Name=\"Driftwood with a Star Fish\" cost=\"130\" stars=\"3\" utility=\"22\"/><string id=\"Item13\" idl=\"13\" idn=\"cn08\" Name=\"Piece of a Brick Wall\" cost=\"140\" stars=\"3\" utility=\"25\"/><string id=\"Item14\" idl=\"14\" idn=\"cn14\" Name=\"Haystack\" cost=\"150\" stars=\"3\" utility=\"27\"/><string id=\"Item15\" idl=\"15\" idn=\"cn14\" Name=\"Yellow Sponge Corals\" cost=\"160\" stars=\"3\" utility=\"30\"/><string id=\"Item16\" idl=\"16\" idn=\"cn15\" Name=\"Watering Can\" cost=\"180\" stars=\"3\" utility=\"35\"/><string id=\"Item17\" idl=\"17\" idn=\"cn16\" Name=\"Lantern\" cost=\"200\" stars=\"3\" utility=\"40\"/><string id=\"Item18\" idl=\"18\" idn=\"cn16\" Name=\"Lawnmower\" cost=\"220\" stars=\"3\" utility=\"45\"/><string id=\"Item19\" idl=\"19\" idn=\"cn12\" Name=\"Barrel\" cost=\"235\" stars=\"3\" utility=\"50\"/><string id=\"Item20\" idl=\"20\" idn=\"cn11\" Name=\"Anvil\" cost=\"250\" stars=\"3\" utility=\"55\"/><string id=\"Item21\" idl=\"21\" idn=\"cn17\" Name=\"Saw\" cost=\"270\" stars=\"3\" utility=\"60\"/><string id=\"Item22\" idl=\"22\" idn=\"cn17\" Name=\"Kennel\" cost=\"290\" stars=\"3\" utility=\"65\"/><string id=\"Item23\" idl=\"23\" idn=\"cn17\" Name=\"Scales\" cost=\"310\" stars=\"3\" utility=\"70\"/><string id=\"Item24\" idl=\"24\" idn=\"cn20\" Name=\"Cart with Vegetables\" cost=\"330\" stars=\"3\" utility=\"75\"/><string id=\"Item25\" idl=\"25\" idn=\"cn20\" Name=\"Frog on an Outdoor Chair\" cost=\"350\" stars=\"4\" utility=\"85\"/><string id=\"Item26\" idl=\"26\" idn=\"cn20\" Name=\"Hippo\" cost=\"380\" stars=\"4\" utility=\"90\"/><string id=\"Item27\" idl=\"27\" idn=\"cn01\" Name=\"White Fence\" cost=\"420\" stars=\"4\" utility=\"100\"/><string id=\"Item28\" idl=\"28\" idn=\"cn09\" Name=\"Wooden Well\" cost=\"430\" stars=\"4\" utility=\"105\"/><string id=\"Item29\" idl=\"29\" idn=\"cn09\" Name=\"Well with a Red Roof\" cost=\"440\" stars=\"4\" utility=\"110\"/><string id=\"Item30\" idl=\"30\" idn=\"cn09\" Name=\"Scarecro\" cost=\"450\" stars=\"4\" utility=\"115\"/><string id=\"Item31\" idl=\"31\" idn=\"cn09\" Name=\"Street Lamp\" cost=\"460\" stars=\"4\" utility=\"120\"/><string id=\"Item32\" idl=\"32\" idn=\"cn09\" Name=\"Farmer's House\" cost=\"585\" stars=\"5\" utility=\"150\"/><string id=\"Item33\" idl=\"33\" idn=\"cn09\" Name=\"Stable\" cost=\"610\" stars=\"5\" utility=\"160\"/><string id=\"Item34\" idl=\"34\" idn=\"cn09\" Name=\"Farmhouse\" cost=\"620\" stars=\"5\" utility=\"170\"/><string id=\"Item35\" idl=\"35\" idn=\"cn09\" Name=\"Mill\" cost=\"640\" stars=\"5\" utility=\"180\"/><string id=\"Comfort1\" Name=\"Light\" idl=\"light\" cost=\"200\" stars=\"2\" utility=\"25\"/><string id=\"Comfort2\" Name=\"Anemone Air Pump\" idl=\"comp1\" cost=\"300\" stars=\"2\" utility=\"38\"/><string id=\"Comfort3\" Name=\"Stove Air Pump\" idl=\"comp2\" cost=\"350\" stars=\"3\" utility=\"63\"/><string id=\"Comfort4\" Name=\"Feeder\" idl=\"feeder\" cost=\"450\" stars=\"3\" utility=\"88\"/><string id=\"Comfort5\" Name=\"Filter\" idl=\"filter\" cost=\"550\" stars=\"4\" utility=\"113\"/><string id=\"Comfort6\" Name=\"Aquarium Fish Vitamins\" idl=\"medic\" cost=\"650\" stars=\"4\" utility=\"125\"/><string id=\"Comfort7\" Name=\"Heater\" idl=\"termo\" cost=\"750\" stars=\"5\" utility=\"138\"/><string id=\"Comfort8\" Name=\"Aquarium Sand\" idl=\"dno\" cost=\"850\" stars=\"5\" utility=\"163\"/></Texts>";
if (!use_api) {
var XMLLoader = (new GameClasses.LoadGameXML(this, "levelXML", "textXML", Loading));
}
var statistics_n2d = "statistics.png";
var level_money_n2d = "level_money.png";
var level_complete_n2d = "level_complete.png";
var more_playrix_games_n2d = "more_playrix_games.png";
var playrix1_active_n2d = "playrix1_active.png";
var playrix1_normal_n2d = "playrix1_normal.png";
var playrix1_pressed_n2d = "playrix1_pressed.png";
var playrix2_active_n2d = "playrix2_active.png";
var playrix2_normal_n2d = "playrix2_normal.png";
var playrix2_pressed_n2d = "playrix2_pressed.png";
var try_more_normal_n2d = "try_more_normal.png";
var try_more_active_n2d = "try_more_active.png";
var try_more_pressed_n2d = "try_more_pressed.png";
var text_nag_n2d = "text_nag.png";
var text_nag2_n2d = "text_nag2.png";
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)) || (l == "TextFont");
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 = 14;
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, MC1, MC2, MC3, MC4) {
for (var _local6 in NameA) {
if ((NameA[_local6] == "counter_s") || (NameA[_local6] == "hint_s")) {
_root[NameA[_local6]] = new GameClasses.GameSound(NameA[_local6], MC3);
} else if (((NameA[_local6] == "music_fon") || (NameA[_local6] == "music_match")) || (NameA[_local6] == "music_match2")) {
_root[NameA[_local6]] = new GameClasses.GameSound(NameA[_local6], MC2);
} else {
_root[NameA[_local6]] = new GameClasses.GameSound(NameA[_local6], MC1);
}
}
}
_root.createEmptyMovieClip("SoundsClip1", 58);
_root.createEmptyMovieClip("SoundsClip2", 59);
_root.createEmptyMovieClip("SoundsClip3", 60);
NameA = ["bell_s", "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", "music_match2"];
AddSound(NameA, _root.SoundsClip1, _root.SoundsClip2, _root.SoundsClip3);
bomb_s.setVolume(60);
}
function InitTank() {
stop_buy = 0;
not_save = false;
FunctionMusic(music_volume);
tnk = _root.attachMovie("tank", "tank", 10, {money:TOTMONEY});
if ((game_win && (((level + 1) % int(_root.BonusTime.value)) == 0)) && (current_bonus < 10)) {
tnk.init(1);
game_win = false;
} else {
tnk.init(0);
game_win = false;
}
game_match = false;
music_fon.stop();
music_match.stop();
music_match2.stop();
music_fon.start(true, 0, 99999);
}
function initGameTimer() {
onEnterFrame = function () {
GameClasses.FreeMove.updateActivePieces();
};
}
function minusGem(num, x, y, type) {
if (tnk.bonus_level) {
if (_root.NPS_LEVEL_MC) {
} else {
_root.createEmptyMovieClip("NPS_LEVEL_MC", 212);
}
nps = new GameClasses.NewParticleSystem(_root.NPS_LEVEL_MC, 25);
var _local7 = flash.display.BitmapData.loadBitmap("particles.png");
var _local3 = new flash.display.BitmapData(32, 32, true, 0);
_local3.copyPixels(_local7, new flash.geom.Rectangle(64, 0, 32, 32), new flash.geom.Point(0, 0));
nps.initTexture(_local3);
var _local6 = new GameClasses.Line(x);
var _local5 = new GameClasses.Line(y);
nps.initPath(_local6, _local5);
if (type == 1) {
var _local4 = [15192831, 15192831];
} else if (type == 2) {
var _local4 = [13232892, 13232892];
} else if (type == 3) {
var _local4 = [10550448, 10550448];
} else if (type == 4) {
var _local4 = [16690397, 16690397];
} else if (type == 5) {
var _local4 = [16449468, 16449468];
} else if (type == 6) {
var _local4 = [16772037, 16772037];
} else if (type == 7) {
var _local4 = [16758711, 16758711];
} else if (type == 8) {
var _local4 = [13612727, 13612727];
} else if (type == 9) {
var _local4 = [11198713, 11198713];
} else if (type == 10) {
var _local4 = [9502628, 9502628];
} else {
var _local4 = [16772557, 16772557];
}
nps.startZvezd(1, 1, 1, 600, null, null, new GameClasses.Spline(50, 50), new GameClasses.Spline(50, 50), null, new GameClasses.Line(100, 90, 90, 90, 90, 80, 0), _local4);
}
tnk.minusGem(num);
}
function showHintGem() {
if ((tnk.bonus_level == 0) && (first_gem)) {
first_gem = false;
timerID = setInterval(endMHa, 2000);
}
}
function endMHa() {
clearInterval(timerID);
ShowHint1(14);
}
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:640, _height:480, onPress:null, useHandCursor:false}));
}
function preHideChangePanel() {
timerChange = setInterval(GameClasses.GFunctions.create(this, hideChangePanel), 25);
}
function hideChangePanel() {
dop_panel._alpha = dop_panel._alpha - 5;
if (dop_panel._alpha < 0) {
clearInterval(timerChange);
GameClasses.GFunctions.ClearAll(dop_panel, 1, 1);
dop_panel.removeMovieClip();
ShowHint(Start_Hint);
}
}
function startMusic() {
clearInterval(timer_music);
if (Math.random() < 0.5) {
music_match.start(true, 0, 99999);
} else {
music_match2.start(true, 0, 99999);
}
}
function InitRound() {
no_show_time = false;
game_win = true;
game_match = true;
music_fon.stop();
music_match.stop();
music_match2.stop();
clearInterval(timer_music);
timer_music = setInterval(GameClasses.GFunctions.create(this, startMusic), 4000);
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());
zdn = GameField.attachMovie("zadnik", "zadnik", GameField.getD());
zdn._alpha = 0;
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());
GameField.attachMovie("rmk", "rmk", GameField.getD());
upf.help.onPress = GameClasses.GFunctions.create(this, FunctionHelp);
upf.menu_button.onLoad = function () {
this.InitText(_root.TextMenu.text, -2, -1, "GameFont", -3, 10, 1, 12, _root.FontWhite, 1000, _root.FontGreenGreen);
};
upf.menu_button.onPress = MenuMain;
if (first_game) {
dop_panel = _root.createEmptyMovieClip("game_dop", 12);
change_panel = dop_panel.attachMovie("change_panel", "change_panel", 12);
var _local7 = dop_panel.attachMovie("zadnik", "zadnik", 10, {useHandCursor:false});
var txt_relax_b = change_panel.relax_button.createEmptyMovieClip("txt_music", 2);
txt_relax_b._x = 72;
txt_relax_b._y = 21;
var txt_clock_b = change_panel.timed_button.createEmptyMovieClip("txt_music", 2);
txt_clock_b._x = 72;
txt_clock_b._y = 21;
change_panel.relax_button.onLoad = function () {
_root.TextShow(txt_relax_b, _root.TextCPanelButtonRelax.text, "gradient", -2, 12, 1, 12, 0, 1000, 0, _root.FontOrange, _root.FontYellow, 90);
};
change_panel.timed_button.onLoad = function () {
_root.TextShow(txt_clock_b, _root.TextCPanelButtonClock.text, "gradient", -2, 12, 1, 12, 0, 1000, 0, _root.FontOrange, _root.FontYellow, 90);
};
change_panel.relax_button.onPress = function () {
_root.TIME.setPassive();
HintArr[3] = 0;
preHideChangePanel();
};
change_panel.timed_button.onPress = function () {
_root.TIME.setActive();
preHideChangePanel();
};
_local7.onPress = null;
var _local3;
var _local5;
var _local4;
var _local6;
_local3 = change_panel.createEmptyMovieClip("txt_music", 26);
_local3._x = 256;
_local3._y = 264;
_root.TextShow(_local3, _root.TextCPanelRealx.text, "GameFont", -3, 13, 1, 12, _root.FontWhite, 300, FontBlue);
_local5 = change_panel.createEmptyMovieClip("txt_music", 27);
_local5._x = 425;
_local5._y = 264;
_root.TextShow(_local5, _root.TextCPanelClock.text, "GameFont", -3, 13, 1, 12, _root.FontWhite, 300, FontBlue);
_local4 = change_panel.createEmptyMovieClip("txt_music", 20);
_local4._x = 340;
_local4._y = 110;
_root.TextShow(_local4, _root.TextCPanelUp.text, "gradient", -2, 12, 1, 16, 0, 1000, 0, _root.FontOrange, _root.FontYellow, 90);
_local6 = change_panel.createEmptyMovieClip("txt_music", 29);
_local6._x = 340;
_local6._y = 326;
_root.TextShow(_local6, _root.TextCPanelDown.text, "GameFont", -3, 13, 1, 12, _root.FontWhite, 300, FontBlue);
} else {
_root.attachMovie("st_lv", "st_lv", 13, {_x:320, _y:240});
}
panel_up.button_help.onPress = MenuMain;
if (level != 0) {
HintArr[1] = 0;
}
upf.eye.onPress = GameClasses.GFunctions.create(this, MovePanel, 1);
TIME = upf.attachMovie("timer", "timer", 1111, {_x:594, _y:45});
TIME.SetTime(map[level].time * 1000);
if (!time_bool) {
TIME._visible = false;
TIME.setPassive();
}
redytoend = (Fall = false);
InitMatrix();
GlobalY = (511 - (Matrix.length * Size)) / 2;
GlobalX = (605 - (Matrix[0].length * Size)) / 2;
DrawFishFon();
DrawGameField();
DrawGameFon();
DrawGameBorder();
upf.level_name.text.text = (_root.TextLevel.text + " ") + int(level + 1);
_root.TextShow(upf.scoret, _root.TextScore.text, "GameFont", -3, 12, 2, 14, FontWhite, 300, FontBlueBlue);
_root.TextShow(upf.moneyt, _root.TextMoney.text, "GameFont", -3, 12, 2, 14, FontWhite, 300, FontBlueBlue);
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(true);
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() {
fon_pic.attachMovie("level_p1", "l", 0);
fon_pic.mov = [];
var _local4;
var _local7;
var _local5;
_local4 = random(8) + 1;
_local7 = 50 + random(400);
_local5 = 30 + random(200);
var _local6 = fon_pic.attachMovie("fish" + _local4, "fish1", 1, {_x:_local7, _y:_local5});
fon_pic.mov.push(_local6);
if (level > 0) {
_local7 = 50 + random(400);
_local5 = 50 + random(200);
_local4 = random(8) + 1;
_local6 = fon_pic.attachMovie("fish" + _local4, "fish2", 2, {_x:_local7, _y:_local5});
fon_pic.mov.push(_local6);
}
if (level > 5) {
_local7 = 50 + random(400);
_local5 = 50 + random(200);
_local4 = random(8) + 1;
_local6 = fon_pic.attachMovie("fish" + _local4, "fish2", 3, {_x:_local7, _y:_local5});
fon_pic.mov.push(_local6);
}
if (level > 10) {
_local7 = 50 + random(400);
_local5 = 50 + random(200);
_local4 = random(8) + 1;
_local6 = fon_pic.attachMovie("fish" + _local4, "fish2", 4, {_x:_local7, _y:_local5});
fon_pic.mov.push(_local6);
}
if (level > 15) {
_local7 = 50 + random(400);
_local5 = 50 + random(200);
_local4 = random(8) + 1;
_local6 = fon_pic.attachMovie("fish" + _local4, "fish2", 5, {_x:_local7, _y:_local5});
fon_pic.mov.push(_local6);
}
fon_pic.onEnterFrame = function () {
var _local3 = this.mov;
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].type == "item") {
_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;
this._visible = true;
game[FindName(_local3, _local2)]._visible = (bor[FindName(_local3, _local2)]._visible = true);
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 % 3) == 0) && (HintArr[0])) {
Start_Hint = 0;
} else if (((level % 3) == 1) && (HintArr[3])) {
Start_Hint = 3;
} else if (((level % 3) == 2) && (HintArr[7])) {
Start_Hint = 7;
}
if ((Start_Hint >= 0) && (HintArr[Start_Hint])) {
ShowHintDop(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;
if (this._alpha <= 0) {
this._visible = false;
game[FindName(_local3, _local2)]._visible = (bor[FindName(_local3, _local2)]._visible = false);
}
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)))));
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(true);
_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 _local6 = MC._currentframe;
MC.Block = false;
if (_local6 == 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 (_local6 == 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();
clearInterval(sonud_int);
sonud_int = setInterval(function () {
if ((_root.levelcomplete_s.position == 0) || (_root.levelcomplete_s.position == _root.levelcomplete_s.duration)) {
clearInterval(timer_music2);
timer_music2 = setInterval(GameClasses.GFunctions.create(this, st_music), 5000);
_root.FunctionMusic2();
_root.levelcomplete_s.start(_root.SoundOn);
} else {
clearInterval(sonud_int);
}
}, 40);
} else if (Silver < 4) {
var _local4 = 0;
while (_local4 < Matrix.length) {
var _local3 = 0;
while (_local3 < Matrix[0].length) {
if (fon[FindName(_local4, _local3)]._currentframe > 1) {
var _local5 = fon[FindName(_local4, _local3)].e.attachMovie("fon_akcent", "a", 111);
_local5.gotoAndPlay(random(20) + 80);
}
_local3++;
}
_local4++;
}
}
}
function st_music() {
clearInterval(timer_music2);
_root.FunctionMusic(music_volume);
}
function DisapRound() {
FromHint();
clearInterval(disdis);
clearInterval(showing_hint);
if (!Failed) {
STATS_MOVE.onEnterFrame = function () {
this.l._xscale = this.l._xscale + 5;
this.l._yscale = this.l._yscale + 5;
this.l._x = -200 - ((((this.l._xscale - 100) / 100) * this.l._width) / 2);
_root.zdn._alpha = _root.zdn._alpha + 15;
this.l._alpha = this.l._alpha - 15;
if (this.l._alpha <= 0) {
this.l._alpha = 0;
this._y = 70;
this.d._alpha = 100;
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() {
make_pause = game_win;
makePerehod(GameClasses.GFunctions.create(this, EndRoundDop));
}
function EndRoundDop() {
trace(level);
if (((((level + 1) < int(_root.MaxLevel.value)) && (_root.NagTime.value != "0")) && ((level % int(_root.NagTime.value)) == 0)) && (game_win)) {
ShowNag();
} else if ((level + 1) >= int(_root.MaxLevel.value)) {
end_game = true;
End_Round();
} 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 End_Round2() {
makePerehod(GameClasses.GFunctions.create(this, End_Round));
}
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, _root.FontOrange, _root.FontYellow, 90);
_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", 846);
STATS_MOVE._x = 320;
STATS_MOVE._y = 200;
if (!Failed) {
var _local3 = STATS_MOVE.createEmptyMovieClip("l", 0);
_local3._y = 40;
_local3._x = -200;
btm = flash.display.BitmapData.loadBitmap(level_complete_n2d);
_local3.attachBitmap(btm, 0);
var _local2 = STATS_MOVE.createEmptyMovieClip("d", 1);
_local2._y = -10;
_local2._x = -170;
_local2._alpha = 0;
btm = flash.display.BitmapData.loadBitmap(statistics_n2d);
_local2.attachBitmap(btm, 0);
} else {
_root.TextShow(STATS_MOVE, _root.TextLose["text" + Failed], "gradient", -2, 18, 1, 26, 0, 300, 0, _root.FontOrange, _root.FontYellow, 90);
game_win = false;
}
} 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 = 594 - _local1;
bor._alpha = (fon._alpha = (game._alpha = (fly._alpha = 100 + (_local1 * 2))));
}
function MenuMain() {
if (!redytoend) {
TIME.StopTimer();
menumain = _root.attachMovie("menumain", "menumain", 101);
if (game_match) {
current_spec_link = "MenuInMatch3";
menumain.init(2);
} else {
current_spec_link = "MenuInTank";
menumain.init(1);
}
}
}
function getSound() {
return(sound_volume);
}
function getMusic() {
return(music_volume);
}
function testSound() {
_root.button_s.start();
}
function FunctionSound(num) {
if (num < 0) {
num = 0;
}
sound_volume = num;
var _local4 = SharedObject.getLocal("FishdomFlash2");
_local4.data.sound_volume = sound_volume;
_local4.flush();
for (var _local3 in NameA) {
if (((NameA[_local3] == "music_fon") || (NameA[_local3] == "music_match")) || (NameA[_local3] == "music_match2")) {
} else if ((NameA[_local3] == "counter_s") || (NameA[_local3] == "hint_s")) {
_root[NameA[_local3]].setVolume(num * 40);
} else {
_root[NameA[_local3]].setVolume(num * 100);
}
}
}
function FunctionMusic(num) {
if (num < 0) {
num = 0;
}
music_volume = num;
var _local2 = SharedObject.getLocal("FishdomFlash2");
_local2.data.music_volume = music_volume;
_local2.flush();
music_fon.setVolume(num * 100);
music_match.setVolume(num * 100);
music_match2.setVolume(num * 100);
}
function FunctionMusic2() {
if (music_volume < 0.2) {
return(undefined);
}
music_fon.setVolume(20);
music_match.setVolume(20);
music_match2.setVolume(20);
}
function FunctionRestartLevel() {
level--;
TIME.StartTimer();
menumain.removeMovieClip();
delete menumain;
InitRound();
}
function FunctionNew() {
clearInterval(timer_music);
music_fon.stop();
music_match.stop();
music_match2.stop();
level--;
Money_ADD = 0;
game_win = false;
EndRound();
}
function FunctionMoreGames() {
_root.makePerehod(GameClasses.GFunctions.create(this, startMoreGames));
}
function startMoreGames() {
dop_panel = _root.createEmptyMovieClip("game_dop", 102);
dop_panel._alpha = 100;
_root.createEmptyMovieClip("HINT_LEVEL_MC", 202);
var _local4 = dop_panel.attachMovie("zadnik", "zadnik", 9, {useHandCursor:false});
more_games = dop_panel.attachMovie("more_games", "more_games", 10);
_local4.onPress = null;
more_games.back.onLoad = function () {
this.InitText(_root.TextBack.text, -2, -1, "GameFont", -3, 10, 1, 12, _root.FontWhite, 1000, _root.FontGreenGreen);
};
hw1 = new GameClasses.HintWindow(_root, more_games.b1, String(_root.TextMoreGames1.text));
hw1.enableHint();
hw2 = new GameClasses.HintWindow(_root, more_games.b2, String(_root.TextMoreGames2.text));
hw2.enableHint();
hw3 = new GameClasses.HintWindow(_root, more_games.b3, String(_root.TextMoreGames3.text));
hw3.enableHint();
hw4 = new GameClasses.HintWindow(_root, more_games.b4, String(_root.TextMoreGames4.text));
hw4.enableHint();
hw5 = new GameClasses.HintWindow(_root, more_games.b5, String(_root.TextMoreGames5.text));
hw5.enableHint();
hw6 = new GameClasses.HintWindow(_root, more_games.b6, String(_root.TextMoreGames6.text));
hw6.enableHint();
more_games.b1.useHandCursor = false;
more_games.b2.useHandCursor = false;
more_games.b3.useHandCursor = false;
more_games.b4.useHandCursor = false;
more_games.b5.useHandCursor = false;
more_games.b6.useHandCursor = false;
if (MoreGames.value == 2) {
more_games.b1.dopAct = function () {
getURL (_root.DownloadLinkMoreGames1.value, "_blank");
};
hw1.cursorTrue();
more_games.b2.dopAct = function () {
getURL (_root.DownloadLinkMoreGames2.value, "_blank");
};
hw2.cursorTrue();
more_games.b3.dopAct = function () {
getURL (_root.DownloadLinkMoreGames3.value, "_blank");
};
hw3.cursorTrue();
more_games.b4.dopAct = function () {
getURL (_root.DownloadLinkMoreGames4.value, "_blank");
};
hw4.cursorTrue();
more_games.b5.dopAct = function () {
getURL (_root.DownloadLinkMoreGames5.value, "_blank");
};
hw5.cursorTrue();
more_games.b6.dopAct = function () {
getURL (_root.DownloadLinkMoreGames6.value, "_blank");
};
hw6.cursorTrue();
}
btm = flash.display.BitmapData.loadBitmap(more_playrix_games_n2d);
more_games.lilo.attachBitmap(btm, 0);
more_games.back.onPress = preHideMoreGames;
if (showPlayrix.value == "true") {
more_games.zvezda._visible = true;
var _local3 = more_games.bt.attachMovie("button_big", "but", 0);
_local3.reload(try_more_normal_n2d, try_more_active_n2d, try_more_pressed_n2d);
_local3.InitFunction(GameClasses.GFunctions.create(_root, _root.FunctionDownloadDop));
} else {
more_games.zvezda._visible = false;
}
}
function preHideMoreGames() {
menumain.removeMovieClip();
delete menumain;
makePerehod(GameClasses.GFunctions.create(this, hideMoreGames));
}
function hideMoreGames() {
GameClasses.GFunctions.ClearAll(dop_panel, 1, 1);
dop_panel.removeMovieClip();
TIME.StartTimer();
hw1.clear();
hw2.clear();
hw3.clear();
hw4.clear();
hw5.clear();
hw6.clear();
}
function FunctionResume() {
TIME.StartTimer();
menumain.removeMovieClip();
delete menumain;
}
function FunctionDownloadDop() {
if (use_api) {
GameClasses.MyRealGamesApi.getInstance().download();
}
getURL (_root.DownloadLinkDop.value, "_blank");
}
function FunctionDownloadMenu() {
_root.current_spec_link = "MenuMain";
FunctionDownload();
}
function FunctionDownload() {
if (use_api) {
GameClasses.MyRealGamesApi.getInstance().download();
}
if (_root.SpecLink.value == "true") {
trace(_root.current_spec_link);
getURL ((_root.DownloadLink.value + "%2F") + _root.current_spec_link, "_blank");
} else {
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) {
trace("qdfdfdf");
clearInterval(showing_hint1);
if (first_game) {
first_game = false;
} else {
showing_hint1 = setInterval(ShowHint1, 100, N);
}
}
function ShowHintDop(N) {
clearInterval(showing_hint1);
if (first_game) {
first_game = false;
} else {
showing_hint1 = setInterval(ShowHint1, 1500, N);
}
}
function ShowHint1(N) {
if ((N == 3) && (!time_bool)) {
return(undefined);
}
if (!show_hint) {
return(undefined);
}
clearInterval(showing_hint1);
if ((((HintArr[N] && (!bl)) && (!redytoend)) && (!Fall)) || (N == 14)) {
trace("go");
HintArr[N] = 0;
GameClasses.GFunctions.ClearAll(_root.sSssS, 1, 1);
FromHint();
TIME.StopTimer();
Start_Hint = -1;
switch (N) {
case 0 :
CheckMatches(2);
var _local7 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 120, 250, FromHint);
break;
case 1 :
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;
_local7 = 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 = 586;
_local4._y = 210;
_local7 = 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;
_local7 = 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 = 29;
_local4._y = 48;
_local4._rotation = -90;
_local7 = 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;
_local7 = 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;
_local7 = 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;
_local7 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 120, _local3._y + 40, FromHint);
} else {
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;
_local7 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 150, _local3._y + 40, FromHint);
} else {
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;
_local7 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 150, _local3._y + 40, FromHint);
} else {
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;
_local7 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), _root["TextHint" + N].text, 150, _local3._y + 40, FromHint);
} else {
FromHint();
}
break;
case 14 :
var _local6 = _root.createEmptyMovieClip("sSssS", 777);
if (tnk.arr_gem.length > 0) {
var _local5 = _local6.attachMovie("green_arrow", "HA", 999);
_local5._x = ((tnk.arr_gem[tnk.arr_gem.length - 1].x + (Size / 2)) - 120) - 14;
_local5._y = (tnk.arr_gem[tnk.arr_gem.length - 1].y - 10) - 70;
_local5._rotation = 90;
}
_local7 = new GameClasses.GameHint(_local6, _root["TextHint" + N].text, 120, 50, 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() {
GameClasses.GFunctions.ClearAll(_root, 1, 1);
nag.removeMovieClip();
var nag = _root.attachMovie("nag", "nag", 400);
var _local5;
var _local4 = 1;
_root.TextShow(nag.txt2, _root.txt_nag2.text, "GameFont", -3, 27, 1, 23, _root.FontWhite, 495, 18042);
_root.TextShow(nag.txt_dop, _root.txt_nag_dop.text, "GameFont", -3, 22, 1, 20, 16438528, 300, 18042);
_root.TextShow(nag.txt33, _root.txt_nag3.text, "GameFont", -3, 14, 1, 16, 16164646, 350, 665424);
nag.b11.onLoad = function () {
this.InitText(_root.TextContinue.text, -2, 0, "GameFont", -3, 15, 1, 14, _root.FontWhite, 300, FontBlueBlue);
this.txt._y = this.txt._y - 2;
};
nag.b11.onPress = _root.End_Round2;
nag.b2.onPress = FunctionDownload;
nag.b2.onLoad = function () {
this.InitText(_root.TextDFW.text, -2, 0, "GameFont", -3, 16, 1, 14, _root.FontWhite, 300, FontGreenGreen);
this.txt._y = this.txt._y - 16;
};
var _local3 = flash.display.BitmapData.loadBitmap(text_nag_n2d);
nag.txt1.attachBitmap(_local3, 0);
_local3 = flash.display.BitmapData.loadBitmap(text_nag2_n2d);
nag.txt6.attachBitmap(_local3, 0);
if (end_game) {
current_spec_link = "FinishNug";
nag.txt1._visible = false;
nag.txt33._visible = false;
nag.txt4._x = nag.txt4._x + 7;
nag.txt4._y = nag.txt4._y - 8;
nag.txt5._x = nag.txt5._x + 5;
nag.txt5._y = nag.txt5._y - 6;
_root.TextShow(nag.txt4, _root.txt_nag4.text, "TextFont", -3.5, 21, 0, 15, 7611392, 420, 16307571);
_root.TextShow(nag.txt5, _root.txt_nag5.text, "TextFont", -3.5, 21, 0, 15, 7611392, 420, 16307571);
} else {
nag.txt5._y = nag.txt5._y + 2;
nag.txt6._visible = false;
nag.nag2._visible = false;
current_spec_link = "Nug_" + String(Math.floor(level / int(_root.NagTime.value)) + 1);
_root.TextShow(nag.txt4, _root.txt_nag41.text, "TextFont", -3.5, 21, 0, 15, 7611392, 420, 16307571);
_root.TextShow(nag.txt5, _root.txt_nag51.text, "TextFont", -3.5, 21, 0, 15, 7611392, 420, 16307571);
nag.txt2._visible = false;
nag.txt_dop._visible = false;
}
}
function FunctionHelp() {
TIME.StopTimer();
N = int(N);
var _local2 = this.createEmptyMovieClip("help", 345);
var _local3 = new GameClasses.BitmapHelp(_local2, "game", _local2);
}
function Restart_All() {
if (use_api) {
GameClasses.MyRealGamesApi.getInstance().gameEnd(TOTPOINTS, level, "restart");
}
not_save = true;
DepthArr = [];
Comfort = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
Indic = [0, 0, 0, 0, 0];
HintArr = [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1];
TOTPOINTS = (Money_ADD = 0);
TOTMONEY = 200;
level = -1;
TankPos = "menu";
KUBOKN = 0;
Matrix = null;
New__Game = true;
SkipTutor = false;
game_win = false;
first_game = true;
first_gem = true;
current_bonus = 1;
end_game = false;
use_bonus = false;
first_finish_panel = true;
_root.MaxLevel.value = 20;
if (bonus_num_buy != -1) {
bonus_num_buy = 3;
}
ResetTank();
End_Round2();
}
function FunctionNewGame() {
var _local2 = new GameClasses.GameHintYellow(_root.createEmptyMovieClip("sSssS", 777), TextNewGame.text, 195, 150, GameClasses.GFunctions.create(_root, Restart_All), FromHint);
}
function endBL() {
var _local2 = new GameClasses.GameHintYellow(_root.createEmptyMovieClip("sSssS", 777), TextEndBonusLevel.text, 207, 150, GameClasses.GFunctions.create(tnk, tnk.endBonusLevel), FromHint);
}
function showNagPerhod() {
makePerehod(ShowNag);
}
function showFinishPanel() {
game_win = false;
dop_panel = _root.createEmptyMovieClip("game_dop", 12);
dop_panel._alpha = 0;
finish_panel = dop_panel.attachMovie("finish_panel", "finish_panel", 12);
var _local3 = dop_panel.attachMovie("zadnik", "zadnik", 10, {useHandCursor:false});
_local3.onPress = null;
finish_panel._x = 140;
finish_panel._y = 70;
current_spec_link = "EndWindow";
_root.TextShow(finish_panel.txt1, _root.txt_finish1.text, "GameFont", -3, 14, 1, 25, 13397774, 320, 16040289);
_root.TextShow(finish_panel.txt2, _root.txt_finish2.text, "GameFont", -3, 17, 1, 17, 13397774, 320, FontYellowYellow);
_root.TextShow(finish_panel.txt3, _root.txt_finish3.text, "GameFont", -3, 13, 1, 13, 25520, 320, FontWhite);
finish_panel.button_back.onLoad = function () {
this.InitText(_root.TextBack.text, -2, 0, "GameFont", -3, 15, 1, 22, _root.FontWhite, 300, FontBlueBlue);
this.txt._y = this.txt._y - 10;
};
if (first_finish_panel) {
first_finish_panel = false;
finish_panel.button_back.onPress = GameClasses.GFunctions.create(this, showNagPerhod);
} else {
finish_panel.button_back.onPress = GameClasses.GFunctions.create(this, preHideFinishPanel);
}
finish_panel.button_download.onLoad = function () {
this.InitText(_root.TextDownloadBonus.text, -2, 0, "GameFont", -3, 14, 1, 14, _root.FontWhite, 300, FontGreenGreen);
this.txt._y = this.txt._y - 10;
};
finish_panel.button_download.onPress = function () {
FunctionDownload();
};
clearInterval(timerFinish);
timerFinish = setInterval(GameClasses.GFunctions.create(this, showFinish), 20);
if (use_api) {
GameClasses.MyRealGamesApi.getInstance().gameEnd(TOTPOINTS, level, "win");
}
}
function showBonusPanel() {
dop_panel = _root.createEmptyMovieClip("game_dop", 12);
dop_panel._alpha = 0;
bonus_panel = dop_panel.attachMovie("bonus_panel", "bonus_panel", 12);
var _local3 = dop_panel.attachMovie("zadnik", "zadnik", 10, {useHandCursor:false});
_local3.onPress = null;
bonus_panel._x = 130;
bonus_panel._y = 70;
show_mail = false;
current_spec_link = "BonusPanel";
_root.TextShow(bonus_panel.txt1, _root.txt_finish1.text, "GameFont", -3, 14, 1, 25, 13397774, 320, 16040289);
_root.TextShow(bonus_panel.txt2, _root.txt_finish2.text, "GameFont", -3, 17, 1, 17, 13397774, 320, FontYellowYellow);
bonus_panel.button_back.onPress = GameClasses.GFunctions.create(this, preHideBonusPanel);
bonus_panel.button_download.onLoad = function () {
this.InitText(_root.TextDownloadBonus.text, -2, 0, "GameFont", -3, 14, 1, 14, _root.FontWhite, 300, FontGreenGreen);
this.txt._y = this.txt._y - 10;
};
bonus_panel.button_download.onPress = function () {
FunctionDownload();
};
bonus_panel.button_bonus.onLoad = function () {
this.InitText(_root.TextBonusLevel2.text, -2, 0, "GameFont", -3, 14, 1, 14, _root.FontWhite, 300, FontBlueBlue);
this.txt._y = this.txt._y - 10;
};
bonus_panel.button_bonus.onPress = function () {
show_mail = true;
preHideBonusPanel();
};
clearInterval(timerFinish);
timerFinish = setInterval(GameClasses.GFunctions.create(this, showFinish), 20);
}
function showMailPanel() {
dop_panel = _root.createEmptyMovieClip("game_dop", 12);
dop_panel._alpha = 0;
mail_panel = dop_panel.attachMovie("email_panel", "email_panel", 12);
var _local4 = dop_panel.attachMovie("zadnik", "zadnik", 10, {useHandCursor:false});
_local4.onPress = null;
mail_panel._x = 130;
mail_panel._y = 70;
show_mail = false;
current_spec_link = "MenuMailWindow";
_root.TextShow(mail_panel.txt1, _root.txt_mail1.text, "GameFont", -3, 17, 1, 14, 13397774, 320, 16040289);
_root.TextShow(mail_panel.txt2, _root.txt_mail2.text, "GameFont", -3, 17, 1, 16, 13397774, 320, FontYellowYellow);
mail_panel.button_back.onLoad = function () {
this.InitText(_root.TextBack.text, -2, 0, "GameFont", -3, 15, 1, 20, _root.FontWhite, 300, FontBlueBlue);
this.txt._y = this.txt._y - 8;
};
mail_panel.button_back.onPress = GameClasses.GFunctions.create(this, preHideFinishPanel);
mail_panel.button_bonus.onLoad = function () {
this.InitText(_root.TextBonusLevel.text, -2, 0, "GameFont", -3, 14, 1, 14, _root.FontWhite, 300, FontGreenGreen);
this.txt._y = this.txt._y - 10;
};
mail_panel.email.text = _root.your_mail.text;
mail_panel.email.onSetFocus = function () {
if ((this.text == _root.your_mail.text) || (this.text == _root.valid_mail.text)) {
this.text = "";
}
};
mail_panel.button_bonus.onPress = function () {
if (_root.corectMail(mail_panel.email.text)) {
var _local2 = new LoadVars();
_local2.action = "subscribe";
_local2.list = "flash-levels";
_local2.confirm = "true";
_local2.email = mail_panel.email.text;
_local2.sendAndLoad("http://www.playrix.com/data/phplist.php", _local2, "GET");
end_game = false;
tnk.play_but.InitFunction(GameClasses.GFunctions.create(tnk, tnk.InitRound));
_root.MaxLevel.value = 30;
use_bonus = true;
preHideFinishPanel();
} else {
mail_panel.email.text = _root.valid_mail.text;
}
};
mail_panel.email.setFocus();
clearInterval(timerFinish);
timerFinish = setInterval(GameClasses.GFunctions.create(this, showFinish), 20);
}
function corectMail(str) {
if (str.indexOf("@") == -1) {
return(false);
}
if (str.indexOf(".") == -1) {
return(false);
}
if (str.indexOf(" ") != -1) {
return(false);
}
return(true);
}
function preHideBonusPanel() {
clearInterval(timerFinish);
timerFinish = setInterval(GameClasses.GFunctions.create(this, HideBonusPanel), 30);
}
function HideBonusPanel() {
dop_panel._alpha = dop_panel._alpha - 5;
if (dop_panel._alpha < 0) {
dop_panel._alpha = 0;
clearInterval(timerFinish);
GameClasses.GFunctions.ClearAll(dop_panel, 1, 1);
}
if (show_mail) {
showMailPanel();
}
}
function preHideFinishPanel() {
clearInterval(timerFinish);
timerFinish = setInterval(GameClasses.GFunctions.create(this, HideFinishPanel), 30);
}
function HideFinishPanel() {
dop_panel._alpha = dop_panel._alpha - 15;
if (dop_panel._alpha < 0) {
dop_panel._alpha = 0;
clearInterval(timerFinish);
GameClasses.GFunctions.ClearAll(dop_panel, 1, 1);
}
}
function showFinish() {
dop_panel._alpha = dop_panel._alpha + 15;
if (dop_panel._alpha > 100) {
dop_panel._alpha = 100;
clearInterval(timerFinish);
}
}
function startParticleHint() {
if (tnk.arr_gem.length > 0) {
_root.tnk.panel_bonus_top.button_hint.deactive();
_root.tnk.panel_bonus_top.msk_hnt._x = line_move_hint.getPoint(0);
_root.createEmptyMovieClip("NPS_LEVEL_MC", 212);
nps = new GameClasses.NewParticleSystem(_root.NPS_LEVEL_MC, 30);
var _local8 = flash.display.BitmapData.loadBitmap("bubble1.png");
nps.initTexture(_local8);
rnd = Math.random() * tnk.arr_gem.length;
var _local4 = (469 + tnk.arr_gem[Math.floor(rnd)].x) / 2;
var _local5 = ((20 + tnk.arr_gem[Math.floor(rnd)].y) - 5) / 2;
var _local3;
if (Math.random() < 0.5) {
_local3 = 20;
} else {
_local3 = 80;
}
if (Math.random() < 0.5) {
_local4 = _local4 + _local3;
} else {
_local4 = _local4 - _local3;
}
if (Math.random() < 0.5) {
_local3 = 20;
} else {
_local3 = 80;
}
if (Math.random() < 0.5) {
_local5 = _local5 + _local3;
}
var _local7 = new GameClasses.Spline(469, _local4, tnk.arr_gem[Math.floor(rnd)].x);
var _local6 = new GameClasses.Spline(20, _local5, tnk.arr_gem[Math.floor(rnd)].y - 5);
nps.initPath(_local7, _local6);
nps.startPuzirik(1, 1, 25, 1500, null, null, new GameClasses.Spline(0, 70, 80, 70), new GameClasses.Spline(0, 70, 80, 70), null, new GameClasses.Line(100, 80, 80, 0));
periodic_effect_obj = new Object();
periodic_effect_obj.mov = new GameClasses.FreeMove();
periodic_effect_obj.mov.updateAct = null;
periodic_effect_obj.mov.endAct = GameClasses.GFunctions.create(this, krugi);
periodic_effect_obj.mov.newInitMove(periodic_effect_obj, 750, 0);
move_hint = new Object();
move_hint.mov = new GameClasses.FreeMove();
move_hint.mov.updateAct = GameClasses.GFunctions.create(this, updHint);
move_hint.mov.endAct = GameClasses.GFunctions.create(this, endHint);
move_hint.mov.newInitMove(move_hint, 15000, 0);
}
}
function updHint() {
_root.tnk.panel_bonus_top.msk_hnt._x = line_move_hint.getPoint(move_hint.mov.t);
}
function endHint() {
_root.tnk.panel_bonus_top.msk_hnt._x = line_move_hint.getPoint(1);
_root.tnk.panel_bonus_top.button_hint.active();
}
function krugi() {
nps = new GameClasses.NewParticleSystem(_root.NPS_LEVEL_MC, 5);
var _local5 = flash.display.BitmapData.loadBitmap("particles.png");
var _local2 = new flash.display.BitmapData(32, 32, true, 0);
_local2.copyPixels(_local5, new flash.geom.Rectangle(96, 64, 32, 32), new flash.geom.Point(0, 0));
nps.initTexture(_local2);
var _local4 = new GameClasses.Line(tnk.arr_gem[Math.floor(rnd)].x);
var _local3 = new GameClasses.Line(tnk.arr_gem[Math.floor(rnd)].y - 5);
nps.initPath(_local4, _local3);
nps.startPS(1, 1, 120, 600, null, null, new GameClasses.Spline(0, 300), new GameClasses.Spline(0, 300), null, new GameClasses.Line(60, 40, 40, 0));
}
function makePerehod(fnc) {
if (go_perehod) {
return(undefined);
}
go_perehod = true;
perehod_panel = _root.createEmptyMovieClip("perehod_panel", 999);
perehod_panel.attachMovie("fon_perehoda", "fon_perehoda", 10);
perehod_panel._alpha = 0;
perehod_panel._visible = true;
perehod_func = fnc;
perehodID = setInterval(updBeginPerehod, 20);
}
function updBeginPerehod() {
perehod_panel._alpha = perehod_panel._alpha + 8;
if (perehod_panel._alpha > 100) {
perehod_panel._alpha = 100;
clearInterval(perehodID);
perehodID = setInterval(seredina, 200);
}
}
function seredina() {
clearInterval(perehodID);
if (use_api && (make_pause)) {
make_pause = false;
GameClasses.MyRealGamesApi.getInstance().__set__gameContinueCapt(GameClasses.GFunctions.create(this, posleSeredinu));
GameClasses.MyRealGamesApi.getInstance().gameBreak();
} else {
perehod_func();
perehodID = setInterval(updEndPerehod, 20);
}
}
function posleSeredinu() {
perehod_func();
perehodID = setInterval(updEndPerehod, 20);
}
function updEndPerehod() {
perehod_panel._alpha = perehod_panel._alpha - 8;
if (perehod_panel._alpha < 0) {
perehod_panel._alpha = 0;
perehod_panel._visible = false;
clearInterval(perehodID);
go_perehod = false;
GameClasses.GFunctions.ClearAll(perehod_panel, 1, 1);
}
}
function startBleski() {
nps = new GameClasses.NewParticleSystem(tnk.indicators.effect, 13);
var _local7 = flash.display.BitmapData.loadBitmap("particles.png");
var _local1 = new flash.display.BitmapData(32, 32, true, 0);
_local1.copyPixels(_local7, new flash.geom.Rectangle(32, 64, 32, 32), new flash.geom.Point(0, 0));
nps.initTexture(_local1);
var _local5 = new GameClasses.Line(0);
var _local3 = new GameClasses.Line(0);
nps.initPath(_local5, _local3);
nps.startKrastulka(1, 1, 200, 1400, null, null, new GameClasses.Spline(100, 110), new GameClasses.Spline(100, 110), new GameClasses.Line(0, 60), new GameClasses.Line(80, 70, 60, 0), [16449468, 16449468]);
nps2 = new GameClasses.NewParticleSystem(tnk.indicators.effect, 13);
var _local2 = flash.display.BitmapData.loadBitmap("particles.png");
var _local8 = new flash.display.BitmapData(32, 32, true, 0);
sbmp2.copyPixels(_local2, new flash.geom.Rectangle(32, 64, 32, 32), new flash.geom.Point(0, 0));
nps2.initTexture(sbmp2);
var _local6 = new GameClasses.Line(0);
var _local4 = new GameClasses.Line(0);
nps2.initPath(_local6, _local4);
nps2.startKrastulka(1, 1, 200, 1400, null, null, new GameClasses.Spline(100, 110), new GameClasses.Spline(100, 110), new GameClasses.Line(0, 60), new GameClasses.Line(80, 70, 60, 0), [16449468, 16449468]);
}
function startSalut() {
clearInterval(id_salut);
id_salut = setInterval(GameClasses.GFunctions.create(this, this.startRaketa1), 200);
}
function endSalut() {
clearInterval(id_salut);
}
function startRaketa1() {
if (Math.random() < 0.5) {
startRaketa2();
}
if (Math.random() < 0.5) {
startRaketa2();
}
}
function startRaketa2() {
_root.createEmptyMovieClip("NPS_LEVEL_MC", 212);
nps = new GameClasses.NewParticleSystem(_root.NPS_LEVEL_MC, 25);
var _local6 = flash.display.BitmapData.loadBitmap("particles.png");
var _local3 = new flash.display.BitmapData(32, 32, true, 0);
_local3.copyPixels(_local6, new flash.geom.Rectangle(64, 0, 32, 32), new flash.geom.Point(0, 0));
nps.initTexture(_local3);
x1 = -30 + (Math.random() * 700);
x2 = (x1 - 40) + (Math.random() * 80);
if (x2 > 610) {
x2 = 610;
}
if (x2 < 30) {
x2 = 30;
}
y1 = 490 + (Math.random() * 40);
y2 = 100 + (Math.random() * 200);
var _local5 = new GameClasses.Spline(x1, x2);
var _local4 = new GameClasses.Spline(y1, y2);
nps.initPath(_local5, _local4);
nps.startPuzirik(1, 1, 25, 1500, null, null, new GameClasses.Spline(0, 70, 80, 70), new GameClasses.Spline(0, 70, 80, 70), null, new GameClasses.Line(100, 80, 80, 0));
periodic_vzruv = new Object();
periodic_vzruv.mov = new GameClasses.FreeMove();
periodic_vzruv.mov.updateAct = null;
periodic_vzruv.mov.endAct = GameClasses.GFunctions.create(this, startVzruv, x2, y2);
periodic_vzruv.mov.newInitMove(periodic_effect_obj, 750, 0);
}
function startVzruv(x, y) {
trace("BOOM");
}
function showLastHint() {
if (tnk.Kubok >= 3) {
return(undefined);
}
var _local3 = tnk.indicators.shnt.attachMovie("tultip", "tultip", 0);
_local3.createEmptyMovieClip("grad", 10);
_local3.createEmptyMovieClip("fish1", 11);
_local3.createEmptyMovieClip("fish2", 12);
_local3.createEmptyMovieClip("beat1", 13);
_local3.createEmptyMovieClip("beat2", 14);
_local3.createEmptyMovieClip("comf1", 15);
_local3.createEmptyMovieClip("comf2", 16);
_local3.createEmptyMovieClip("text1", 17);
_local3.grad._x = 100;
_local3.grad._y = 20;
_local3.grad.attachMovie("grad_shop1", "grad_shop1", 0);
_local3.grad.grad_shop1.text.text = _root.TextHintMeters1.text;
_local3.fish1._x = 40;
_local3.fish1._y = 50;
_local3.fish2._x = 160;
_local3.fish2._y = 50;
_local3.beat1._x = 40;
_local3.beat1._y = 67;
_local3.beat2._x = 160;
_local3.beat2._y = 67;
_local3.comf1._x = 40;
_local3.comf1._y = 84;
_local3.comf2._x = 160;
_local3.comf2._y = 84;
_local3.text1._x = 97;
_local3.text1._y = 110;
_root.TextShow(_local3.fish1, _root.TextFishes.text, "TextFont", -3, 20, 0, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
_root.TextShow(_local3.beat1, _root.TextBeauty.text, "TextFont", -3, 20, 0, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
_root.TextShow(_local3.comf1, _root.TextComfort.text, "TextFont", -3, 20, 0, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
if (Math.round(Math.min(100, Math.max(0, ((tnk.Indic[1] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) == 0) {
_root.TextShow(_local3.fish2, Math.round(Math.min(100, Math.max(0, ((tnk.Indic[1] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) + "%", "TextFont", -3, 20, 2, 14, FontRed, 1000, _root.FontBlueBlue);
} else if (Math.round(Math.min(100, Math.max(0, ((tnk.Indic[1] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) == 100) {
_root.TextShow(_local3.fish2, Math.round(Math.min(100, Math.max(0, ((tnk.Indic[1] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) + "%", "TextFont", -3, 20, 2, 14, FontGreen2, 1000, _root.FontBlueBlue);
} else {
_root.TextShow(_local3.fish2, Math.round(Math.min(100, Math.max(0, ((tnk.Indic[1] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) + "%", "TextFont", -3, 20, 2, 14, FontWhite, 1000, _root.FontBlueBlue);
}
if (Math.round(Math.min(100, Math.max(0, ((tnk.Indic[2] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) == 0) {
_root.TextShow(_local3.beat2, Math.round(Math.min(100, Math.max(0, ((tnk.Indic[2] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) + "%", "TextFont", -3, 20, 2, 14, FontRed, 1000, _root.FontBlueBlue);
} else if (Math.round(Math.min(100, Math.max(0, ((tnk.Indic[2] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) == 100) {
_root.TextShow(_local3.beat2, Math.round(Math.min(100, Math.max(0, ((tnk.Indic[2] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) + "%", "TextFont", -3, 20, 2, 14, FontGreen2, 1000, _root.FontBlueBlue);
} else {
_root.TextShow(_local3.beat2, Math.round(Math.min(100, Math.max(0, ((tnk.Indic[2] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) + "%", "TextFont", -3, 20, 2, 14, FontWhite, 1000, _root.FontBlueBlue);
}
if (Math.round(Math.min(100, Math.max(0, ((tnk.Indic[3] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) == 0) {
_root.TextShow(_local3.comf2, Math.round(Math.min(100, Math.max(0, ((tnk.Indic[3] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) + "%", "TextFont", -3, 20, 2, 14, FontRed, 1000, _root.FontBlueBlue);
} else if (Math.round(Math.min(100, Math.max(0, ((tnk.Indic[3] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) == 100) {
_root.TextShow(_local3.comf2, Math.round(Math.min(100, Math.max(0, ((tnk.Indic[3] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) + "%", "TextFont", -3, 20, 2, 14, FontGreen2, 1000, _root.FontBlueBlue);
} else {
_root.TextShow(_local3.comf2, Math.round(Math.min(100, Math.max(0, ((tnk.Indic[3] - tnk.CurrK()) * 100) / (tnk.NextK() - tnk.CurrK())))) + "%", "TextFont", -3, 20, 2, 14, FontWhite, 1000, _root.FontBlueBlue);
}
_root.TextShow(_local3.text1, (_root.TextHintMeters2.text + " ") + _root.TextWonCup["c" + String(tnk.Kubok + 1)], "TextFont", -3, 15, 1, 14, _root.FontWhite, 155, _root.FontBlueBlue);
tnk.indicators.shnt._alpha = 0;
clearInterval(id_show_last_hint);
id_show_last_hint = setInterval(GameClasses.GFunctions.create(this, showLH), 10);
}
function showLH() {
tnk.indicators.shnt._alpha = tnk.indicators.shnt._alpha + 10;
if (tnk.indicators.shnt._alpha >= 100) {
tnk.indicators.shnt._alpha = 100;
clearInterval(id_show_last_hint);
}
}
function hideLastHint() {
clearInterval(id_show_last_hint);
id_show_last_hint = setInterval(GameClasses.GFunctions.create(this, hideLH), 10);
}
function hideLH() {
tnk.indicators.shnt._alpha = tnk.indicators.shnt._alpha - 10;
if (tnk.indicators.shnt._alpha <= 0) {
clearInterval(id_show_last_hint);
GameClasses.GFunctions.ClearAll(tnk.indicators.shnt, 1, 1);
}
}
function showGoldPanel() {
dop_panel = _root.createEmptyMovieClip("game_dop", 12);
dop_panel._alpha = 0;
gold_panel = dop_panel.attachMovie("gold_panel", "gold_panel", 12);
var _local4 = dop_panel.attachMovie("zadnik", "zadnik", 10, {useHandCursor:false});
_local4.onPress = null;
gold_panel._x = 130;
gold_panel._y = 70;
trace(answer);
_root.TextShow(gold_panel.txt2, _root.txt_gold1.text, "GameFont", -3, 30, 1, 16, 13397774, 320, 16040289);
gold_panel.button_back.onLoad = function () {
this.InitText(_root.TextBack.text, -2, 0, "GameFont", -3, 15, 1, 18, _root.FontWhite, 300, FontBlueBlue);
this.txt._y = this.txt._y - 6;
};
gold_panel.button_back.onPress = function () {
bonus_num_buy = 3;
preHideFinishPanel();
};
gold_panel.button_bonus.onLoad = function () {
this.InitText(_root.TextGetCoins.text, -2, 0, "GameFont", -3, 15, 1, 18, _root.FontWhite, 300, FontGreenGreen);
this.txt._y = this.txt._y - 6;
};
gold_panel.email.text = _root.your_mail.text;
gold_panel.email.onSetFocus = function () {
if ((this.text == _root.your_mail.text) || (this.text == _root.valid_mail.text)) {
this.text = "";
}
};
gold_panel.button_bonus.onPress = function () {
if (corectMail(gold_panel.email.text)) {
var _local2 = new LoadVars();
_local2.action = "subscribe";
_local2.list = "flash-money";
_local2.confirm = "true";
_local2.email = gold_panel.email.text;
_local2.sendAndLoad("http://www.playrix.com/data/phplist.php", _local2, "GET");
bonus_num_buy = -1;
tnk.MONEY.Add(1000);
preHideFinishPanel();
} else {
gold_panel.email.text = _root.valid_mail.text;
}
};
clearInterval(timerFinish);
timerFinish = setInterval(GameClasses.GFunctions.create(this, showFinish), 20);
}
stop();
stop();
Stage.scaleMode = "noScale";
fscommand ("trappallkeys", "true");
_root.attachMovie("black", "root_black", 0, {_width:640, _height:480, _alpha:0});
_root.setMask(root_black);
MovieClip.prototype.getD = getNextHighestDepth;
var FontWhite = 16777215;
var FontGreenGreen = 26163;
var FontGreen = 26163;
var FontGreen2 = 61440;
var FontBlueBlue = 86921;
var FontBlue = 157149;
var FontRed = 16527982;
var FontBrown = 8934690;
var FontBrownBrown = 10110993;
var FontOrange = 16414618;
var FontYellow = 16776960;
var FontYellowYellow = 16705094;
var notBlock = true;
var SoundOn = true;
var stop_buy = 0;
var Matrix;
var go_perehod = false;
var timer_music;
var not_save = false;
var GlobalX = 0;
var GlobalY = 0;
var Size = 34;
var current_spec_link;
var id_show_last_hint;
var make_pause = false;
var Step = 10;
var bonus_num_buy = 3;
var first_finish_panel = true;
var TankPos = "menu";
var SwapTime = 200;
var FallPauseTime = 100;
var FallTime = 200;
var FallTimeLong = 200;
var FallTimeShort = 100;
var swapping = false;
var matches = 0;
var pos_hint = 185;
var pos_hint_y = 140;
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 = 200;
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 sound_volume = 0.65;
var music_volume = 0.5;
var NameA;
var game_match = false;
var game_win = false;
var tnk;
var dop_panel;
var change_panel;
var finish_panel;
var bonus_panel;
var mail_panel;
var gold_panel;
var end_panel;
var zdn;
var perehod_panel;
var perehod_func;
var more_games;
var current_bonus = 1;
var first_game = true;
var first_gem = true;
var can_load_game = true;
var hw1;
var hw2;
var hw3;
var hw4;
var hw5;
var hw6;
var nps;
var periodic_effect_obj;
var periodic_vzruv;
var timerFinish;
var timerChange;
var answer;
var move_hint;
var count_gem = 10;
var rnd;
var line_move_hint = (new GameClasses.Line(374, 439));
var SkipTutor;
var get_new_fish = false;
var show_hint = true;
var timerID;
var perehodID;
var end_game = false;
var time_bool = true;
var timer_music2;
var use_bonus = false;
var show_mail = false;
var no_show_time = false;
var id_salut;
var num_fish_my = 0;
initGameTimer();
oKey = {};
oKey.onKeyDown = function () {
if (Key.getCode() == 87) {
var _local3 = 0;
while (_local3 < Matrix.length) {
var _local4 = "";
var _local2 = 0;
while (_local2 < Matrix[0].length) {
if (Matrix[_local3][_local2] == 0) {
_local4 = _local4 + "0";
} else {
_local4 = _local4 + GetTile(_local3, _local2).Name.substr(5, 1);
}
_local2++;
}
_local3++;
}
}
if (Key.getCode() == 68) {
if (Key.isDown(35)) {
Silver = 1;
Gold = 0;
Decrease(2);
}
}
if (_root.cheat.value == "true") {
if ((Key.getCode() == String("e").charCodeAt(0)) || (Key.getCode() == String("E").charCodeAt(0))) {
EndRound();
}
}
};
Key.addListener(oKey);
InitSound();
var SO = SharedObject.getLocal("FishdomFlash2");
if (SO.data.music_volume != null) {
music_volume = SO.data.music_volume;
sound_volume = SO.data.sound_volume;
}
FunctionMusic(music_volume);
FunctionSound(sound_volume);
InitTank();
Symbol 7 MovieClip [button_restart] Frame 1
#initclip 78
Object.registerClass("button_restart", GameClasses.GameButton);
#endinitclip
stop();
Symbol 23 MovieClip [item25] Frame 1
#initclip 70
Object.registerClass("item25", GameClasses.ItemTank);
#endinitclip
mc.R = random(5000);
mc.onEnterFrame = function () {
var _local3 = 10000;
var _local5 = ((getTimer() + this.R) % _local3) / _local3;
var _local2 = 6000;
var _local4 = ((getTimer() + this.R) % _local2) / _local2;
this.mc1._rotation = (-Math.sin((Math.PI*2) * ((_local5 + 0.9) % 1))) * 15;
this.mc2._rotation = (-Math.sin((Math.PI*2) * ((_local4 + 0.3) % 1))) * 30;
};
Symbol 37 MovieClip [button_timed] Frame 1
#initclip 71
Object.registerClass("button_timed", GameClasses.GameButton);
#endinitclip
stop();
Symbol 44 MovieClip [button_relax] Frame 1
#initclip 72
Object.registerClass("button_relax", GameClasses.GameButton);
#endinitclip
stop();
Symbol 82 MovieClip [item34] Frame 1
#initclip 73
Object.registerClass("item34", GameClasses.ItemTank);
#endinitclip
mc.R = random(5000);
mc.onEnterFrame = function () {
var _local3 = 15000;
var _local2 = ((getTimer() + this.R) % _local3) / _local3;
if (_local2 < 0.2) {
_local2 = _local2 * 5;
this._xscale = Math.sin(((Math.PI*2) * _local2) + (Math.PI/2)) * 100;
} else if ((_local2 > 0.6) && (_local2 < 0.8)) {
_local2 = _local2 - 0.6;
_local2 = _local2 * 5;
this._xscale = Math.abs(Math.sin((Math.PI * _local2) + (Math.PI/2)) * 100);
}
};
Symbol 87 MovieClip [item15] Frame 1
#initclip 74
Object.registerClass("item15", GameClasses.ItemTank);
#endinitclip
Symbol 92 MovieClip [item18] Frame 1
#initclip 75
Object.registerClass("item18", GameClasses.ItemTank);
#endinitclip
Symbol 97 MovieClip [item4] Frame 1
#initclip 76
Object.registerClass("item4", GameClasses.ItemTank);
#endinitclip
Symbol 105 MovieClip [item22] Frame 1
#initclip 77
Object.registerClass("item22", GameClasses.ItemTank);
#endinitclip
mc.R = random(5000);
mc.onEnterFrame = function () {
var _local3 = 25000;
var _local2 = ((getTimer() + this.R) % _local3) / _local3;
if (_local2 > 0.2) {
} else {
_local2 = _local2 * 5;
if (Math.sin(25.1327412287183 * _local2) < 0) {
this._rotation = Math.sin(25.1327412287183 * _local2) * 30;
} else {
this._rotation = Math.sin(25.1327412287183 * _local2) * 15;
}
}
};
Symbol 112 MovieClip [e-mail_btn_action] Frame 9
stop();
Symbol 112 MovieClip [e-mail_btn_action] Frame 16
stop();
Symbol 2498 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 _local6 in mc) {
var _local4;
_local4.length;
if ((((((((((typeof(mc[_local6]) == "movieclip") && (String(mc).split(".").length < String(mc[_local6]).split(".").length)) && (_local6 != "root_black")) && (_local6 != "SoundsClip1")) && (_local6 != "SoundsClip2")) && (_local6 != "SoundsClip3")) && (_local6 != "SoundsClip4")) && (_local6 != "perehod_panel")) && (_local6 != "download_spec")) && (!((((_local6.charAt(_local6.length - 4) == "_") && (_local6.charAt(_local6.length - 3) == "n")) && (_local6.charAt(_local6.length - 2) == "2")) && (_local6.charAt(_local6.length - 1) == "d")))) {
ClearAll(mc[_local6], M, I);
if (M) {
mc[_local6].DELETE();
mc[_local6].removeMovieClip();
}
}
if (I) {
delete mc[_local6].onEnterFrame;
clearInterval(mc[_local6]);
}
}
if ((M && (!III)) && (mc != _root)) {
mc.removeMovieClip();
}
}
}
Symbol 2499 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(_root[levelPath]);
initcountXML(LEVELxml);
TEXTxml = new XML(_root[textPath]);
initTEXTXML(TEXTxml);
}
function initcountXML(ThisXML) {
var _local8 = ThisXML.firstChild;
if (_local8 != undefined) {
MCRoot.loadbar._visible = true;
var _local5 = _local8.childNodes;
MCRoot.map = new Array(_local5.length);
var _local4 = 0;
while (_local4 < _local5.length) {
var _local3 = new Array();
_local3.name = _local5[_local4].attributes.id;
_local3.time = _local5[_local4].attributes.time;
_local3.chips = _local5[_local4].attributes.chips.toString().split("");
_local3.art = _local5[_local4].attributes.artefact_begin;
_local3.bonus = _local5[_local4].attributes.bonusLevel;
var _local6 = _local5[_local4].childNodes;
_local3.L = new Array(_local6.length);
var _local2 = 0;
while (_local2 < _local6.length) {
var _local7 = _local6[_local2].firstChild.toString().split("");
_local3.L[_local2] = _local7;
_local2++;
}
MCRoot.map[_local4] = _local3;
_local4++;
}
if (!(--XMLCount)) {
Loading();
}
} else {
Text();
}
}
function initTEXTXML(ThisXML) {
MCRoot.Dialogs = new Array();
var _local11 = ThisXML.firstChild;
if (_local11 != undefined) {
var _local4 = _local11.childNodes;
var _local2 = 0;
while (_local2 < _local4.length) {
if (_local4[_local2].nodeName == "text") {
var _local8 = "";
var _local10 = _local4[_local2].attributes.id;
var _local9 = _local4[_local2].childNodes;
var _local6 = 0;
while (_local6 < _local9.length) {
_local8 = _local8 + (_local9[_local6].attributes.text + "|");
_local6++;
}
_local8 = _local8.substr(0, -1);
MCRoot[_local10] = _local8;
} else if (_local4[_local2].nodeName == "string") {
var _local7 = (MCRoot[_local4[_local2].attributes.id] = {});
for (var _local10 in _local4[_local2].attributes) {
_local7[_local10] = _local4[_local2].attributes[_local10];
}
} else if (_local4[_local2].nodeName == "menu_buttons") {
MCRoot.menu_buttons = new Array();
var _local5 = _local4[_local2].childNodes;
var _local3 = 0;
while (_local3 < _local5.length) {
var _local7 = {};
for (var _local10 in _local5[_local3].attributes) {
_local7[_local10] = _local5[_local3].attributes[_local10];
}
MCRoot.menu_buttons.push(_local7);
_local3++;
}
}
_local2++;
}
if (!(--XMLCount)) {
Loading();
}
} else {
Text();
}
}
function Text() {
MCRoot.KB.text = "Could not find game files";
}
var XMLCount = 2;
}
Symbol 2500 MovieClip [__Packages.GameClasses.MyRealGamesApi] Frame 0
class GameClasses.MyRealGamesApi
{
static var instance;
var _gameBegin, _swfReadyHand, __get__swfReadyHand, __get__gameBegin;
function MyRealGamesApi () {
if (!allow_create) {
throw new Error("use getInstance");
}
}
static function getInstance() {
if (!instance) {
allow_create = true;
instance = new GameClasses.MyRealGamesApi();
allow_create = false;
}
return(instance);
}
function Init(root) {
com.real.games.datagathering.game.RGGameConnectionAS2.initialize(root);
com.real.games.datagathering.game.RGGameConnectionAS2.addListener(com.real.games.datagathering.game.RGGameEventAS2.SWFREADY, GameClasses.GFunctions.create(this, swfReadyCapture), false, true);
com.real.games.datagathering.game.RGGameConnectionAS2.addListener(com.real.games.datagathering.game.RGGameEventAS2.GAMECONTINUE, GameClasses.GFunctions.create(this, gameContinue));
}
function gameContinue(e) {
if (_gameContinueCapt != null) {
_gameContinueCapt();
}
}
function gameReady() {
com.real.games.datagathering.game.RGGameConnectionAS2.addListener(com.real.games.datagathering.game.RGGameEventAS2.GAMEBEGIN, GameClasses.GFunctions.create(this, gameBeginCapture), false, true);
com.real.games.datagathering.game.RGGameConnectionAS2.fireEvent(com.real.games.datagathering.game.RGGameEventAS2.GAMEREADY);
}
function gameBreak() {
com.real.games.datagathering.game.RGGameConnectionAS2.fireEvent(com.real.games.datagathering.game.RGGameEventAS2.GAMEBREAK);
}
function gameEnd(score, level, mes) {
com.real.games.datagathering.game.RGGameConnectionAS2.fireEvent(com.real.games.datagathering.game.RGGameEventAS2.GAMEEND, {score:score, level:level, outcome:mes});
}
function download() {
com.real.games.datagathering.game.RGGameConnectionAS2.fireEvent(com.real.games.datagathering.game.RGGameEventAS2.GAMEDOWNLOAD);
}
function gameBeginCapture(e) {
trace("Game Has gameBeginHandler - start game");
trace(_gameBegin);
_gameBegin();
}
function swfReadyCapture(e) {
trace("Game Has swfReadyHandler - start load");
_swfReadyHand();
}
function get flVars() {
return(com.real.games.datagathering.game.RGGameConnectionAS2.getFlashVars());
}
function set swfReadyHand(value) {
_swfReadyHand = value;
trace(_swfReadyHand);
//return(__get__swfReadyHand());
}
function set gameBegin(value) {
_gameBegin = value;
//return(__get__gameBegin());
}
function get gameContinueCapt() {
return(_gameContinueCapt);
}
function set gameContinueCapt(value) {
_gameContinueCapt = value;
//return(gameContinueCapt);
}
static var allow_create = false;
var _gameContinueCapt = null;
}
Symbol 2501 MovieClip [__Packages.com.real.games.datagathering.game.RGGameConnectionAS2] Frame 0
class com.real.games.datagathering.game.RGGameConnectionAS2
{
static var _timeKeeper, _fireEventQueue, _eventListeners, _timeoutTimer2, _gamereference, _timeoutTimer, _swfbridge, _flashvars;
var dispatchEvent;
function RGGameConnectionAS2 () {
_timeKeeper = new com.hagane.MHU.Timer();
trace(((("=== " + className) + " ") + version) + " ===");
mx.events.EventDispatcher.initialize(this);
_fireEventQueue = new Array();
_eventListeners = new Array();
buildUniqueConnection();
_timeoutTimer2 = setInterval(mx.utils.Delegate.create(this, onCheckLoadedTimer), 1000);
}
function onCheckLoadedTimer() {
if (_gamereference.getBytesLoaded() != _gamereference.getBytesTotal()) {
} else {
clearInterval(_timeoutTimer2);
if (!_connected) {
_timeoutTimer = _timeKeeper.intervalCall(1000 * _timeOutSeconds, 1, mx.utils.Delegate.create(this, onTimeout));
}
}
}
static function initialize(gamereference) {
if (gamereference) {
_gamereference = gamereference;
}
init();
}
static function init() {
getInstance();
}
static function getInstance() {
if (_instance == null) {
_instance = new com.real.games.datagathering.game.RGGameConnectionAS2();
}
return(_instance);
}
static function addListener(name, callback, scope, once) {
if (!once) {
once = false;
}
if (!_instance) {
init();
}
var _local3 = (removeListener(name, true) ? "(existing listener removed first)" : "");
var _local1 = mx.utils.Delegate.create(scope, callback);
trace((((((((className + ": added eventlistener[name: ") + name) + " callback:") + callback) + " once: ") + once) + "] ") + _local3);
_eventListeners.push({name:name, callback:_local1, scope:scope, once:once});
_instance.addEventListener(name, _local1);
}
function buildUniqueConnection() {
_swfbridge = new com.gskinner.utils.SWFBridgeAS2(_lcName, this);
}
function setConnectionID(new_lcName) {
mx.events.EventDispatcher.initialize(this);
_lcName = new_lcName;
_swfbridge.close();
_swfbridge = null;
createUniqueConnection();
}
function createUniqueConnection() {
_swfbridge = new com.gskinner.utils.SWFBridgeAS2(_lcName, this);
_swfbridge.addEventListener("connect", mx.utils.Delegate.create(this, onConnect));
}
function onConnect(event) {
_connected = true;
_timeKeeper.clearIntervalCall(_timeoutTimer);
trace(((className + ": ready! (") + _lcName) + ")");
_swfbridge.send("gameReady");
emptyQueue();
}
function emptyQueue() {
if (_fireEventQueue.length != 0) {
var _local1 = 0;
while (_local1 < _fireEventQueue.length) {
fireEvent(_fireEventQueue[_local1].eventName, _fireEventQueue[_local1].params);
_local1++;
}
}
_fireEventQueue = new Array();
}
function getEvent(eventName, params) {
trace((className + ": received event: ") + eventName);
handleEvents(new com.real.games.datagathering.game.RGGameEventAS2(com.real.games.datagathering.game.RGGameEventAS2.TOGAME, eventName, params));
}
function handleEvents(event) {
if (!(event.eventName === com.real.games.datagathering.game.RGGameEventAS2.SWFREADY)) {
} else {
_flashvars = event.params;
}
dispatchEvent({type:event.eventName, eventName:event.eventName, params:event.params});
removeListener(event.eventName, true);
}
static function removeListener(name, once) {
var _local1 = false;
for (var _local4 in _eventListeners) {
if ((_eventListeners[_local4].name == name) && (_eventListeners[_local4].once == once)) {
getInstance().removeEventListener(_eventListeners[_local4].name, _eventListeners[_local4].callback);
_local1 = true;
_eventListeners.splice(_local4, 1);
}
}
return(_local1);
}
static function getFlashVars(asString) {
if (!_instance) {
init();
}
if (asString) {
var _local1 = "";
for (var _local2 in _flashvars) {
_local1 = _local1 + (((_local2 + " : ") + _flashvars[_local2]) + "<br>");
}
return(_local1);
}
return(_flashvars);
}
static function fireEvent(eventName, params) {
if (!_instance) {
init();
}
if (_swfbridge.__get__connected()) {
trace((className + ": fired event: ") + eventName);
_swfbridge.send("getEvent", eventName, params);
} else {
trace(((className + ": connection not ready, ") + eventName) + " added to the queue");
_fireEventQueue.push(new com.real.games.datagathering.game.RGGameEventAS2(com.real.games.datagathering.game.RGGameEventAS2.FROMGAME, eventName, params));
}
if (!_enabled) {
respondToEvent(eventName, params);
}
}
static function respondToEvent(eventName, params) {
switch (eventName) {
case "INIT" :
_global.setTimeout(_instance, "getEvent", _autoRespondTimeout, com.real.games.datagathering.game.RGGameEventAS2.SWFREADY, params);
break;
case com.real.games.datagathering.game.RGGameEventAS2.GAMEREADY :
_global.setTimeout(_instance, "getEvent", _autoRespondTimeout, com.real.games.datagathering.game.RGGameEventAS2.GAMEBEGIN, params);
break;
case com.real.games.datagathering.game.RGGameEventAS2.GAMEBREAK :
_global.setTimeout(_instance, "getEvent", _autoRespondTimeout, com.real.games.datagathering.game.RGGameEventAS2.GAMECONTINUE, params);
}
}
function onTimeout() {
trace(className + ": timeout reached, autoresponding to events!");
_timeKeeper.clearIntervalCall(_timeoutTimer);
_enabled = false;
_connected = false;
respondToEvent("INIT", null);
}
function bypassListeners() {
for (var _local1 in _eventListeners) {
getInstance().removeEventListener(_eventListeners[_local1].name, _eventListeners[_local1].callback);
mx.utils.Delegate.create(_eventListeners[_local1].scope, _eventListeners[_local1].callback).call();
}
_eventListeners.splice(0, _eventListeners.length);
}
static function isEnabled() {
return(_enabled);
}
static var version = "1.0.0";
static var className = "RGGameConnectionAS2";
var _lcName = "firstConnName";
static var _instance = null;
static var _enabled = true;
static var _connected = false;
static var _autoRespondTimeout = 2000;
static var _timeOutSeconds = 2;
static var debug = false;
}
Symbol 2502 MovieClip [__Packages.com.gskinner.utils.SWFBridgeAS2] Frame 0
class com.gskinner.utils.SWFBridgeAS2
{
var baseID, lc, clientObj, host, myID, extID, dispatchEvent;
function SWFBridgeAS2 (p_id, p_clientObj) {
mx.events.EventDispatcher.initialize(this);
baseID = p_id.split(":").join("");
lc = new LocalConnection();
var _this = this;
lc.com_gskinner_utils_SWFBridge_init = function () {
_this.com_gskinner_utils_SWFBridge_init();
};
lc.com_gskinner_utils_SWFBridge_receive = function () {
_this.com_gskinner_utils_SWFBridge_receive.apply(_this, arguments);
};
clientObj = p_clientObj;
host = lc.connect(baseID + "_host");
myID = baseID + (host ? "_host" : "_guest");
extID = baseID + (host ? "_guest" : "_host");
if (!host) {
lc.connect(myID);
lc.send(extID, "com_gskinner_utils_SWFBridge_init");
}
}
function close() {
lc.close();
delete clientObj;
delete lc;
_connected = false;
}
function send() {
if (!_connected) {
return(undefined);
}
var _local3 = arguments.slice(0);
_local3.unshift("com_gskinner_utils_SWFBridge_receive");
_local3.unshift(extID);
lc.send.apply(lc, _local3);
}
function get id() {
return(baseID);
}
function get connected() {
return(_connected);
}
function com_gskinner_utils_SWFBridge_receive() {
var _local3 = arguments.slice(0);
var _local4 = String(_local3.shift());
clientObj[_local4].apply(clientObj, _local3);
}
function com_gskinner_utils_SWFBridge_init() {
if (host) {
lc.send(extID, "com_gskinner_utils_SWFBridge_init");
}
_connected = true;
dispatchEvent({type:"connect"});
}
var _connected = false;
}
Symbol 2503 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 2504 MovieClip [__Packages.com.hagane.MHU.Timer] Frame 0
class com.hagane.MHU.Timer
{
var __mcTimer, __currTimer;
function Timer (mcTimer) {
if (mcTimer == undefined) {
__mcTimer = _root.createEmptyMovieClip("timer", DEPTH_DEFAULT);
} else {
__mcTimer = mcTimer;
}
__currTimer = 1;
}
function intervalCall(time, repeat, callFunc) {
var $class = this;
var _local5 = __mcTimer.createEmptyMovieClip("timer_" + __currTimer, __currTimer);
_local5.tempTime = getTimer();
_local5.currRepeat = __currTimer;
_local5.args = new Array();
_local5.time = time;
_local5.repeat = repeat;
_local5.number = __currTimer;
_local5.func = callFunc;
$class.__currTimer++;
var _local3 = 3;
while (_local3 < arguments.length) {
var _local4 = arguments[_local3];
_local5.args.push(_local4);
_local3++;
}
_local5.onEnterFrame = function () {
var _local2 = getTimer() - this.tempTime;
if (_local2 >= this.time) {
if ((this.repeat == -1) || (this.currRepeat < this.repeat)) {
this.currRepeat++;
this.tempTime = getTimer();
this.func.apply(null, this.args);
} else if ((this.repeat == 0) || (this.currRepeat == this.repeat)) {
this.func.apply(null, this.args);
$class.__destroyTimer(this.number);
}
}
};
return(_local5.currRepeat);
}
function clearIntervalCall(id) {
__destroyTimer(id);
}
function __destroyTimer(number) {
var _local2 = __mcTimer["timer_" + number];
delete _local2.onEnterFrame;
removeMovieClip(_local2);
}
static var DEPTH_DEFAULT = 32760;
}
Symbol 2505 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 2506 MovieClip [__Packages.com.real.games.datagathering.game.RGGameEventAS2] Frame 0
class com.real.games.datagathering.game.RGGameEventAS2
{
var params, eventName, type;
function RGGameEventAS2 (type, eventName, params) {
this.params = params;
this.eventName = eventName;
}
function clone() {
return(new com.real.games.datagathering.game.RGGameEventAS2(type, eventName, params));
}
function toString() {
return("GameEventtypeeventName");
}
static var FROMGAME = "from_gamedata";
static var TOGAME = "to_gamedata";
static var LOADBROADCAST = "LOADBROADCAST";
static var GAMEREADY = "GAMEREADY";
static var GAMESTART = "GAMESTART";
static var GAMEMUTE = "GAMEMUTE";
static var GAMEBREAK = "GAMEBREAK";
static var GAMEEND = "GAMEEND";
static var GAMEDOWNLOAD = "GAMEDOWNLOAD";
static var SWFREADY = "SWFREADY";
static var GAMEBEGIN = "GAMEBEGIN";
static var GAMEPAUSE = "GAMEPAUSE";
static var GAMECONTINUE = "GAMECONTINUE";
}
Symbol 2507 MovieClip [__Packages.GameClasses.ItemTank] Frame 0
class GameClasses.ItemTank extends MovieClip
{
var tank, _parent, BlueColor, item, DefaultColor, onPress, onMouseUp, _xscale, Stx, _x, Sty, _y, krest, pred_x, pred_y, Nomer, removeMovieClip, onEnterFrame, razn_x, razn_y, time_tr, now_time, spline_x, spline_y, getDepth, _name, LibName, _visible, 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 (tank.bonus_level) {
return(undefined);
}
if (!N) {
N = 1;
}
if (Rot != N) {
Rot = N;
_xscale = _xscale * -1;
}
}
function MoveLi() {
return(Math.max(Math.abs(_x - Stx), Math.abs(_y - Sty)));
}
function SSMove() {
if (tank.buy_compform) {
return(undefined);
}
if (!krest) {
pred_x = _x;
pred_y = _y;
}
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.ConfermSell2(_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;
delete onEnterFrame;
var _local3 = Math.abs(pred_x - _x);
var _local2 = Math.abs(pred_y - _y);
razn_x = (20 * _local3) / Math.sqrt((_local3 * _local3) + (_local2 * _local2));
razn_y = (20 * _local2) / Math.sqrt((_local3 * _local3) + (_local2 * _local2));
time_tr = Math.sqrt((_local3 * _local3) + (_local2 * _local2)) / 600;
now_time = getTimer();
spline_x = new Spline(_x, pred_x);
spline_y = new Spline(_y, pred_y);
krest.removeMovieClip();
onEnterFrame = MoveSpec;
}
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_text", "tt", 97, {_x:_root._xmouse, _y:_root._ymouse - 20});
_root.TextShow(_local5.t1, ("+" + _root.TextDollar.text) + Math.abs(_local3), "gradient", -3, 20, 1, 20, 0, 1000, 0, _root.FontOrange, _root.FontYellow, 90);
tank.MONEY.Add(_local3);
tank.Indicators(2, _local6);
StopMove(Nomer);
removeMovieClip();
}
function StartMove() {
WasMove = false;
Stx = _x;
Sty = _y;
tank.sellbutton.top.gotoAndStop("open");
var _local5 = getDepth();
var _local4 = true;
var _local3 = 0;
while (_local3 < tank.DepthArr.length) {
if (tank.DepthArr[_local3].Depth == _local5) {
tank.DepthArr.splice(_local3, 1);
_local4 = false;
break;
}
_local3++;
}
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;
if ((tank.bonus_level != 0) || (!_root.SkipTutor)) {
var _local4 = [];
} else {
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 _local5 = _root["Item" + Nomer];
var _local8 = -_local5.cost;
var _local12 = Number(_local5.utility);
tank.MONEY.Add(_local8);
tank.Indicators(2, _local12);
tank.AttachNos();
var _local11 = _root.attachMovie("fly_text", "tt", 97, {_x:_root._xmouse, _y:_root._ymouse - 20});
_root.TextShow(_local11.t1, ("-" + _root.TextDollar.text) + Math.abs(_local8), "gradient", -3, 20, 1, 20, 0, 1000, 0, _root.FontOrange, _root.FontYellow, 90);
_root.buy_s.start(_root.SoundOn);
tank.InitMessage(9);
}
fromShop = false;
tank.active = (active = false);
delete onEnterFrame;
if (c == undefined) {
var _local5 = {};
_local5.Name = _name;
_local5.type = "item";
_local5.POS = Nomer;
_local5.LibName = LibName;
_local5.x = int(_x);
_local5.y = int(_y);
_local5.Rot = Rot;
_local5.Depth = getDepth();
tank.DepthArr.push(_local5);
} else {
_name = "delitem" + c;
tank.NItems--;
var _local4 = tank.tank["item" + tank.NItems];
_local4._name = "item" + c;
var _local3 = 0;
while (_local3 < tank.DepthArr.length) {
if (tank.DepthArr[_local3].Depth == _local4.getDepth()) {
tank.DepthArr[_local3].Name = _local4._name;
break;
}
_local3++;
}
}
var _local9 = MoveLi();
var _local7 = ((tank.PanelPosition == "menu") ? (tank.menupanel) : (tank.panel_down));
if ((_local9 > 5) || ((_local7._y == _local7.dir2) && (tank.panel_up._y == tank.panel_up.dir1))) {
var _local6;
if (tank.bonus_level != 0) {
_local6 = [];
} else {
_local6 = [tank.sellbutton];
}
if (tank.panel_up._y == tank.panel_up.dir1) {
_local6.push(_local7, tank.panel_play);
}
tank.MovePanel(_local6, [-1, -1, -1], 300);
tank.sellbutton.gotoAndStop(1);
tank.SaveTank();
} else if (_local9 < 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 = tank.sellbutton.attachMovie(LibName, "fff", 11, {_alpha:0});
_local6._xscale = (_local6._yscale = (50 / _local6._width) * 80);
_local6.onEnterFrame = function () {
this._alpha = 100;
this._x = _root._xmouse - this.tank.sellbutton._x;
this._y = (_root._ymouse + 10) - this.tank.sellbutton._y;
};
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();
scale = int(60 + ((40 * (_y - upline)) / (downline - upline)));
var _local7 = CopyColor(DefaultColor);
var _local5 = int((1000 * (_y - upline)) / (downline - upline));
do {
var _local4 = true;
var _local3 = 0;
while (_local3 < tank.DepthArr.length) {
if (tank.DepthArr[_local3].Depth == _local5) {
_local4 = false;
_local5++;
break;
}
_local3++;
}
} while (!_local4);
swapDepths(_local5);
_local7.rb = _local7.rb - (Math.pow((1000 - _local5) / 1000, 2) * 75);
_local7.gb = _local7.gb - (Math.pow((1000 - _local5) / 1000, 2) * 30);
_local7.bb = _local7.bb + (Math.pow((1000 - _local5) / 1000, 2) * 37);
BlueColor.setTransform(_local7);
}
_xscale = (_yscale = scale);
_xscale = _xscale * Rot;
}
}
function MoveSpec() {
if ((!WasMove) && (MoveLi() > 5)) {
MovePanels();
}
if (sxp == 0) {
if (((getTimer() - now_time) / 1000) > time_tr) {
_x = pred_x;
_y = pred_y;
SSMove1();
return(undefined);
}
trace(time_tr);
trace("vs");
trace(getTimer() - now_time);
_x = spline_x.getPoint(((getTimer() - now_time) / 1000) / time_tr);
_y = spline_y.getPoint(((getTimer() - now_time) / 1000) / time_tr);
if (tank.sellbutton.hit.hitTest(_root._xmouse, _root._ymouse, false) && (active)) {
_visible = false;
if (!wasatsell) {
var _local6 = tank.sellbutton.attachMovie(LibName, "fff", 11, {_alpha:0});
_local6._xscale = (_local6._yscale = (50 / _local6._width) * 80);
_local6.onEnterFrame = function () {
this._alpha = 100;
this._x = _root._xmouse - this.tank.sellbutton._x;
this._y = (_root._ymouse + 10) - this.tank.sellbutton._y;
};
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))) {
} else {
krest.removeMovieClip();
scale = int(60 + ((40 * (_y - upline)) / (downline - upline)));
var _local7 = CopyColor(DefaultColor);
var _local5 = int((1000 * (_y - upline)) / (downline - upline));
do {
var _local4 = true;
var _local3 = 0;
while (_local3 < tank.DepthArr.length) {
if (tank.DepthArr[_local3].Depth == _local5) {
_local4 = false;
_local5++;
break;
}
_local3++;
}
} while (!_local4);
swapDepths(_local5);
_local7.rb = _local7.rb - (Math.pow((1000 - _local5) / 1000, 2) * 75);
_local7.gb = _local7.gb - (Math.pow((1000 - _local5) / 1000, 2) * 30);
_local7.bb = _local7.bb + (Math.pow((1000 - _local5) / 1000, 2) * 37);
BlueColor.setTransform(_local7);
}
_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 = 246;
var downline = 467;
var blue = 0;
var type = "item";
var fromShop = false;
var up_timer = 0;
var WasMove = false;
var Rot = 1;
}
Symbol 2508 MovieClip [__Packages.Spline] Frame 0
class 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 2509 MovieClip [__Packages.GameClasses.GameButton] Frame 0
class GameClasses.GameButton extends MovieClip
{
var _totalframes, _name, gotoAndStop, _x, _width, _y, _height, txt, createEmptyMovieClip, onRollOut, onRollOver, onReleaseOutside, onPress, onRelease, nor, act, pr;
function GameButton () {
super();
InitButton(this);
if (_totalframes > 5) {
_name = "FSound";
}
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, qq, qqq) {
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;
}
}
if (H == null) {
}
if (qq == null) {
qq = 1000;
}
if (qqq == null) {
}
var _local3 = _width;
_root.TextShow(txt, T, l, W, H, C, WT, HT, qq, qqq);
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.loaded) {
this.gotoAndStop("a");
} else {
this.act._visible = true;
this.nor._visible = false;
this.pr._visible = false;
}
};
B.onRollOut = function () {
if (!this.loaded) {
this.gotoAndStop("n");
} else {
this.act._visible = false;
this.nor._visible = true;
this.pr._visible = false;
}
};
B.onReleaseOutside = function () {
if (!this.loaded) {
this.gotoAndStop("n");
} else {
this.act._visible = false;
this.nor._visible = true;
this.pr._visible = false;
}
this.txt._alpha = 100;
this.txt._y = this.txt._y - 1;
};
B.onPress = function () {
this.dopAct();
_root.button_s.start(_root.SoundOn);
if (!this.loaded) {
this.gotoAndStop("p");
} else {
this.act._visible = false;
this.nor._visible = false;
this.pr._visible = true;
}
this.txt._y = this.txt._y + 1;
this.txt._alpha = 70;
};
B.onRelease = function () {
this.F();
if (!this.loaded) {
this.gotoAndStop("a");
} else {
this.act._visible = true;
this.nor._visible = false;
this.pr._visible = false;
}
this.txt._alpha = 100;
this.txt._y = this.txt._y - 1;
};
}
function active() {
onRollOut();
onRollOver = function () {
this.gotoAndStop("a");
};
onRollOut = function () {
this.gotoAndStop("n");
};
onReleaseOutside = function () {
this.gotoAndStop("n");
this.txt._alpha = 100;
this.txt._y = this.txt._y - 1;
};
onPress = function () {
this.dopAct();
_root.button_s.start(_root.SoundOn);
this.gotoAndStop("p");
this.txt._y = this.txt._y + 1;
this.txt._alpha = 70;
};
onRelease = function () {
this.F();
this.gotoAndStop("a");
this.txt._alpha = 100;
this.txt._y = this.txt._y - 1;
};
onRollOut();
}
function deactive() {
onRollOut();
delete onRollOver;
delete onRollOut;
delete onReleaseOutside;
delete onPress;
delete onRelease;
}
function reload(nor_mc, act_mc, pr_mc) {
nor = createEmptyMovieClip("nor", 100);
act = createEmptyMovieClip("act", 101);
pr = createEmptyMovieClip("pr", 102);
var _local2;
_local2 = flash.display.BitmapData.loadBitmap(nor_mc);
nor.attachBitmap(_local2, 0);
_local2 = flash.display.BitmapData.loadBitmap(act_mc);
act.attachBitmap(_local2, 0);
_local2 = flash.display.BitmapData.loadBitmap(pr_mc);
pr.attachBitmap(_local2, 0);
loaded = true;
nor._visible = true;
act._visible = false;
pr._visible = false;
}
function plus(t) {
nor._x = nor._x + t;
nor._y = nor._y + t;
act._x = act._x + t;
act._y = act._y + t;
pr._x = pr._x + t;
pr._y = pr._y + t;
}
var T = "O";
var F = null;
var dopAct = null;
var sx = -2;
var sy = -3;
var loaded = false;
}
Symbol 2510 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, turn, getDepth, hitTest, _xscale, _yscale, swapDepths, _name, LibName, timer_del, createEmptyMovieClip, dw, up, removeMovieClip;
function Fish () {
super();
if (!spec_fish) {
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) {
MC1 = fish.nos.attachMovie("fish_wish", "h", 0);
if ((_currentframe == 2) || (_currentframe == 4)) {
MC1._xscale = -100;
} else {
MC1._xscale = 100;
}
MC1.gotoAndPlay(F);
var _local4 = MC1.e.attachMovie(ID, "h", 0);
if (_local4.bl) {
var _local7 = 70 / _local4.bl._width;
var _local6 = 50 / _local4.bl._height;
var _local5 = Math.min(_local7, _local6);
_local4._xscale = 100 * _local5;
_local4._yscale = 100 * _local5;
_local4._x = ((-_local4.bl._width) / 4) - 5;
_local4._y = ((-_local4.bl._height) / 4) - 5;
} else {
var _local7 = 70 / _local4._width;
var _local6 = 50 / _local4._height;
var _local5 = Math.min(_local7, _local6);
_local4._xscale = 100 * _local5;
_local4._yscale = 100 * _local5;
_local4._x = (-_local4._width) / 2;
_local4._y = (-_local4._height) / 2;
}
MC1.ID = ID;
} else {
var MC1 = fish.nos.attachMovie("hearts", "h", 0);
MC1.TTT = getTimer();
var _local2 = 1;
while (_local2 < 6) {
var _local3 = MC1["h" + _local2];
_local3._rotation = 25 * ((2 * Math.random()) - 1);
_local3.gotoAndPlay(random(35));
_local2++;
}
}
MC1.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 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++;
GetYsp();
}
function AddFish() {
if (random(2) == 1) {
dir = "left";
}
StartMove();
}
function StartMove() {
TurnTime = (getTimer() + 3000) + random(7000);
GetY();
turn = false;
Depths = int(random(500) + 500);
position = 1;
if (speed <= 3) {
speed = random(3) + 1;
} else if (speed > 6) {
speed = speed - 3;
} else {
speed = 3;
}
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;
tank.SaveTank();
}
function GetY() {
y = ((2 * Math.random()) - 1) / 4;
if (_y < 20) {
y = 0.5 + ((Math.random() * 2) / 3);
} else if (_y > 307) {
y = -0.5 - ((Math.random() * 2) / 3);
}
var _local2 = ((dir == "left") ? -1 : 1);
}
function GetYsp() {
if (_y < 190) {
y = 1 + (2 * Math.random());
} else {
y = -1 - (2 * Math.random());
}
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 _local5 = (Math.atan2(_y - yp, _x - xp) * 180) / Math.PI;
if (_local5 > 90) {
_local5 = _local5 - 180;
if (!active) {
_local5 = Math.min(0, _local5);
}
} else if (_local5 < -90) {
_local5 = _local5 + 180;
if (!active) {
_local5 = Math.max(0, _local5);
}
}
var _local9 = _rotation;
var _local8 = _local5 / 3;
if (_local8 > (_local9 + 2)) {
_local8 = _local9 + 2;
}
if (_local8 < (_local9 - 2)) {
_local8 = _local9 - 2;
}
_rotation = _local8;
xp = _x;
yp = _y;
}
if (speed <= 3) {
if ((((((getTimer() > TurnTime) || ((_x < 60) && (_local7 < 0))) || ((_x > (border_right - 60)) && (_local7 > 0))) || ((_y < 20) && (y < 0))) || ((_y > 307) && (y > 0))) && (!fish_del)) {
Turn();
} else if (Math.abs(Depths - getDepth()) > 10) {
var _local3 = getDepth();
var _local4 = int((Depths - _local3) / 20);
var _local6 = true;
var _local2 = 0;
while (_local2 < tank.DepthArr.length) {
if (((tank.DepthArr[_local2].Depth > Math.min(_local3, _local3 + _local4)) && (tank.DepthArr[_local2].Depth < Math.max(_local3, _local3 + _local4))) && (hitTest(tank.tank[tank.DepthArr[_local2].Name]))) {
_local6 = false;
break;
}
_local2++;
}
if (_local6) {
_local3 = SwapFishDepth(_local3, _local3 + _local4);
_xscale = (_yscale = (_local3 + 1000) / 20);
var _local10 = CopyColor(DefaultColor);
_local10.rb = _local10.rb - (Math.pow((1000 - _local3) / 1000, 2) * 150);
_local10.gb = _local10.gb - (Math.pow((1000 - _local3) / 1000, 2) * 60);
_local10.bb = _local10.bb + (Math.pow((1000 - _local3) / 1000, 2) * 75);
BlueColor.setTransform(_local10);
}
}
} else if (((_x < -50) && (_local7 < 0)) || ((_x > (border_right + 50)) && (_local7 > 0))) {
Turn();
} else if (Math.abs(Depths - getDepth()) > 10) {
var _local3 = getDepth();
var _local4 = int((Depths - _local3) / 20);
var _local6 = true;
var _local2 = 0;
while (_local2 < tank.DepthArr.length) {
if (((tank.DepthArr[_local2].Depth > Math.min(_local3, _local3 + _local4)) && (tank.DepthArr[_local2].Depth < Math.max(_local3, _local3 + _local4))) && (hitTest(tank.tank[tank.DepthArr[_local2].Name]))) {
_local6 = false;
break;
}
_local2++;
}
if (_local6) {
_local3 = SwapFishDepth(_local3, _local3 + _local4);
_xscale = (_yscale = (_local3 + 1000) / 20);
var _local10 = CopyColor(DefaultColor);
_local10.rb = _local10.rb - (Math.pow((1000 - _local3) / 1000, 2) * 150);
_local10.gb = _local10.gb - (Math.pow((1000 - _local3) / 1000, 2) * 60);
_local10.bb = _local10.bb + (Math.pow((1000 - _local3) / 1000, 2) * 75);
BlueColor.setTransform(_local10);
}
}
}
function Diam(x1, x2, y1, y2) {
return(Math.sqrt(((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2))));
}
function Turn() {
turn = true;
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) {
var _local2 = 0;
while (_local2 < tank.DepthArr.length) {
if (tank.DepthArr[_local2].Depth == D1) {
tank.DepthArr.splice(_local2, 1);
break;
}
_local2++;
}
var _local4 = true;
while (true) {
_local2 = 0;
while (_local2 < tank.DepthArr.length) {
if (tank.DepthArr[_local2].Depth == D2) {
D2++;
_local4 = false;
break;
}
_local2++;
}
if (_local4) {
break;
}
_local4 = true;
}
swapDepths(D2);
var _local5 = {};
_local5.Name = _name;
_local5.type = "fish";
_local5.LibName = LibName;
_local5.x = int(_x);
_local5.y = int(_y);
_local5.Depth = D2;
tank.DepthArr.push(_local5);
return(D2);
}
function DelFish(t) {
clearInterval(timer_del);
if (turn) {
timer_del = setInterval(GameClasses.GFunctions.create(this, DelFish, t), 1000);
return(undefined);
}
_root.stop_buy++;
fish_del = true;
_root.sell_s.start(_root.SoundOn);
clearInterval(moving);
var _local5 = createEmptyMovieClip("dw", 0);
var _local6 = 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);
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) {
var _local3 = 0;
while (_local3 < tank.DepthArr.length) {
if (tank.DepthArr[_local3].Depth == getDepth()) {
tank.DepthArr.splice(_local3, 1);
break;
}
_local3++;
}
clearInterval(moving);
tank.NFishes[t]--;
_root.stop_buy--;
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;
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 border_right = 640;
var position = 1;
var y = 0;
var Depths = 0;
var type = "item";
var fish_del = false;
var UseFishInt = false;
var spec_fish = false;
}
Symbol 2511 MovieClip [__Packages.GameClasses.Spline] Frame 0
class GameClasses.Spline
{
var keys;
function Spline () {
keys = new Array();
if (arguments.length > 0) {
InitSpline(arguments);
}
}
function destroy() {
clear();
}
function clear() {
var _local2 = 0;
while (_local2 < keys.length) {
delete keys[_local2];
_local2++;
}
delete keys;
}
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 reCalculate(shift) {
var _local2 = 0;
while (_local2 < keys.length) {
keys[_local2][0] = keys[_local2][0] + shift;
keys[_local2][1] = keys[_local2][0];
_local2++;
}
Calculate();
}
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();
}
function InitSpline2(A) {
var _local2 = 0;
while (_local2 < A.length) {
addKey(A[_local2][0]);
_local2++;
}
Calculate();
}
}
Symbol 2512 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 2513 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, hitTest, _xscale, _yscale, swapDepths, _name, LibName, createEmptyMovieClip, dw, up, removeMovieClip;
function Turtle () {
super();
if (!spec_fish) {
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) {
MC1 = fish.nos.attachMovie("fish_wish", "h", 0);
if ((_currentframe == 2) || (_currentframe == 4)) {
MC1._xscale = -100;
} else {
MC1._xscale = 100;
}
MC1.gotoAndPlay(F);
var _local4 = MC1.e.attachMovie(ID, "h", 0);
if (_local4.bl) {
var _local7 = 70 / _local4.bl._width;
var _local6 = 50 / _local4.bl._height;
var _local5 = Math.min(_local7, _local6);
_local4._xscale = 100 * _local5;
_local4._yscale = 100 * _local5;
_local4._x = ((-_local4.bl._width) / 4) - 5;
_local4._y = ((-_local4.bl._height) / 4) - 5;
} else {
var _local7 = 70 / _local4._width;
var _local6 = 50 / _local4._height;
var _local5 = Math.min(_local7, _local6);
_local4._xscale = 100 * _local5;
_local4._yscale = 100 * _local5;
_local4._x = (-_local4._width) / 2;
_local4._y = (-_local4._height) / 2;
}
MC1.ID = ID;
} else {
var MC1 = fish.nos.attachMovie("hearts", "h", 0);
MC1.TTT = getTimer();
var _local2 = 1;
while (_local2 < 6) {
var _local3 = MC1["h" + _local2];
_local3._rotation = 25 * ((2 * Math.random()) - 1);
_local3.gotoAndPlay(random(35));
_local2++;
}
}
MC1.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 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;
if (speed <= 3) {
speed = random(3) + 1;
} else if (speed > 6) {
speed = speed - 3;
} else {
speed = 3;
}
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;
tank.SaveTank();
}
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 _local10 = ((dir == "left") ? -1 : 1) * speed;
_x = _x + _local10;
_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 _local5 = (Math.atan2(_y - yp, _x - xp) * 180) / Math.PI;
if (_local5 > 90) {
_local5 = _local5 - 180;
if (!active) {
_local5 = Math.min(0, _local5);
}
} else if (_local5 < -90) {
_local5 = _local5 + 180;
if (!active) {
_local5 = Math.max(0, _local5);
}
}
var _local8 = _rotation;
var _local7 = _local5 / 3;
if (_local7 > (_local8 + 2)) {
_local7 = _local8 + 2;
}
if (_local7 < (_local8 - 2)) {
_local7 = _local8 - 2;
}
_rotation = _local7;
xp = _x;
yp = _y;
}
if ((_x < -50) || (_x > (border_right + 80))) {
Turn2();
} else if (getTimer() > TurnTime) {
Turn();
} else if (Math.abs(Depths - getDepth()) > 10) {
var _local3 = getDepth();
var _local4 = int((Depths - _local3) / 20);
var _local6 = true;
var _local2 = 0;
while (_local2 < tank.DepthArr.length) {
if (((tank.DepthArr[_local2].Depth > Math.min(_local3, _local3 + _local4)) && (tank.DepthArr[_local2].Depth < Math.max(_local3, _local3 + _local4))) && (hitTest(tank.tank[tank.DepthArr[_local2].Name]))) {
_local6 = false;
break;
}
_local2++;
}
if (_local6) {
_local3 = SwapFishDepth(_local3, _local3 + _local4);
_xscale = (_yscale = (_local3 + 1000) / 20);
var _local9 = CopyColor(DefaultColor);
_local9.rb = _local9.rb - (Math.pow((1000 - _local3) / 1000, 2) * 150);
_local9.gb = _local9.gb - (Math.pow((1000 - _local3) / 1000, 2) * 60);
_local9.bb = _local9.bb + (Math.pow((1000 - _local3) / 1000, 2) * 75);
BlueColor.setTransform(_local9);
}
}
}
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 > 690) {
_x = 689;
}
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) {
var _local2 = 0;
while (_local2 < tank.DepthArr.length) {
if (tank.DepthArr[_local2].Depth == D1) {
tank.DepthArr.splice(_local2, 1);
break;
}
_local2++;
}
var _local4 = true;
while (true) {
_local2 = 0;
while (_local2 < tank.DepthArr.length) {
if (tank.DepthArr[_local2].Depth == D2) {
D2++;
_local4 = false;
break;
}
_local2++;
}
if (_local4) {
break;
}
_local4 = true;
}
swapDepths(D2);
var _local5 = {};
_local5.Name = _name;
_local5.type = "fish";
_local5.LibName = LibName;
_local5.x = int(_x);
_local5.y = int(_y);
_local5.Depth = D2;
tank.DepthArr.push(_local5);
return(D2);
}
function DelFish(t) {
_root.stop_buy++;
_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);
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) {
var _local3 = 0;
while (_local3 < tank.DepthArr.length) {
if (tank.DepthArr[_local3].Depth == getDepth()) {
tank.DepthArr.splice(_local3, 1);
break;
}
_local3++;
}
clearInterval(moving);
tank.NFishes[t]--;
_root.stop_buy--;
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;
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() + 20000, 1, _local6.ID);
}
}
}
var active = true;
var border_right = 640;
var dir = "right";
var speed = 1;
var position = 1;
var y = 0;
var Depths = 0;
var type = "item";
var IsRot = false;
var UseFishInt = false;
var spec_fish = false;
}
Symbol 2514 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);
if (bonust < 2.1) {
_root.fly.attachMovie("small_bomb_eff", "b", _root.fly.getD(), {_x:_x + 15, _y:_y + 15, _xscale:bonust * 86, _yscale:bonust * 86});
} else {
_root.fly.attachMovie("big_bomb_eff", "b", _root.fly.getD(), {_x:_x + 15, _y:_y + 15, _xscale:bonust * 80, _yscale:bonust * 80});
}
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 2515 MovieClip [__Packages.GameClasses.GameMenu] Frame 0
class GameClasses.GameMenu extends MovieClip
{
var e, _y, y_pos, attachMovie, sound_tray, music_tray, check_hint, check_relax, header, txt_relax, createEmptyMovieClip, txt_show_hint, txt_sound, txt_music, ramka, tray_click, tray_line, black, sellpanel, sound, music;
function GameMenu (menu) {
super();
}
function init(type) {
_root.GetBlack(e, 30);
_y = _y + 10;
e._y = e._y - 10;
y_pos = 0;
nb = 0;
var _local4 = _root.menu_buttons;
var _local3 = 0;
while (_local3 < _local4.length) {
if ((_local4[_local3].type == 0) || (Number(_local4[_local3].type) == type)) {
if ((_local4[_local3].funct == "FDownload") && (_root.DownloadLink.value == "")) {
} else if ((_local4[_local3].funct == "FMoreGames") && (_root.MoreGames.value == "0")) {
} else if (_local4[_local3].color == "yellow") {
left_mesto = left_mesto - 55;
nb++;
} else {
left_mesto = left_mesto - 35;
nb++;
}
}
_local3++;
}
_local3 = 0;
while (_local3 < _local4.length) {
if ((_local4[_local3].type == 0) || (Number(_local4[_local3].type) == type)) {
if ((_local4[_local3].funct == "FDownload") && (_root.DownloadLink.value == "")) {
} else if ((_local4[_local3].funct == "FMoreGames") && (_root.MoreGames.value == "0")) {
} else {
if (_local4[_local3].color == "yellow") {
var _local5 = attachMovie("button_yellow", "b" + _local3, (_local3 * 4) + 1);
_local5._y = (229 + y_pos) + (left_mesto / nb);
y_pos = y_pos + (55 + (left_mesto / nb));
_local5._x = 227;
if (_local4[_local3].funct != "FMoreGames") {
_local5.InitText(_local4[_local3].text, 0, -2, "GameFont", -2, 20, 1, 14, 16777215, 1000, _root.FontBlueBlue);
} else {
_local5.reload(_root.playrix2_normal_n2d, _root.playrix2_active_n2d, _root.playrix2_pressed_n2d);
}
} else {
var _local5 = attachMovie("button_green", "b" + _local3, (_local3 * 4) + 1);
_local5._y = (229 + y_pos) + (left_mesto / nb);
y_pos = y_pos + (35 + (left_mesto / nb));
_local5._x = 227;
_local5.InitText(_local4[_local3].text, 0, -2, "GameFont", -2, 20, 1, 14, 16777215, 1000, _root.FontGreenGreen);
}
_local5.InitFunction(_root["Function" + _local4[_local3].funct.substr(1, 100)]);
if (_local4[_local3].color == "yellow") {
_local5.txt._y = _local5.txt._y - 10;
}
}
}
_local3++;
}
sound_tray = attachMovie("tray", "tr_sound", 100);
music_tray = attachMovie("tray", "tr_music", 101);
sound_tray._x = 311;
sound_tray._y = 80;
music_tray._x = 311;
music_tray._y = 123;
check_hint = attachMovie("check", "ch_hint", 102);
check_relax = attachMovie("check", "ch_relax", 103);
check_hint._x = 265;
check_hint._y = 195;
check_relax._x = 265;
check_relax._y = 155;
if (_root.show_hint) {
check_hint.check1._visible = false;
check_hint.check2._visible = true;
} else {
check_hint.check1._visible = true;
check_hint.check2._visible = false;
}
if (_root.time_bool) {
check_relax.check1._visible = true;
check_relax.check2._visible = false;
} else {
check_relax.check1._visible = false;
check_relax.check2._visible = true;
}
InitTray();
initCheck();
_local3--;
_root.TextShow(header, _root.TextMenu.text, "gradient", -2, 12, 1, 14, 0, 1000, 0, _root.FontOrange, _root.FontYellow, 90);
txt_relax = createEmptyMovieClip("txt_relax", 10);
txt_relax._x = 296;
txt_relax._y = 170;
txt_relax.attachMovie("font_menu", "font_menu", 0);
txt_relax.font_menu.text.text = _root.TextRelaxed.text;
txt_show_hint = createEmptyMovieClip("txt_show_hint", 15);
txt_show_hint._x = 296;
txt_show_hint._y = 210;
txt_show_hint.attachMovie("font_menu", "font_menu", 0);
txt_show_hint.font_menu.text.text = _root.TextShowHints.text;
txt_show_hint.onPress = GameClasses.GFunctions.create(this, checkHint);
txt_relax.onPress = GameClasses.GFunctions.create(this, checkRelax);
txt_sound = createEmptyMovieClip("txt_sound", 20);
txt_sound._x = 233;
txt_sound._y = 61;
txt_sound.attachMovie("font_menu", "font_menu", 0);
txt_sound.font_menu.text.text = _root.TextSound.text;
txt_music = createEmptyMovieClip("txt_music", 26);
txt_music._x = 233;
txt_music._y = 104;
txt_music.attachMovie("font_menu", "font_menu", 0);
txt_music.font_menu.text.text = _root.TextMusic.text;
}
function InitRamka(y) {
ramka.up._y = 0;
ramka.md._y = 20;
ramka.dw._y = y - 50;
ramka.md._height = y - 40;
}
function initCheck() {
check_hint.onPress = GameClasses.GFunctions.create(this, checkHint);
check_relax.onPress = GameClasses.GFunctions.create(this, checkRelax);
}
function checkRelax() {
if (check_relax.check1._visible) {
_root.time_bool = false;
_root.TIME.setPassive();
check_relax.check2._visible = true;
check_relax.check1._visible = false;
} else {
_root.time_bool = true;
_root.TIME.setActive();
check_relax.check1._visible = true;
check_relax.check2._visible = false;
}
}
function checkHint() {
if (check_hint.check1._visible) {
_root.show_hint = true;
check_hint.check2._visible = true;
check_hint.check1._visible = false;
} else {
_root.show_hint = false;
check_hint.check1._visible = true;
check_hint.check2._visible = false;
}
}
function InitTray() {
tray_click = sound_tray.tray_click;
tray_line = sound_tray.tray;
black = sound_tray.black;
sellpanel = sound_tray.mask;
tray_line._x = black._x + (_root.getSound() * (black._width - 18));
sellpanel._x = (tray_line._x - sellpanel._width) + 3;
tray_click.onPress = (tray_line.onPress = GameClasses.GFunctions.create(this, initSound));
tray_click.tabEnabled = (tray_line.tabEnabled = false);
tray_click.onRelease = (tray_click.onReleaseOutside = (tray_line.onRelease = (tray_line.onReleaseOutside = GameClasses.GFunctions.create(this, TrayUnMove))));
tray_click = music_tray.tray_click;
tray_line = music_tray.tray;
black = music_tray.black;
sellpanel = music_tray.mask;
tray_line._x = black._x + (_root.getMusic() * (black._width - 18));
sellpanel._x = (tray_line._x - sellpanel._width) + 3;
tray_click.onPress = (tray_line.onPress = GameClasses.GFunctions.create(this, initMusic));
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 initSound() {
sound = true;
music = false;
tray_click = sound_tray.tray_click;
tray_line = sound_tray.tray;
sellpanel = sound_tray.mask;
black = sound_tray.black;
tray_width = 0;
tray_line.onEnterFrame = GameClasses.GFunctions.create(this, TrayMoving);
}
function initMusic() {
sound = false;
music = true;
tray_click = music_tray.tray_click;
tray_line = music_tray.tray;
sellpanel = music_tray.mask;
black = music_tray.black;
tray_width = 0;
tray_line.onEnterFrame = GameClasses.GFunctions.create(this, TrayMoving);
}
function TrayMoving() {
var _local4 = 4;
if (tray_width > (black._width - 20)) {
return(undefined);
}
var _local3 = _root._xmouse - 324;
if (_local3 < (((tray_width / 2) + black._x) - 2)) {
_local3 = ((tray_width / 2) + black._x) - 2;
} else if (_local3 > (((((-tray_width) / 2) + black._x) + black._width) - 18)) {
_local3 = ((((-tray_width) / 2) + black._x) + black._width) - 18;
}
tray_line._x = _local3;
sellpanel._x = (tray_line._x - sellpanel._width) + 3;
if (sound) {
_root.FunctionSound(((tray_line._x - black._x) + 2) / (black._width - 18));
} else if (music) {
_root.FunctionMusic(((tray_line._x - black._x) + 2) / (black._width - 18));
}
}
function TrayUnMove() {
delete tray_line.onEnterFrame;
if (sound) {
_root.FunctionSound((tray_line._x - black._x) / (black._width - 18));
_root.testSound();
} else if (music) {
_root.FunctionMusic((tray_line._x - black._x) / (black._width - 18));
}
}
var tray_width = 0;
var left_mesto = 215;
var nb = 0;
}
Symbol 2516 MovieClip [__Packages.GameClasses.GameTimer] Frame 0
class GameClasses.GameTimer extends MovieClip
{
var t, krug, time, Tii, onEnterFrame, B, TI, E, _visible;
function GameTimer () {
super();
t = 0;
time._y = (krug._y = scale);
Tii = getTimer();
onEnterFrame = Appear;
krug.onEnterFrame = function () {
if (this._y > (360 - 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() {
now_play = true;
if (now_active) {
start_Timer();
}
}
function StopTimer() {
now_play = false;
if (now_active) {
stop_Timer();
}
}
function start_Timer() {
if (S > 0) {
E = E + (getTimer() - S);
B = B + (getTimer() - S);
S = 0;
}
onEnterFrame = ShowTime;
}
function stop_Timer() {
_root.fly.red.removeMovieClip();
clearInterval(_root.showing_hint);
if (S == 0) {
S = getTimer();
delete onEnterFrame;
}
}
function ShowTime() {
if (_root.no_show_time) {
return(undefined);
}
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;
}
};
}
function setActive() {
_root.time_bool = true;
now_active = true;
_visible = true;
if (now_play) {
start_Timer();
}
}
function setPassive() {
_root.time_bool = false;
now_active = false;
_visible = false;
if (now_play) {
stop_Timer();
}
}
function getActive() {
return(now_active);
}
var S = 0;
var scale = 365;
var now_play = false;
var now_active = true;
}
Symbol 2517 MovieClip [__Packages.GameClasses.Tank] Frame 0
class GameClasses.Tank extends MovieClip
{
var bonus_level, SHADOW, sellpanel, panel_down, leftarrow, tray_line, black, rightarrow, MouseL, shop, panel_back, indicators, donebutton, panel_play, play_but, menupanel, move_ind1, move_ind2, move_ind3, line_kubok, move_kubok, move_sto, button_mail, id_scroll, panel_up, panel_bonus_top, sellbutton, tray_click, showing, attachMovie, hint, IsPressed, onEnterFrame, tank, MONEY, SO, wishing, id_get_fish, arr_gem, timer_music, timerFish, fish_panel, GH, moving, Move_comf, shine, feeder, medic, termometer, timer_krasatulki, timer_figni, move_ind, cur_ind, line_ind1, line_ind2, line_ind3, createEmptyMovieClip, Tutor;
function Tank () {
super();
}
function init(bonus) {
PanelPosition = _root.TankPos;
bonus_level = bonus;
SHADOW = new flash.filters.DropShadowFilter(2, 45, 6306049, 1, 1, 1, 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))));
shop = new GameClasses.Shop(this);
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, -2, -1, "GameFont", -3, 10, 1, 12, _root.FontWhite, 1000, _root.FontGreenGreen);
};
panel_back.button_back.onPress = GameClasses.GFunctions.create(this, EYE);
panel_back.button_back.tabEnabled = false;
sellpanel.setMask(panel_down.black);
StartFishes();
InitPanels();
TankShow(bonus);
var _local4 = 0;
while (_local4 < 4) {
prevShop[_local4] = black._x;
_local4++;
}
indicators.hint._alpha = 0;
indicators.sto11._visible = false;
indicators.sto22._visible = false;
indicators.sto33._visible = false;
indicators.hint.onRollOver = function () {
_root.showLastHint();
};
indicators.hint.onRollOut = function () {
_root.hideLastHint();
};
indicators.hint.useHandCursor = false;
_root.TextShow(panel_down.bc1, _root.TextFishes.text, "GameFont", -3.5, 20, 0, 12, _root.FontBrown, 300, _root.FontYellowYellow);
_root.TextShow(panel_down.bc2, _root.TextBeauty.text, "GameFont", -3.5, 20, 0, 12, _root.FontBrown, 300, _root.FontYellowYellow);
_root.TextShow(panel_down.bc3, _root.TextComfort.text, "GameFont", -3.5, 20, 0, 12, _root.FontBrown, 300, _root.FontYellowYellow);
_root.TextShow(panel_down.bb1, _root.TextFishes.text, "GameFont", -3, 20, 0, 12, _root.FontWhite, 1000, _root.FontBlueBlue);
_root.TextShow(panel_down.bb2, _root.TextBeauty.text, "GameFont", -3, 20, 0, 12, _root.FontWhite, 1000, _root.FontBlueBlue);
_root.TextShow(panel_down.bb3, _root.TextComfort.text, "GameFont", -3, 20, 0, 12, _root.FontWhite, 1000, _root.FontBlueBlue);
_root.TextShow(indicators.bb1, _root.TextFishes.text, "TextFont", -3, 20, 2, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
_root.TextShow(indicators.bb2, _root.TextBeauty.text, "TextFont", -3, 20, 2, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
_root.TextShow(indicators.bb3, _root.TextComfort.text, "TextFont", -3, 20, 2, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
donebutton = panel_play.button_play;
var _local5 = donebutton.attachMovie("button_rg", "but", 0);
_local5.InitText(_root.TextPlay.text, -2, 0, "GameFont", -3, 10, 1, 16, _root.FontWhite, 1000, _root.FontGreenGreen);
_local5.txt._y = _local5.txt._y - 3;
play_but = _local5;
if ((_root.end_game && (_root.BonusLevel.value == 1)) && (!_root.use_bonus)) {
_local5.InitFunction(GameClasses.GFunctions.create(_root, _root.showBonusPanel));
} else if ((_root.end_game && (_root.BonusLevel.value == 1)) && (_root.use_bonus)) {
_local5.InitFunction(GameClasses.GFunctions.create(_root, _root.showFinishPanel));
} else if (_root.end_game) {
_local5.InitFunction(GameClasses.GFunctions.create(_root, _root.showFinishPanel));
} else {
_local5.InitFunction(GameClasses.GFunctions.create(this, InitRound));
}
_local5.ToCenter();
_local5 = menupanel.button_shop.attachMovie("button_rg", "but", 0);
_local5.InitText(_root.TextShop.text, 0, -5, "GameFont", -3, 12, 1, 17, _root.FontWhite, 1000, _root.FontGreenGreen);
_local5.InitFunction(GameClasses.GFunctions.create(this, SwapPanels));
_local5.ToCenter();
_local5._xscale = 90;
_local5._yscale = 90;
panel_down.button_close.onPress = GameClasses.GFunctions.create(this, SwapPanels);
if (_root.NagTime.value != "0") {
_local5 = menupanel.button_download.attachMovie("button", "but", 0);
_local5.InitFunction(_root.FunctionDownloadMenu);
_local5.InitText(_root.TextDownloadFull.text, -2, 0, "GameFont", -3, 15, 1, 12, _root.FontWhite, 1000, _root.FontBlueBlue);
_local5.ToCenter();
_local5.txt._y = _local5.txt._y - 13;
} else {
_local5 = menupanel.button_download.attachMovie("button_B", "but", 0);
_local5.InitFunction(FunctionHelp);
_local5.InitText(_root.TextHelp.text);
_local5.ToCenter();
}
if (_root.MoreGames.value != 0) {
_local5 = menupanel.button_more.attachMovie("button_big", "but1", 2);
_local5.InitFunction(_root.FunctionMoreGames);
_local5.ToCenter();
_local5.reload(_root.playrix1_normal_n2d, _root.playrix1_active_n2d, _root.playrix1_pressed_n2d);
}
move_ind1 = new Object();
move_ind1.mov = new GameClasses.FreeMove();
move_ind1.mov.updateAct = GameClasses.GFunctions.create(this, updInd1);
move_ind1.mov.endAct = GameClasses.GFunctions.create(this, endInd1);
move_ind2 = new Object();
move_ind2.mov = new GameClasses.FreeMove();
move_ind2.mov.updateAct = GameClasses.GFunctions.create(this, updInd2);
move_ind2.mov.endAct = GameClasses.GFunctions.create(this, endInd2);
move_ind3 = new Object();
move_ind3.mov = new GameClasses.FreeMove();
move_ind3.mov.updateAct = GameClasses.GFunctions.create(this, updInd3);
move_ind3.mov.endAct = GameClasses.GFunctions.create(this, endInd3);
indicators.sep1._visible = false;
indicators.sep2._visible = false;
indicators.sep3._visible = false;
var _local3 = 1;
while (_local3 < 4) {
setLength(_local3, indicators["l" + String(_local3)], Math.min(100, Math.max(0, ((Indic[_local3] - CurrK()) * 100) / (NextK() - CurrK()))));
if (Math.min(100, Math.max(0, ((Indic[_local3] - CurrK()) * 100) / (NextK() - CurrK()))) == 100) {
indicators["sto" + String(_local3)]._visible = true;
} else {
indicators["sto" + String(_local3)]._visible = false;
}
_local3++;
}
line_kubok = new GameClasses.Line(451, 407);
move_kubok = new Object();
move_kubok.mov = new GameClasses.FreeMove();
move_kubok.mov.updateAct = GameClasses.GFunctions.create(this, updIzmenKubok);
move_kubok.mov.endAct = GameClasses.GFunctions.create(this, endIzmenKubok);
indicators.cup1.stop();
move_sto = new Object();
move_sto.mov = new GameClasses.FreeMove();
move_sto.mov.updateAct = GameClasses.GFunctions.create(this, updIzmenSto);
move_sto.mov.endAct = GameClasses.GFunctions.create(this, endIzmenSto);
if (((_root.bonus_num_buy == 0) && (_root.showBonusMoney.value == "true")) && (!bonus_level)) {
button_mail.gotoAndPlay(1);
button_mail.onPress = function () {
this.play();
_root.showGoldPanel();
};
} else {
button_mail._visible = false;
button_mail.stop();
}
}
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, 350);
}
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) {
if (delta > 0) {
MoveLeft();
} else {
MoveRight();
}
clearInterval(id_scroll);
id_scroll = setInterval(GameClasses.GFunctions.create(this, StopMove), 100);
}
function InitPanels() {
panel_down.dir1 = 381;
panel_down.dir2 = 482;
panel_play.dir1 = 405;
panel_play.dir2 = 482;
panel_play.dir3 = 393;
panel_play.dir4 = 405;
menupanel.dir1 = 408;
menupanel.dir2 = 492;
panel_up.dir1 = 0;
panel_up.dir2 = -61;
panel_bonus_top.dir1 = 0;
panel_bonus_top.dir2 = -61;
panel_back.dir2 = 0;
panel_back.dir1 = -61;
sellbutton.dir1 = 592;
sellbutton.dir2 = 469;
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_bonus_top._y = panel_bonus_top.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 = 1;
}
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 :
shop.ShowFishes();
break;
case 2 :
shop.ShowBeauty();
break;
case 3 :
shop.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 - 5;
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) % 65) > 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 ComfortPress(mc) {
if (IsLock()) {
return(undefined);
}
UnShowHint();
var _local4 = ComfortUp(mc);
if (_local4 == 1) {
if (_root.bonus_num_buy > 0) {
_root.bonus_num_buy--;
}
delete mc.black.onRelease;
_root.TextShow(mc.TEXT, _root.TextBought.text, "TextFont", -4, 9, 1, 13, _root.FontWhite, 100, _root.FontBlueBlue);
}
}
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();
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 _local11 = _local6.Name;
var _local8 = _local6.cost;
var _local5 = _local6.stars;
_local4.Name.attachMovie("grad_shop1", "grad_shop1", 0);
_local4.Name.grad_shop1.text.text = _local11;
var _local12 = new flash.filters.DropShadowFilter(0, 0, _root.FontBlue, 1, 2, 2, 2, 3, false, false, false);
var _local3 = 1;
while (_local3 <= Math.min(int(_local5), 5)) {
_local4["star" + _local3].gotoAndStop(2);
_local3++;
}
if ((str == "Comfort") && (Comfort[i])) {
_local4.Price.attachMovie("grad_shop2", "grad_shop1", 0);
_local4.Price.grad_shop1._x = _local4.Price.grad_shop1._x - 25;
_local4.Price.grad_shop1.text.text = _root.TextBought.text;
return(undefined);
}
if (money >= _local8) {
_root.TextShow(_local4.Price, _root.TextPrice.text, "GameFont", -2, 15, 0, 14, _root.FontWhite, 180, _root.FontBlueBlue);
_local4.Cost.attachMovie("grad_shop2", "grad_shop1", 0);
_local4.Cost.grad_shop1.text.text = _root.TextDollar.text + _local8;
} else {
_root.TextShow(_local4.Price, _root.TextPrice.text, "GameFont", -2, 15, 0, 14, _root.FontWhite, 180, _root.FontBlueBlue);
_local4.Cost.attachMovie("grad_shop3", "grad_shop1", 0);
_local4.Cost.grad_shop1.text.text = _root.TextDollar.text + _local8;
}
var _local13 = _local4.Price._x;
var _local14 = _local4.Price._width + _local4.Cost._width;
_local4.Price._x = _local4.Price._x - 60;
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() {
clearInterval(id_scroll);
IsPressed = false;
}
function MoveLeft(c) {
dir = 13;
if (c) {
dir = c;
} else {
IsPressed = true;
_root.button_pressed_s.start(_root.SoundOn);
}
onEnterFrame = Moving;
}
function MoveRight(c) {
dir = -13;
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) % 65;
if ((_local2 > 6) || (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) - 3) <= black._width) || (sellpanel._width <= (black._width + 50))) {
sellpanel._x = ((black._x - sellpanel._width) + black._width) - 0;
rightarrow.gotoAndStop(2);
delete onEnterFrame;
} else {
rightarrow.gotoAndStop(1);
}
SetTray();
prevShop[position] = sellpanel._x;
}
function AddFish(i) {
trace(_root.stop_buy);
if (_root.stop_buy > 0) {
return(undefined);
}
if (IsLock()) {
return(undefined);
}
UnShowHint();
var _local3 = sellpanel["sell" + i].ID;
var _local5 = Number(_root["Fish" + int(i + 1)].cost);
var _local9 = Number(_root["Fish" + int(i + 1)].utility);
if (((NFishes[_local3] < MaxFishes) && (DepthArr.length < MaxItems)) && (money >= _local5)) {
tank["fish" + NFishes[_local3]].removeMovieClip();
var _local6 = tank.attachMovie("fish" + _local3, ("fish" + _local3) + NFishes[_local3], random(100) + 1001, {_x:260, _y:-100, active:true});
_local6.LibName = "fish" + _local3;
if (_root.bonus_num_buy > 0) {
_root.bonus_num_buy--;
}
_local6.AppearFish(((random(100) + 50) * ((2 * random(2)) - 1)) + 260, (random(100) * ((2 * random(2)) - 1)) + 150);
NFishes[_local3]++;
var _local7 = ((NFishes[_local3] > 0) ? (String(NFishes[_local3])) : " ");
_root.TextShow(sellpanel["sell" + i].num, _local7, "GameFont", 2, 0, 1, 14, _root.FontBlue, 100, _root.FontWhite);
if (NFishes[_local3] >= 1) {
sellpanel["sell" + i].minus.onRelease = GameClasses.GFunctions.create(this, DelFish, i, sellpanel["sell" + i]);
}
var _local8 = _root.attachMovie("fly_text", "tt", 97, {_x:_root._xmouse - 20, _y:_root._ymouse - 40});
_root.TextShow(_local8.t1, ("-" + _root.TextDollar.text) + Math.abs(_local5), "gradient", -3, 20, 1, 20, 0, 1000, 0, _root.FontOrange, _root.FontYellow, 90);
MONEY.Add(-_local5);
Indicators(1, _local9);
DepthArr2.push(_local6);
} else if (money < _local5) {
NotMoney();
}
}
function myAddFish(i) {
var _local3 = i;
if (_root.bonus_num_buy > 0) {
_root.bonus_num_buy--;
}
tank["fish" + NFishes[_local3]].removeMovieClip();
var _local4 = tank.attachMovie("fish" + _local3, ("fish" + _local3) + NFishes[_local3], random(100) + 1001, {_x:260, _y:-100, active:true});
_local4.LibName = "fish" + _local3;
_local4.AppearFish(((random(100) + 50) * ((2 * random(2)) - 1)) + 260, (random(100) * ((2 * random(2)) - 1)) + 150);
NFishes[_local3]++;
DepthArr2.push(_local4);
}
function DelFish(i) {
if (_root.stop_buy > 0) {
return(undefined);
}
UnShowHint();
var _local5 = sellpanel["sell" + i].ID;
var _local4 = Number(_root["Fish" + int(i + 1)].cost) >> 1;
ConfermSell(_local4, GameClasses.GFunctions.create(this, DelFish1, i), null, 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_text", "tt", 97, {_x:_root._xmouse, _y:_root._ymouse - 20});
_root.TextShow(_local8.t1, ("+" + _root.TextDollar.text) + Math.abs(_local5 >> 1), "gradient", -3, 20, 1, 20, 0, 1000, 0, _root.FontOrange, _root.FontYellow, 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", 2, 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 _local5 = Number(_root["Item" + mc.POS].cost);
if ((DepthArr.length < (MaxItems + 10)) && (money >= _local5)) {
if (_root.bonus_num_buy > 0) {
_root.bonus_num_buy--;
}
sellbutton.gotoAndStop(2);
var _local4 = mc.ID;
tank["item" + NItems].removeMovieClip();
var _local3 = tank.attachMovie("item" + _local4, "item" + NItems, 1001, {_x:_root._xmouse, _y:_root._ymouse + 30, fromShop:true});
NItems++;
_local3.LibName = "item" + _local4;
_local3.Nomer = mc.POS;
_local3.StartMove();
} else if (money < _local5) {
NotMoney();
}
}
function TankShow(bonus) {
if ((_root.SaveGame.value != "false") && (SO == null)) {
SO = SharedObject.getLocal("FishdomFlash2");
}
indicators.morg._y = 1000;
DepthArr = [];
DepthArr2 = [];
attachMovie("black", "black", 1, {_width:640, _height:480, _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_help.tabEnabled = false;
panel_up.button_move.tabEnabled = false;
panel_bonus_top.button_hint.InitFunction(_root.startParticleHint);
panel_bonus_top.button_hint.onPress = _root.startParticleHint;
panel_bonus_top.button_skip.onPress = _root.endBL;
panel_bonus_top.button_hint.tabEnabled = false;
panel_bonus_top.button_skip.tabEnabled = false;
_root.show_kubok = 0;
if (bonus) {
var _local4 = new GameClasses.GameHintYellow(_root.createEmptyMovieClip("sSssS", 777), _root.TextHintBonusLevelString.text, 192, 150, _root.FromHint);
_local4.setCaption(_root.TextHintBonusLevel.text);
LoadBonusTank();
} else {
LoadTank();
}
if ((_root.game_win && (!bonus)) && (_root.SkipTutor)) {
CreateGems();
}
DrawItems();
InitComfort();
MONEY = new GameClasses.Score(panel_up.money, money, this, "money");
MONEY.Add(int(_root.Money_ADD));
_root.TOTPOINTS = _root.TOTPOINTS + int(_root.Money_ADD);
if (_root.cheat.value == "true") {
panel_up.money.onPress = function () {
this._parent._parent.MONEY.Add(1000);
};
} else {
panel_up.money.onPress = null;
panel_up.money.useHandCursor = false;
}
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, -2, -1, "GameFont", -3, 10, 1, 12, _root.FontWhite, 1000, _root.FontGreenGreen);
};
panel_up.textm.text.text = _root.TextYourMoney.text;
panel_bonus_top.text_col_gem.text.text = _root.TextBonusGems.text;
showNumGem();
panel_bonus_top.button_hint.onLoad = function () {
this.InitText(_root.TextBonusHint.text, -3, -1, "GameFont", -3, 12, 1, 12, _root.FontWhite, 1000, _root.FontGreenGreen);
};
_root.TextShow(_root.tnk.panel_bonus_top.text_hint1, _root.TextBonusHint.text, "GameFont", -3, 20, 1, 12, _root.FontWhite, 300, 7171437);
panel_bonus_top.button_skip.onLoad = function () {
this.InitText(_root.TextBonusSkip.text, -3, -1, "GameFont", -3, 12, 1, 12, _root.FontWhite, 1000, _root.FontGreenGreen);
};
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));
if (bonus) {
bonusLevel(0);
} else {
EYE(0);
}
clearInterval(wishing);
wishing = setInterval(GameClasses.GFunctions.create(this, Wish), 10000 + random(40000));
SaveTank();
if ((_root.level == -1) || ((!_root.SkipTutor) && (money > 20))) {
if (bonus == 0) {
Tutorial();
}
}
ShowPanel(2);
MoveLeft(2);
if (_root.get_new_fish) {
_root.get_new_fish = false;
clearInterval(id_get_fish);
id_get_fish = setInterval(GameClasses.GFunctions.create(this, getFish), 1200);
}
}
function getFish() {
clearInterval(id_get_fish);
if ((_root.current_bonus - 1) < 5) {
myAddFish((8 + _root.current_bonus) - 1);
} else {
MONEY.Add(1000);
}
}
function RotatePropellers() {
var _local2 = this;
var _local3 = Math.sin((++_local2.PS) / 200);
_local2._rotation = _local2._rotation + (_local3 * 2);
}
function showNumGem() {
_root.TextShow(panel_bonus_top.left_gem, String(left_gem), "GameFont", -3, 20, 1, 14, _root.FontWhite, 300, _root.FontBlueBlue);
}
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 = 450;
NItems = 0;
GameClasses.GFunctions.ClearAll(tank, 1, 1, 1);
}
function LoadBonusTank() {
ResetTank();
left_gem = 0;
arr_gem = new Array();
if (_root.current_bonus < 1) {
_root.current_bonus = 1;
}
var _local3 = 0;
while (_local3 < _root.bonus_map[_root.current_bonus].inf.length) {
DepthArr[_local3] = new Object();
DepthArr[_local3].Name = _root.bonus_map[_root.current_bonus].inf[_local3].item;
DepthArr[_local3].x = int(_root.bonus_map[_root.current_bonus].inf[_local3].x * 0.8);
DepthArr[_local3].y = 470 - int(_root.bonus_map[_root.current_bonus].inf[_local3].y * 0.8);
DepthArr[_local3].Depth = int((1000 * (DepthArr[_local3].y - 246)) / 221);
DepthArr[_local3].LibName = _root.bonus_map[_root.current_bonus].inf[_local3].item;
if (_root.bonus_map[_root.current_bonus].inf[_local3].mirror != null) {
DepthArr[_local3].Rot = _root.bonus_map[_root.current_bonus].inf[_local3].mirror;
} else {
DepthArr[_local3].Rot = false;
}
DepthArr[_local3].type = "item";
if (DepthArr[_local3].Name.substr(0, 4) == "gems") {
left_gem++;
var _local5 = new Object();
_local5.num = _root.count_gem;
_local5.x = DepthArr[_local3].x;
_local5.y = DepthArr[_local3].y;
arr_gem.push(_local5);
DepthArr[_local3].ttt = _root.count_gem;
var _local6;
_local6.length;
if (DepthArr[_local3].Name.length == 6) {
DepthArr[_local3].ggg = Number(DepthArr[_local3].Name.substr(5, 1));
} else {
DepthArr[_local3].ggg = 10;
}
_root.count_gem++;
}
_local3++;
}
_local3 = 0;
while (_local3 < _root.bonus_map[_root.current_bonus].inf.length) {
var _local4 = 0;
while (_local4 < _root.bonus_map[_root.current_bonus].inf.length) {
if ((DepthArr[_local3].Depth == DepthArr[_local4].Depth) && (_local3 != _local4)) {
DepthArr[_local3].Depth++;
_local3--;
break;
}
_local4++;
}
_local3++;
}
_root.current_bonus++;
showNumGem();
}
function st_music() {
clearInterval(timer_music);
_root.FunctionMusic(_root.music_volume);
}
function minusGem(num) {
var _local3 = 0;
while (_local3 < arr_gem.length) {
if (arr_gem[_local3].num == num) {
arr_gem.splice(_local3, 1);
}
_local3++;
}
if (bonus_level) {
left_gem--;
showNumGem();
if (left_gem == 0) {
clearInterval(timer_music);
timer_music = setInterval(GameClasses.GFunctions.create(this, st_music), 5000);
_root.FunctionMusic2();
_root.levelcomplete_s.start(true);
timerFish = setInterval(GameClasses.GFunctions.create(this, getAward), 1500);
} else {
_root.bell_s.start(true);
}
} else {
_root.bell_s.start(true);
}
}
function getAward() {
clearInterval(timerFish);
_root.get_new_fish = true;
fish_panel = _root.createEmptyMovieClip("sSssS", 666);
fish_panel._alpha = 0;
var _local3 = fish_panel.attachMovie("zadnik", "zadnik", 10, {useHandCursor:false});
GH = new GameClasses.GameHint3(fish_panel.createEmptyMovieClip("sSssS", 12), _root.TextGetReward.text, 190, 60, GameClasses.GFunctions.create(this, preEndBonusLevel), null, _root.current_bonus - 1);
GH.setCaption(_root.MagnificentText.text);
_local3.onPress = null;
timerFish = setInterval(GameClasses.GFunctions.create(this, showAward), 20);
}
function showAward() {
fish_panel._alpha = fish_panel._alpha + 5;
if (fish_panel._alpha > 100) {
fish_panel._alpha = 100;
clearInterval(timerFish);
}
}
function preEndBonusLevel() {
endBonusLevel();
}
function endBonusLevel() {
clearInterval(wishing);
wishing = setInterval(GameClasses.GFunctions.create(this, StartLevel2), 200);
panel_back._visible = false;
}
function LoadTank() {
ResetTank();
if (_root.DepthArr) {
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.can_load_game)) && (SO.data.DepthArr != undefined)) {
_root.can_load_game = false;
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.first_game = SO.data.first_game;
_root.first_gem = SO.data.first_gem;
_root.current_bonus = SO.data.current_bonus;
_root.show_hint = SO.data.show_hint;
_root.time_bool = SO.data.time_bool;
_root.music_volume = SO.data.music_volume;
_root.sound_volume = SO.data.sound_volume;
if (SO.data.bonus_num_buy != null) {
_root.bonus_num_buy = SO.data.bonus_num_buy;
}
_root.use_bonus = SO.data.use_bonus;
if (SO.data.MaxLevel != null) {
_root.MaxLevel.value = SO.data.MaxLevel;
}
if (SO.data.end_game != null) {
_root.end_game = SO.data.end_game;
}
_root.FunctionSound(_root.sound_volume);
_root.FunctionMusic(_root.music_volume);
}
}
}
function SaveTank() {
if (bonus_level) {
return(undefined);
}
if (_root.not_save) {
return(undefined);
}
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.first_game = _root.first_game;
SO.data.first_gem = _root.first_gem;
SO.data.current_bonus = _root.current_bonus;
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;
SO.data.show_hint = _root.show_hint;
SO.data.time_bool = _root.time_bool;
SO.data.music_volume = _root.music_volume;
SO.data.sound_volume = _root.sound_volume;
SO.data.bonus_num_buy = _root.bonus_num_buy;
SO.data.use_bonus = _root.use_bonus;
SO.data.MaxLevel = _root.MaxLevel.value;
SO.data.end_game = _root.end_game;
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 CreateGems() {
arr_gem = new Array();
var _local9;
var _local11;
var _local10;
var _local7 = 0;
_local7 = _root.num_fish_my * 2;
if (_local7 > 6) {
_local7 = 6;
}
if (_local7 < 0) {
_local7 = 0;
}
var _local8 = Math.floor(Math.random() * _local7);
var _local4;
arr_gem = new Array();
var _local3 = 1;
while (_local3 <= _local8) {
_local4 = new Object();
_local4.Name = "gems_" + String(Math.floor(Math.random() * 10) + 1);
_local4.x = 18 + (Math.random() * 596);
_local4.y = 306 + (Math.random() * 86);
_local4.Depth = int((1000 * (_local4.y - 246)) / 221);
_local4.LibName = _local4.Name;
_local4.type = "item";
var _local6 = new Object();
_local6.num = _root.count_gem;
_local6.x = _local4.x;
_local6.y = _local4.y;
arr_gem.push(_local6);
_local4.ttt = _root.count_gem;
DepthArr.push(_local4);
_root.showHintGem();
_local3++;
}
_local3 = 0;
while (_local3 < DepthArr[_local3].length) {
var _local5 = 0;
while (_local5 < DepthArr[_local3].length) {
if ((DepthArr[_local3].Depth == DepthArr[_local5].Depth) && (_local3 != _local5)) {
DepthArr[_local3].Depth++;
_local3--;
break;
}
_local5++;
}
_local3++;
}
}
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));
var _local7;
if (DepthArr[_local3].type == "fish") {
_local7 = new Color(_local2);
if (((_local2.LibName.substr(5, 1) == "0") || (_local2.LibName.substr(5, 1) == "1")) || (_local2.LibName.substr(5, 1) == "2")) {
} else {
NFishes[Number(_local2.LibName.substr(4, 1))]++;
}
_local2._xscale = (_local2._yscale = (_local4 + 800) / 20);
DepthArr2.push(_local2);
} else {
_local2.Nomer = DepthArr[_local3].POS;
_local2._name = "item" + NItems;
_local7 = new Color(_local2.item);
NItems++;
_local2._xscale = (_local2._yscale = int(60 + ((40 * (_local2._y - 246)) / 221)));
_local2.Rotate(DepthArr[_local3].Rot);
}
if (DepthArr[_local3].ttt != undefined) {
_local2.setNum(DepthArr[_local3].ttt, _local3);
_local2.setType(DepthArr[_local3].ggg);
}
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.panel_moving_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 bonusLevel(C) {
clearInterval(Move_comf);
var _local3;
var _local4;
var _local2 = -1;
if (C) {
_local2 = 1;
}
_local3 = [panel_bonus_top];
_local4 = [_local2];
MovePanel(_local3, _local4, 350);
}
function EYE(C) {
buy_compform = false;
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];
panel_play.dir1 = panel_play.dir4;
} else if (PanelPosition == "shop") {
_local3 = [panel_up, panel_back, panel_play, panel_down];
_local4 = [_local2, _local2, _local2, _local2];
panel_play.dir1 = panel_play.dir3;
}
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 {
tank.bl.removeMovieClip();
}
MovePanel(_local3, _local4, 350);
}
function StartBubbles(N, W) {
var _local3 = 0;
while (_local3 < N) {
var _local2 = tank["bubbles" + W].attachMovie("bubble", "b" + _local3, _local3, {_y:random(250)});
_local2._xscale = (_local2._yscale = random(50) + 50);
_local2.SIN = random(100) + 1;
_local2.speed = (Math.random() * 3) + 1;
_local2.center = 200;
_local2.type = "bubble";
DepthArr2.push(_local2);
_local3++;
}
}
function BubbleTick(MC) {
var _local1 = MC;
_local1._y = _local1._y - _local1.speed;
if (_local1._y < 0) {
_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() {
_root.num_fish_my = 0;
var _local3 = 0;
while (_local3 < NoFishes) {
_root.num_fish_my = _root.num_fish_my + NFishes[_local3 + 1];
_local3++;
}
clearInterval(_root.timerID);
_root.TankPos = PanelPosition;
clearInterval(wishing);
wishing = setInterval(GameClasses.GFunctions.create(this, StartLevel), 700);
EYE(1);
panel_back._visible = false;
if (IsLock()) {
return(undefined);
}
}
function StartLevel() {
clearInterval(wishing);
_root.makePerehod(GameClasses.GFunctions.create(this, StartLevelDop));
}
function StartLevelDop() {
_root.sSss1._alpha = 1;
SaveTank();
DepthArr2 = [];
GameClasses.GFunctions.ClearAll(this, 1, 1);
_root.InitRound();
}
function StartLevel2() {
clearInterval(wishing);
_root.makePerehod(GameClasses.GFunctions.create(this, StartLevel2Dop));
}
function StartLevel2Dop() {
_root.sSss1._alpha = 1;
GameClasses.GFunctions.ClearAll(GH, 1, 1);
GameClasses.GFunctions.ClearAll(fish_panel, 1, 1);
GameClasses.GFunctions.ClearAll(this, 1, 1);
_root.InitTank();
}
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.compr1.gotoAndStop(tank.compr1._totalframes);
StartBubbles(15, 1);
StartBubbles(5, 11);
StartBubbles(5, 12);
}
if (Comfort[3]) {
tank.bubbles2._alpha = 100;
tank.compr2.gotoAndStop(tank.compr2._totalframes);
StartBubbles(10, 2);
StartBubbles(5, 21);
}
if (Comfort[1]) {
tank.light1.gotoAndStop(tank.light1._totalframes);
tank.light2.gotoAndStop(tank.light2._totalframes);
tank.light3.gotoAndStop(tank.light3._totalframes);
}
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_text", "tt", 97, {_x:_root._xmouse - 20, _y:_root._ymouse - 30});
_root.TextShow(_local7.t1, ("-" + _root.TextDollar.text) + Math.abs(_local3), "gradient", -3, 20, 1, 20, 0, 1000, 0, _root.FontOrange, _root.FontYellow, 90);
MONEY.Add(_local3);
Indicators(3, _local6);
_root.comfort_s.start(_root.SoundOn);
SaveTank();
} else {
NotMoney();
return(0);
}
}
Comfort[MC.POS] = 1;
EYE(1);
buy_compform = true;
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.bubbles11._alpha = 100;
tank.bubbles12._alpha = 100;
tank.compr1.gotoAndPlay(2);
StartBubbles(15, 1);
StartBubbles(5, 11);
StartBubbles(5, 12);
return(1);
case "comp2" :
tank.bubbles2._alpha = 100;
tank.compr2.gotoAndPlay(2);
StartBubbles(10, 2);
StartBubbles(5, 21);
return(1);
case "light" :
tank.light1.gotoAndPlay(2);
tank.light2.gotoAndPlay(2);
tank.light3.gotoAndPlay(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() {
indicators.cup1._alpha = 0;
if (Kubok > 0) {
indicators.cup1._alpha = 100;
indicators._x = 407;
indicators.cup1.gotoAndStop(2);
if (Kubok > 1) {
indicators.cup1.gotoAndStop(3);
if (Kubok > 2) {
indicators.cup1.gotoAndStop(4);
}
}
}
}
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, N) {
var _local4 = NextK();
var _local3 = true;
var _local2 = 1;
while (_local2 < 4) {
if (Indic[_local2] < _local4) {
_local3 = false;
break;
}
_local2++;
}
if (_local3) {
Kubok++;
i_have_kubok = true;
if (H && (Kubok < 4)) {
if (Kubok == 1) {
indicators.cup1.gotoAndStop(Kubok + 1);
}
if (N != 3) {
clearInterval(timer_krasatulki);
timer_krasatulki = setInterval(GameClasses.GFunctions.create(this, startBleski), 1400);
move_kubok.mov.newInitMove(move_kubok, 4000, 0);
} else {
clearInterval(timer_figni);
timer_figni = setInterval(GameClasses.GFunctions.create(this, giveKubok), 3500);
}
}
}
return(_local3);
}
function startBleski() {
clearInterval(timer_krasatulki);
_root.startBleski();
}
function giveKubok() {
clearInterval(timer_figni);
clearInterval(timer_krasatulki);
timer_krasatulki = setInterval(GameClasses.GFunctions.create(this, startBleski), 1400);
move_kubok.mov.newInitMove(move_kubok, 4000, 0);
}
function updIzmenKubok() {
if (Kubok == 1) {
if (move_kubok.mov.t < 0.33) {
indicators._x = line_kubok.getPoint(3 * move_kubok.mov.t);
} else if (move_kubok.mov.t < 0.66) {
indicators.cup1._alpha = 300 * (move_kubok.mov.t - 0.33);
}
} else if (move_kubok.mov.t < 0.33) {
indicators.cup1._alpha = 300 * (0.33 - move_kubok.mov.t);
} else if (move_kubok.mov.t < 0.66) {
indicators.cup1.gotoAndStop(Kubok + 1);
indicators.cup1._alpha = 300 * (move_kubok.mov.t - 0.33);
}
}
function endIzmenKubok() {
indicators.sto11._visible = true;
indicators.sto22._visible = true;
indicators.sto33._visible = true;
indicators.sto1._visible = false;
indicators.sto2._visible = false;
indicators.sto3._visible = false;
clearInterval(_root.show_kubok);
move_sto.mov.newInitMove(move_kubok, 900, 0);
_root.show_kubok = setInterval(GameClasses.GFunctions.create(this, endIzmenKubok2), 1400);
}
function updIzmenSto() {
if (move_sto.mov.t < 0.5) {
if (move_sto.mov.t < 0.25) {
indicators.sto11._xscale = 100 + ((20 * move_sto.mov.t) * 4);
indicators.sto11._yscale = 100 + ((20 * move_sto.mov.t) * 4);
} else {
indicators.sto11._xscale = 100 + ((20 * (0.5 - move_sto.mov.t)) * 4);
indicators.sto11._yscale = 100 + ((20 * (0.5 - move_sto.mov.t)) * 4);
}
}
if ((move_sto.mov.t < 0.75) && (move_sto.mov.t > 0.25)) {
if (move_sto.mov.t < 0.5) {
indicators.sto22._xscale = 100 + ((20 * (move_sto.mov.t - 0.25)) * 4);
indicators.sto22._yscale = 100 + ((20 * (move_sto.mov.t - 0.25)) * 4);
} else {
indicators.sto22._xscale = 100 + ((20 * (0.75 - move_sto.mov.t)) * 4);
indicators.sto22._yscale = 100 + ((20 * (0.75 - move_sto.mov.t)) * 4);
}
}
if (move_sto.mov.t > 0.5) {
if (move_sto.mov.t < 0.75) {
indicators.sto33._xscale = 100 + ((20 * (move_sto.mov.t - 0.5)) * 4);
indicators.sto33._yscale = 100 + ((20 * (move_sto.mov.t - 0.5)) * 4);
} else {
indicators.sto33._xscale = 100 + ((20 * (1 - move_sto.mov.t)) * 4);
indicators.sto33._yscale = 100 + ((20 * (1 - move_sto.mov.t)) * 4);
}
}
}
function endIzmenSto() {
indicators.sto11._visible = false;
indicators.sto22._visible = false;
indicators.sto33._visible = false;
indicators.sto1._visible = true;
indicators.sto2._visible = true;
indicators.sto3._visible = true;
}
function endIzmenKubok2() {
_root.KUBOKN = Kubok;
clearInterval(_root.show_kubok);
var _local4 = _root.createEmptyMovieClip("blcup", 76);
var _local5 = _root.GetBlack(_local4, 0, 0, "blcup");
var _local3 = _local4.createEmptyMovieClip("mc", 5);
_local3._x = 320;
_local3._y = 200;
EYE(1);
var _local6 = _root.TextWonCup.text.split("%c").join(_root.TextWonCup["c" + Kubok]);
_root.show_kubok = setInterval(GameClasses.GFunctions.create(this, ShowCup, Kubok), 1000);
indicators.sto1._visible = false;
indicators.sto2._visible = false;
indicators.sto3._visible = false;
}
function ShowCup(N) {
if (panel_down._y != panel_down.dir2) {
EYE(1);
}
clearInterval(_root.show_kubok);
if (N == 4) {
N = 3;
}
var _local4 = new GameClasses.GameHintKubok(_root.createEmptyMovieClip("sSss", 77), (_root.TextWonCup.text.split("%c").join(_root.TextWonCup["c" + N]) + "|") + _root["TextCup" + N].text, 160, 185, GameClasses.GFunctions.create(this, posleKubka), null, N, N);
_local4.setCaption(_root.MagnificentText.text + "!");
}
function posleKubka() {
i_have_kubok = false;
var _local2 = 1;
while (_local2 < 4) {
setLength(_local2, indicators["l" + String(_local2)], Math.min(100, Math.max(0, ((Indic[_local2] - CurrK()) * 100) / (NextK() - CurrK()))));
if (Math.min(100, Math.max(0, ((Indic[_local2] - CurrK()) * 100) / (NextK() - CurrK()))) == 100) {
indicators["sto" + String(_local2)]._visible = true;
} else {
indicators["sto" + String(_local2)]._visible = false;
}
_local2++;
}
EYE(0);
}
function Indicators(N, H) {
N = Number(N);
H = Number(H);
if (Kubok < 4) {
Indic[N] = Indic[N] + H;
if (NextKubok(H, N)) {
var _local2 = 1;
while (_local2 < 4) {
SetIndLength(N, indicators["l" + _local2], Math.min(100, Math.max(0, ((Indic[_local2] - CurrK()) * 100) / (NextK() - CurrK()))));
_local2++;
}
Indicators(1, 0);
Indicators(2, 0);
Indicators(3, 0);
indicators.sto1._visible = true;
indicators.sto2._visible = true;
indicators.sto3._visible = true;
indicators.sep1._visible = false;
indicators.sep2._visible = false;
indicators.sep3._visible = false;
} else {
var _local5 = SetIndLength(N, indicators["l" + N], Math.min(100, Math.max(0, ((Indic[N] - CurrK()) * 100) / (NextK() - CurrK()))));
if (_local5 && (H > 0)) {
indicators["sto" + String(N)]._visible = true;
}
if ((Math.min(100, Math.max(0, ((Indic[N] - CurrK()) * 100) / (NextK() - CurrK()))) < 100) && (H < 0)) {
indicators["sto" + String(N)]._visible = false;
}
}
indicators.k.gotoAndStop(Kubok + 1);
}
}
function Indicators2(N, H) {
N = Number(N);
H = Number(H);
indicators["sep" + String(N)]._x = 3 + ((Math.min(100, Math.max(0, ((Indic[N] - CurrK()) * 100) / (NextK() - CurrK()))) * 165) / 100);
if ((Math.min(100, Math.max(0, ((Indic[N] - CurrK()) * 100) / (NextK() - CurrK()))) > 4) && (Math.min(100, Math.max(0, ((Indic[N] - CurrK()) * 100) / (NextK() - CurrK()))) < 100)) {
indicators["sep" + String(N)]._visible = true;
} else {
indicators["sep" + String(N)]._visible = false;
}
SetIndLength(N, indicators["l" + N], Math.min(100, Math.max(0, (((Indic[N] + H) - CurrK()) * 100) / (NextK() - CurrK()))));
}
function SetIndLength(N, MC, L) {
if (i_have_kubok) {
L = 100;
}
if (N == 1) {
move_ind = move_ind1;
cur_ind = ind1;
line_ind1 = new GameClasses.Line(cur_ind, L);
} else if (N == 2) {
move_ind = move_ind2;
cur_ind = ind2;
line_ind2 = new GameClasses.Line(cur_ind, L);
} else if (N == 3) {
move_ind = move_ind3;
cur_ind = ind3;
line_ind3 = new GameClasses.Line(cur_ind, L);
}
if ((Math.abs(cur_ind - L) * 10) == 0) {
setLength(N, MC, L);
} else {
move_ind.mov.newInitMove(move_ind, Math.abs(cur_ind - L) * 10, 0);
}
return(L == 100);
}
function updInd1() {
setLength(1, indicators.l1, line_ind1.getPoint(move_ind1.mov.t));
}
function updInd2() {
setLength(2, indicators.l2, line_ind2.getPoint(move_ind2.mov.t));
}
function updInd3() {
setLength(3, indicators.l3, line_ind3.getPoint(move_ind3.mov.t));
}
function endInd1() {
if (Math.abs(ind1 - Math.min(100, Math.max(0, ((Indic[1] - CurrK()) * 100) / (NextK() - CurrK())))) < 2) {
indicators.sep1._visible = false;
}
}
function endInd2() {
if (Math.abs(ind2 - Math.min(100, Math.max(0, ((Indic[2] - CurrK()) * 100) / (NextK() - CurrK())))) < 2) {
indicators.sep2._visible = false;
}
}
function endInd3() {
if (Math.abs(ind3 - Math.min(100, Math.max(0, ((Indic[3] - CurrK()) * 100) / (NextK() - CurrK())))) < 2) {
indicators.sep3._visible = false;
}
}
function setLength(N, MC, L) {
if (N == 1) {
ind1 = L;
} else if (N == 2) {
ind2 = L;
} else if (N == 3) {
ind3 = L;
}
delete MC.onEnterFrame;
var _local9 = 1.7;
var _local7 = MC._width;
if (L < 2) {
MC._alpha = 0;
return(false);
}
MC._alpha = 100;
var _local6 = int(L * _local9) - 6;
if (_local6 < 5) {
_local6 = 5;
}
MC.l._x = 0;
MC.r._x = _local6;
var _local2 = 5;
while (_local2 < 175) {
if (_local2 < _local6) {
if (!MC["c" + _local2]) {
var _local4 = MC.c.duplicateMovieClip("c" + _local2, _local2);
_local4._x = _local2;
}
} else {
if (!MC["c" + _local2]) {
return((L == 100) && (_local7 < MC._width));
}
MC["c" + _local2].removeMovieClip();
}
_local2++;
}
return(false);
}
function ConfermSell2(M, F1, F2) {
if (F2 == undefined) {
F2 = DDD;
}
var _local4 = new GameClasses.GameHintYellow(_root.createEmptyMovieClip("sSss1", 777), (_root.TextSell.text + _root.TextDollar.text) + M, 195, 150, F1, F2);
}
function ConfermSell(M, F1, F2, num) {
if (F2 == undefined) {
F2 = DDD;
}
var _local4 = new GameClasses.GameHintProdaga(_root.createEmptyMovieClip("sSss1", 777), (_root.TextSell.text + _root.TextDollar.text) + M, 190, 60, F1, F2, num);
}
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() {
var _local2 = 0;
while (_local2 < DepthArr.length) {
if (DepthArr[_local2].Name.substr(0, 2) == "fi") {
tank[DepthArr[_local2].Name].AttachNos();
return(true);
}
_local2++;
}
}
function Wish() {
clearInterval(wishing);
wishing = setInterval(GameClasses.GFunctions.create(this, Wish), 30000 + random(60000));
var _local2 = DepthArr.length - 1;
while (_local2 >= 0) {
if (DepthArr[_local2].Name.substr(0, 2) == "fi") {
tank[DepthArr[_local2].Name].Wish();
return(true);
}
_local2--;
}
}
function FunctionHelp() {
var _local2 = createEmptyMovieClip("help_screen", 345);
var _local3 = new GameClasses.BitmapHelp(_local2, PanelPosition);
}
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 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, -2, -3, "GameFont", -3, 10, 1, 16, _root.FontWhite, 1000, _root.FontGreenGreen);
_local3.InitFunction(GameClasses.GFunctions.create(this, SkipTutorial, 1));
_local3._x = 105;
_local3._y = 5;
if ((_root.level < 0) && (!_root.Matrix)) {
InitMessage(0);
} else if (money > 20) {
InitMessage(7);
}
}
function InitMessage(N) {
trace(N);
if (_root.SkipTutor) {
return(undefined);
}
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 _local8 = 0;
var _local7 = 0;
var _local9 = 0;
switch (N) {
case 0 :
var _local12 = new GameClasses.GameHint(_local3, _local4.text, _root.pos_hint, _root.pos_hint_y, 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, _root.pos_hint, _root.pos_hint_y, GameClasses.GFunctions.create(this, InitMessage, 2), null, int(_local4.P));
delete _local3.ramka.onPress;
_local8 = 285;
_local7 = 297;
_local9 = 90;
var _local6 = _local3.attachMovie("oval_white", "BL", 98, {_alpha:0, _width:75, _height:58});
_local6._x = 242 - _local3._x;
_local6._y = 412 - _local3._y;
_local6.tabEnabled = false;
var TMC = menupanel.button_shop.but;
_local6.TMC = TMC;
_local6.T = this;
_local6.onRollOver = function () {
this.TMC.onRollOver();
};
_local6.onRollOut = function () {
this.TMC.onRollOut();
};
_local6.onPress = function () {
this.TMC.onPress();
};
_local6.onReleaseOutside = function () {
this.TMC.onReleaseOutside();
};
_local6.onRelease = function () {
this.TMC.onRelease();
this.T.InitMessage(2);
};
break;
case 2 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, _root.pos_hint, _root.pos_hint_y, GameClasses.GFunctions.create(this, InitMessage, 2), null, int(_local4.P));
delete _local3.ramka.onPress;
_local8 = 72;
_local7 = 255;
_local9 = 90;
_local6 = _local3.attachMovie("black", "BL", 98, {_alpha:0, _width:80, _height:20});
_local6._x = 12 - _local3._x;
_local6._y = 385 - _local3._y;
_local6.tabEnabled = false;
var TMC = panel_down.b1;
_local6.TMC = TMC;
_local6.T = this;
_local6.onRelease = function () {
this.TMC.onRelease();
this.T.InitMessage(3);
};
break;
case 3 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, _root.pos_hint, _root.pos_hint_y, GameClasses.GFunctions.create(this, InitMessage, 3), null, int(_local4.P));
delete _local3.ramka.onPress;
_local8 = 142;
_local7 = 289;
_local6 = _local3.attachMovie("black", "BL", 98, {_alpha:0, _width:50, _height:40});
_local6._x = 150 - _local3._x;
_local6._y = 400 - _local3._y;
_local6.tabEnabled = false;
var TMC = sellpanel.sell0.black;
_local6.onRollOver = TMC.onRollOver;
_local6.onRollOut = TMC.onRollOut;
_local6.TMC = TMC;
_local6.T = this;
_local6.onRelease = function () {
this.TMC.onRelease();
this.TMC.onRollOut();
this.T.InitMessage(4);
};
break;
case 4 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, _root.pos_hint, _root.pos_hint_y, GameClasses.GFunctions.create(this, InitMessage, 5), null, int(_local4.P));
delete _local3.ramka.onPress;
break;
case 5 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, _root.pos_hint, _root.pos_hint_y, GameClasses.GFunctions.create(this, InitMessage, 6), null, int(_local4.P));
delete _local3.ramka.onPress;
_local8 = 500;
_local7 = 140;
_local9 = 180;
break;
case 6 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, _root.pos_hint, _root.pos_hint_y, GameClasses.GFunctions.create(this, InitMessage, 7), null, int(_local4.P));
delete _local3.ramka.onPress;
_local8 = 554;
_local7 = 290;
_local9 = 0;
_local6 = _local3.attachMovie("oval_white", "BL", 98, {_alpha:0, _width:60, _height:50});
_local6._x = 545 - _local3._x;
_local6._y = 395 - _local3._y;
_local6.tabEnabled = false;
var TMC = donebutton.but;
_local6.TMC = TMC;
_local6.T = this;
_local6.onRollOver = function () {
this.TMC.onRollOver();
};
_local6.onRollOut = function () {
this.TMC.onRollOut();
};
_local6.onPress = function () {
this.TMC.onPress();
};
_local6.onReleaseOutside = function () {
this.TMC.onReleaseOutside();
};
_local6.onRelease = function () {
this.TMC.onRelease();
this.TMC.onRollOut();
this.T.Tutor.removeMovieClip();
};
break;
case 17 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, _root.pos_hint, _root.pos_hint_y, 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, _root.pos_hint, _root.pos_hint_y, GameClasses.GFunctions.create(this, InitMessage, int(N + 1)), null, int(_local4.P));
delete _local3.ramka.onPress;
_local8 = 142;
_local7 = 289;
_local6 = _local3.attachMovie("black", "BL", 98, {_alpha:0, _width:50, _height:40});
_local6._x = 145 - _local3._x;
_local6._y = 400 - _local3._y;
_local6.tabEnabled = false;
var TMC = sellpanel.sell1.black;
_local6.TMC = TMC;
_local6.T = this;
_local6.onRollOver = function () {
this.TMC.onRollOver();
};
_local6.onRollOut = function () {
this.TMC.onRollOut();
};
_local6.onPress = function () {
this.TMC.onPress();
this.T.UnShowHint(999, this.TMC._parent);
this.T.Tutor.ram.r1.removeMovieClip();
};
_local6.onReleaseOutside = function () {
this.TMC.onReleaseOutside();
};
_local6.onRelease = function () {
this.TMC.onRelease();
this.TMC.onRollOut();
this.T.Tutor.ram.r1.removeMovieClip();
};
break;
case 19 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, _root.pos_hint, _root.pos_hint_y, 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, _root.pos_hint, _root.pos_hint_y, GameClasses.GFunctions.create(this, InitMessage, int(N + 1)), null, int(_local4.P));
delete _local3.ramka.onPress;
_local8 = 565;
_local7 = 217;
_local9 = 180;
break;
case 11 :
_local12 = new GameClasses.GameHint(_local3, _local4.text, _root.pos_hint, _root.pos_hint_y, GameClasses.GFunctions.create(this, SkipTutorial), null, int(_local4.P));
delete _local3.ramka.onPress;
break;
default :
InitMessage(int(N + 1));
}
_local3.BLACK.removeMovieClip();
if ((_local8 > 0) && (_local7 > 0)) {
var _local10 = _local3.attachMovie("hint_arrow", "HA", 99);
if ((_local9 == 90) || (_local9 == -90)) {
_local8 = _local8 + 140;
_local7 = _local7 + 110;
}
_local10._x = _local8 - _local3._x;
_local10._y = _local7 - _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, _root.pos_hint, _root.pos_hint_y, 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 == "item") {
DepthArr2[_local2].MoveFish();
} else if (DepthArr2[_local2].type == "bubble") {
BubbleTick(DepthArr2[_local2]);
} else {
DepthArr2.splice(_local2, 1);
}
_local2++;
}
}
var i_have_kubok = false;
var DepthArr = [];
var DepthArr2 = [];
var active = false;
var position = 0;
var NFishes = [0, 0, 0, 0, 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 = 12;
var MaxItems = 45;
var NItems = 0;
var Kubok = 0;
var money = 0;
var IsScrolled = false;
var NItem = 35;
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";
var left_gem = 10;
var ind1 = 0;
var ind2 = 0;
var ind3 = 0;
var buy_compform = false;
var stop_buy = 0;
}
Symbol 2518 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();
ScoreClip.onPress = null;
ScoreClip.useHandCursor = false;
}
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() {
ScoreClip.text.text = Doll + String(score);
}
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 2519 MovieClip [__Packages.GameClasses.GameHint3] Frame 0
class GameClasses.GameHint3 extends Object
{
var This, Text, X, Y, F1, F2, ramka, text, b1, showt, caption, cap;
function GameHint3 (This, Text, X, Y, F1, F2, num) {
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("fish_panel", "ramka", 10, {useHandCursor:false});
text = This.createEmptyMovieClip("text", 20);
text.attachMovie("font_hint", "font_hint", 0);
text.font_hint.text.text = Text;
var _local14 = text._width;
var _local6 = text._height;
text._x = 150;
if ((num == 1) || (num == 2)) {
var _local7 = This.attachMovie("fish" + String(8 + num), "fish", 11, {_x:170, _y:95});
} else if (num == 3) {
var _local7 = This.attachMovie("fish" + String(8 + num), "fish", 11, {_x:161, _y:80});
} else if (num == 4) {
var _local7 = This.attachMovie("fish" + String(8 + num), "fish", 11, {_x:163, _y:80});
} else {
var _local7 = This.attachMovie("new_money", "fish", 11, {_x:152, _y:95});
}
_local7.gotoAndStop("moveleft");
text._y = 215;
_local6 = _local6 + 130;
b1 = This.attachMovie("button_B", "b1", 30);
b1._x = 150 - (b1._width / 2);
b1._y = 247;
b1.InitText(_root.TextOk.text, -3, -3, "GameFont", -3, 12, 1, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
b1.InitFunction(GameClasses.GFunctions.create(this, AGA));
InitRamka(_local6 + 53);
This._x = X;
This._y = Y;
if ((This._y + ramka._height) > 480) {
This._y = 20;
}
}
function DeleteTip() {
clearInterval(showt);
GameClasses.GFunctions.ClearAll(This, 1, 1);
}
function AGA() {
F1();
}
function NEA() {
F2();
DeleteTip();
}
function InitRamka(y) {
ramka.onPress = GameClasses.GFunctions.create(this, AGA);
}
function setCaption(Text) {
caption = Text;
cap = This.createEmptyMovieClip("caption", 21);
cap._x = 150;
cap._y = 190;
cap.attachMovie("grad_yellow", "font_br2", 0);
cap.font_br2.text.text = caption;
}
}
Symbol 2520 MovieClip [__Packages.GameClasses.Shop] Frame 0
class GameClasses.Shop
{
var pnt;
function Shop (_pnt) {
pnt = _pnt;
}
function ShowFishes() {
pnt.panel_down.bb1._visible = true;
pnt.panel_down.bb2._visible = false;
pnt.panel_down.bb3._visible = false;
pnt.panel_down.bc1._visible = false;
pnt.panel_down.bc2._visible = true;
pnt.panel_down.bc3._visible = true;
var _local4 = 0;
while (_local4 < pnt.NoFishes) {
var _local3 = pnt.sellpanel.attachMovie("panelsell", "sell" + _local4, _local4, {_x:(_local4 * 65) + 1, _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(pnt, pnt.ShowHint, _local4, "Fish", _local3));
_local3.minus.onRollOut = (_local3.black.onRollOut = (_local3.black.onReleaseOutside = GameClasses.GFunctions.create(pnt, pnt.UnShowHint, _local4, _local3)));
_local3.black.onRelease = GameClasses.GFunctions.create(pnt, pnt.AddFish, _local4);
_local3.black.tabEnabled = false;
_local3.minus.onRelease = null;
_local3.minus.tabEnabled = false;
var _local5 = ((pnt.NFishes[_local4 + 1] > 0) ? (String(pnt.NFishes[_local4 + 1])) : " ");
_root.TextShow(_local3.num, _local5, "GameFont", 2, 0, 1, 14, _root.FontBlue, 100, _root.FontWhite);
_local3.num._x = _local3.num._x + 11;
_local3.num._y = _local3.num._y + 4;
_local3.num.swapDepths(99);
if (pnt.NFishes[_local3.ID] > 0) {
_local3.minus.onRelease = GameClasses.GFunctions.create(pnt, pnt.DelFish, _local4, _local3);
}
_local4++;
}
}
function ShowBeauty() {
pnt.panel_down.bb1._visible = false;
pnt.panel_down.bb2._visible = true;
pnt.panel_down.bb3._visible = false;
pnt.panel_down.bc1._visible = true;
pnt.panel_down.bc2._visible = false;
pnt.panel_down.bc3._visible = true;
var _local4 = 1;
while (_local4 <= pnt.NItem) {
var _local3 = pnt.sellpanel.attachMovie("panelsell", "sell" + _local4, _local4, {_x:((_local4 - 1) * 65) + 1, _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.ins._x = 6;
_local3.ins._y = 3;
_local3.minus._visible = (_local3.plus._visible = false);
_local3.black.onRollOver = GameClasses.GFunctions.create(pnt, pnt.ShowHint, _local4, "Item", _local3);
_local3.black.onRollOut = (_local3.black.onReleaseOutside = GameClasses.GFunctions.create(pnt, pnt.UnShowHint, _local4, _local3));
_local3.black.onPress = GameClasses.GFunctions.create(pnt, pnt.SmallPress, _local3);
_local3.black.tabEnabled = false;
_local4++;
}
}
function ShowComfort() {
pnt.panel_down.bb1._visible = false;
pnt.panel_down.bb2._visible = false;
pnt.panel_down.bb3._visible = true;
pnt.panel_down.bc1._visible = true;
pnt.panel_down.bc2._visible = true;
pnt.panel_down.bc3._visible = false;
var _local4 = 1;
while (_local4 <= 8) {
var _local3 = pnt.sellpanel.attachMovie("panelsell", "sell" + _local4, 5 + _local4, {_x:((_local4 - 1) * 65) + 1, _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.ins._x = 6;
_local3.ins._y = 2;
_local3.minus._visible = (_local3.plus._visible = false);
_local3.black.onRollOver = GameClasses.GFunctions.create(pnt, pnt.ShowHint, _local4, "Comfort", _local3);
_local3.black.onRollOut = (_local3.black.onReleaseOutside = GameClasses.GFunctions.create(pnt, pnt.UnShowHint, _local4, _local3));
_local3.black.tabEnabled = false;
var _local5 = _local3.createEmptyMovieClip("TEXT", 10);
_local5._x = (_local3._width / 2) - 2;
_local5._y = (_local3._height / 2) + 6;
_local5._rotation = 0;
if (pnt.Comfort[_local4] == 0) {
_local3.black.onRelease = GameClasses.GFunctions.create(pnt, pnt.ComfortPress, _local3);
} else if (pnt.Comfort[_local4] == 1) {
_root.TextShow(pnt.sellpanel["sell" + _local4].TEXT, _root.TextBought.text, "TextFont", -4, 9, 1, 13, _root.FontWhite, 100, _root.FontBlueBlue);
}
_local4++;
}
}
}
Symbol 2521 MovieClip [__Packages.GameClasses.Line] Frame 0
class GameClasses.Line
{
var keys;
function Line () {
keys = new Array();
if (arguments.length > 0) {
initLine(arguments);
}
}
function destroy() {
clear();
}
function initLine(A) {
var _local2 = 0;
while (_local2 < A.length) {
addKey(A[_local2]);
_local2++;
}
}
function clear() {
var _local2 = 0;
while (_local2 < keys.length) {
delete keys[_local2];
_local2++;
}
delete keys;
}
function addKey(key) {
keys.push(key);
}
function calculate() {
}
function getPoint(t) {
var _local2 = 0;
var _local3 = t * (keys.length - 1);
while (_local2 < _local3) {
_local2++;
}
if (_local2 <= 0) {
return(keys[0]);
}
if (_local2 == keys.length) {
return(keys[keys.length - 1]);
}
_local2--;
return(keys[_local2] + ((keys[_local2 + 1] - keys[_local2]) * (_local3 - _local2)));
}
}
Symbol 2522 MovieClip [__Packages.GameClasses.FreeMove] Frame 0
class GameClasses.FreeMove
{
var mc, color_object, x0, x1, y0, y1, rotation0, rotation1, xscale0, xscale1, yscale0, yscale1, alpha0, alpha1, color0, color1, vx, vy, ax, ay;
function FreeMove () {
}
function get endAct() {
return(endActFunction);
}
function set endAct(fun) {
delete endActFunction;
endActFunction = fun;
//return(endAct);
}
static function getIntervalFullTime(i) {
var _local1 = interval_objects[i].mov;
if (_local1) {
return(_local1.t * _local1.T);
}
return(0);
}
static function setPeriodicInterval(obj_src, fun, T, param1, param2, param3, param4, param5) {
var _local2 = new Object();
_local2.mov = new GameClasses.FreeMove();
_local2.mov.info = (((("periodic fun=" + fun) + "\n from obj=") + typeof(obj_src)) + ":") + String(obj_src);
_local2.mov.updateAct = null;
_local2.mov.endActFunction = GameClasses.GFunctions.create(_local2, function (os, f) {
os[f](param1, param2, param3, param4, param5);
this.mov.newInitMove(this, T, 0);
}, obj_src, fun);
_local2.mov.newInitMove(_local2, T, 0);
interval_objects.push(_local2);
return(interval_objects.length - 1);
}
static function setInterval(obj_src, fun, T, param1, param2, param3, param4, param5) {
var _local2 = new Object();
_local2.mov = new GameClasses.FreeMove();
_local2.mov.info = (((("permanent fun=" + fun) + "\n from obj=") + typeof(obj_src)) + ":") + String(obj_src);
_local2.mov.updateAct = GameClasses.GFunctions.create(obj_src, obj_src[fun], param1, param2, param3, param4, param5);
_local2.mov.endActFunction = GameClasses.GFunctions.create(_local2, function () {
this.mov.newInitMove(this, GameClasses.FreeMove.interval_objects_T, 0);
});
_local2.mov.newInitMove(_local2, interval_objects_T, 0);
interval_objects.push(_local2);
return(interval_objects.length - 1);
}
static function clearInterval(i) {
if ((!i) || (i <= 0)) {
return(undefined);
}
if (interval_objects[i]) {
interval_objects[i].mov.destroy();
delete interval_objects[i].mov;
delete interval_objects[i];
}
var _local1 = interval_objects.length - 1;
while ((!interval_objects[_local1]) && (_local1 >= 1)) {
interval_objects.pop();
_local1--;
}
}
static function getActiveIntervals() {
var _local2 = newline;
var _local3 = 0;
var _local1 = 1;
while (_local1 < interval_objects.length) {
if (interval_objects[_local1]) {
_local3++;
if (interval_objects[_local1].mov.info == "delay") {
_local2 = _local2 + ((((("" + _local1) + " ") + "delay t=") + ((1 - interval_objects[_local1].mov.t) * interval_objects[_local1].mov.T)) + newline);
} else {
_local2 = _local2 + (((("" + _local1) + " ") + interval_objects[_local1].mov.info) + newline);
}
}
_local1++;
}
return(("\nLENGTH=" + _local3) + _local2);
}
static function pauseInterval(i) {
interval_objects[i].mov.makePause();
}
static function playInterval(i) {
interval_objects[i].mov.makePlay();
}
static function resetInterval(i) {
interval_objects[i].mov.t = 0;
}
static function makeDelay(T, fun) {
var _local1 = new Object();
_local1.mov = new GameClasses.FreeMove();
_local1.mov.endActFunction = GameClasses.GFunctions.create(GameClasses.FreeMove, function (ob, fn) {
fn();
ob.mov.destroy();
delete ob.mov;
}, _local1, fun);
_local1.mov.newInitMove(_local1, T, 0);
return(_local1.mov);
}
function dispose() {
destroy();
}
function destroy() {
stopMove();
clearInterval(interval);
interval = 0;
delete mc;
sp_x.clear();
sp_y.clear();
acc_x.clear();
acc_y.clear();
sp_xscale.clear();
sp_yscale.clear();
sp_rot.clear();
sp_alpha.clear();
sp_color.clear();
delete color_object;
delete sp_x;
delete sp_y;
delete acc_x;
delete acc_y;
delete sp_xscale;
delete sp_yscale;
delete sp_rot;
delete sp_alpha;
delete sp_color;
delete endActFunction;
}
function clear() {
clearInterval(interval);
interval = 0;
sp_x.clear();
sp_y.clear();
acc_x.clear();
acc_y.clear();
sp_xscale.clear();
sp_yscale.clear();
sp_rot.clear();
sp_alpha.clear();
sp_color.clear();
delete color_object;
delete sp_x;
delete sp_y;
delete acc_x;
delete acc_y;
delete sp_xscale;
delete sp_yscale;
delete sp_rot;
delete sp_alpha;
delete sp_color;
}
function initTr(sp, nsp) {
if (sp == nsp) {
return(sp);
}
sp.clear();
return(nsp);
}
function newInitMove(mc, T, delay, x1, y1, xscale1, yscale1, rotation1, alpha1, color1) {
if (mc) {
addActivePiece(mc, getTimer());
initMove(mc, T, delay, x1, y1, xscale1, yscale1, rotation1, alpha1, color1);
}
}
function initMove(mc, T, delay, x1, y1, xscale1, yscale1, rotation1, alpha1, color1) {
if ((delay == undefined) || (delay == 0)) {
delay_time = 0;
} else {
delay_time = delay;
}
this.mc = mc;
if ((x1 == undefined) || (x1 == null)) {
sp_x.clear();
sp_x = null;
} else if (((x1 instanceof GameClasses.Spline) || (x1 instanceof GameClasses.AccelLinePath)) || (x1 instanceof GameClasses.Line)) {
sp_x = initTr(sp_x, x1);
} else {
sp_x.clear();
x0 = mc._x;
this.x1 = x1;
sp_x = new GameClasses.Spline(x0, x1);
}
if ((y1 == undefined) || (y1 == null)) {
sp_y.clear();
sp_y = null;
} else if (((y1 instanceof GameClasses.Spline) || (y1 instanceof GameClasses.AccelLinePath)) || (y1 instanceof GameClasses.Line)) {
sp_y = initTr(sp_y, y1);
} else {
sp_y.clear();
y0 = mc._y;
this.y1 = y1;
sp_y = new GameClasses.Spline(y0, y1);
}
if ((rotation1 == undefined) || (rotation1 == null)) {
sp_rot.clear();
sp_rot = null;
} else if ((rotation1 instanceof GameClasses.Spline) || (rotation1 instanceof GameClasses.Line)) {
sp_rot = initTr(sp_rot, rotation1);
} else {
sp_rot.clear();
rotation0 = mc._rotation;
this.rotation1 = rotation1;
sp_rot = new GameClasses.Spline(rotation0, rotation1);
}
if ((xscale1 == undefined) || (xscale1 == null)) {
sp_xscale.clear();
sp_xscale = null;
} else if ((xscale1 instanceof GameClasses.Spline) || (xscale1 instanceof GameClasses.Line)) {
sp_xscale = initTr(sp_xscale, xscale1);
} else {
sp_xscale.clear();
xscale0 = mc._xscale;
this.xscale1 = xscale1;
sp_xscale = new GameClasses.Spline(xscale0, xscale1);
}
if ((yscale1 == undefined) || (yscale1 == null)) {
sp_yscale.clear();
sp_yscale = null;
} else if ((yscale1 instanceof GameClasses.Spline) || (yscale1 instanceof GameClasses.Line)) {
sp_yscale = initTr(sp_yscale, yscale1);
} else {
sp_yscale.clear();
yscale0 = mc._yscale;
this.yscale1 = yscale1;
sp_yscale = new GameClasses.Spline(yscale0, yscale1);
}
if ((alpha1 == undefined) || (alpha1 == null)) {
sp_alpha.clear();
sp_alpha = null;
} else if ((alpha1 instanceof GameClasses.Spline) || (alpha1 instanceof GameClasses.Line)) {
sp_alpha = initTr(sp_alpha, alpha1);
} else {
sp_alpha.clear();
alpha0 = mc._alpha;
this.alpha1 = alpha1;
sp_alpha = new GameClasses.Spline(alpha0, alpha1);
}
if ((color1 == undefined) || (color1 == null)) {
sp_color.clear();
sp_color = null;
} else if (color1 instanceof Array) {
sp_color.clear();
sp_color = new GameClasses.Spline(0, 1);
color_object = new Color(mc);
color0 = color1[0];
color0_r = (color0 >> 16) % 256;
color0_g = (color0 >> 8) % 256;
color0_b = color0 % 256;
this.color1 = color1[1];
color1_r = (this.color1 >> 16) % 256;
color1_g = (this.color1 >> 8) % 256;
color1_b = this.color1 % 256;
} else {
sp_color.clear();
sp_color = new GameClasses.Spline(0, 1);
color_object = new Color(mc);
color0 = color_object.getRGB();
color0_r = (color0 >> 16) % 256;
color0_g = (color0 >> 8) % 256;
color0_b = color0 % 256;
this.color1 = color1;
color1_r = (color1 >> 16) % 256;
color1_g = (color1 >> 8) % 256;
color1_b = color1 % 256;
}
this.T = T;
if (start_time == 0) {
last_t = getTimer();
clearInterval(interval);
interval = 0;
interval = setInterval(this, "updateMove", 4);
} else {
last_t = start_time;
}
active = true;
}
function updateActInverse() {
t = 1 - t;
if (sp_x != null) {
mc._x = sp_x.getPoint(t);
}
if (sp_y != null) {
mc._y = sp_y.getPoint(t);
}
if (sp_xscale != null) {
mc._xscale = sp_xscale.getPoint(t);
}
if (sp_yscale != null) {
mc._yscale = sp_yscale.getPoint(t);
}
if (sp_rot != null) {
mc._rotation = sp_rot.getPoint(t);
}
if (sp_color != null) {
color_r = color0_r + ((color1_r - color0_r) * sp_color.getPoint(t));
color_g = color0_g + ((color1_g - color0_g) * sp_color.getPoint(t));
color_b = color0_b + ((color1_b - color0_b) * sp_color.getPoint(t));
color = ((color_r << 16) + (color_g << 8)) + color_b;
color_object.setRGB(color);
}
if (sp_alpha != null) {
mc._alpha = sp_alpha.getPoint(t);
}
}
function updateAct() {
if (sp_x != null) {
mc._x = sp_x.getPoint(t);
}
if (sp_y != null) {
mc._y = sp_y.getPoint(t);
}
if (sp_xscale != null) {
mc._xscale = sp_xscale.getPoint(t);
}
if (sp_yscale != null) {
mc._yscale = sp_yscale.getPoint(t);
}
if (sp_rot != null) {
mc._rotation = sp_rot.getPoint(t);
}
if (sp_color != null) {
color_r = color0_r + ((color1_r - color0_r) * sp_color.getPoint(t));
color_g = color0_g + ((color1_g - color0_g) * sp_color.getPoint(t));
color_b = color0_b + ((color1_b - color0_b) * sp_color.getPoint(t));
color = ((color_r << 16) + (color_g << 8)) + color_b;
color_object.setRGB(color);
}
if (sp_alpha != null) {
mc._alpha = sp_alpha.getPoint(t);
}
}
function updateMove(current_time) {
if (current_time != undefined) {
curr_t = current_time;
} else {
curr_t = getTimer();
}
t = (curr_t - last_t) * global_time_coof;
if (delay_time != 0) {
if (t >= delay_time) {
mc._visible = true;
delay_time = 0;
last_t = curr_t;
t = 0;
} else {
return(true);
}
}
if (t >= T) {
t = 1;
updateAct();
if (start_time == 0) {
active = false;
clearInterval(interval);
interval = 0;
endActFunction();
}
return(false);
}
t = t / T;
updateAct();
return(true);
}
function initLine(mc, x1, y1, T) {
initMove(mc, T, 0, x1, y1);
}
function initLineTo(mc, x1, y1, xscale1, yscale1, rotation1, T) {
initMove(mc, T, 0, x1, y1, xscale1, yscale1, rotation1);
}
function initAccelLineTo(mc, x1, y1, alp1, T, delay, accel_fall, coof_abs) {
var _local5 = new GameClasses.Spline(mc._x, x1);
var _local2 = new GameClasses.AccelLinePath();
_local2.addKey(mc._y, accel_fall, 0);
_local2.addKey(y1, accel_fall, coof_abs);
_local2.addKey(y1, 0, 1);
var _local3 = _local2.calculatePath();
initMove(mc, _local3, delay, _local5, _local2, undefined, undefined, undefined, alp1);
return(_local2.getT(0));
}
function initDisappear(mc, T) {
initMove(mc, T, 0, mc._x + (mc._width / 2), mc._y + (mc._height / 2), 0, 0);
}
function initSplineTo(mc, x1, y1, xscale1, yscale1, rotation1, T, alpha1, delay) {
initMove(mc, T, delay, x1, y1, xscale1, yscale1, rotation1, alpha1);
}
function initParticle(mc, T, fi, v, a, alp1, scale1, rot1, color1, delay) {
vx = v * Math.cos(fi);
vy = v * Math.sin(fi);
ax = a * Math.cos(fi);
ay = a * Math.sin(fi);
var _local8 = mc._x + ((vx + ((T * ax) * 0.5)) * T);
var _local7 = mc._y + ((vy + ((T * ay) * 0.5)) * T);
var _local4 = new GameClasses.AccelLinePath();
_local4.addKey(mc._x, ax, vx);
_local4.addKey(_local8, 0, 1);
_local4.calculatePath();
var _local3 = new GameClasses.AccelLinePath();
_local3.addKey(mc._y, ay, vy);
_local3.addKey(_local7, 0, 1);
_local3.calculatePath();
if ((delay != undefined) && (delay != 0)) {
mc._visible = false;
}
initMove(mc, T, delay, _local4, _local3, scale1, scale1, rot1, alp1, color1);
}
function stopMove() {
if (start_time == 0) {
active = false;
clearInterval(interval);
interval = 0;
} else {
stopMove1();
}
}
function stopMove1() {
if (active) {
if (piece_number == -1) {
}
if ((piece_number != -1) && (curr_length_ap > 0)) {
var _local2 = piece_number;
active = false;
piece_number = -1;
active_pieces[_local2] = active_pieces[curr_length_ap - 1];
active_pieces[_local2].mov.piece_number = _local2;
delete active_pieces[curr_length_ap - 1];
curr_length_ap--;
}
}
}
static function clearAll() {
var _local1 = delay_obj.length - 1;
while (_local1 >= 0) {
delay_obj[_local1].mov.destroy();
delete delay_obj[_local1].mov;
delete delay_obj[_local1];
_local1--;
}
delete delay_obj;
delay_obj = new Array();
_local1 = interval_objects.length - 1;
while (_local1 >= 0) {
interval_objects[_local1].mov.destroy();
delete interval_objects[_local1].mov;
delete interval_objects[_local1];
_local1--;
}
delete interval_objects;
interval_objects = new Array(1);
_local1 = curr_length_ap - 1;
while (_local1 >= 0) {
active_pieces[_local1].mov.stopMove();
delete active_pieces[_local1];
_local1--;
}
delete active_pieces;
active_pieces = new Array(length_ap);
curr_length_ap = 0;
}
static function addActivePiece(mc, st) {
if (mc) {
if (mc.mov.active) {
mc.mov.stopMove1();
}
mc.mov.start_time = st;
mc.mov.piece_number = curr_length_ap;
active_pieces[curr_length_ap] = mc;
curr_length_ap++;
}
}
static function updateActivePieces() {
if (is_pause) {
return(undefined);
}
var _local3 = getTimer();
var _local2 = curr_length_ap - 1;
while (_local2 >= 0) {
var _local1 = active_pieces[_local2];
if (String(_local1) == "") {
if ((curr_length_ap > 1) && (_local2 != (curr_length_ap - 1))) {
active_pieces[_local2] = active_pieces[curr_length_ap - 1];
active_pieces[_local2].mov.piece_number = _local2;
delete active_pieces[curr_length_ap - 1];
} else {
delete active_pieces[_local2];
}
curr_length_ap--;
} else if (_local1.mov.is_mov_pause) {
} else {
if (_local1.mov.active) {
if (!_local1.mov.updateMove(_local3)) {
_local1.mov.stopMove();
_local1.mov.endActFunction();
}
}
}
_local2--;
}
}
function infoGlobal() {
}
static function pause() {
if (is_pause) {
return(undefined);
}
pause_t = getTimer();
is_pause = true;
}
static function play() {
if (!is_pause) {
return(undefined);
}
var _local3 = getTimer();
var _local4 = _local3 - pause_t;
var _local1 = curr_length_ap - 1;
while (_local1 >= 0) {
var _local2 = active_pieces[_local1];
if (_local2.mov.last_t <= pause_t) {
_local2.mov.last_t = _local2.mov.last_t + _local4;
} else {
_local2.mov.last_t = _local3;
}
_local1--;
}
is_pause = false;
}
function makePause() {
if (is_mov_pause) {
return(undefined);
}
mov_pause_t = getTimer();
is_mov_pause = true;
}
function makePlay() {
if (!is_mov_pause) {
return(undefined);
}
var _local2 = getTimer();
last_t = _local2 - (t * T);
is_mov_pause = false;
}
var color0_r = 0;
var color0_g = 0;
var color0_b = 0;
var color1_r = 0;
var color1_g = 0;
var color1_b = 0;
var color = 0;
var color_r = 0;
var color_g = 0;
var color_b = 0;
var sp_x = null;
var sp_y = null;
var acc_x = null;
var acc_y = null;
var sp_xscale = null;
var sp_yscale = null;
var sp_rot = null;
var sp_alpha = null;
var sp_color = null;
var interval = 0;
var T = 0;
var t = 0;
var last_t = 0;
var curr_t = 0;
var delay_time = 0;
var info = "";
var start_time = 0;
var active = false;
var piece_number = -1;
var endActFunction = null;
var mov_pause_t = 0;
var is_mov_pause = false;
static var global_time_coof = 1;
static var length_ap = 1000;
static var curr_length_ap = 0;
static var pause_t = 0;
static var is_pause = false;
static var delay_obj = new Array();
static var interval_objects = new Array(1);
static var interval_objects_T = 600000;
static var active_pieces = new Array(length_ap);
}
Symbol 2523 MovieClip [__Packages.GameClasses.AccelLinePath] Frame 0
class GameClasses.AccelLinePath
{
var p, t_full;
function AccelLinePath () {
p = new Array();
t_full = 0;
}
function getT(i) {
return(p[i].t);
}
function destroy() {
clear();
}
function clear() {
var _local2 = 0;
while (_local2 < p.length) {
delete p[_local2];
_local2++;
}
delete p;
}
function addKey(xp, ap, vp) {
p.push({x:xp, a:ap, v:vp, t:0});
}
function calculatePath() {
var _local2;
_local2 = 0;
while (_local2 < (p.length - 1)) {
if (p[_local2].a != 0) {
p[_local2].t = ((-p[_local2].v) / p[_local2].a) + Math.sqrt(Math.pow(p[_local2].v / p[_local2].a, 2) + ((2 * (p[_local2 + 1].x - p[_local2].x)) / p[_local2].a));
p[_local2 + 1].v = p[_local2 + 1].v * (p[_local2].v + (p[_local2].a * p[_local2].t));
} else if (p[_local2].v == 0) {
p[_local2].t = 1;
p[_local2].v = (p[_local2 + 1].x - p[_local2].x) / p[_local2].t;
p[_local2 + 1].v = 0;
} else {
p[_local2].t = (p[_local2 + 1].x - p[_local2].x) / p[_local2].v;
p[_local2 + 1].v = p[_local2 + 1].v * p[_local2].v;
}
_local2++;
}
_local2 = 1;
while (_local2 < (p.length - 1)) {
p[_local2].t = p[_local2].t + p[_local2 - 1].t;
_local2++;
}
t_full = p[p.length - 2].t;
return(t_full);
}
function getPoint(t) {
var _local2 = 0;
var _local4;
t = t * t_full;
while ((_local2 < p.length) && (p[_local2].t < t)) {
_local2++;
}
if ((_local2 >= (p.length - 1)) || (t > t_full)) {
return(p[p.length - 1].x);
}
if (_local2 > 0) {
_local4 = t - p[_local2 - 1].t;
} else {
_local4 = t;
}
return((p[_local2].x + (p[_local2].v * _local4)) + ((p[_local2].a * (_local4 * _local4)) / 2));
}
}
Symbol 2524 MovieClip [__Packages.GameClasses.GameHintYellow] Frame 0
class GameClasses.GameHintYellow extends Object
{
var This, Text, X, Y, F1, F2, ramka, text, b1, BLACK, showt, b2, xs, ys, caption, cap;
function GameHintYellow (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_yellow", "ramka", 10, {useHandCursor:false});
text = This.createEmptyMovieClip("text", 20);
text.attachMovie("font_hint", "font_hint", 0);
text.font_hint.text.text = Text;
var _local17 = text._width;
var _local5 = text._height;
text._x = 130;
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 = 136 - (b1._width / 2);
b1._y = _local5;
b1.InitText(_root.TextOk.text, -3, -3, "GameFont", -3, 12, 1, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
} else {
b2 = This.attachMovie("button_B", "b2", 40);
BLACK.onPress = null;
b1._x = (132 - b1._width) - 5;
b2._x = 137;
b1._y = (b2._y = _local5 + 20);
b1.InitText(_root.TextYes.text, -3, -3, "GameFont", -3, 12, 1, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
b2.InitText(_root.TextNo.text, -3, -3, "GameFont", -3, 12, 1, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
}
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 + 63);
b1._y = (b2._y = heg - 44);
text._y = ((heg / 2) - (text._height / 2)) - 8;
This._x = X;
This._y = Y;
if ((This._y + ramka._height) > 480) {
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;
if (y < min_heg) {
y = min_heg;
}
heg = y + 10;
ramka.md._y = ramka.up._height - 1;
ramka.dw._y = (y - ramka.dw._height) - 2;
ramka.md._height = (y - ramka.up._height) - ramka.dw._height;
}
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;
}
function setCaption(Text) {
caption = Text;
cap = This.createEmptyMovieClip("caption", 21);
cap._x = 127;
cap._y = 30;
text._y = text._y + 10;
b1._y = (b2._y = heg - 44);
cap.attachMovie("grad_yellow", "font_br2", 0);
cap.font_br2.text.text = caption;
}
var h = 0;
var min_heg = 135;
var heg = 0;
}
Symbol 2525 MovieClip [__Packages.GameClasses.GameHintKubok] Frame 0
class GameClasses.GameHintKubok extends Object
{
var This, Text, X, Y, F1, F2, ramka, text, b1, BLACK, showt, b2, line_move, line_move1, move_hint, xs, ys, caption, cap;
function GameHintKubok (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_kubok", "ramka", 10, {useHandCursor:false});
text = This.createEmptyMovieClip("text", 20);
_root.TextShow(text, Text, "TextFont", -3, 14, 1, 14, _root.FontWhite, 270, _root.FontBlueBlue);
var _local16 = text._width;
var _local6 = text._height;
text._x = 165;
if (K > 0) {
if (K == 1) {
This.attachMovie("kubok_big", "kubok", 11, {_x:165, _y:145}).gotoAndStop(K + 1);
text._y = 250;
} else if (K == 2) {
This.attachMovie("kubok_big", "kubok", 11, {_x:165, _y:145}).gotoAndStop(K + 1);
text._y = 245;
} else if (K == 3) {
This.attachMovie("kubok_big", "kubok", 11, {_x:165, _y:150}).gotoAndStop(K + 1);
text._y = 255;
}
_local6 = _local6 + (150 + ((K - 1) * 10));
} 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 = 130;
b1._y = 330;
b1.InitText(_root.TextOk.text, -3, -3, "GameFont", -3, 12, 1, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
} else {
b2 = This.attachMovie("button_B", "b2", 40);
BLACK.onPress = null;
b1._x = (125 - b1._width) - 5;
b2._x = 130;
b1._y = (b2._y = _local6 + 8);
b1.InitText(_root.TextYes.text, -3, -3, "GameFont", -3, 12, 1, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
b2.InitText(_root.TextNo.text, -3, -3, "GameFont", -3, 12, 1, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
}
b1.InitFunction(GameClasses.GFunctions.create(this, AGA));
b2.InitFunction(GameClasses.GFunctions.create(this, NEA));
if (K == -1) {
clearInterval(showt);
BLACK.onPress = null;
_local6 = _local6 - 28;
}
InitRamka(_local6 + 53);
This._x = X;
This._y = -300;
if ((This._y + ramka._height) > 380) {
This._y = 20;
}
line_move = new Spline(-300, 40, 20, 40);
line_move1 = new Spline(-300, 40);
move_hint = new Object();
move_hint.mov = new GameClasses.FreeMove();
move_hint.mov.updateAct = GameClasses.GFunctions.create(this, updShowHint);
move_hint.mov.endAct = GameClasses.GFunctions.create(this, endShowHint);
move_hint.mov.newInitMove(move_hint, 600, 0);
}
function updShowHint() {
This._y = line_move.getPoint(move_hint.mov.t);
}
function endShowHint() {
}
function updHideHint() {
This._y = line_move1.getPoint(1 - move_hint.mov.t);
This._alpha = 100 - (100 * move_hint.mov.t);
}
function endHideHint() {
DeleteTip();
}
function BLclick() {
clearInterval(showt);
BLACK.onPress = GameClasses.GFunctions.create(this, AGA);
}
function DeleteTip() {
clearInterval(showt);
GameClasses.GFunctions.ClearAll(This, 1, 1);
}
function AGA() {
F1();
move_hint = new Object();
move_hint.mov = new GameClasses.FreeMove();
move_hint.mov.updateAct = GameClasses.GFunctions.create(this, updHideHint);
move_hint.mov.endAct = GameClasses.GFunctions.create(this, endHideHint);
move_hint.mov.newInitMove(move_hint, 300, 0);
}
function NEA() {
F2();
DeleteTip();
}
function InitRamka(y) {
}
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;
}
function setCaption(Text) {
caption = Text;
cap = This.createEmptyMovieClip("caption", 21);
cap._x = 165;
cap._y = 25;
cap.attachMovie("grad_kubok", "font_br2", 0);
cap.font_br2.text.text = caption;
}
var h = 0;
}
Symbol 2526 MovieClip [__Packages.GameClasses.GameHintProdaga] Frame 0
class GameClasses.GameHintProdaga extends Object
{
var This, Text, X, Y, F1, F2, ramka, text, b1, BLACK, showt, b2, xs, ys;
function GameHintProdaga (This, Text, X, Y, F1, F2, num) {
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("fish_panel", "ramka", 10, {useHandCursor:false});
text = This.createEmptyMovieClip("text", 20);
text.attachMovie("font_hint", "font_hint", 0);
text.font_hint.text.text = Text;
var _local19 = text._width;
var _local6 = text._height;
text._x = 140;
if ((num + 1) == 1) {
var _local7 = This.attachMovie("fish" + String(num + 1), "fish", 11, {_x:147, _y:85, spec_fish:true});
} else if ((num + 1) == 2) {
var _local7 = This.attachMovie("fish" + String(num + 1), "fish", 11, {_x:149, _y:95, spec_fish:true});
} else if ((num + 1) == 3) {
var _local7 = This.attachMovie("fish" + String(num + 1), "fish", 11, {_x:151, _y:85, spec_fish:true});
} else if ((num + 1) == 4) {
var _local7 = This.attachMovie("fish" + String(num + 1), "fish", 11, {_x:147, _y:85, spec_fish:true});
} else if ((num + 1) == 5) {
var _local7 = This.attachMovie("fish" + String(num + 1), "fish", 11, {_x:149, _y:85, spec_fish:true});
} else if ((num + 1) == 6) {
var _local7 = This.attachMovie("fish" + String(num + 1), "fish", 11, {_x:149, _y:85, spec_fish:true});
} else if ((num + 1) == 7) {
var _local7 = This.attachMovie("fish" + String(num + 1), "fish", 11, {_x:149, _y:90, spec_fish:true});
} else if ((num + 1) == 8) {
var _local7 = This.attachMovie("fish" + String(num + 1), "fish", 11, {_x:158, _y:80, spec_fish:true});
}
b1 = This.attachMovie("button_B", "b1", 30);
_local7.gotoAndStop("moveleft");
_local6 = _local6 + 130;
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 = 136 - (b1._width / 2);
b1._y = 247;
b1.InitText(_root.TextOk.text, -3, -3, "GameFont", -3, 12, 1, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
} else {
b2 = This.attachMovie("button_B", "b2", 40);
BLACK.onPress = null;
b1._x = (132 - b1._width) - 1;
b2._x = 167;
b1._y = (b2._y = 247);
b1.InitText(_root.TextYes.text, -3, -3, "GameFont", -3, 12, 1, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
b2.InitText(_root.TextNo.text, -3, -3, "GameFont", -3, 12, 1, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
}
b1.InitFunction(GameClasses.GFunctions.create(this, AGA));
b2.InitFunction(GameClasses.GFunctions.create(this, NEA));
InitRamka(_local6 + 63);
text._y = 192;
_local6 = _local6 + 130;
This._x = X;
This._y = Y;
if ((This._y + ramka._height) > 480) {
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) {
}
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;
}
var h = 0;
var min_heg = 135;
var heg = 0;
}
Symbol 2527 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 = 180;
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, _root.FontOrange, _root.FontYellow, 90);
_local4._y = Y1;
_local4._x = 138;
_local4 = This.createEmptyMovieClip("text2", 21);
_root.TextShow(_local4, Text2, "TextFont", -3, 12, 1, 14, _root.FontWhite, 200, _root.FontBlueBlue);
_local4._y = Y2;
_local4._x = 138;
InitRamka();
if ((This._y + ramka._height) > 380) {
This._y = 50;
}
clearInterval(moving);
moving = setInterval(GameClasses.GFunctions.create(this, Disap), 1700);
}
function Disap() {
clearInterval(moving);
This.onEnterFrame = GameClasses.GFunctions.create(this, Disap);
This._alpha = This._alpha - 7;
if (This._alpha < 5) {
delete This.onEnterFrame;
This.removeMovieClip();
}
}
function InitRamka() {
}
}
Symbol 2528 MovieClip [__Packages.GameClasses.BitmapHelp] Frame 0
class GameClasses.BitmapHelp
{
var Clip, BMD, Black;
function BitmapHelp (MC, type) {
Clip = MC;
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 < 20) {
var _local5 = Clip["txt" + _local6];
if (_local5) {
var _local4 = _root["TextHelp" + _local6];
if (_local4) {
_root.TextShow(_local5, _local4.text, "TextFont", -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:640, _height:480, _alpha:0});
if ((type == "game") && (!_root.TIME.getActive())) {
Clip.attachMovie("help_for_game_spec", "T", 1);
} else if ((type != "game") && (_root.tnk.Kubok > 0)) {
Clip.attachMovie(("help_for_" + type) + "_kubok", "T", 1);
} else {
Clip.attachMovie("help_for_" + type, "T", 1);
}
Black.useHandCursor = false;
Black.tabEnabled = false;
Black.onPress = null;
MoveBlack(GameClasses.GFunctions.create(this, InitBlack), 0, 100);
}
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++));
Clip.createEmptyMovieClip("txt3", 100 + (Depths++));
Clip.createEmptyMovieClip("txt4", 100 + (Depths++));
Clip.createEmptyMovieClip("txt14", 100 + (Depths++));
Clip.createEmptyMovieClip("txt16", 100 + (Depths++));
Clip.createEmptyMovieClip("txt17", 100 + (Depths++));
}
function DrawShop() {
Clip.createEmptyMovieClip("txt5", 100 + (Depths++));
Clip.createEmptyMovieClip("txt6", 100 + (Depths++));
Clip.createEmptyMovieClip("txt7", 100 + (Depths++));
Clip.createEmptyMovieClip("txt8", 100 + (Depths++));
Clip.createEmptyMovieClip("txt15", 100 + (Depths++));
Clip.createEmptyMovieClip("txt3", 100 + (Depths++));
Clip.createEmptyMovieClip("txt14", 100 + (Depths++));
}
function DrawGame() {
Clip.createEmptyMovieClip("txt9", 100 + (Depths++));
Clip.createEmptyMovieClip("txt10", 100 + (Depths++));
Clip.createEmptyMovieClip("txt11", 100 + (Depths++));
Clip.createEmptyMovieClip("txt12", 100 + (Depths++));
if (_root.TIME.getActive()) {
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 2529 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, caption, cap;
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, "TextFont", -3, 18, 1, 14, _root.FontWhite, 220, _root.FontBlueBlue);
var _local17 = text._width;
var _local6 = text._height;
text._x = 140;
if (K > 0) {
This.attachMovie("kubok_big", "kubok", 11, {_x:125, _y:80 + ((K - 1) * 10)}).gotoAndStop(K + 1);
text._y = 157 + ((K - 1) * 10);
_local6 = _local6 + (150 + ((K - 1) * 10));
} 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 = 140 - (b1._width / 2);
b1._y = _local6 + 20;
b1.InitText(_root.TextOk.text, -3, -3, "GameFont", -3, 12, 1, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
} else {
b2 = This.attachMovie("button_B", "b2", 40);
BLACK.onPress = null;
b1._x = (132 - b1._width) - 5;
b2._x = 152;
b1._y = (b2._y = _local6 + 20);
b1.InitText(_root.TextYes.text, -3, -3, "GameFont", -3, 12, 1, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
b2.InitText(_root.TextNo.text, -3, -3, "GameFont", -3, 12, 1, 14, _root.FontWhite, 1000, _root.FontBlueBlue);
}
b1.InitFunction(GameClasses.GFunctions.create(this, AGA));
b2.InitFunction(GameClasses.GFunctions.create(this, NEA));
if (K == -1) {
clearInterval(showt);
BLACK.onPress = null;
_local6 = _local6 - 28;
}
InitRamka(_local6 + 63);
b1._y = (b2._y = heg - 44);
text._y = ((heg / 2) - (text._height / 2)) - 4;
This._x = X;
This._y = Y;
if ((This._y + ramka._height) > 480) {
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) {
if (y < min_heg) {
y = min_heg;
}
heg = y + 10;
ramka.up._y = 0;
ramka.md._y = ramka.up._height - 1;
ramka.dw._y = (y - ramka.dw._height) - 1;
ramka.md._height = (y - ramka.up._height) - ramka.dw._height;
}
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;
}
function setCaption(Text) {
caption = Text;
cap = This.createEmptyMovieClip("caption", 21);
cap._x = 132;
cap._y = 30;
text._y = text._y + 10;
b1._y = (b2._y = heg - 44);
_root.TextShow(cap, caption, "gradient", -2, 12, 1, 15, 0, 1000, 0, _root.FontOrange, _root.FontYellow, 90);
}
var h = 0;
var min_heg = 135;
var heg = 0;
}
Symbol 2530 MovieClip [__Packages.GameClasses.GemTank] Frame 0
class GameClasses.GemTank extends MovieClip
{
var tank, _parent, BlueColor, item, onPress, money_mc, createEmptyMovieClip, money_value, number, number2, type, _x, _y, _xscale, _yscale, DefaultColor, start_time, timer_gem, gem, shadow, removeMovieClip;
function GemTank () {
super();
tank = _parent._parent;
BlueColor = new Color(item);
onPress = takeGem;
money_mc = createEmptyMovieClip("money", 30);
money_mc._visible = false;
money_mc._x = -7;
money_mc._y = -40;
money_value = Math.floor((Math.random() * 10) + 1);
_root.TextShow(money_mc, ("+" + _root.TextDollar.text) + String(money_value), "gradient", -3, 20, 1, 20, 0, 1000, _root.FontBlueBlue, _root.FontOrange, _root.FontYellow, 90);
}
function setNum(num, num2) {
number = num;
number2 = num2;
}
function setType(num) {
type = num;
}
function initRandom() {
_x = 15 + (Math.random() * 485);
_y = 255 + (Math.random() * 70);
scale = int(60 + ((40 * (_y - upline)) / (downline - upline)));
_xscale = (_yscale = scale);
var _local3 = int((1000 * (_y - upline)) / (downline - upline));
var _local2 = CopyColor(DefaultColor);
_local2.rb = _local2.rb - (Math.pow((1000 - _local3) / 1000, 2) * 75);
_local2.gb = _local2.gb - (Math.pow((1000 - _local3) / 1000, 2) * 30);
_local2.bb = _local2.bb + (Math.pow((1000 - _local3) / 1000, 2) * 37);
BlueColor.setTransform(_local2);
}
function CopyColor(O1) {
var _local2 = {};
for (var _local3 in O1) {
_local2[_local3] = O1[_local3];
}
return(_local2);
}
function takeGem() {
if (_root.tnk.bonus_level) {
} else {
money_mc._visible = true;
tank.MONEY.Add(money_value);
}
start_time = getTimer();
tank.DepthArr.splice(number2, 1);
tank.SaveTank();
_root.minusGem(number, _x, _y - 5, type);
delete onPress;
timer_gem = setInterval(GameClasses.GFunctions.create(this, preHideGem1), 20);
}
function preHideGem1() {
gem._rotation = gem._rotation + 4;
gem._y = gem._y - (distance / 50);
money_mc._y = money_mc._y - (distance / 50);
if (gem._rotation > 20) {
gem._rotation = 20;
clearInterval(timer_gem);
timer_gem = setInterval(GameClasses.GFunctions.create(this, preHideGem2), 20);
}
}
function preHideGem2() {
gem._rotation = gem._rotation - 7;
gem._y = gem._y - (distance / 40);
money_mc._y = money_mc._y - (distance / 40);
if (gem._rotation < -15) {
gem._rotation = -15;
clearInterval(timer_gem);
timer_gem = setInterval(GameClasses.GFunctions.create(this, hideGem), 20);
}
}
function hideGem() {
gem._alpha = gem._alpha - 4;
shadow._alpha = shadow._alpha - 4;
gem._y = gem._y - (distance / 25);
money_mc._y = money_mc._y - (distance / 25);
if (gem._alpha < 0) {
gem._y = -distance;
gem._alpha = 0;
shadow._alpha = 0;
clearInterval(timer_gem);
removeMovieClip();
}
}
var upline = 246;
var downline = 467;
var scale = 100;
var time_hide = 500;
var distance = 20;
}
Symbol 2531 MovieClip [__Packages.GameClasses.NewParticleSystem] Frame 0
class GameClasses.NewParticleSystem
{
var mcRoot, numb, particles, path, body, pmov, pmovs, T, t0;
function NewParticleSystem (root_mc, number_parts) {
mcRoot = root_mc;
numb = number_parts;
particles = new Array();
path = new Array();
body = mcRoot.createEmptyMovieClip("ps" + depth, depth++);
body._x = -100;
makeUnvisible();
body.mov = new GameClasses.FreeMove();
var _local3 = 0;
while (_local3 < numb) {
particles[_local3] = body.createEmptyMovieClip("part" + _local3, _local3);
var _local2 = particles[_local3];
_local2._x = -100;
_local2.mov = new GameClasses.FreeMove();
_local2.body = _local2.createEmptyMovieClip("body", 2);
_local2._visible = false;
_local3++;
}
}
function destroy() {
delete mcRoot;
delete link_mc;
var _local2 = 0;
while (_local2 < particles.length) {
particles[_local2].mov.destroy();
delete particles[_local2].mov;
delete particles[_local2];
_local2++;
}
delete particles;
_local2 = 0;
while (_local2 < path.length) {
delete path[_local2];
_local2++;
}
delete path;
for (var _local3 in body) {
if (body[_local3] instanceof MovieClip) {
MovieClip(body[_local3]).removeMovieClip();
delete body[_local3];
}
}
body.removeMovieClip();
delete body;
path_x.destroy();
path_y.destroy();
if (path_x instanceof Array) {
_local2 = 0;
while (_local2 < path_x.length) {
delete path_x[_local2];
delete path_y[_local2];
_local2++;
}
delete path_x;
delete path_y;
}
pmov.destroy();
delete pmov;
_local2 = 0;
while (_local2 < pmovs.length) {
pmovs[_local2].destroy();
delete pmovs[_local2];
_local2++;
}
delete pmovs;
}
function clear() {
stopPS();
}
function makeVisible() {
body._visible = true;
}
function makeUnvisible() {
body._visible = false;
}
function initTexture(bmp_src) {
if (active) {
stopPS();
}
var _local5 = new flash.geom.Rectangle(0, 0, bmp_src.width, bmp_src.height);
var _local6 = new flash.geom.Point(0, 0);
var _local3 = 0;
while (_local3 < numb) {
var _local2 = particles[_local3];
_local2.bmp.dispose();
_local2.body.removeMovieClip();
_local2.body = _local2.createEmptyMovieClip("body", 2);
_local2.bmp = new flash.display.BitmapData(bmp_src.width, bmp_src.height, true, 0);
_local2.bmp.copyPixels(bmp_src, _local5, _local6);
_local2.body.attachBitmap(_local2.bmp, 1);
_local2.body._x = (-_local2.body._width) / 2;
_local2.body._y = (-_local2.body._height) / 2;
_local3++;
}
}
function initTextureFromLibrary(id) {
if (active) {
stopPS();
}
var _local3 = 0;
while (_local3 < numb) {
var _local2 = particles[_local3];
_local2.bmp.dispose();
_local2.body.removeMovieClip();
_local2.attachMovie(id, "body", 2);
_local2.body._x = (-_local2.body._width) / 2;
_local2.body._y = (-_local2.body._height) / 2;
_local3++;
}
}
function initPath(path_src_x, path_src_y) {
if (active) {
stopPS();
}
if (((path_src_x instanceof GameClasses.Spline) || (path_src_x instanceof GameClasses.Line)) || (path_src_x instanceof Array)) {
path_x = path_src_x;
path_y = path_src_y;
}
}
function startPS1(numb_repeats, t_delay, t_issue, t_life, x1, y1, xscale1, yscale1, rotation1, alpha1, color1) {
startPS(numb_repeats, t_delay, t_issue, t_life, x1, y1, xscale1, yscale1, rotation1, alpha1, color1);
}
function startPS(numb_repeats, t_delay, t_issue, t_life, x1, y1, xscale1, yscale1, rotation1, alpha1, color1) {
body._x = 0;
var _local18 = getTimer();
active = true;
T = t_delay + (t_issue * (numb - 1));
var _local10;
var _local9;
makeVisible();
t0 = getTimer();
var _local3 = 0;
while (_local3 < pmovs.length) {
pmovs[_local3].destroy();
delete pmovs[_local3];
_local3++;
}
delete pmovs;
pmovs = new Array(numb);
if (x1 != undefined) {
_local10 = new GameClasses.Spline();
_local10.InitSpline2(x1.GetKeys());
_local9 = new GameClasses.Spline();
_local9.InitSpline2(y1.GetKeys());
}
_local3 = 0;
while (_local3 < numb) {
var _local2 = particles[_local3];
var _local7 = getBurnX(t_issue, _local3);
var _local6 = getBurnY(t_issue, _local3);
if (x1 != undefined) {
if (x1 instanceof GameClasses.Spline) {
x1 = new GameClasses.Spline();
x1.InitSpline2(_local10.GetKeys());
y1 = new GameClasses.Spline();
y1.InitSpline2(_local9.GetKeys());
x1.reCalculate(_local7);
y1.reCalculate(_local6);
} else if (!isNaN(x1)) {
}
} else {
_local2._x = _local7;
_local2._y = _local6;
}
_local2.mov.endAct = null;
pmovs[_local3] = GameClasses.FreeMove.makeDelay(t_delay + (_local3 * t_issue), GameClasses.GFunctions.create(_local2.mov, _local2.mov.newInitMove, _local2, t_life, 1, x1, y1, xscale1, yscale1, rotation1, alpha1, color1));
_local3++;
}
if (numb_repeats == 1) {
particles[numb - 1].mov.endAct = GameClasses.GFunctions.create(this, stopPS);
} else {
pmov = GameClasses.FreeMove.makeDelay(T, GameClasses.GFunctions.create(this, startPS, 0, 0, t_issue, t_life, x1, y1, xscale1, yscale1, rotation1, alpha1, color1));
}
}
function startKrastulka(numb_repeats, t_delay, t_issue, t_life, x1, y1, xscale1, yscale1, rotation1, alpha1, color1) {
body._x = 0;
var _local16 = getTimer();
active = true;
T = t_delay + (t_issue * (numb - 1));
makeVisible();
t0 = getTimer();
var _local2 = 0;
while (_local2 < pmovs.length) {
pmovs[_local2].destroy();
delete pmovs[_local2];
_local2++;
}
delete pmovs;
pmovs = new Array(numb);
_local2 = 0;
while (_local2 < numb) {
var _local3 = particles[_local2];
var _local9 = getBurnX(t_issue, _local2);
var _local8 = getBurnY(t_issue, _local2);
var _local4 = -10 + (Math.random() * 20);
x1 = new GameClasses.Spline(_local4, (_local4 - 2) + (4 * Math.random()));
y1 = new GameClasses.Spline(Math.random() * 10, -35 - (Math.random() * 10));
x1.reCalculate(_local9);
y1.reCalculate(_local8);
_local3.mov.endAct = null;
pmovs[_local2] = GameClasses.FreeMove.makeDelay(t_delay + (_local2 * t_issue), GameClasses.GFunctions.create(_local3.mov, _local3.mov.newInitMove, _local3, t_life, 1, x1, y1, xscale1, xscale1, rotation1, alpha1, color1));
_local2++;
}
if (numb_repeats == 1) {
particles[numb - 1].mov.endAct = GameClasses.GFunctions.create(this, stopPS);
} else {
pmov = GameClasses.FreeMove.makeDelay(T, GameClasses.GFunctions.create(this, startPS, 0, 0, t_issue, t_life, x1, y1, xscale1, yscale1, rotation1, alpha1, color1));
}
}
function startPuzirik(numb_repeats, t_delay, t_issue, t_life, x1, y1, xscale1, yscale1, rotation1, alpha1, color1) {
body._x = 0;
var _local16 = getTimer();
active = true;
T = t_delay + (t_issue * (numb - 1));
makeVisible();
t0 = getTimer();
var _local3 = 0;
while (_local3 < pmovs.length) {
pmovs[_local3].destroy();
delete pmovs[_local3];
_local3++;
}
delete pmovs;
pmovs = new Array(numb);
_local3 = 0;
while (_local3 < numb) {
var _local4 = particles[_local3];
var _local10 = getBurnX(t_issue, _local3);
var _local9 = getBurnY(t_issue, _local3);
var _local2 = 8 - (Math.random() * 16);
x1 = new GameClasses.Spline(_local2);
_local2 = 8 - (Math.random() * 16);
y1 = new GameClasses.Spline(_local2, _local2 - 14, _local2 - 28);
x1.reCalculate(_local10);
y1.reCalculate(_local9);
_local2 = 30 + (Math.random() * 50);
xscale1 = new GameClasses.Spline(0, _local2, _local2 - (Math.random() * 6), _local2, 0);
_local4.mov.endAct = null;
pmovs[_local3] = GameClasses.FreeMove.makeDelay(t_delay + (_local3 * t_issue), GameClasses.GFunctions.create(_local4.mov, _local4.mov.newInitMove, _local4, t_life, 1, x1, y1, xscale1, xscale1, rotation1, alpha1, color1));
_local3++;
}
if (numb_repeats == 1) {
particles[numb - 1].mov.endAct = GameClasses.GFunctions.create(this, stopPS);
} else {
pmov = GameClasses.FreeMove.makeDelay(T, GameClasses.GFunctions.create(this, startPS, 0, 0, t_issue, t_life, x1, y1, xscale1, yscale1, rotation1, alpha1, color1));
}
}
function startZvezd(numb_repeats, t_delay, t_issue, t_life, x1, y1, xscale1, yscale1, rotation1, alpha1, color1) {
body._x = 0;
var _local16 = getTimer();
active = true;
T = t_delay + (t_issue * (numb - 1));
makeVisible();
t0 = getTimer();
var _local2 = 0;
while (_local2 < pmovs.length) {
pmovs[_local2].destroy();
delete pmovs[_local2];
_local2++;
}
delete pmovs;
pmovs = new Array(numb);
_local2 = 0;
while (_local2 < numb) {
var _local4 = particles[_local2];
var _local9 = getBurnX(t_issue, _local2);
var _local8 = getBurnY(t_issue, _local2);
var _local3 = Math.random() * 360;
x1 = new GameClasses.Spline(10 * Math.sin(_local3), 20 * Math.sin(_local3), 24 * Math.sin(_local3));
y1 = new GameClasses.Spline(10 * Math.cos(_local3), 20 * Math.cos(_local3), 24 * Math.cos(_local3));
x1.reCalculate(_local9);
y1.reCalculate(_local8);
_local4.mov.endAct = null;
pmovs[_local2] = GameClasses.FreeMove.makeDelay(t_delay + (_local2 * t_issue), GameClasses.GFunctions.create(_local4.mov, _local4.mov.newInitMove, _local4, t_life, 1, x1, y1, xscale1, xscale1, rotation1, alpha1, color1));
_local2++;
}
if (numb_repeats == 1) {
particles[numb - 1].mov.endAct = GameClasses.GFunctions.create(this, stopPS);
} else {
pmov = GameClasses.FreeMove.makeDelay(T, GameClasses.GFunctions.create(this, startPS, 0, 0, t_issue, t_life, x1, y1, xscale1, yscale1, rotation1, alpha1, color1));
}
}
function getBurnX(t, i) {
if (T > 0) {
if (path_x instanceof Array) {
return(path_x[i]);
}
return(path_x.getPoint((t * i) / T));
}
return(0);
}
function getBurnY(t, i) {
if (T > 0) {
if (path_y instanceof Array) {
return(path_y[i]);
}
return(path_y.getPoint((t * i) / T));
}
return(0);
}
function stopPS() {
if (active) {
var _local2 = 0;
while (_local2 < pmovs.length) {
pmovs[_local2].destroy();
delete pmovs[_local2];
_local2++;
}
delete pmovs;
pmov.destroy();
delete pmov;
makeUnvisible();
body._x = -100;
_local2 = 0;
while (_local2 < numb) {
particles[_local2].mov.stopMove();
particles[_local2]._x = -100;
_local2++;
}
active = false;
}
}
function startExplode(x, y, mindx, maxdx, dy, minvy, maxvy, ay, sp_xscale, sp_yscale, sp_alp, color1, delay) {
body._x = x;
body._y = y;
var _local8;
var _local3;
var _local9;
var _local7;
var _local6;
var _local5;
makeVisible();
var _local4 = 0;
while (_local4 <= (particles.length - 1)) {
var _local2 = particles[_local4];
_local7 = mindx + (Math.random() * (maxdx - mindx));
_local8 = new GameClasses.Spline(0, _local7);
_local9 = new GameClasses.Spline(0, (Math.random() * 720) - 360);
_local3 = new GameClasses.AccelLinePath();
_local6 = minvy + (Math.random() * (maxvy - minvy));
_local3.addKey(0, ay, _local6);
_local3.addKey(dy, 0, 1);
_local5 = _local3.calculatePath();
_local2.mov.endAct = null;
_local2.mov.newInitMove(_local2, _local5, 1, _local8, _local3, sp_xscale, sp_yscale, _local9, sp_alp, color1);
_local4++;
}
}
function startInverseExplode(x, y, mindx, maxdx, dy, minvy, maxvy, ay, sp_xscale, sp_yscale, sp_alp, color1, delay) {
body._x = x;
body._y = y;
var _local8;
var _local3;
var _local9;
var _local7;
var _local6;
var _local5;
makeVisible();
var _local4 = 0;
while (_local4 <= (particles.length - 1)) {
var _local2 = particles[_local4];
_local7 = mindx + (Math.random() * (maxdx - mindx));
_local8 = new GameClasses.Spline(0, _local7);
_local9 = new GameClasses.Spline(0, (Math.random() * 720) - 360);
_local3 = new GameClasses.AccelLinePath();
_local6 = minvy + (Math.random() * (maxvy - minvy));
_local3.addKey(0, ay, _local6);
_local3.addKey(dy, 0, 1);
_local5 = _local3.calculatePath();
_local2.mov.endAct = null;
_local2.mov.updateAct = _local2.mov.updateActInverse;
_local2.mov.newInitMove(_local2, _local5, 1, _local8, _local3, sp_xscale, sp_yscale, _local9, sp_alp, color1);
_local4++;
}
}
static function makeSimpleFire(root_mc) {
var _local1 = new GameClasses.NewParticleSystem(root_mc, 12);
_local1.initTextureFromLibrary("blur1");
return(_local1);
}
function startSimpleFire(x, y, t_delay, _scale) {
var _local2;
if (!_scale) {
_local2 = 1;
} else {
_local2 = _scale;
}
var _local11 = new flash.geom.Point(x, y);
var _local10 = new flash.geom.Point(x, y - (_local2 * 13));
var _local9 = new flash.geom.Point(x, y - (_local2 * 50));
var _local12 = [_local11, _local10, _local9];
var _local4 = [2, 4, 2];
var _local6 = [_local2 * 25, _local2 * 55, _local2 * 30, _local2 * 5];
var _local5 = [_local2 * 5, _local2 * 5, _local2 * 5, _local2 * 1];
var _local3 = [60, 100, 80, 10];
var _local8 = [16776960, 16711680];
var _local7 = [-180, 180];
startFire(t_delay, 720, 60, _local12, _local4, _local6, _local5, _local3, _local8, _local7);
}
function startFireParticle(part, t_life, t_delay, points, p_rads, scales, s_rads, alphas, color1, rotations) {
var _local10 = new GameClasses.Spline();
var _local9 = new GameClasses.Spline();
var _local2 = 0;
while (_local2 < points.length) {
var _local1 = p_rads[_local2] * (1 - (2 * Math.random()));
var _local6 = Math.sqrt((p_rads[_local2] * p_rads[_local2]) - (_local1 * _local1)) * (1 - (2 * Math.random()));
_local10.addKey(points[_local2].x + _local1);
_local9.addKey(points[_local2].y + _local6);
_local2++;
}
_local10.Calculate(false);
_local9.Calculate(false);
var _local11 = new GameClasses.Spline();
var _local12 = new GameClasses.Spline();
_local2 = 0;
while (_local2 < scales.length) {
var _local1 = s_rads[_local2] * (1 - (2 * Math.random()));
var _local6 = Math.sqrt((s_rads[_local2] * s_rads[_local2]) - (_local1 * _local1)) * (1 - (2 * Math.random()));
_local11.addKey(scales[_local2] + _local1);
_local12.addKey(scales[_local2] + _local6);
_local2++;
}
_local11.Calculate(false);
_local12.Calculate(false);
var _local15 = new GameClasses.Line(rotations[0] + ((rotations[1] - rotations[0]) * Math.random()), rotations[0] + ((rotations[1] - rotations[0]) * Math.random()));
var _local13 = new GameClasses.Spline();
_local2 = 0;
while (_local2 < alphas.length) {
_local13.addKey(alphas[_local2]);
_local2++;
}
_local13.Calculate(false);
GameClasses.FreeMove.makeDelay(t_delay, GameClasses.GFunctions.create(part.mov, part.mov.newInitMove, part, t_life, 1, _local10, _local9, _local11, _local12, _local15, _local13, color1));
}
function startFire(t_delay, t_life, t_issue, points, p_rads, scales, s_rads, alphas, color1, rotations) {
body._x = 0;
makeVisible();
var _local3 = 0;
while (_local3 < particles.length) {
var _local2 = particles[_local3];
_local2.mov.endAct = GameClasses.GFunctions.create(this, startFireParticle, _local2, t_life, 1, points, p_rads, scales, s_rads, alphas, color1, rotations);
startFireParticle(_local2, t_life, t_delay + (t_issue * _local3), points, p_rads, scales, s_rads, alphas, color1, rotations);
_local3++;
}
pmov = GameClasses.FreeMove.makeDelay(t_delay + (t_issue * (particles.length - 1)), GameClasses.GFunctions.create(this, startFire, 0, t_life, t_issue, points, p_rads, scales, s_rads, alphas, color1, rotations));
}
function addMC(id, x, y) {
body.attachMovie(id, id, body.getNextHighestDepth());
body[id]._x = x;
body[id]._y = y;
}
static var depth = 0;
var link_mc = null;
var path_x = null;
var path_y = null;
var active = false;
var randX = 0;
var randY = 0;
}
Symbol 2532 MovieClip [__Packages.GameClasses.Consts] Frame 0
class GameClasses.Consts
{
function Consts () {
}
static function makeShadow(mcSource, mcDest, color1, opacity) {
var _local2 = 8;
var _local5 = new flash.geom.Rectangle(0, 0, mcSource._width + 20, mcSource._height + 20);
var _local6 = new flash.geom.Point(0, 0);
var _local4 = new Color(mcDest);
mcDest.shadow_bmp = new flash.display.BitmapData(mcSource._width + _local2, mcSource._height + _local2, true, 0);
mcDest.shadow_bmp.draw(mcSource, new flash.geom.Matrix(1, 0, 0, 1, _local2 / 2, _local2 / 2));
mcDest.filtr = new flash.filters.BlurFilter(8, 8, 1);
mcDest.shadow_bmp.applyFilter(mcDest.shadow_bmp, _local5, _local6, mcDest.filtr);
mcDest.attachBitmap(mcDest.shadow_bmp, 1);
_local4.setRGB(color1);
mcDest._alpha = opacity;
}
static function drawRectangle(mc, rect) {
mc.beginFill(0, 100);
mc.moveTo(rect.x, rect.y);
mc.lineTo(rect.x + rect.width, rect.y);
mc.lineTo(rect.x + rect.width, rect.y + rect.height);
mc.lineTo(rect.x, rect.y + rect.height);
mc.lineTo(rect.x, rect.y);
mc.endFill();
}
static function doForcedClean() {
var _local2 = 1;
var _local1 = 0;
while (_local1 < _local2) {
try {
} catch(e:Error) {
}
_local1++;
}
}
static var CELL_SIZE = 30;
static var CELL_SIZE_CHIP = 32;
static var CHIP_TIME_ROTATION = 550;
static var CHIP_TIME_BLIK = 500;
static var GLOBAL_BLIK_COOF = 0.25;
static var TIME_PERIOD_GLOBAL_BLIK = 60000;
static var TIME_OF_DISSAPEAR_CHIP_PS = 350;
static var TIME_OF_EXPLODE_CHIP_PS = 500;
static var TIME_OF_DISSAPEAR_CHIP = 250;
static var TIME_PERIOD_OF_THE_CHIP_MOVE_TO_THE_BONUS_SUN = 900;
static var TIME_PERIOD_BETWEEN_EXPLODES_OF_THE_CHIPS = 300;
static var TIME_OF_THE_MOVE_SMALL_BONUS = 100;
static var TIME_OF_CHANGE_PLACES_CHIPS = 200;
static var ACCEL_OF_CHIP_FALL = 0.0009;
static var COOF_OF_ABSORPTION_CHIP_FALL = -0.3;
static var FIRST_DELAY_OF_CHIP_FALL = 20;
static var NUMB_RESERV_CHIPS = 90;
static var NUMBER_OF_BONUS_PS = 12;
static var TIME_OF_THE_BOMB_BONUS_MOVE = 3000;
static var TIME_OF_THE_ZL_BONUS_MOVE = 1300;
static var TIME_OF_TREMBLE_TOTAL_ART = 2000;
static var TIME_OF_MOVE_TOTAL_ART_TO_PLACE = 800;
static var TIME_OF_MOVE_TOTAL_CRYSTAL_TO_PLACE = 1500;
static var TIME_OF_MOVE_TOTAL_ART_TO_PLACE_IN_MATCH3 = 2500;
static var NUMBER_OF_THE_ART_PARTICLE = 5;
static var TIME_OF_MOVE_PIECE_OF_ART_TO_PLACE = 1500;
static var TIME_OF_MOVE_PIECE_OF_ART_TO_PLACE_IN_MATCH3 = 3000;
static var TIME_OF_HINT_PS_OF_POA = 1800;
static var NUMBER_OF_THE_POA_PARTICLES = 5;
static var OPACITY_OF_THE_POA_BLUR_BODY = 95;
static var BEGIN_MIN_SHINE_INTENSITY_COOF = 1.4;
static var BEGIN_MAX_SHINE_INTENSITY_COOF = 1.7;
static var BEGIN_MAXMAX_SHINE_INTENSITY_COOF = 2.2;
static var TIME_OF_THE_SHINE_PERIOD = 1500;
static var TIME_OF_THE_END_SHINE_PERIOD = 700;
static var TIME_OF_THE_TREMBLE_SHINE_PERIOD = 2000;
static var POSITION_OF_THE_END_SHINE = 15;
static var INTENSITY_OF_THE_SHINE_POA_BLUR = 8;
static var TIME_TO_HIDE = 500;
static var BONUS_ZEUSLIGHTNING_TIME_EFFECT = 1700;
static var TIME_OF_THE_HINT_DELAY = 100;
static var TIME_OF_THE_HINT_MOVE = 50;
static var TIME_OF_THE_HELP_HINT_MOVE = 250;
static var DEPTH_FOR_SOUND_MC = 1000;
static var NO_ACTIVE_TIME_OF_HINT_BUTTON = 20000;
static var TIME_TO_HELP_SHINE = 25000;
static var TIME_OF_THE_CRYSTAL_FALL = 800;
static var numb_b = 0;
static var numb_t = 0;
static var numb_s = 0;
static var numb_zl = 0;
static var show_debug_info = false;
}
Symbol 2533 MovieClip [__Packages.GameClasses.HintWindow] Frame 0
class GameClasses.HintWindow
{
static var bmp, interval_mouse, w, h, rect, point, bmp_t, bmp_rt, bmp_r, bmp_rb, bmp_b, bmp_lb, bmp_l, bmp_lt, bmp_c, interval_hint;
var square_mc, hint_text, mcBody, mcRoot, body, txt, body_bmp, hint_bmp, hint_mc, shadow, btn, hw, hh, tw, th, strela;
function HintWindow (mc_root, mc_with_hint, tex, point1) {
var _local3;
if (bmp == undefined) {
initClass();
}
square_mc = mc_root.SQUARE_MC;
hint_text = new Object();
hint_text.text = tex;
hint_text.x = 0;
hint_text.y = 0;
hint_text.h = 0;
hint_text.w = 220;
hint_text.color = 16777215 /* 0xFFFFFF */;
hint_text.leading = -2;
hint_text.size = 15;
hint_text.align = "center";
mcBody = mc_with_hint;
mcRoot = mc_root.HINT_LEVEL_MC;
body = mcRoot.createEmptyMovieClip("hint_window" + depth, depth++);
body._x = -100;
body._y = -100;
body.createEmptyMovieClip("body", 2);
body.createEmptyMovieClip("shadow", 1);
body._xscale = 0;
body._yscale = 0;
body._alpha = 0;
txt = new GameClasses.TextClass(body.body, 2, hint_text, recede, recede);
var _local5 = txt.getWidth();
var _local4 = (txt.getHeight() + hint_text.h) + (recede / 2);
initBitmap(_local5, _local4);
body.body.attachBitmap(body_bmp, 1);
GameClasses.Consts.makeShadow(body.body, body.shadow, 0, 50);
body.mov = new GameClasses.FreeMove();
if ((mcBody != undefined) && (mcBody != null)) {
if (mcBody.hitArea) {
hint_bmp = new flash.display.BitmapData(mcBody.hitArea._width, mcBody.hitArea._height, true, 0);
hint_bmp.draw(mcBody.hitArea);
} else {
hint_bmp = new flash.display.BitmapData(mcBody._width, mcBody._height, true, 0);
hint_bmp.draw(mcBody);
}
hint_mc = mcRoot.createEmptyMovieClip("hint_mask" + depth, depth++);
_local3 = new Color(hint_mc);
_local3.setRGB(0);
hint_mc._alpha = 0;
var _local2;
if (point1 == undefined) {
if ((!mcBody.hitArea) || ((mcBody.hitArea._x == 0) && (mcBody.hitArea._y == 0))) {
_local2 = new flash.geom.Point(mcBody._x, mcBody._y);
} else {
_local2 = new flash.geom.Point(mcBody.hitArea._x, mcBody.hitArea._y);
}
} else {
_local2 = point1;
}
hint_mc._x = _local2.x;
hint_mc._y = _local2.y;
hint_mc.useHandCursor = false;
hint_mc.attachBitmap(hint_bmp, 1);
hint_mc.onRollOver = GameClasses.GFunctions.create(this, startHint);
hint_mc.onRollOut = GameClasses.GFunctions.create(this, stopHint);
hint_mc.onDragOver = GameClasses.GFunctions.create(this, startHint);
hint_mc.onDragOut = GameClasses.GFunctions.create(this, stopHint);
hint_mc.tabEnabled = false;
hint_mc.onPress = GameClasses.GFunctions.create(mcBody, function () {
this.onPress();
this.addOnPressAction();
this.dopAction();
});
}
}
static function disableHW() {
HW_enabled = false;
}
static function enableHW() {
HW_enabled = true;
}
function destroy() {
GameClasses.FreeMove.clearInterval(interval_mouse);
interval_mouse = 0;
mcRoot = null;
mcBody = null;
square_mc = null;
hint_mc.onRollOver = null;
hint_mc.onRollOut = null;
hint_mc.onDragOver = null;
hint_mc.onDragOut = null;
shadow.shadow_bmp.dispose();
shadow.removeMovieClip();
shadow = null;
hint_mc.removeMovieClip();
hint_mc = null;
destroyStrela();
body.mov.destroy();
body.mov = null;
body.body.removeMovieClip();
body.body = null;
body.shadow.shadow_bmp.dispose();
body.shadow.shadow_bmp = null;
body.shadow.filtr.destroy();
body.shadow.filtr = null;
body.shadow.removeMovieClip();
body.shadow = null;
body.removeMovieClip();
body = null;
hint_text = null;
btn.destroy();
btn = null;
hint_bmp.dispose();
hint_bmp = null;
body_bmp.dispose();
body_bmp = null;
txt.destroy();
txt = null;
delete addOnPressAction;
delete startHideAct;
delete endHideAct;
}
function clear() {
body.removeMovieClip();
shadow.shadow_bmp.dispose();
shadow.removeMovieClip();
hint_mc.removeMovieClip();
hint_bmp.dispose();
body_bmp.dispose();
}
static function clearAll() {
GameClasses.FreeMove.clearInterval(interval_mouse);
interval_mouse = 0;
all_hw = new Array();
}
static function initInterval() {
GameClasses.FreeMove.clearInterval(interval_mouse);
interval_mouse = 0;
interval_mouse = GameClasses.FreeMove.setInterval(GameClasses.HintWindow, "onMouseMoveAct", 16);
GameClasses.AllIntervals.get().add(interval_mouse);
enableHW();
}
static function initClass() {
initInterval();
bmp = flash.display.BitmapData.loadBitmap(hint_name);
w = 15;
h = 15;
rect = new flash.geom.Rectangle(0, 0, w, h);
point = new flash.geom.Point(0, 0);
bmp_t = new flash.display.BitmapData(w, h, true, 0);
rect.x = w;
rect.y = 0;
bmp_t.copyPixels(bmp, rect, point);
bmp_rt = new flash.display.BitmapData(w, h, true, 0);
rect.x = bmp.width - w;
rect.y = 0;
bmp_rt.copyPixels(bmp, rect, point);
bmp_r = new flash.display.BitmapData(w, h, true, 0);
rect.x = bmp.width - w;
rect.y = h;
bmp_r.copyPixels(bmp, rect, point);
bmp_rb = new flash.display.BitmapData(w, h, true, 0);
rect.x = bmp.width - w;
rect.y = bmp.height - h;
bmp_rb.copyPixels(bmp, rect, point);
bmp_b = new flash.display.BitmapData(w, h, true, 0);
rect.x = w;
rect.y = bmp.height - h;
bmp_b.copyPixels(bmp, rect, point);
bmp_lb = new flash.display.BitmapData(w, h, true, 0);
rect.x = 0;
rect.y = bmp.height - h;
bmp_lb.copyPixels(bmp, rect, point);
bmp_l = new flash.display.BitmapData(w, h, true, 0);
rect.x = 0;
rect.y = h;
bmp_l.copyPixels(bmp, rect, point);
bmp_lt = new flash.display.BitmapData(w, h, true, 0);
rect.x = 0;
rect.y = 0;
bmp_lt.copyPixels(bmp, rect, point);
bmp_c = new flash.display.BitmapData(w, h, true, 0);
rect.x = w;
rect.y = h;
bmp_c.copyPixels(bmp, rect, point);
}
function initBitmap(w1, h1) {
var _local3;
var _local2;
var _local5;
var _local4;
hw = (2 * recede) + w1;
hh = (2 * recede) + h1;
tw = hw - (2 * w);
th = hh - (2 * h);
body_bmp = new flash.display.BitmapData(hw, hh, true, 0);
rect.x = 0;
rect.y = 0;
point.x = 0;
point.y = 0;
rect.width = w;
rect.height = h;
body_bmp.copyPixels(bmp_lt, rect, point);
point.x = body_bmp.width - w;
point.y = 0;
body_bmp.copyPixels(bmp_rt, rect, point);
point.x = body_bmp.width - w;
point.y = body_bmp.height - h;
body_bmp.copyPixels(bmp_rb, rect, point);
point.x = 0;
point.y = body_bmp.height - h;
body_bmp.copyPixels(bmp_lb, rect, point);
_local5 = int(tw / w);
_local3 = 0;
while (_local3 < _local5) {
point.x = w + (_local3 * w);
point.y = 0;
body_bmp.copyPixels(bmp_t, rect, point);
point.y = h + th;
body_bmp.copyPixels(bmp_b, rect, point);
_local3++;
}
rect.width = tw - (_local5 * w);
point.x = w + (_local5 * w);
point.y = 0;
body_bmp.copyPixels(bmp_t, rect, point);
point.y = h + th;
body_bmp.copyPixels(bmp_b, rect, point);
rect.width = w;
_local4 = int(th / h);
_local2 = 0;
while (_local2 < _local4) {
point.y = h + (_local2 * h);
point.x = 0;
body_bmp.copyPixels(bmp_l, rect, point);
point.x = w + tw;
body_bmp.copyPixels(bmp_r, rect, point);
_local2++;
}
rect.height = th - (_local4 * h);
point.y = h + (_local4 * h);
point.x = 0;
body_bmp.copyPixels(bmp_l, rect, point);
point.x = w + tw;
body_bmp.copyPixels(bmp_r, rect, point);
rect.height = h;
_local3 = 0;
while (_local3 < _local5) {
point.x = w + (_local3 * w);
_local2 = 0;
while (_local2 < _local4) {
point.y = h + (_local2 * h);
body_bmp.copyPixels(bmp_c, rect, point);
_local2++;
}
point.y = h + (_local4 * h);
rect.height = th - (_local4 * h);
body_bmp.copyPixels(bmp_c, rect, point);
rect.height = h;
_local3++;
}
point.x = w + (_local5 * w);
rect.width = tw - (_local5 * w);
_local2 = 0;
while (_local2 < _local4) {
point.y = h + (_local2 * h);
body_bmp.copyPixels(bmp_c, rect, point);
_local2++;
}
rect.width = w;
point.x = w + (_local5 * w);
point.y = h + (_local4 * h);
rect.width = tw - (_local5 * w);
rect.height = th - (_local4 * h);
body_bmp.copyPixels(bmp_c, rect, point);
}
function cursorTrue() {
hint_mc.useHandCursor = true;
}
function initHelp(x, y) {
type = "study_hint";
TIME_OF_THE_HINT_MOVE = TIME_OF_THE_HELP_HINT_MOVE;
body.body._x = (-body.body._width) / 2;
body.shadow._x = body.body._x;
body.body._y = -body.body._height;
body.shadow._y = body.body._y;
body._x = x;
body._y = y;
}
function initHelpHint(x, y) {
initHelp(x, y);
initButton();
}
function initHelpHintStrela(x, y, xs) {
initHelp(x, y);
initButton();
initStrela(xs);
}
function initHelpHintStrelaH(x, y, ys) {
initHelp(x, y);
initButton();
initStrelaH(ys);
}
function initHelpStrela(x, y, xs) {
initHelp(x, y);
initStrela(xs);
}
function initButton() {
btn = new GameClasses.MyButton2(body.body, "Ok", 3, _root.dialogs.TextOk, 0, 0);
btn.setX((hw - btn.getWidth()) / 2);
btn.setY((hh - btn.getHeight()) - 10);
btn.addAction(GameClasses.GFunctions.create(this, hideHelpHint, 1));
}
function initStrela(x) {
strela = body.createEmptyMovieClip("strela", 3);
var _local2 = flash.display.BitmapData.loadBitmap("Strela.png");
strela.bmp = new flash.display.BitmapData(_local2.width / 2, _local2.height, true, 0);
strela.bmp.copyPixels(_local2, new flash.geom.Rectangle(0, 0, _local2.width / 2, _local2.height), new flash.geom.Point(0, 0));
strela.body = strela.createEmptyMovieClip("body", 2);
strela.shadow = strela.createEmptyMovieClip("shadow", 1);
strela.body.attachBitmap(strela.bmp, 1);
GameClasses.Consts.makeShadow(strela.body, strela.shadow, 0, 60);
strela.body._x = (-strela.body._width) / 2;
strela.body._y = -strela.body._height;
strela.shadow._x = strela.body._x;
strela.shadow._y = strela.body._y;
strela.mov = new GameClasses.FreeMove();
strela.x0 = x - body._x;
strela.y0 = strela.body._height - 10;
strela._x = strela.x0;
strela._y = -body._y;
strela._alpha = 0;
_local2.dispose();
_local2 = null;
}
function destroyStrela() {
strela.bmp.dispose();
strela.bmp = null;
strela.mov.destroy();
strela.mov = null;
strela.shadow.shadow_bmp.dispose();
strela.shadow.shadow_bmp = null;
strela.shadow.filtr.destroy();
strela.shadow.filtr = null;
strela.shadow.removeMovieClip();
strela.shadow = null;
strela.body.removeMovieClip();
strela.body = null;
}
function initStrelaH(y) {
initStrela(0);
strela.x0 = (((-body.body._width) / 2) - strela.body._height) - 15;
strela.y0 = y - body._y;
strela._x = 530 - body._x;
strela._y = strela.y0;
strela._alpha = 0;
strela._rotation = 90;
}
function setStrela(x, y) {
strela.x0 = x - body._x;
strela.y0 = y - body._y;
strela._x = strela.x0;
strela._y = -body._y;
}
function startStrela() {
if (strela._y == (-body._y)) {
strela.acc_y = new GameClasses.AccelLinePath();
strela.acc_y.addKey(strela.y0, 0.0002, 0);
strela.acc_y.addKey(strela.y0 + 5, 0.0002, -1);
strela.acc_y.addKey(strela.y0, 0, 0);
strela.T = strela.acc_y.calculatePath();
strela.acc_x = undefined;
} else {
strela.acc_x = new GameClasses.AccelLinePath();
strela.acc_x.addKey(strela.x0, 0.0002, 0);
strela.acc_x.addKey(strela.x0 + 5, 0.0002, -1);
strela.acc_x.addKey(strela.x0, 0, 0);
strela.T = strela.acc_x.calculatePath();
strela.acc_y = undefined;
}
strela.mov.endAct = GameClasses.GFunctions.create(this, function () {
this.strela.mov.endAct = GameClasses.GFunctions.create(this, function () {
GameClasses.FreeMove.addActivePiece(this.strela, getTimer());
this.strela.mov.initMove(this.strela, this.strela.T, 0, this.strela.acc_x, this.strela.acc_y);
});
this.strela.mov.endAct();
});
strela._alpha = 100;
GameClasses.FreeMove.addActivePiece(strela, getTimer());
strela.mov.initLine(strela, strela.x0, strela.y0, 300);
}
function disableHint() {
hint_disabled = true;
}
function enableHint() {
hint_disabled = false;
hint_mc.swapDepths(depth++);
}
function showHelpHint(is_square) {
hideAll();
interval_hint = getTimer() + interval_delay;
is_hint = true;
if ((is_square == undefined) || (is_square)) {
square_mc._x = 0;
}
if (strela) {
body.mov.endAct = GameClasses.GFunctions.create(this, function () {
this.square_mc.onPress = GameClasses.GFunctions.create(this, this.hideHelpHint);
this.square_mc.enabled = true;
this.startStrela();
});
} else {
body.mov.endAct = GameClasses.GFunctions.create(this, function () {
this.square_mc.onPress = GameClasses.GFunctions.create(this, this.hideHelpHint);
this.square_mc.enabled = true;
});
}
square_mc.tabEnabled = false;
is_active = true;
all_hw.push(this);
GameClasses.FreeMove.addActivePiece(body, getTimer());
body.mov.initMove(body, TIME_OF_THE_HINT_MOVE, TIME_OF_THE_HINT_DELAY, undefined, undefined, 100, 100, undefined, hint_opacity);
}
function hideHelpHint(C) {
if ((btn.getX() && (interval_hint > getTimer())) && (!C)) {
return(undefined);
}
is_hint = false;
square_mc.onPress = function () {
};
square_mc._x = 640;
if (strela) {
strela.mov.endAct = null;
}
hideHint();
}
function showHint() {
if (is_hint) {
return(undefined);
}
is_active = true;
all_hw.push(this);
GameClasses.FreeMove.addActivePiece(body, getTimer());
body.mov.initMove(body, TIME_OF_THE_HINT_MOVE, TIME_OF_THE_HINT_DELAY, undefined, undefined, 100, 100, undefined, hint_opacity);
}
function hideHint() {
var _local2 = all_hw.length - 1;
while (_local2 >= 0) {
if (all_hw[_local2] == this) {
all_hw[_local2] = all_hw[all_hw.length - 1];
all_hw.pop();
break;
}
_local2--;
}
is_active = false;
GameClasses.FreeMove.addActivePiece(body, getTimer());
body.mov.endAct = GameClasses.GFunctions.create(this, endHideAct);
body.mov.initMove(body, TIME_OF_THE_HINT_MOVE, 0, undefined, undefined, 0, 0, undefined, 0);
startHideAct();
}
function startHint() {
if ((!hint_disabled) && (HW_enabled)) {
if (mcBody) {
active_hint = this;
}
showHint();
}
if (mcBody) {
mcBody.onRollOver();
}
}
function stopHint() {
active_hint = null;
if (body.mov.active) {
body.mov.stopMove1();
}
hideHint();
if (mcBody) {
mcBody.onRollOut();
}
}
static function hideCurrent() {
active_hint.stopHint();
}
static function onMouseMoveAct() {
if (active_hint != null) {
if ((active_hint.mcRoot._xmouse + active_hint.body.body._width) > 630) {
active_hint.body.body._x = ((-active_hint.mcRoot._xmouse) - active_hint.body.body._width) + 630;
active_hint.body.shadow._x = active_hint.body.body._x;
} else {
active_hint.body.body._x = 0;
active_hint.body.shadow._x = active_hint.body.body._x;
}
active_hint.body.body._y = 0;
active_hint.body.shadow._y = active_hint.body.body._y;
active_hint.body._x = active_hint.mcRoot._xmouse;
active_hint.body._y = active_hint.mcRoot._ymouse;
}
}
static function hideAll() {
var _local1 = all_hw.length - 1;
while (_local1 >= 0) {
if (!all_hw[_local1]) {
all_hw.splice(_local1, 1);
} else if (all_hw[_local1].is_active) {
if (all_hw[_local1].type == "study_hint") {
all_hw[_local1].hideHelpHint();
} else {
all_hw[_local1].hideHint();
}
}
_local1--;
}
}
function getHeight() {
return(body.body._height);
}
function setText(s) {
txt.setText(s);
}
static var hint_name = "HintWindow.png";
static var depth = 0;
static var all_hw = new Array();
static var interval_delay = 5000;
static var active_hint = null;
static var is_hint = false;
var startHideAct = null;
var addOnPressAction = null;
var dopAction = null;
var endHideAct = null;
var hint_disabled = false;
var recede = 10;
var TIME_OF_THE_HINT_MOVE = GameClasses.Consts.TIME_OF_THE_HINT_MOVE;
var TIME_OF_THE_HELP_HINT_MOVE = GameClasses.Consts.TIME_OF_THE_HELP_HINT_MOVE;
var TIME_OF_THE_HINT_DELAY = GameClasses.Consts.TIME_OF_THE_HINT_DELAY;
var hint_opacity = 90;
var type = "hint";
var is_active = false;
var sound_showHint = "ShowTooltip";
static var HW_enabled = true;
}
Symbol 2534 MovieClip [__Packages.GameClasses.MyButton2] Frame 0
class GameClasses.MyButton2
{
var mcRoot, body, normal, active, pressed, button_text, txt, txt_active, txt_pressed, actions;
function MyButton2 (root_mc, lib_name, depth, tex, x, y) {
var _local5;
var _local4;
mcRoot = root_mc;
body = mcRoot.createEmptyMovieClip("btn_body" + depth, depth);
if (((normal = body.attachMovie(lib_name + "Normal", "normal", 3))) != undefined) {
active = body.attachMovie(lib_name + "Active", "active", 2);
pressed = body.attachMovie(lib_name + "Pressed", "pressed", 1);
} else if (((normal = body.attachMovie(lib_name + "normal", "normal", 3))) != undefined) {
active = body.attachMovie(lib_name + "active", "active", 2);
pressed = body.attachMovie(lib_name + "pressed", "pressed", 1);
} else if (((normal = body.attachMovie(lib_name + "_Normal", "normal", 3))) != undefined) {
active = body.attachMovie(lib_name + "_Active", "active", 2);
pressed = body.attachMovie(lib_name + "_Pressed", "pressed", 1);
} else if (((normal = body.attachMovie(lib_name + "_normal", "normal", 3))) != undefined) {
active = body.attachMovie(lib_name + "_active", "active", 2);
pressed = body.attachMovie(lib_name + "_pressed", "pressed", 1);
} else {
return;
}
body.hitArea = normal;
body._x = x;
body._y = y;
if ((tex != undefined) && (tex != null)) {
button_text = tex;
if (isNaN(button_text.w) || (button_text.w > body._width)) {
button_text.w = body._width;
}
if (isNaN(button_text.h) || (button_text.h > body._height)) {
button_text.h = body._height;
}
_local5 = (body._width - button_text.w) / 2;
_local4 = (body._height - button_text.h) / 2;
txt = new GameClasses.TextClass(normal, 4, button_text, 0, 0);
txt_active = new GameClasses.TextClass(active, 4, button_text, 0, 0);
txt_active.makeDarker(color_text_shift);
txt_pressed = new GameClasses.TextClass(pressed, 4, button_text, coord_text_shift, coord_text_shift);
txt_pressed.makeDarker(-color_text_shift);
}
makeNormal();
body.onRollOver = GameClasses.GFunctions.create(this, onRollOverAction);
body.onRollOut = GameClasses.GFunctions.create(this, onRollOutAction);
body.onDragOver = GameClasses.GFunctions.create(this, onRollOverAction);
body.onDragOut = GameClasses.GFunctions.create(this, onRollOutAction);
body.onPress = GameClasses.GFunctions.create(this, onPressAction);
body.onRelease = GameClasses.GFunctions.create(this, onReleaseAction);
body.onReleaseOutside = GameClasses.GFunctions.create(this, onReleaseOutsideAction);
body.useHandCursor = false;
body.tabEnabled = false;
actions = new Array();
}
function destroy() {
delete mcRoot;
delete button_text;
normal.removeMovieClip();
delete normal;
active.removeMovieClip();
delete active;
pressed.removeMovieClip();
delete pressed;
delete body.onRollOver;
delete body.onRollOut;
delete body.onDragOver;
delete body.onDragOut;
delete body.onPress;
delete body.onRelease;
delete body.onReleaseOutside;
body.removeMovieClip();
delete body;
txt.destroy();
delete txt;
txt_active.destroy();
delete txt_active;
txt_pressed.destroy();
delete txt_pressed;
var _local2 = 0;
while (_local2 < actions.length) {
delete actions[_local2];
_local2++;
}
delete actions;
}
function setX(x) {
body._x = x;
}
function setY(y) {
body._y = y;
}
function getX() {
return(body._x);
}
function getY() {
return(body._y);
}
function setWidth(w) {
body._width = w;
}
function setHeight(h) {
body._height = h;
}
function getWidth() {
return(body._width);
}
function getHeight() {
return(body._height);
}
function getBody() {
return(body);
}
function setText(str) {
txt.setText(str);
txt_active.setText(str);
txt_pressed.setText(str);
}
function setScale(scale) {
body._xscale = scale;
body._yscale = scale;
}
function setMainOnRelease() {
body.onPress = GameClasses.GFunctions.create(this, onPressAction);
body.onRelease = GameClasses.GFunctions.create(this, onReleaseAction);
}
function setMainOnPress() {
body.onRelease = GameClasses.GFunctions.create(this, onPressAction);
body.onPress = GameClasses.GFunctions.create(this, onReleaseAction);
}
function addAction(act) {
actions.push(act);
}
function clearActions() {
actions = new Array();
}
function makeNormal() {
normal._visible = true;
active._visible = false;
pressed._visible = false;
}
function makeActive() {
normal._visible = false;
active._visible = true;
pressed._visible = false;
}
function makePressed() {
normal._visible = false;
active._visible = false;
pressed._visible = true;
}
function onRollOverAction() {
if (enabled && (buttons_enabed)) {
makeActive();
}
}
function onRollOutAction() {
if (enabled && (buttons_enabed)) {
makeNormal();
}
}
function onPressAction() {
if (enabled && (buttons_enabed)) {
makePressed();
}
}
function onReleaseAction() {
if (enabled && (buttons_enabed)) {
makeNormal();
var _local2 = actions.length - 1;
while (_local2 >= 0) {
actions[_local2]();
_local2--;
}
}
}
function onReleaseOutsideAction() {
if (enabled && (buttons_enabed)) {
makeNormal();
}
}
function enable() {
normal.enabled = true;
active.enabled = true;
pressed.enabled = true;
body.enabled = true;
enabled = true;
}
function disable() {
enabled = false;
}
static function setOn(val) {
buttons_enabed = val;
}
static var buttons_enabed = true;
var enabled = true;
var color_text_shift = 50;
var coord_text_shift = -1;
var sound_onPress = "ButtonClick";
var sound_onRollOver = "MouseOverButton";
}
Symbol 2535 MovieClip [__Packages.GameClasses.TextClass] Frame 0
class GameClasses.TextClass
{
var mcRoot, text_obj, text_str, body, filters, body_tf, shadow_tf, body_fmt, shadow_fmt, gradient_mc;
function TextClass (root_mc, depth, tex, x, y) {
mcRoot = root_mc;
text_obj = tex;
text_str = text_obj.text;
body = mcRoot.createEmptyMovieClip("text_field_" + depth, depth);
body._x = x;
body._y = y;
body.mov = new GameClasses.FreeMove();
bmp_font = null;
filters = new Array();
var _local3 = new flash.filters.DropShadowFilter(0, 0, _root.FontBlueBlue, 1, 2, 2, 1.5, 3, false, false, false);
filters = [_local3];
if (bmp_font != null) {
initBitmapText();
if (text_obj.blur != 0) {
makeBlur(text_obj.blur);
}
} else if (text_obj.filters.length == 0) {
initText();
if (text_obj.gradient) {
makeGradientFill();
}
if (text_obj.contour) {
initContour();
} else {
initShadow();
}
if (text_obj.blur != 0) {
makeBlur(text_obj.blur);
}
} else {
initText();
}
_local3 = new flash.filters.DropShadowFilter(0, 0, _root.FontBlueBlue, 1, 2, 2, 1.5, 3, false, false, false);
filters = [_local3];
body.filters = filters;
}
static function createTextObject(text, font, x, y, h, w, color, leading, size, align, bold, shadow_color, shadow_opacity, sx, sy) {
var _local1 = new Object();
_local1.text = text;
_local1.font = font;
_local1.x = x;
_local1.y = y;
_local1.h = h;
_local1.w = w;
_local1.color = color;
_local1.leading = leading;
_local1.size = size;
_local1.align = align;
_local1.bold = bold;
_local1.shadow_color = shadow_color;
_local1.shadow_opacity = shadow_opacity;
_local1.sx = sx;
_local1.sy = sy;
return(_local1);
}
function destroy() {
delete text_obj;
delete mcRoot;
body_tf.removeTextField();
shadow_tf.removeTextField();
delete body_tf;
delete shadow_tf;
delete body_fmt;
delete shadow_fmt;
body_bmp_mc.removeMovieClip();
delete body_bmp_mc;
body.mov.destroy();
delete body.mov;
delete filters;
delete body.filters;
body.removeMovieClip();
delete body;
delete bmp_font;
}
function setText(text_str) {
this.text_str = text_str;
if (body_bmp_mc == null) {
body_tf.text = text_str;
shadow_tf.text = text_str;
body_tf.setTextFormat(body_fmt);
shadow_tf.setTextFormat(shadow_fmt);
} else {
body_bmp_mc.removeMovieClip();
bmp_font.setTextFormat(text_obj);
body_bmp_mc = bmp_font.getBitmapText(body, text_str, "text", 2, text_obj.size, text_obj.w);
body_bmp_mc._x = text_obj.x;
body_bmp_mc._y = text_obj.y;
}
}
function getWidth() {
if (body_bmp_mc == null) {
return(body_tf._width);
}
return(body_bmp_mc._width);
}
function getHeight() {
if (body_bmp_mc == null) {
return(body_tf._height);
}
return(body_bmp_mc._height);
}
function getX() {
if (body_bmp_mc == null) {
return(body_tf._x);
}
return(body_bmp_mc._x);
}
function getY() {
if (body_bmp_mc == null) {
return(body_tf._y);
}
return(body_bmp_mc._y);
}
function setX(val) {
body._x = val;
}
function setY(val) {
body._y = val;
}
function getText() {
return(text_str);
}
function hide() {
body._visible = false;
}
function show() {
body._visible = true;
}
function getBody() {
return(body);
}
function initMove(act, T, delay, x1, y1, xscale1, yscale1, rotation1, alpha1, color1) {
body.mov.endAct = act;
body.mov.newInitMove(body, T, delay, x1, y1, xscale1, yscale1, rotation1, alpha1, color1);
}
function setVisible(vis) {
body._visible = vis;
}
function makeDarker(val) {
var _local3 = new Color(body);
_local3.setTransform({rb:val, gb:val, bb:val});
}
function setColorOffset(r, g, b) {
var _local2 = new Color(body);
_local2.setTransform({rb:r, gb:g, bb:b});
}
function setOpacity(val) {
body._alpha = val;
}
function setHotSpot(x, y) {
body_tf._x = -x;
body_tf._y = -y;
shadow_tf._x = body_tf._x + text_obj.sx;
shadow_tf._y = body_tf._y + text_obj.sy;
gradient_mc._x = body_tf._x;
gradient_mc._y = body_tf._y;
}
function initText() {
body_tf = body.createTextField("txt", 2, text_obj.x, text_obj.y, text_obj.w, 0);
body_tf.autoSize = "center";
body_tf.wordWrap = true;
body_tf.multiline = true;
body_tf.selectable = false;
body_tf.embedFonts = true;
body_tf.text = text_obj.text;
body_tf.filters = new Array(new flash.filters.DropShadowFilter(0, 0, _root.FontBlueBlue, 1, 2, 2, 1.5, 3, false, false, false));
body_fmt = body_tf.getTextFormat();
if ((text_obj.font != "undefined") && (text_obj.font != null)) {
body_fmt.font = text_obj.font;
} else {
body_fmt.font = "TextFont";
}
body_fmt.size = text_obj.size;
body_fmt.color = text_obj.color;
body_fmt.align = text_obj.align;
body_fmt.bold = text_obj.bold;
body_fmt.leading = text_obj.leading;
body_tf.setTextFormat(body_fmt);
}
function initShadow() {
shadow_tf = body.createTextField("stxt", 1, text_obj.x + text_obj.sx, text_obj.y + text_obj.sy, text_obj.w, 0);
shadow_tf.autoSize = "center";
shadow_tf.wordWrap = true;
shadow_tf.multiline = true;
shadow_tf.selectable = false;
shadow_tf.embedFonts = true;
shadow_tf.text = text_obj.text;
shadow_tf._alpha = text_obj.shadow_opacity;
shadow_fmt = body_tf.getTextFormat();
shadow_fmt.color = text_obj.shadow_color;
shadow_tf.setTextFormat(shadow_fmt);
shadow_tf._xscale = 100 * text_obj.shadow_scale;
shadow_tf._yscale = 100 * text_obj.shadow_scale;
shadow_tf.filters = [new flash.filters.BlurFilter(text_obj.shadow_blur, text_obj.shadow_blur, 1)];
}
function initContour() {
}
function initBitmapText() {
bmp_font.setTextFormat(text_obj);
body_bmp_mc = bmp_font.getBitmapText(body, text_obj.text, "text", 2, text_obj.size, text_obj.w);
body_bmp_mc._x = text_obj.x;
body_bmp_mc._y = text_obj.y;
}
function makeGradientFill() {
}
function makeBlur(val) {
filters.push(new flash.filters.BlurFilter(val, val, 1));
}
function initFilters() {
var _local3 = 0;
while (_local3 < text_obj.filters.length) {
var _local2 = text_obj.filters[_local3];
switch (_local2.name) {
case "bevel" :
filters.push(new flash.filters.BevelFilter(_local2.distance, _local2.angle, _local2.highlightColor, _local2.highlightAlpha, _local2.shadowColor, _local2.shadowAlpha, _local2.blurX, _local2.blurY, _local2.strength, _local2.quality, _local2.type, _local2.knockout));
break;
case "glow" :
filters.push(new flash.filters.GlowFilter(_local2.color, _local2.alpha, _local2.blurX, _local2.blurY, _local2.strength, _local2.quality, _local2.inner, _local2.knockout));
break;
case "shadow" :
filters.push(new flash.filters.DropShadowFilter(_local2.distance, _local2.angle, _local2.color, _local2.alpha, _local2.blurX, _local2.blurY, _local2.strength, _local2.quality, _local2.inner, _local2.knockout, _local2.hideObject));
break;
}
_local3++;
}
}
var bmp_font = null;
var body_bmp_mc = null;
}
Symbol 2536 MovieClip [__Packages.fonts_util.MyFont] Frame 0
class fonts_util.MyFont
{
var font, big_bmp, bmps;
function MyFont (font_fnt) {
font = font_fnt;
big_bmp = flash.display.BitmapData.loadBitmap(font.id + ".png");
bmps = new Array();
var _local7;
var _local5 = new flash.geom.Point(0, 0);
var _local3 = new flash.geom.Rectangle(0, 0, 1, 1);
var _local2 = 0;
while (_local2 < font.length) {
_local7 = "cod" + font[_local2].char;
var _local8 = (2 * font.xOffset) + font[_local2].B;
var _local9 = ((2 * font.yOffset) + font.ascent) + font.descent;
var _local4 = font.ascent;
bmps[_local2] = new flash.display.BitmapData(_local8, _local9, true, 0);
_local5.x = 0;
_local5.y = 0;
_local3.x = font[_local2].x;
_local3.y = font[_local2].y;
_local3.width = _local8;
_local3.height = _local9;
if (_local3.y < _local4) {
var _local6 = _local4 - _local3.y;
_local3.y = 0;
_local3.height = _local9 - _local6;
_local5.y = _local6;
} else {
_local3.y = _local3.y - _local4;
}
bmps[_local2].copyPixels(big_bmp, _local3, _local5);
bmps[_local7] = bmps[_local2];
_local2++;
}
if (font.cod32 == undefined) {
_local7 = "cod32";
var _local8 = bmps.cod97.width;
var _local9 = ((2 * font.yOffset) + font.ascent) + font.descent;
bmps[font.length] = new flash.display.BitmapData(_local8, _local9, true, 0);
bmps[_local7] = bmps[font.length];
font[_local7] = new Object();
font[_local7].A = 0;
font[_local7].B = _local8;
font[_local7].C = 0;
}
}
function getBitmapText(root_mc, s, str_id, depth, st, wstr) {
var _local15 = root_mc.createEmptyMovieClip(str_id, depth);
var _local17 = st / font.ascent;
var _local10 = wstr / _local17;
var _local16 = leading / _local17;
var _local11 = letter_space / _local17;
var _local7 = 0;
var _local13 = 0;
var _local12 = 0;
var _local9;
var _local3 = 0;
var _local2 = "cod";
var _local14 = "cod";
var _local8 = "cod";
var _local6;
var _local5;
while (_local3 < s.length) {
_local5 = _local15.createEmptyMovieClip("line" + _local12, _local12++);
_local9 = 0;
while (_local3 < s.length) {
if (s.charAt(_local3) == "\\") {
_local3++;
if (s.charAt(_local3) == "n") {
_local3++;
break;
}
}
_local14 = _local2;
_local2 = "cod" + s.charCodeAt(_local3);
if ((((_local7 + font[_local2].B) - font[_local2].C) + _local11) > _local10) {
if (_local2 == "cod32") {
_local3++;
break;
}
_local2 = "cod45";
_local6.attachBitmap(bmps[_local2], 1);
_local3--;
break;
}
_local6 = _local5.createEmptyMovieClip("letter" + _local9, _local9++);
_local6.attachBitmap(bmps[_local2], 1, "never", false);
_local6._x = _local7 + font[_local2].A;
_local7 = _local7 + ((_local6._width + font[_local2].C) + _local11);
_local3++;
if ((_local3 < s.length) && (font.pairs[_local2])) {
_local8 = "cod" + s.charCodeAt(_local3);
if (font.pairs[_local2][_local8]) {
_local7 = _local7 + font.pairs[_local2][_local8];
}
}
}
switch (align) {
case "right" :
_local5._x = _local10 - _local5._width;
break;
case "center" :
_local5._x = (_local10 - _local5._width) / 2;
break;
case "left" :
_local5._x = 0;
break;
default :
_local5._x = 0;
}
_local7 = 0;
_local5._y = _local13;
_local13 = _local13 + (_local5._height + _local16);
}
_local15._width = _local15._width * _local17;
_local15._height = _local15._height * _local17;
return(_local15);
}
function setLetterSpace(val) {
letter_space = val;
}
function setTextFormat(obj) {
align = obj.align;
letter_space = obj.interspace;
leading = obj.leading;
}
function getObject() {
return(font);
}
var leading = 0;
var letter_space = 0;
var align = "left";
}
Symbol 2537 MovieClip [__Packages.GameClasses.AllIntervals] Frame 0
class GameClasses.AllIntervals
{
var intervals, infos;
function AllIntervals () {
intervals = new Array();
infos = new Array();
}
static function get() {
if (!ai) {
ai = new GameClasses.AllIntervals();
}
return(ai);
}
function add(int, inf) {
}
function del(int) {
}
function getInfo() {
return("");
}
function add1(int, inf) {
var _local2 = 0;
while (_local2 < intervals.length) {
if (int == intervals[_local2]) {
if (inf) {
infos[_local2] = inf;
}
return(undefined);
}
_local2++;
}
intervals.push(int);
if (inf) {
infos.push(inf);
} else {
infos.push(" ");
}
}
function del1(int) {
var _local3 = -1;
var _local2 = 0;
while (_local2 < intervals.length) {
if (int == intervals[_local2]) {
_local3 = _local2;
break;
}
_local2++;
}
if (_local3 != -1) {
intervals.splice(_local3, 1);
delete infos[_local3];
infos.splice(_local3, 1);
}
}
function getInfo1() {
var _local3 = ("Count=" + intervals.length) + newline;
var _local2 = 0;
while (_local2 < intervals.length) {
_local3 = _local3 + (((String(intervals[_local2]) + " ") + infos[_local2]) + newline);
_local2++;
}
return(_local3);
}
static var ai = null;
}
Symbol 2538 MovieClip [__Packages.mx.core.UIObject] Frame 0
class mx.core.UIObject extends MovieClip
{
var _width, _height, _x, _y, _parent, _minHeight, _minWidth, _visible, dispatchEvent, _xscale, _yscale, methodTable, onEnterFrame, tfList, __width, __height, moveTo, lineTo, createTextField, attachMovie, buildDepthTable, findNextAvailableDepth, idNames, childrenCreated, _name, createAccessibilityImplementation, _endInit, validateNow, hasOwnProperty, initProperties, stylecache, className, ignoreClassStyleDeclaration, _tf, fontFamily, fontSize, color, marginLeft, marginRight, fontStyle, fontWeight, textAlign, textIndent, textDecoration, embedFonts, styleName, enabled;
function UIObject () {
super();
constructObject();
}
function get width() {
return(_width);
}
function get height() {
return(_height);
}
function get left() {
return(_x);
}
function get x() {
return(_x);
}
function get top() {
return(_y);
}
function get y() {
return(_y);
}
function get right() {
return(_parent.width - (_x + width));
}
function get bottom() {
return(_parent.height - (_y + height));
}
function getMinHeight(Void) {
return(_minHeight);
}
function setMinHeight(h) {
_minHeight = h;
}
function get minHeight() {
return(getMinHeight());
}
function set minHeight(h) {
setMinHeight(h);
//return(minHeight);
}
function getMinWidth(Void) {
return(_minWidth);
}
function setMinWidth(w) {
_minWidth = w;
}
function get minWidth() {
return(getMinWidth());
}
function set minWidth(w) {
setMinWidth(w);
//return(minWidth);
}
function setVisible(x, noEvent) {
if (x != _visible) {
_visible = x;
if (noEvent != true) {
dispatchEvent({type:(x ? "reveal" : "hide")});
}
}
}
function get visible() {
return(_visible);
}
function set visible(x) {
setVisible(x, false);
//return(visible);
}
function get scaleX() {
return(_xscale);
}
function set scaleX(x) {
_xscale = x;
//return(scaleX);
}
function get scaleY() {
return(_yscale);
}
function set scaleY(y) {
_yscale = y;
//return(scaleY);
}
function doLater(obj, fn) {
if (methodTable == undefined) {
methodTable = new Array();
}
methodTable.push({obj:obj, fn:fn});
onEnterFrame = doLaterDispatcher;
}
function doLaterDispatcher(Void) {
delete onEnterFrame;
if (invalidateFlag) {
redraw();
}
var _local3 = methodTable;
methodTable = new Array();
if (_local3.length > 0) {
var _local2;
while (_local2 = _local3.shift() , _local2 != undefined) {
_local2.obj[_local2.fn]();
}
}
}
function cancelAllDoLaters(Void) {
delete onEnterFrame;
methodTable = new Array();
}
function invalidate(Void) {
invalidateFlag = true;
onEnterFrame = doLaterDispatcher;
}
function invalidateStyle(Void) {
invalidate();
}
function redraw(bAlways) {
if (invalidateFlag || (bAlways)) {
invalidateFlag = false;
var _local2;
for (_local2 in tfList) {
tfList[_local2].draw();
}
draw();
dispatchEvent({type:"draw"});
}
}
function draw(Void) {
}
function move(x, y, noEvent) {
var _local3 = _x;
var _local2 = _y;
_x = x;
_y = y;
if (noEvent != true) {
dispatchEvent({type:"move", oldX:_local3, oldY:_local2});
}
}
function setSize(w, h, noEvent) {
var _local3 = __width;
var _local2 = __height;
__width = w;
__height = h;
size();
if (noEvent != true) {
dispatchEvent({type:"resize", oldWidth:_local3, oldHeight:_local2});
}
}
function size(Void) {
_width = __width;
_height = __height;
}
function drawRect(x1, y1, x2, y2) {
moveTo(x1, y1);
lineTo(x2, y1);
lineTo(x2, y2);
lineTo(x1, y2);
lineTo(x1, y1);
}
function createLabel(name, depth, text) {
createTextField(name, depth, 0, 0, 0, 0);
var _local2 = this[name];
_local2._color = textColorList;
_local2._visible = false;
_local2.__text = text;
if (tfList == undefined) {
tfList = new Object();
}
tfList[name] = _local2;
_local2.invalidateStyle();
invalidate();
_local2.styleName = this;
return(_local2);
}
function createObject(linkageName, id, depth, initobj) {
return(attachMovie(linkageName, id, depth, initobj));
}
function createClassObject(className, id, depth, initobj) {
var _local3 = className.symbolName == undefined;
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var _local4 = mx.core.UIObject(createObject(className.symbolOwner.symbolName, id, depth, initobj));
if (_local3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return(_local4);
}
function createEmptyObject(id, depth) {
return(createClassObject(mx.core.UIObject, id, depth));
}
function destroyObject(id) {
var _local2 = this[id];
if (_local2.getDepth() < 0) {
var _local4 = buildDepthTable();
var _local5 = findNextAvailableDepth(0, _local4, "up");
var _local3 = _local5;
_local2.swapDepths(_local3);
}
_local2.removeMovieClip();
delete this[id];
}
function getSkinIDName(tag) {
return(idNames[tag]);
}
function setSkin(tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return(createObject(linkageName, getSkinIDName(tag), tag, initObj));
}
function createSkin(tag) {
var _local2 = getSkinIDName(tag);
createEmptyObject(_local2, tag);
return(this[_local2]);
}
function createChildren(Void) {
}
function _createChildren(Void) {
createChildren();
childrenCreated = true;
}
function constructObject(Void) {
if (_name == undefined) {
return(undefined);
}
init();
_createChildren();
createAccessibilityImplementation();
_endInit();
if (validateNow) {
redraw(true);
} else {
invalidate();
}
}
function initFromClipParameters(Void) {
var _local4 = false;
var _local2;
for (_local2 in clipParameters) {
if (hasOwnProperty(_local2)) {
_local4 = true;
this["def_" + _local2] = this[_local2];
delete this[_local2];
}
}
if (_local4) {
for (_local2 in clipParameters) {
var _local3 = this["def_" + _local2];
if (_local3 != undefined) {
this[_local2] = _local3;
}
}
}
}
function init(Void) {
__width = _width;
__height = _height;
if (initProperties == undefined) {
initFromClipParameters();
} else {
initProperties();
}
if (_global.cascadingStyles == true) {
stylecache = new Object();
}
}
function getClassStyleDeclaration(Void) {
var _local4 = this;
var _local3 = className;
while (_local3 != undefined) {
if (ignoreClassStyleDeclaration[_local3] == undefined) {
if (_global.styles[_local3] != undefined) {
return(_global.styles[_local3]);
}
}
_local4 = _local4.__proto__;
_local3 = _local4.className;
}
}
function setColor(color) {
}
function __getTextFormat(tf, bAll) {
var _local8 = stylecache.tf;
if (_local8 != undefined) {
var _local3;
for (_local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
tf[_local3] = _local8[_local3];
}
}
}
return(false);
}
var _local6 = false;
for (var _local3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local3])) {
if (tf[_local3] == undefined) {
var _local5 = _tf[_local3];
if (_local5 != undefined) {
tf[_local3] = _local5;
} else if ((_local3 == "font") && (fontFamily != undefined)) {
tf[_local3] = fontFamily;
} else if ((_local3 == "size") && (fontSize != undefined)) {
tf[_local3] = fontSize;
} else if ((_local3 == "color") && (color != undefined)) {
tf[_local3] = color;
} else if ((_local3 == "leftMargin") && (marginLeft != undefined)) {
tf[_local3] = marginLeft;
} else if ((_local3 == "rightMargin") && (marginRight != undefined)) {
tf[_local3] = marginRight;
} else if ((_local3 == "italic") && (fontStyle != undefined)) {
tf[_local3] = fontStyle == _local3;
} else if ((_local3 == "bold") && (fontWeight != undefined)) {
tf[_local3] = fontWeight == _local3;
} else if ((_local3 == "align") && (textAlign != undefined)) {
tf[_local3] = textAlign;
} else if ((_local3 == "indent") && (textIndent != undefined)) {
tf[_local3] = textIndent;
} else if ((_local3 == "underline") && (textDecoration != undefined)) {
tf[_local3] = textDecoration == _local3;
} else if ((_local3 == "embedFonts") && (embedFonts != undefined)) {
tf[_local3] = embedFonts;
} else {
_local6 = true;
}
}
}
}
if (_local6) {
var _local9 = styleName;
if (_local9 != undefined) {
if (typeof(_local9) != "string") {
_local6 = _local9.__getTextFormat(tf, true, this);
} else if (_global.styles[_local9] != undefined) {
_local6 = _global.styles[_local9].__getTextFormat(tf, true, this);
}
}
}
if (_local6) {
var _local10 = getClassStyleDeclaration();
if (_local10 != undefined) {
_local6 = _local10.__getTextFormat(tf, true, this);
}
}
if (_local6) {
if (_global.cascadingStyles) {
if (_parent != undefined) {
_local6 = _parent.__getTextFormat(tf, false);
}
}
}
if (_local6) {
_local6 = _global.style.__getTextFormat(tf, true, this);
}
return(_local6);
}
function _getTextFormat(Void) {
var _local2 = stylecache.tf;
if (_local2 != undefined) {
return(_local2);
}
_local2 = new TextFormat();
__getTextFormat(_local2, true);
stylecache.tf = _local2;
if (enabled == false) {
var _local3 = getStyle("disabledColor");
_local2.color = _local3;
}
return(_local2);
}
function getStyleName(Void) {
var _local2 = styleName;
if (_local2 != undefined) {
if (typeof(_local2) != "string") {
return(_local2.getStyleName());
}
return(_local2);
}
if (_parent != undefined) {
return(_parent.getStyleName());
}
return(undefined);
}
function getStyle(styleProp) {
var _local3;
_global.getStyleCounter++;
if (this[styleProp] != undefined) {
return(this[styleProp]);
}
var _local6 = styleName;
if (_local6 != undefined) {
if (typeof(_local6) != "string") {
_local3 = _local6.getStyle(styleProp);
} else {
var _local7 = _global.styles[_local6];
_local3 = _local7.getStyle(styleProp);
}
}
if (_local3 != undefined) {
return(_local3);
}
var _local7 = getClassStyleDeclaration();
if (_local7 != undefined) {
_local3 = _local7[styleProp];
}
if (_local3 != undefined) {
return(_local3);
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || (mx.styles.StyleManager.isColorStyle(styleProp))) {
var _local5 = stylecache;
if (_local5 != undefined) {
if (_local5[styleProp] != undefined) {
return(_local5[styleProp]);
}
}
if (_parent != undefined) {
_local3 = _parent.getStyle(styleProp);
} else {
_local3 = _global.style[styleProp];
}
if (_local5 != undefined) {
_local5[styleProp] = _local3;
}
return(_local3);
}
}
if (_local3 == undefined) {
_local3 = _global.style[styleProp];
}
return(_local3);
}
static function mergeClipParameters(o, p) {
for (var _local3 in p) {
o[_local3] = p[_local3];
}
return(true);
}
static var symbolName = "UIObject";
static var symbolOwner = mx.core.UIObject;
static var version = "2.0.2.127";
static var textColorList = {color:1, disabledColor:1};
var invalidateFlag = false;
var lineWidth = 1;
var lineColor = 0;
var tabEnabled = false;
var clipParameters = {visible:1, minHeight:1, minWidth:1, maxHeight:1, maxWidth:1, preferredHeight:1, preferredWidth:1};
}
Symbol 2539 MovieClip [__Packages.mx.skins.SkinElement] Frame 0
class mx.skins.SkinElement extends MovieClip
{
var _visible, _x, _y, _width, _height;
function SkinElement () {
super();
}
static function registerElement(name, className) {
Object.registerClass(name, ((className == undefined) ? (mx.skins.SkinElement) : (className)));
_global.skinRegistry[name] = true;
}
function __set__visible(visible) {
_visible = visible;
}
function move(x, y) {
_x = x;
_y = y;
}
function setSize(w, h) {
_width = w;
_height = h;
}
}
Symbol 2540 MovieClip [__Packages.mx.styles.CSSTextStyles] Frame 0
class mx.styles.CSSTextStyles
{
function CSSTextStyles () {
}
static function addTextStyles(o, bColor) {
o.addProperty("textAlign", function () {
return(this._tf.align);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty("fontWeight", function () {
return(((this._tf.bold != undefined) ? ((this._tf.bold ? "bold" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == "bold";
});
if (bColor) {
o.addProperty("color", function () {
return(this._tf.color);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty("fontFamily", function () {
return(this._tf.font);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty("textIndent", function () {
return(this._tf.indent);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty("fontStyle", function () {
return(((this._tf.italic != undefined) ? ((this._tf.italic ? "italic" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == "italic";
});
o.addProperty("marginLeft", function () {
return(this._tf.leftMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty("marginRight", function () {
return(this._tf.rightMargin);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty("fontSize", function () {
return(this._tf.size);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty("textDecoration", function () {
return(((this._tf.underline != undefined) ? ((this._tf.underline ? "underline" : "none")) : undefined));
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == "underline";
});
o.addProperty("embedFonts", function () {
return(this._tf.embedFonts);
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
}
}
Symbol 2541 MovieClip [__Packages.mx.styles.CSSStyleDeclaration] Frame 0
class mx.styles.CSSStyleDeclaration
{
var _tf;
function CSSStyleDeclaration () {
}
function __getTextFormat(tf, bAll) {
var _local5 = false;
if (_tf != undefined) {
var _local2;
for (_local2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || (mx.styles.StyleManager.TextFormatStyleProps[_local2])) {
if (tf[_local2] == undefined) {
var _local3 = _tf[_local2];
if (_local3 != undefined) {
tf[_local2] = _local3;
} else {
_local5 = true;
}
}
}
}
} else {
_local5 = true;
}
return(_local5);
}
function getStyle(styleProp) {
var _local2 = this[styleProp];
var _local3 = mx.styles.StyleManager.getColorName(_local2);
return(((_local3 == undefined) ? (_local2) : (_local3)));
}
static function classConstruct() {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return(true);
}
static var classConstructed = classConstruct();
static var CSSTextStylesDependency = mx.styles.CSSTextStyles;
}
Symbol 2542 MovieClip [__Packages.mx.styles.StyleManager] Frame 0
class mx.styles.StyleManager
{
function StyleManager () {
}
static function registerInheritingStyle(styleName) {
inheritingStyles[styleName] = true;
}
static function isInheritingStyle(styleName) {
return(inheritingStyles[styleName] == true);
}
static function registerColorStyle(styleName) {
colorStyles[styleName] = true;
}
static function isColorStyle(styleName) {
return(colorStyles[styleName] == true);
}
static function registerColorName(colorName, colorValue) {
colorNames[colorName] = colorValue;
}
static function isColorName(colorName) {
return(colorNames[colorName] != undefined);
}
static function getColorName(colorName) {
return(colorNames[colorName]);
}
static var inheritingStyles = {color:true, direction:true, fontFamily:true, fontSize:true, fontStyle:true, fontWeight:true, textAlign:true, textIndent:true};
static var colorStyles = {barColor:true, trackColor:true, borderColor:true, buttonColor:true, color:true, dateHeaderColor:true, dateRollOverColor:true, disabledColor:true, fillColor:true, highlightColor:true, scrollTrackColor:true, selectedDateColor:true, shadowColor:true, strokeColor:true, symbolBackgroundColor:true, symbolBackgroundDisabledColor:true, symbolBackgroundPressedColor:true, symbolColor:true, symbolDisabledColor:true, themeColor:true, todayIndicatorColor:true, shadowCapColor:true, borderCapColor:true, focusColor:true};
static var colorNames = {black:0, white:16777215, red:16711680, green:65280, blue:255, magenta:16711935, yellow:16776960, cyan:65535, haloGreen:8453965, haloBlue:2881013, haloOrange:16761344};
static var TextFormatStyleProps = {font:true, size:true, color:true, leftMargin:false, rightMargin:false, italic:true, bold:true, align:true, indent:true, underline:false, embedFonts:false};
static var TextStyleMap = {textAlign:true, fontWeight:true, color:true, fontFamily:true, textIndent:true, fontStyle:true, lineHeight:true, marginLeft:true, marginRight:true, fontSize:true, textDecoration:true, embedFonts:true};
}
Symbol 2543 MovieClip [__Packages.mx.core.UIComponent] Frame 0
class mx.core.UIComponent extends mx.core.UIObject
{
var __width, __height, invalidate, stylecache, removeEventListener, dispatchEvent, drawFocus, addEventListener, _xscale, _yscale, _focusrect, watch, enabled;
function UIComponent () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function setVisible(x, noEvent) {
super.setVisible(x, noEvent);
}
function enabledChanged(id, oldValue, newValue) {
setEnabled(newValue);
invalidate();
delete stylecache.tf;
return(newValue);
}
function setEnabled(enabled) {
invalidate();
}
function getFocus() {
var selFocus = Selection.getFocus();
return(((selFocus === null) ? null : (eval (selFocus))));
}
function setFocus() {
Selection.setFocus(this);
}
function getFocusManager() {
var _local2 = this;
while (_local2 != undefined) {
if (_local2.focusManager != undefined) {
return(_local2.focusManager);
}
_local2 = _local2._parent;
}
return(undefined);
}
function onKillFocus(newFocus) {
removeEventListener("keyDown", this);
removeEventListener("keyUp", this);
dispatchEvent({type:"focusOut"});
drawFocus(false);
}
function onSetFocus(oldFocus) {
addEventListener("keyDown", this);
addEventListener("keyUp", this);
dispatchEvent({type:"focusIn"});
if (getFocusManager().bDrawFocus != false) {
drawFocus(true);
}
}
function findFocusInChildren(o) {
if (o.focusTextField != undefined) {
return(o.focusTextField);
}
if (o.tabEnabled == true) {
return(o);
}
return(undefined);
}
function findFocusFromObject(o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return(undefined);
}
if (o._parent.tabEnabled == true) {
o = o._parent;
} else if (o._parent.tabChildren) {
o = findFocusInChildren(o._parent);
} else {
o = findFocusFromObject(o._parent);
}
}
return(o);
}
function pressFocus() {
var _local3 = findFocusFromObject(this);
var _local2 = getFocus();
if (_local3 != _local2) {
_local2.drawFocus(false);
if (getFocusManager().bDrawFocus != false) {
_local3.drawFocus(true);
}
}
}
function releaseFocus() {
var _local2 = findFocusFromObject(this);
if (_local2 != getFocus()) {
_local2.setFocus();
}
}
function isParent(o) {
while (o != undefined) {
if (o == this) {
return(true);
}
o = o._parent;
}
return(false);
}
function size() {
}
function init() {
super.init();
_xscale = 100;
_yscale = 100;
_focusrect = _global.useFocusRect == false;
watch("enabled", enabledChanged);
if (enabled == false) {
setEnabled(false);
}
}
function dispatchValueChangedEvent(value) {
dispatchEvent({type:"valueChanged", value:value});
}
static var symbolName = "UIComponent";
static var symbolOwner = mx.core.UIComponent;
static var version = "2.0.2.127";
static var kStretch = 5000;
var focusEnabled = true;
var tabEnabled = true;
var origBorderStyles = {themeColor:16711680};
var clipParameters = {};
static var mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
}
Symbol 2544 MovieClip [__Packages.mx.skins.Border] Frame 0
class mx.skins.Border extends mx.core.UIObject
{
function Border () {
super();
}
function init(Void) {
super.init();
}
static var symbolName = "Border";
static var symbolOwner = mx.skins.Border;
var className = "Border";
var tagBorder = 0;
var idNames = new Array("border_mc");
}
Symbol 2545 MovieClip [__Packages.mx.skins.RectBorder] Frame 0
class mx.skins.RectBorder extends mx.skins.Border
{
var __width, __height, offset, __borderMetrics;
function RectBorder () {
super();
}
function get width() {
return(__width);
}
function get height() {
return(__height);
}
function init(Void) {
super.init();
}
function draw(Void) {
size();
}
function getBorderMetrics(Void) {
var _local2 = offset;
if (__borderMetrics == undefined) {
__borderMetrics = {left:_local2, top:_local2, right:_local2, bottom:_local2};
} else {
__borderMetrics.left = _local2;
__borderMetrics.top = _local2;
__borderMetrics.right = _local2;
__borderMetrics.bottom = _local2;
}
return(__borderMetrics);
}
function get borderMetrics() {
return(getBorderMetrics());
}
function drawBorder(Void) {
}
function size(Void) {
drawBorder();
}
function setColor(Void) {
drawBorder();
}
static var symbolName = "RectBorder";
static var symbolOwner = mx.skins.RectBorder;
static var version = "2.0.2.127";
var className = "RectBorder";
var borderStyleName = "borderStyle";
var borderColorName = "borderColor";
var shadowColorName = "shadowColor";
var highlightColorName = "highlightColor";
var buttonColorName = "buttonColor";
var backgroundColorName = "backgroundColor";
}
Symbol 2546 MovieClip [__Packages.mx.data.binding.DataAccessor] Frame 0
class mx.data.binding.DataAccessor
{
var dataAccessor, component, property, location, type;
function DataAccessor () {
}
function getAnyTypedValue(suggestedTypes) {
var _local3 = 0;
while (_local3 < suggestedTypes.length) {
var _local5 = getTypedValue(suggestedTypes[_local3]);
if (_local5 != null) {
return(_local5);
}
_local3++;
}
var _local5 = getTypedValue();
_local3 = 0;
while (_local3 < suggestedTypes.length) {
var _local2 = suggestedTypes[_local3];
if (_local2 == "String") {
return(new mx.data.binding.TypedValue(String(_local5.value), _local2));
}
if (_local2 == "Number") {
return(new mx.data.binding.TypedValue(Number(_local5.value), _local2));
}
if (_local2 == "Boolean") {
return(new mx.data.binding.TypedValue(Boolean(_local5.value), _local2));
}
_local3++;
}
return(_local5);
}
function setAnyTypedValue(newValue) {
var _local7 = getSettableTypes();
if ((_local7 == null) || (-1 != findString(newValue.typeName, _local7))) {
return(setTypedValue(newValue));
}
var _local3 = 0;
while (_local3 < _local7.length) {
var _local2 = _local7[_local3];
if (_local2 == "String") {
return(setTypedValue(new mx.data.binding.TypedValue(String(newValue.value), _local2)));
}
if (_local2 == "Number") {
var _local5 = Number(newValue.value);
var _local6 = setTypedValue(new mx.data.binding.TypedValue(_local5, _local2));
if (_local5.toString() == "NaN") {
return([("Failed to convert '" + newValue.value) + "' to a number"]);
}
return(_local6);
}
if (_local2 == "Boolean") {
return(setTypedValue(new mx.data.binding.TypedValue(Boolean(newValue.value), _local2)));
}
_local3++;
}
return(dataAccessor.setTypedValue(newValue));
}
function getTypedValue(requestedType) {
var _local2 = dataAccessor.getTypedValue(requestedType);
return(_local2);
}
function getGettableTypes() {
return(null);
}
function setTypedValue(newValue) {
return(dataAccessor.setTypedValue(newValue));
}
function getSettableTypes() {
return(null);
}
function findLastAccessor() {
return(((dataAccessor == null) ? this : (dataAccessor.findLastAccessor())));
}
function setupDataAccessor(component, property, location) {
this.component = component;
this.property = property;
this.location = location;
type = component.findSchema(property, location);
}
static function findString(str, arr) {
var _local3 = str.toLowerCase();
var _local1 = 0;
while (_local1 < arr.length) {
if (arr[_local1].toLowerCase() == _local3) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function conversionFailed(newValue, target) {
return(((("Failed to convert to " + target) + ": '") + newValue.value) + "'");
}
}
Symbol 2547 MovieClip [__Packages.mx.data.binding.TypedValue] Frame 0
class mx.data.binding.TypedValue
{
var value, typeName, type;
function TypedValue (value, typeName, type) {
this.value = value;
this.typeName = typeName;
this.type = type;
}
}
Symbol 2548 MovieClip [__Packages.mx.data.binding.DataType] Frame 0
class mx.data.binding.DataType extends mx.data.binding.DataAccessor
{
var errorArray, type, kind, dataAccessor, encoder, formatter, getAnyTypedValue, setAnyTypedValue, component, location, property;
function DataType () {
super();
errorArray = null;
}
function setupDataAccessor(component, property, location) {
super.setupDataAccessor(component, property, location);
type = component.findSchema(property, location);
if (type.kind != undefined) {
kind = mx.data.binding.Binding.getRuntimeObject(type.kind);
} else {
kind = new mx.data.kinds.Data();
}
kind.setupDataAccessor(component, property, location);
dataAccessor = kind;
if (type.encoder != undefined) {
encoder = mx.data.binding.Binding.getRuntimeObject(type.encoder);
encoder.setupDataAccessor(component, property, location);
encoder.dataAccessor = dataAccessor;
dataAccessor = encoder;
}
if (type.formatter != undefined) {
formatter = mx.data.binding.Binding.getRuntimeObject(type.formatter);
formatter.setupDataAccessor(component, property, location);
formatter.dataAccessor = dataAccessor;
}
}
function getAsBoolean() {
var _local2 = getAnyTypedValue(["Boolean"]);
return(_local2.value);
}
function getAsNumber() {
var _local2 = getAnyTypedValue(["Number"]);
return(_local2.value);
}
function getAsString() {
var _local2 = getAnyTypedValue(["String"]);
return(_local2.value);
}
function setAsBoolean(newValue) {
setAnyTypedValue(new mx.data.binding.TypedValue(newValue, "Boolean"));
}
function setAsNumber(newValue) {
setAnyTypedValue(new mx.data.binding.TypedValue(newValue, "Number"));
}
function setAsString(newValue) {
setAnyTypedValue(new mx.data.binding.TypedValue(newValue, "String"));
}
function validationError(errorMessage) {
if (errorArray == null) {
errorArray = new Array();
}
errorArray.push(errorMessage);
}
function validate(value) {
}
function getTypedValue(requestedType) {
var _local2;
if ((requestedType == "String") && (formatter != null)) {
_local2 = formatter.getTypedValue(requestedType);
} else {
_local2 = dataAccessor.getTypedValue(requestedType);
if (_local2.type == null) {
_local2.type = type;
}
if (_local2.typeName == null) {
_local2.typeName = type.name;
}
}
if ((_local2.typeName != requestedType) && (requestedType != null)) {
_local2 = null;
} else if (((!requestedType) && (_local2.typeName == "XML")) && (_local2.type.name == "String")) {
_local2 = null;
}
return(_local2);
}
function getGettableTypes() {
var _local2 = new Array();
var _local3 = gettableTypes();
if (_local3 != null) {
_local2 = _local2.concat(_local3);
}
if (type.name != null) {
_local2 = _local2.concat(type.name);
}
if (formatter != null) {
_local2 = _local2.concat(formatter.getGettableTypes());
}
if (_local2.length == 0) {
return(null);
}
return(_local2);
}
function setTypedValue(newValue) {
if ((newValue.typeName == "String") && (formatter != null)) {
return(formatter.setTypedValue(newValue));
}
var _local3 = dataAccessor.getSettableTypes();
if ((_local3 == null) || (-1 != mx.data.binding.DataAccessor.findString(newValue.typeName, _local3))) {
return(dataAccessor.setTypedValue(newValue));
}
return(["Can't set a value of type " + newValue.typeName]);
}
function getSettableTypes() {
var _local2 = new Array();
var _local3 = settableTypes();
if (_local3 != null) {
_local2 = _local2.concat(_local3);
}
if (type.name != null) {
_local2 = _local2.concat(type.name);
}
if (formatter != null) {
_local2 = _local2.concat(formatter.getSettableTypes());
}
if (_local2.length == 0) {
return(null);
}
return(_local2);
}
function gettableTypes() {
return(dataAccessor.getGettableTypes());
}
function settableTypes() {
return(dataAccessor.getSettableTypes());
}
function validateAndNotify(returnData, noEvent, initialMessages) {
var _local4 = false;
errorArray = null;
for (var _local6 in initialMessages) {
validationError(initialMessages[_local6]);
_local4 = true;
}
var _local7 = getTypedValue();
if ((_local7.value == null) || (_local7.value == "")) {
if (type.required == false) {
_global.__dataLogger.logData(component, "Validation of null value succeeded because field '<property>/<m_location>' is not required", this);
} else {
var _local8 = ((location == null) ? "" : (":" + String(location)));
validationError((("Required item '" + property) + _local8) + "' is missing");
_local4 = true;
}
} else {
validate(_local7.value);
_local4 = true;
}
if (_local4 && (noEvent != true)) {
var _local5 = new Object();
_local5.type = ((errorArray == null) ? "valid" : "invalid");
_local5.property = property;
_local5.location = location;
_local5.messages = errorArray;
component.dispatchEvent(_local5);
returnData.event = _local5;
}
return(errorArray);
}
}
Symbol 2549 MovieClip [__Packages.mx.data.binding.Binding] Frame 0
class mx.data.binding.Binding
{
var is2way, dest, source, format;
function Binding (source, dest, format, is2way) {
mx.events.EventDispatcher.initialize(this);
var _local5 = this;
_local5.source = source;
_local5.dest = dest;
_local5.format = format;
_local5.is2way = is2way;
registerBinding(this);
calcShortLoc(source);
calcShortLoc(dest);
_global.__dataLogger.logData(null, ("Creating binding " + summaryString()) + (is2way ? ", 2-way" : ""), {binding:this});
_global.__dataLogger.nestLevel++;
mx.data.binding.ComponentMixins.initComponent(dest.component);
if (source.component != undefined) {
mx.data.binding.ComponentMixins.initComponent(source.component);
}
dest.component.addBinding(this);
if (source.component != undefined) {
source.component.addBinding(this);
setUpListener(source, false);
if (this.is2way) {
setUpListener(dest, true);
setUpIndexListeners(source, false);
setUpIndexListeners(dest, true);
} else {
setUpIndexListeners(source, false);
setUpIndexListeners(dest, false);
}
} else {
execute();
}
_global.__dataLogger.nestLevel--;
}
function execute(reverse) {
var _local3;
var _local4;
if (reverse) {
if (!is2way) {
_global.__dataLogger.logData(null, ("Warning: Can't execute binding " + summaryString(false)) + " in reverse, because it's not a 2 way binding", {binding:this}, mx.data.binding.Log.BRIEF);
return(["error"]);
}
_local3 = dest;
_local4 = source;
} else {
_local3 = source;
_local4 = dest;
}
_global.__dataLogger.logData(null, "Executing binding " + summaryString(reverse), {binding:this});
_global.__dataLogger.nestLevel++;
var _local10;
if (_local3.constant != undefined) {
_local10 = {value:new mx.data.binding.TypedValue(_local3.constant, "String"), getAnyTypedValue:function () {
return(this.value);
}, getTypedValue:function () {
return(this.value);
}, getGettableTypes:function () {
return(["String"]);
}};
} else {
_local10 = _local3.component.getField(_local3.property, _local3.location, true);
}
var _local18;
var _local20;
var _local12 = "";
var _local8 = _local4.component.getField(_local4.property, _local4.location);
if (format != null) {
var _local5 = getRuntimeObject(format);
if (_local5 != null) {
if (reverse) {
_local5.setupDataAccessor(_local4.component, _local4.property, _local4.location);
_local5.dataAccessor = _local8;
_local8 = _local5;
} else {
_local5.setupDataAccessor(_local3.component, _local3.property, _local3.location);
_local5.dataAccessor = _local10;
_local10 = _local5;
}
}
}
var _local14 = ((format == null) ? (_local8.getSettableTypes()) : null);
var value = _local10.getAnyTypedValue(_local14);
var _local9 = new Object();
if (_local8.type.readonly == true) {
_global.__dataLogger.logData(null, "Not executing binding because the destination is read-only", null, mx.data.binding.Log.BRIEF);
var _local6 = new Object();
_local6.type = "invalid";
_local6.property = _local4.property;
_local6.location = _local4.location;
_local6.messages = [{message:"Cannot assign to a read-only data field."}];
_local4.component.dispatchEvent(_local6);
_local9.event = _local6;
} else {
_global.__dataLogger.logData(null, "Assigning new value '<value>' (<typeName>) " + _local12, {value:value.value, typeName:value.typeName, unformattedValue:_local18, formatterFrom:_local20});
var _local13 = _local8.setAnyTypedValue(value);
_local8.validateAndNotify(_local9, false, _local13);
_local4.component.dispatchEvent({type:"bindingExecuted", binding:this});
}
if (_local9.event != null) {
if (_local3.component != null) {
var _local7 = new Object();
_local7.type = _local9.event.type;
_local7.property = _local3.property;
_local7.location = _local3.location;
_local7.messages = _local9.event.messages;
_local7.to = _local4.component;
_local3.component.dispatchEvent(_local7);
}
}
_global.__dataLogger.nestLevel--;
return(_local9.event.messages);
}
function queueForExecute(reverse) {
if (!queued) {
if (_global.__databind_executeQueue == null) {
_global.__databind_executeQueue = new Array();
}
if (_root.__databind_dispatch == undefined) {
_root.createEmptyMovieClip("__databind_dispatch", -8888);
}
_global.__databind_executeQueue.push(this);
queued = true;
this.reverse = reverse;
_root.__databind_dispatch.onEnterFrame = dispatchEnterFrame;
}
}
static function dispatchEnterFrame() {
_root.__databind_dispatch.onEnterFrame = null;
var _local4 = 0;
while (_local4 < _global.__databind_executeQueue.length) {
var _local3 = _global.__databind_executeQueue[_local4];
_local3.execute(_local3.reverse);
_local4++;
}
var _local5;
while (_local5 = _global.__databind_executeQueue.pop() , _local5 != null) {
_local5.queued = false;
_local5.reverse = false;
}
}
function calcShortLoc(endpoint) {
var _local1 = endpoint.location;
if (_local1.path != null) {
_local1 = _local1.path;
}
endpoint.loc = ((_local1 instanceof Array) ? (_local1.join(".")) : (_local1));
}
function summaryString(reverse) {
var _local2 = "<binding.dest.component>:<binding.dest.property>:<binding.dest.loc>";
var _local3 = "<binding.source.component>:<binding.source.property>:<binding.source.loc>";
if (source.constant == null) {
if (reverse == true) {
return((("from " + _local2) + " to ") + _local3);
}
return((("from " + _local3) + " to ") + _local2);
}
return("from constant '<binding.source.constant>' to " + _local2);
}
static function getRuntimeObject(info, constructorParameter) {
if (info.cls == undefined) {
info.cls = mx.utils.ClassFinder.findClass(info.className);
}
var _local3 = new info.cls(constructorParameter);
if (_local3 == null) {
_global.__dataLogger.logData(null, "Could not construct a formatter or validator - new <info.className>(<params>)", {info:info, params:constructorParameter}, mx.data.binding.Log.BRIEF);
}
for (var _local4 in info.settings) {
_local3[_local4] = info.settings[_local4];
}
return(_local3);
}
static function refreshFromSources(component, property, bindings) {
var _local5 = null;
var _local3;
_local3 = 0;
while (_local3 < bindings.length) {
var _local1 = bindings[_local3];
var _local2 = null;
if ((_local1.dest.component == component) && ((property == null) || (property == _local1.dest.property))) {
_local2 = _local1.execute();
} else if ((_local1.is2way && (_local1.source.component == component)) && ((property == null) || (property == _local1.source.property))) {
_local2 = _local1.execute(true);
}
if (_local2 != null) {
_local5 = ((_local5 == null) ? (_local2) : (_local5.concat(_local2)));
}
_local3++;
}
return(_local5);
}
static function refreshDestinations(component, bindings) {
var _local1;
_local1 = 0;
while (_local1 < bindings.length) {
var _local2 = bindings[_local1];
if (_local2.source.component == component) {
_local2.execute();
} else if (_local2.is2way && (_local2.dest.component == component)) {
_local2.execute(true);
}
_local1++;
}
_local1 = 0;
while (_local1 < component.__indexBindings.length) {
var _local3 = component.__indexBindings[_local1];
_local3.binding.execute(_local3.reverse);
_local1++;
}
}
static function okToCallGetterFromSetter() {
function setter(val) {
this.value2 = this.value;
}
function getter() {
return(5);
}
var _local2 = new Object();
_local2.addProperty("value", getter, setter);
_local2.value = 0;
var _local3 = _local2.value2 == _local2.value;
return(_local3);
}
function setUpListener(endpoint, reverse) {
var _local4 = new Object();
_local4.binding = this;
_local4.property = endpoint.property;
_local4.reverse = reverse;
_local4.immediate = okToCallGetterFromSetter();
_local4.handleEvent = function (event) {
_global.__dataLogger.logData(event.target, "Data of property '<property>' has changed. <immediate>.", this);
if (this.immediate) {
if (this.binding.executing != true) {
this.binding.executing = true;
this.binding.execute(this.reverse);
this.binding.executing = false;
}
} else {
this.binding.queueForExecute(this.reverse);
}
};
if (endpoint.event instanceof Array) {
for (var _local5 in endpoint.event) {
endpoint.component.__addHighPrioEventListener(endpoint.event[_local5], _local4);
}
} else {
endpoint.component.__addHighPrioEventListener(endpoint.event, _local4);
}
mx.data.binding.ComponentMixins.initComponent(endpoint.component);
}
function setUpIndexListeners(endpoint, reverse) {
if (endpoint.location.indices != undefined) {
var _local3 = 0;
while (_local3 < endpoint.location.indices.length) {
var _local2 = endpoint.location.indices[_local3];
if (_local2.component != undefined) {
setUpListener(_local2, reverse);
if (_local2.component.__indexBindings == undefined) {
_local2.component.__indexBindings = new Array();
}
_local2.component.__indexBindings.push({binding:this, reverse:reverse});
}
_local3++;
}
}
}
static function copyBinding(b) {
var _local1 = new Object();
_local1.source = copyEndPoint(b.source);
_local1.dest = copyEndPoint(b.dest);
_local1.format = b.format;
_local1.is2way = b.is2way;
return(_local1);
}
static function copyEndPoint(e) {
var _local1 = new Object();
_local1.constant = e.constant;
_local1.component = String(e.component);
_local1.event = e.event;
_local1.location = e.location;
_local1.property = e.property;
return(_local1);
}
static function registerScreen(screen, id) {
var symbol = screenRegistry[id];
if (symbol == null) {
screenRegistry[id] = {symbolPath:String(screen), bindings:[], id:id};
return(undefined);
}
if (symbol.symbolPath == String(screen)) {
return(undefined);
}
var instancePath = String(screen);
var i = 0;
while (i < bindingRegistry.length) {
var b = bindingRegistry[i];
var src = copyEndPoint(b.source);
var dst = copyEndPoint(b.dest);
var prefix = (symbol.symbolPath + ".");
var symbolContainsSource = (prefix == b.source.component.substr(0, prefix.length));
var symbolContainsDest = (prefix == b.dest.component.substr(0, prefix.length));
if (symbolContainsSource) {
if (symbolContainsDest) {
src.component = eval (instancePath + src.component.substr(symbol.symbolPath.length));
dst.component = eval (instancePath + dst.component.substr(symbol.symbolPath.length));
new mx.data.binding.Binding(src, dst, b.format, b.is2way);
} else {
src.component = eval (instancePath + src.component.substr(symbol.symbolPath.length));
dst.component = eval (dst.component);
new mx.data.binding.Binding(src, dst, b.format, b.is2way);
}
} else if (symbolContainsDest) {
src.component = eval (src.component);
dst.component = eval (instancePath + dst.component.substr(symbol.symbolPath.length));
new mx.data.binding.Binding(src, dst, b.format, b.is2way);
}
i++;
}
}
static function registerBinding(binding) {
var _local1 = copyBinding(binding);
bindingRegistry.push(_local1);
}
static function getLocalRoot(clip) {
var _local2;
var _local3 = clip._url;
while (clip != null) {
if (clip._url != _local3) {
break;
}
_local2 = clip;
clip = clip._parent;
}
return(_local2);
}
var queued = false;
var reverse = false;
static var counter = 0;
static var screenRegistry = new Object();
static var bindingRegistry = new Array();
}
Symbol 2550 MovieClip [__Packages.mx.data.binding.ComponentMixins] Frame 0
class mx.data.binding.ComponentMixins
{
var __refreshing, __bindings, __schema, __fieldCache, _eventDispatcher;
function ComponentMixins () {
}
function refreshFromSources() {
if (__refreshing != null) {
return(undefined);
}
__refreshing = true;
_global.__dataLogger.logData(this, "Refreshing from sources");
_global.__dataLogger.nestLevel++;
mx.data.binding.Binding.refreshFromSources(this, null, __bindings);
_global.__dataLogger.nestLevel--;
__refreshing = null;
}
function refreshDestinations() {
_global.__dataLogger.logData(this, "Refreshing Destinations");
_global.__dataLogger.nestLevel++;
mx.data.binding.Binding.refreshDestinations(this, __bindings);
_global.__dataLogger.nestLevel--;
}
function validateProperty(property, initialMessages) {
var _local4 = null;
var _local3 = getField(property);
if (_local3 != null) {
_local4 = _local3.validateAndNotify(null, null, initialMessages);
} else {
_global.__dataLogger.logData(this, "Can't validate property '<property>' because it doesn't exist", {property:property});
}
return(_local4);
}
function addBinding(binding) {
if (__bindings == undefined) {
__bindings = new Array();
}
__bindings.push(binding);
var _local3 = false;
if (binding.source.component == this) {
getField(binding.source.property, binding.source.location);
_local3 = true;
}
if (binding.dest.component == this) {
getField(binding.dest.property, binding.dest.location);
_local3 = _local3 | Object(binding).is2way;
}
if (_local3) {
var _local4 = binding.dest.component.findSchema(binding.dest.property, binding.dest.location);
if (_local4.readonly) {
binding.source.component.__setReadOnly(true);
}
}
}
static function initComponent(component) {
var _local2 = mx.data.binding.ComponentMixins.prototype;
if (component.refreshFromSources == undefined) {
component.refreshFromSources = _local2.refreshFromSources;
}
if (component.refreshDestinations == undefined) {
component.refreshDestinations = _local2.refreshDestinations;
}
if (component.validateProperty == undefined) {
component.validateProperty = _local2.validateProperty;
}
if (component.createFieldAccessor == undefined) {
component.createFieldAccessor = _local2.createFieldAccessor;
}
if (component.createField == undefined) {
component.createField = _local2.createField;
}
if (component.addBinding == undefined) {
component.addBinding = _local2.addBinding;
}
if (component.findSchema == undefined) {
component.findSchema = _local2.findSchema;
}
if (component.getField == undefined) {
component.getField = _local2.getField;
}
if (component.refreshAndValidate == undefined) {
component.refreshAndValidate = _local2.refreshAndValidate;
}
if (component.getFieldFromCache == undefined) {
component.getFieldFromCache = _local2.getFieldFromCache;
}
if (component.getBindingMetaData == undefined) {
component.getBindingMetaData = _local2.getBindingMetaData;
}
if (component.__setReadOnly == undefined) {
component.__setReadOnly = _local2.__setReadOnly;
}
if (component.__addHighPrioEventListener == undefined) {
component.__addHighPrioEventListener = _local2.__addHighPrioEventListener;
}
}
function createFieldAccessor(property, location, mustExist) {
return(mx.data.binding.FieldAccessor.createFieldAccessor(this, property, location, mx.data.binding.FieldAccessor.findElementType(__schema, property), mustExist));
}
function findSchema(property, location) {
if (typeof(location) == "string") {
if (mx.data.binding.FieldAccessor.isActionScriptPath(String(location))) {
location = location.split(".");
} else {
return(null);
}
}
var _local5 = mx.data.binding.FieldAccessor.findElementType(__schema, property);
if (location != null) {
if (location.path != null) {
location = location.path;
}
if (!(location instanceof Array)) {
return(null);
}
var _local2 = 0;
while (_local2 < location.length) {
var _local4 = location[_local2];
_local5 = mx.data.binding.FieldAccessor.findElementType(_local5, _local4);
_local2++;
}
}
return(_local5);
}
function createField(property, location) {
var _local3 = findSchema(property, location);
var _local2;
if (_local3.validation != null) {
_local2 = mx.data.binding.Binding.getRuntimeObject(_local3.validation);
} else {
_local2 = new mx.data.binding.DataType();
}
_local2.setupDataAccessor(this, property, location);
return(_local2);
}
static function deepEqual(a, b) {
if (a == b) {
return(true);
}
if (typeof(a) != typeof(b)) {
return(false);
}
if (typeof(a) != "object") {
return(false);
}
var _local3 = new Object();
for (var _local4 in a) {
if (!deepEqual(a[_local4], b[_local4])) {
return(false);
}
_local3[_local4] = 1;
}
for (var _local4 in b) {
if (_local3[_local4] != 1) {
return(false);
}
}
return(true);
}
function getFieldFromCache(property, location) {
for (var _local5 in __fieldCache) {
var _local2 = __fieldCache[_local5];
if ((_local2.property == property) && (deepEqual(_local2.location, location))) {
return(_local2);
}
}
return(null);
}
function getField(property, location) {
var _local2 = getFieldFromCache(property, location);
if (_local2 != null) {
return(_local2);
}
_local2 = createField(property, location);
if (__fieldCache == null) {
__fieldCache = new Array();
}
__fieldCache.push(_local2);
return(_local2);
}
function refreshAndValidate(property) {
_global.__dataLogger.logData(this, "Refreshing and validating " + property);
_global.__dataLogger.nestLevel++;
var _local3 = mx.data.binding.Binding.refreshFromSources(this, property, __bindings);
_local3 = validateProperty(property, _local3);
_global.__dataLogger.nestLevel--;
return(_local3 == null);
}
function getBindingMetaData(name) {
return(this["__" + name]);
}
function __setReadOnly(setting) {
if (Object(this).editable != undefined) {
Object(this).editable = !setting;
}
}
function __addHighPrioEventListener(event, handler) {
var _local3 = ((_eventDispatcher != undefined) ? (_eventDispatcher) : this);
if (_local3.__highPrioEvents == undefined) {
_local3.__highPrioEvents = new Object();
}
var _local4 = "__q_" + event;
if (_local3.__highPrioEvents[_local4] == undefined) {
_local3.__highPrioEvents[_local4] = new Array();
}
_global.ASSetPropFlags(_local3.__highPrioEvents, _local4, 1);
mx.events.EventDispatcher._removeEventListener(_local3.__highPrioEvents[_local4], event, handler);
_local3.__highPrioEvents[_local4].push(handler);
if (_local3._databinding_original_dispatchEvent == undefined) {
_local3._databinding_original_dispatchEvent = _local3.dispatchEvent;
_local3.dispatchEvent = function (eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this.dispatchQueue(this.__highPrioEvents, eventObj);
this._databinding_original_dispatchEvent(eventObj);
};
}
}
}
Symbol 2551 MovieClip [__Packages.mx.data.binding.FieldAccessor] Frame 0
class mx.data.binding.FieldAccessor
{
var component, property, parentObj, fieldName, m_location, type, index, xpath;
function FieldAccessor (component, property, parentObj, fieldName, type, index, parentField) {
this.component = component;
this.property = property;
this.parentObj = parentObj;
this.fieldName = fieldName;
if (component == parentObj) {
m_location = undefined;
} else if (parentField.m_location == undefined) {
m_location = fieldName;
} else {
m_location = (parentField.m_location + ".") + fieldName;
}
this.type = type;
this.index = index;
}
function getValue() {
var _local2 = getFieldData();
if ((_local2 == null) && (type.value != undefined)) {
var _local3 = new mx.data.binding.TypedValue(type.value, "String");
_local3.getDefault = true;
component.getField(fieldName).setAnyTypedValue(_local3);
_local2 = _local3.value;
}
if ((isXML(_local2) && (_local2.childNodes.length == 1)) && (_local2.firstChild.nodeType == 3)) {
return(_local2.firstChild.nodeValue);
}
return(_local2);
}
function setValue(newValue, newTypedValue) {
if (newTypedValue.getDefault) {
newTypedValue.value = newValue;
} else {
if (xpath != null) {
var _local4 = getFieldData();
if (_local4 != null) {
setXMLData(_local4, newValue);
} else {
_global.__dataLogger.logData(component, "Can't assign to '<property>:<xpath>' because there is no element at the given path", this);
}
} else if (isXML(parentObj)) {
if (type.category == "attribute") {
parentObj.attributes[fieldName] = newValue;
} else if (type.category == "array") {
} else {
var _local4 = getOrCreateFieldData();
setXMLData(_local4, newValue);
}
} else {
if (parentObj == null) {
_global.__dataLogger.logData(component, "Can't set field '<property>/<location>' because the field doesn't exist", this);
}
parentObj[fieldName] = newValue;
}
component.propertyModified(property, (xpath == null) && (parentObj == component), newTypedValue.type);
}
}
static function isActionScriptPath(str) {
var _local2 = str.toLowerCase();
var _local3 = "0123456789abcdefghijklmnopqrstuvwxyz_.";
var _local1 = 0;
while (_local1 < _local2.length) {
if (-1 == _local3.indexOf(_local2.charAt(_local1))) {
return(false);
}
_local1++;
}
return(true);
}
static function createFieldAccessor(component, property, location, type, mustExist) {
if (mustExist && (component[property] == null)) {
_global.__dataLogger.logData(component, "Warning: property '<property>' does not exist", {property:property});
return(null);
}
var _local5 = new mx.data.binding.FieldAccessor(component, property, component, property, type, null, null);
if (location == null) {
return(_local5);
}
var _local7 = null;
if (location.indices != null) {
_local7 = location.indices;
location = location.path;
}
if (typeof(location) == "string") {
if (_local7 != null) {
_global.__dataLogger.logData(component, "Warning: ignoring index values for property '<property>', path '<location>'", {property:property, location:location});
}
if (isActionScriptPath(String(location))) {
location = location.split(".");
} else {
_local5.xpath = location;
return(_local5);
}
}
if (location instanceof Array) {
var _local3;
var _local10 = 0;
_local3 = 0;
while (_local3 < location.length) {
var _local2 = null;
var _local4 = location[_local3];
if (_local4 == "[n]") {
if (_local7 == null) {
_global.__dataLogger.logData(component, "Error: indices for <property>:<location> are null, but [n] appears in the location.", {property:property, location:location});
return(null);
}
_local2 = _local7[_local10++];
if (_local2 == null) {
_global.__dataLogger.logData(component, "Error: not enough index values for <property>:<location>", {property:property, location:location});
return(null);
}
}
_local5 = _local5.getChild(_local4, _local2, mustExist);
_local3++;
}
if (mustExist && (_local5.getValue() == null)) {
_global.__dataLogger.logData(component, "Warning: field <property>:<m_location> does not exist, or is null", _local5);
}
return(_local5);
}
trace("unrecognized location: " + mx.data.binding.ObjectDumper.toString(location));
return(null);
}
function getFieldAccessor() {
return(this);
}
function getChild(childName, index, mustExist) {
if (childName == ".") {
return(this);
}
var _local2 = getOrCreateFieldData(mustExist);
if (_local2 == null) {
return(null);
}
var _local4 = findElementType(type, childName);
return(new mx.data.binding.FieldAccessor(component, property, _local2, childName, _local4, index, this));
}
function getOrCreateFieldData(mustExist) {
var _local3 = getFieldData();
if (_local3 == null) {
if (mustExist) {
_global.__dataLogger.logData(component, "Warning: field <property>:<m_location> does not exist", this);
} else {
setupComplexField();
_local3 = getFieldData();
}
}
return(_local3);
}
function evaluateSubPath(obj, type) {
var path = type.path;
if (isActionScriptPath(path)) {
var tokens = path.split(".");
var i = 0;
while (i < tokens.length) {
var token = tokens[i];
if (isXML(obj)) {
obj = obj.firstChild;
while (obj != null) {
if (toLocalName(obj.nodeName) == token) {
break;
}
obj = obj.nextSibling;
}
} else {
obj = obj[token];
}
if (obj == null) {
_global.__dataLogger.logData(component, "Warning: path '<path>' evaluates to null, at '<token>' in <t.property>:<t.m_location>", {path:path, token:token, t:this});
break;
}
i++;
}
} else if (isXML(obj)) {
if (path.charAt(0) != "/") {
path = "/" + path;
}
if (obj.nodeName == null) {
obj = obj.firstChild;
} else {
path = toLocalName(obj.nodeName) + path;
}
var category = ((type.category != null) ? (type.category) : (((type.elements.length > 0) ? "complex" : "simple")));
if ((category == "simple") || (category == "attribute")) {
obj = eval ("obj" + mx.xpath.XPathAPI.getEvalString(obj, path));
} else if (category == "complex") {
obj = mx.xpath.XPathAPI.selectSingleNode(obj, path);
} else if (category == "array") {
obj = mx.xpath.XPathAPI.selectNodeList(obj, path);
}
} else {
_global.__dataLogger.logData(component, "Error: path '<path>' is an XPath. It cannot be applied to non-XML data <t.property>:<t.m_location>", {path:path, t:this});
}
return(obj);
}
function getFieldData() {
if (xpath != null) {
var _local4 = parentObj[fieldName].firstChild;
while ((_local4 != null) && (_local4.nodeType != 1)) {
_local4 = _local4.nextSibling;
}
var _local10 = mx.xpath.XPathAPI.selectSingleNode(_local4, xpath);
return(_local10);
}
if (isXML(parentObj)) {
if (type.path != null) {
return(evaluateSubPath(parentObj, type));
}
if (type.category == "attribute") {
var _local5 = parentObj.attributes;
for (var _local8 in _local5) {
if (toLocalName(_local8) == fieldName) {
return(_local5[_local8]);
}
}
return(undefined);
}
var _local3 = parentObj.firstChild;
if (type.category == "array") {
var _local6 = new Array();
while (_local3 != null) {
if (toLocalName(_local3.nodeName) == fieldName) {
_local6.push(_local3);
}
_local3 = _local3.nextSibling;
}
return(_local6);
}
while (_local3 != null) {
if (toLocalName(_local3.nodeName) == fieldName) {
return(_local3);
}
_local3 = _local3.nextSibling;
}
return(null);
}
if (fieldName == "[n]") {
var _local7;
if (index.component != null) {
var _local9 = index.component.getField(index.property, index.location);
_local7 = _local9.getAnyTypedValue(["Number"]);
_local7 = _local7.value;
} else {
_local7 = index.constant;
}
var index = Number(_local7);
if (typeof(_local7) == "undefined") {
_global.__dataLogger.logData(component, "Error: index specification '<index>' was not supplied, or incorrect, for <t.property>:<t.m_location>", {index:index, t:this});
return(null);
}
if (index.toString() == "NaN") {
_global.__dataLogger.logData(component, "Error: index value '<index>' for <t.property>:<t.m_location> is not a number", {index:index, t:this});
return(null);
}
if (!(parentObj instanceof Array)) {
_global.__dataLogger.logData(component, "Error: indexed field <property>:<m_location> is not an array", this);
return(null);
}
if ((index < 0) || (index >= parentObj.length)) {
_global.__dataLogger.logData(component, "Error: index '<index>' for <t.property>:<t.m_location> is out of bounds", {index:index, t:this});
return(null);
}
_global.__dataLogger.logData(component, "Accessing item [<index>] of <t.property>:<t.m_location>", {index:index, t:this});
return(parentObj[index]);
}
if (type.path != null) {
return(evaluateSubPath(parentObj, type));
}
return(parentObj[fieldName]);
}
static function setXMLData(obj, newValue) {
while (obj.hasChildNodes()) {
obj.firstChild.removeNode();
}
var _local2 = xmlNodeFactory.createTextNode(newValue);
obj.appendChild(_local2);
}
function setupComplexField() {
var _local2;
if (isXML(parentObj)) {
_local2 = xmlNodeFactory.createElement(fieldName);
parentObj.appendChild(_local2);
} else if (dataIsXML()) {
parentObj[fieldName] = new XML();
} else {
parentObj[fieldName] = new Object();
}
}
static function findElementType(type, name) {
var _local1 = 0;
while (_local1 < type.elements.length) {
if (type.elements[_local1].name == name) {
return(type.elements[_local1].type);
}
_local1++;
}
return(null);
}
function isXML(obj) {
return(obj instanceof XMLNode);
}
function dataIsXML() {
return(type.name == "XML");
}
static function accessField(component, fieldName, desiredTypes) {
var _local1;
_local1 = desiredTypes[fieldName];
if (_local1 == null) {
_local1 = desiredTypes.dflt;
}
if (_local1 == null) {
_local1 = desiredTypes;
}
var _local4 = component.createField("data", [fieldName]);
var _local2 = _local4.getAnyTypedValue([_local1]);
return(_local2.value);
}
static function ExpandRecord(obj, objectType, desiredTypes) {
var _local4 = new Object();
mx.data.binding.ComponentMixins.initComponent(_local4);
_local4.data = obj;
_local4.__schema = {elements:[{name:"data", type:objectType}]};
var _local2 = new Object();
if (objectType.elements.length > 0) {
var _local3 = 0;
while (_local3 < objectType.elements.length) {
var _local10 = objectType.elements[_local3].name;
_local2[_local10] = accessField(_local4, _local10, desiredTypes);
_local3++;
}
} else if ((obj instanceof XML) || (obj instanceof XMLNode)) {
if ((obj.childNodes.length == 1) && (obj.firstChild.nodeType == 3)) {
return(obj.firstChild.nodeValue);
}
var _local5 = obj.lastChild;
while (_local5 != null) {
var _local10 = toLocalName(_local5.nodeName);
if ((_local10 != null) && (_local2[_local10] == null)) {
_local2[_local10] = accessField(_local4, _local10, desiredTypes);
}
_local5 = _local5.previousSibling;
}
for (var _local10 in obj.attributes) {
if (_local2[_local10] != null) {
_global.__dataLogger.logData(null, "Warning: attribute '<name>' has same name as an element, in XML object <obj>", {name:_local10, obj:obj});
}
_local2[_local10] = accessField(_local4, _local10, desiredTypes);
}
} else {
if (typeof(obj) != "object") {
return(obj);
}
for (var _local10 in obj) {
_local2[_local10] = accessField(_local4, _local10, desiredTypes);
}
}
return(_local2);
}
static function wrapArray(theArray, itemType, desiredTypes) {
var _local4 = {getItemAt:function (index) {
if ((index < 0) || (index >= this.data.length)) {
return(undefined);
}
var _local2 = this.data[index];
if (_local2 == undefined) {
return(undefined);
}
var _local3 = mx.data.binding.FieldAccessor.ExpandRecord(_local2, this.type, desiredTypes);
return(_local3);
}, getItemID:function (index) {
return(index);
}, data:theArray, type:itemType, length:theArray.length};
return(_local4);
}
static function toLocalName(nodeName) {
var _local1 = nodeName.split(":");
var _local2 = _local1[_local1.length - 1];
return(_local2);
}
static var xmlNodeFactory = new XML();
}
Symbol 2552 MovieClip [__Packages.mx.data.binding.ObjectDumper] Frame 0
class mx.data.binding.ObjectDumper
{
var inProgress;
function ObjectDumper () {
inProgress = new Array();
}
static function toString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent) {
var _local3 = new mx.data.binding.ObjectDumper();
if (maxLineLength == undefined) {
maxLineLength = 100;
}
if (indent == undefined) {
indent = 0;
}
return(_local3.realToString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent));
}
function realToString(obj, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent) {
var _local8 = 0;
while (_local8 < inProgress.length) {
if (inProgress[_local8] == obj) {
return("***");
}
_local8++;
}
inProgress.push(obj);
indent++;
var _local16 = typeof(obj);
var _local5;
if ((obj instanceof XMLNode) && (showXMLstructures != true)) {
_local5 = obj.toString();
} else if (obj instanceof Date) {
_local5 = obj.toString();
} else if (_local16 == "object") {
var _local4 = new Array();
if (obj instanceof Array) {
_local5 = "[";
var _local15 = 0;
while (_local15 < obj.length) {
_local4.push(_local15);
_local15++;
}
} else {
_local5 = "{";
for (var _local15 in obj) {
_local4.push(_local15);
}
_local4.sort();
}
var _local9 = "";
var _local3 = 0;
while (_local3 < _local4.length) {
var _local6 = obj[_local4[_local3]];
var _local7 = true;
if (typeof(_local6) == "function") {
_local7 = showFunctions == true;
}
if (typeof(_local6) == "undefined") {
_local7 = showUndefined == true;
}
if (_local7) {
_local5 = _local5 + _local9;
if (!(obj instanceof Array)) {
_local5 = _local5 + (_local4[_local3] + ": ");
}
_local5 = _local5 + realToString(_local6, showFunctions, showUndefined, showXMLstructures, maxLineLength, indent);
_local9 = ", `";
}
_local3++;
}
if (obj instanceof Array) {
_local5 = _local5 + "]";
} else {
_local5 = _local5 + "}";
}
} else if (_local16 == "function") {
_local5 = "function";
} else if (_local16 == "string") {
_local5 = ("\"" + obj) + "\"";
} else {
_local5 = String(obj);
}
if (_local5 == "undefined") {
_local5 = "-";
}
inProgress.pop();
return(replaceAll(_local5, "`", ((_local5.length < maxLineLength) ? "" : (newline + doIndent(indent)))));
}
static function replaceAll(str, from, to) {
var _local3 = str.split(from);
var _local4 = "";
var _local2 = "";
var _local1 = 0;
while (_local1 < _local3.length) {
_local4 = _local4 + (_local2 + _local3[_local1]);
_local2 = to;
_local1++;
}
return(_local4);
}
function doIndent(indent) {
var _local2 = "";
var _local1 = 0;
while (_local1 < indent) {
_local2 = _local2 + " ";
_local1++;
}
return(_local2);
}
}
Symbol 2553 MovieClip [__Packages.mx.xpath.XPathAPI] Frame 0
class mx.xpath.XPathAPI
{
function XPathAPI () {
}
static function getEvalString(node, path) {
var _local7 = "";
var _local4 = null;
var _local9 = getPathSet(path);
var _local3 = _local9[0].nodeName;
var _local8;
var _local2 = node;
var _local5 = false;
if ((_local3 != undefined) && ((_local3 == "*") || (node.nodeName == _local3))) {
var _local6 = 1;
while (_local6 < _local9.length) {
_local3 = _local9[_local6].nodeName;
_local8 = _local3.indexOf("@");
if (_local8 >= 0) {
_local3 = _local3.substring(_local8 + 1);
_local5 = _local2.attributes[_local3] != undefined;
_local7 = _local7 + (".attributes." + _local3);
} else {
_local5 = false;
var _local1 = 0;
while (_local1 < _local2.childNodes.length) {
_local4 = _local2.childNodes[_local1];
if (_local4.nodeName == _local3) {
_local7 = _local7 + (".childNodes." + _local1);
_local1 = _local2.childNodes.length;
_local2 = _local4;
_local5 = true;
}
_local1++;
}
}
if (!_local5) {
return("");
}
_local6++;
}
if (!_local5) {
_local7 = "";
} else if (_local8 == -1) {
_local7 = _local7 + ".firstChild.nodeValue";
}
} else {
_local7 = "";
}
return(_local7);
}
static function selectNodeList(node, path) {
var _local2 = new Array(node);
var _local5 = getPathSet(path);
var _local4 = _local5[0];
var _local6 = _local4.__get__nodeName();
var _local1 = null;
if ((_local6 != undefined) && ((_local6 == "*") || (node.nodeName == _local6))) {
if (_local4.__get__filter().length > 0) {
_local1 = new mx.xpath.FilterStack(_local4.__get__filter());
_local2 = filterNodes(_local2, _local1);
}
if (_local2.length > 0) {
var _local3 = 1;
while (_local3 < _local5.length) {
_local4 = _local5[_local3];
_local2 = getAllChildNodesByName(_local2, _local4.__get__nodeName());
if (_local4.__get__filter().length > 0) {
_local1 = new mx.xpath.FilterStack(_local4.__get__filter());
} else {
_local1 = null;
}
if ((_local1 != null) && (_local1.__get__exprs().length > 0)) {
_local2 = filterNodes(_local2, _local1);
}
_local3++;
}
}
} else {
_local2 = new Array();
}
return(_local2);
}
static function selectSingleNode(node, path) {
var _local1 = selectNodeList(node, path);
if (_local1.length > 0) {
return(_local1[0]);
}
return(null);
}
static function setNodeValue(node, path, newValue) {
var _local1 = new Array(node);
var _local9 = getPathSet(path);
var _local7 = _local9[_local9.length - 1].nodeName;
if (_local7.charAt(0) == "@") {
_local7 = _local7.substring(1, _local7.length);
_local9.pop();
} else {
_local7 = null;
}
var _local5 = _local9[0];
var _local11 = _local5.__get__nodeName();
var _local3 = null;
if ((_local11 != undefined) && ((_local11 == "*") || (node.nodeName == _local11))) {
if (_local5.__get__filter().length > 0) {
_local3 = new mx.xpath.FilterStack(_local5.__get__filter());
_local1 = filterNodes(_local1, _local3);
}
if (_local1.length > 0) {
var _local2 = 1;
while (_local2 < _local9.length) {
_local5 = _local9[_local2];
_local1 = getAllChildNodesByName(_local1, _local5.__get__nodeName());
if (_local5.__get__filter().length > 0) {
_local3 = new mx.xpath.FilterStack(_local5.__get__filter());
} else {
_local3 = null;
}
if ((_local3 != null) && (_local3.__get__exprs().length > 0)) {
_local1 = filterNodes(_local1, _local3);
}
_local2++;
}
}
} else {
_local1 = new Array();
}
var _local4 = null;
var _local6 = null;
var _local10 = new XML();
var _local2 = 0;
while (_local2 < _local1.length) {
if (_local7 != null) {
_local1[_local2].attributes[_local7] = newValue;
} else {
_local4 = _local1[_local2];
if ((_local4.firstChild == null) || (_local4.firstChild.nodeType != 3)) {
_local6 = _local10.createTextNode(newValue);
_local4.appendChild(_local6);
} else {
_local6 = _local4.firstChild;
_local6.nodeValue = newValue;
}
}
_local2++;
}
return(_local1.length);
}
static function copyStack(toStk, fromStk) {
var _local1 = 0;
while (_local1 < fromStk.length) {
toStk.splice(_local1, 0, fromStk[_local1]);
_local1++;
}
}
static function evalExpr(expr, node) {
var _local2 = true;
if (expr.__get__attr()) {
_local2 = ((expr.__get__value() != null) ? (node.attributes[expr.__get__name()] == expr.__get__value()) : (node.attributes[expr.__get__name()] != null));
} else {
var _local3 = getChildNodeByName(node, expr.__get__name());
if (_local3 != null) {
_local2 = ((expr.__get__value() != null) ? (_local3.firstChild.nodeValue == expr.__get__value()) : true);
} else {
_local2 = false;
}
}
return(_local2);
}
static function filterNodes(nodeList, stack) {
var _local13 = new Array();
var _local2;
var _local3;
var _local9;
var _local6;
var _local10;
var _local1 = true;
var _local4;
var _local5;
var _local8 = 0;
while (_local8 < nodeList.length) {
_local5 = true;
_local2 = new Array();
_local3 = new Array();
copyStack(_local2, stack.__get__exprs());
copyStack(_local3, stack.__get__ops());
_local4 = nodeList[_local8];
while ((_local2.length > 0) && (_local5)) {
if (typeof(_local2[_local2.length - 1]) == "object") {
_local9 = mx.xpath.FilterExpr(_local2.pop());
_local1 = evalExpr(_local9, _local4);
} else {
_local10 = Boolean(_local2.pop());
_local1 = _local10;
}
if (_local3.length > 0) {
var _local7 = _local2.pop();
_local6 = _local7;
switch (_local3[_local3.length - 1]) {
case "and" :
_local1 = _local1 && (evalExpr(_local6, _local4));
_local5 = _local1;
break;
case "or" :
_local1 = _local1 || (evalExpr(_local6, _local4));
_local5 = !_local1;
}
_local3.pop();
_local2.push(_local1);
}
}
if (_local1) {
_local13.push(_local4);
}
_local8++;
}
return(_local13);
}
static function getAllChildNodesByName(nodeList, name) {
var _local5 = new Array();
var _local2;
var _local3 = 0;
while (_local3 < nodeList.length) {
_local2 = nodeList[_local3].childNodes;
if (_local2 != null) {
var _local1 = 0;
while (_local1 < _local2.length) {
if ((name == "*") || (_local2[_local1].nodeName == name)) {
_local5.push(_local2[_local1]);
}
_local1++;
}
}
_local3++;
}
return(_local5);
}
static function getChildNodeByName(node, nodeName) {
var _local2;
var _local3 = node.childNodes;
var _local1 = 0;
while (_local1 < _local3.length) {
_local2 = _local3[_local1];
if (_local2.nodeName == nodeName) {
return(_local2);
}
_local1++;
}
return(null);
}
static function getKeyValues(node, keySpec) {
var _local5 = "";
var _local3 = new mx.utils.StringTokenParser(keySpec);
var _local2 = _local3.nextToken();
var _local1;
var _local6;
while (_local2 != mx.utils.StringTokenParser.tkEOF) {
_local1 = _local3.token;
_local5 = _local5 + (" " + _local1);
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
if (_local1 == "@") {
_local2 = _local3.nextToken();
_local1 = _local3.token;
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
_local5 = _local5 + (((_local1 + "='") + node.attributes[_local1]) + "'");
}
} else if (_local1 == "/") {
_local2 = _local3.nextToken();
if (_local2 == mx.utils.StringTokenParser.tkSymbol) {
_local1 = _local3.token;
node = getChildNodeByName(node, _local1);
if (node != null) {
_local5 = _local5 + _local1;
}
}
} else if ((((_local1 != "and") && (_local1 != "or")) && (_local1 != "[")) && (_local1 != "]")) {
_local6 = getChildNodeByName(node, _local1);
if (_local6 != null) {
_local5 = _local5 + (("='" + _local6.firstChild.nodeValue) + "'");
}
}
}
if (node == null) {
trace(("Invalid keySpec specified. '" + keySpec) + "' Error.");
return("ERR");
}
_local2 = _local3.nextToken();
}
return(_local5.slice(1));
}
static function getPath(node, keySpecs) {
var _local2 = "";
var _local5 = keySpecs[node.nodeName];
if (_local5 == undefined) {
var _local8 = "";
var _local10;
for (_local10 in node.attributes) {
_local8 = _local8 + (((("@" + _local10) + "='") + node.attributes[_local10]) + "' and ");
}
var _local7 = "";
var _local1;
var _local6;
var _local4 = 0;
while (_local4 < node.childNodes.length) {
_local1 = node.childNodes[_local4];
_local6 = _local1.firstChild.nodeValue;
if (_local6 != undefined) {
_local7 = _local7 + (((_local1.nodeName + "='") + _local6) + "' and ");
}
_local4++;
}
if (_local8.length > 0) {
if (_local7.length > 0) {
_local2 = (((("/" + node.nodeName) + "[") + _local8) + _local7.substring(0, _local7.length - 4)) + "]";
} else {
_local2 = ((("/" + node.nodeName) + "[") + _local8.substring(0, _local8.length - 4)) + "]";
}
} else {
_local2 = ((("/" + node.nodeName) + "[") + _local7.substring(0, _local7.length - 4)) + "]";
}
} else {
_local2 = _local2 + (("/" + node.nodeName) + getKeyValues(node, _local5));
}
var _local1 = node.parentNode;
while (_local1.parentNode != null) {
_local5 = keySpecs[_local1.nodeName];
if (_local5 != undefined) {
_local2 = (("/" + _local1.nodeName) + getKeyValues(_local1, _local5)) + _local2;
} else {
_local2 = ("/" + _local1.nodeName) + _local2;
}
_local1 = _local1.parentNode;
}
return(_local2);
}
static function getPathSet(path) {
var _local6 = new Array();
var _local4;
var _local1;
var _local2;
var _local5;
while (path.length > 0) {
_local4 = path.lastIndexOf("/");
_local1 = path.substring(_local4 + 1);
_local2 = _local1.indexOf("[", 0);
_local5 = ((_local2 >= 0) ? (_local1.substring(_local2 + 1, _local1.length - 1)) : "");
_local1 = ((_local2 >= 0) ? (_local1.substring(0, _local2)) : (_local1));
_local6.splice(0, 0, new mx.xpath.NodePathInfo(_local1, _local5));
path = path.substring(0, _local4);
}
return(_local6);
}
}
Symbol 2554 MovieClip [__Packages.mx.xpath.NodePathInfo] Frame 0
class mx.xpath.NodePathInfo
{
function NodePathInfo (nodeName, filter) {
__nodeName = nodeName;
__filter = filter;
}
function get nodeName() {
return(__nodeName);
}
function get filter() {
return(__filter);
}
var __nodeName = null;
var __filter = null;
}
Symbol 2555 MovieClip [__Packages.mx.xpath.FilterStack] Frame 0
class mx.xpath.FilterStack
{
var __expr, __ops;
function FilterStack (filterVal) {
__expr = new Array();
__ops = new Array();
var _local2 = new mx.utils.StringTokenParser(filterVal);
var _local5 = _local2.nextToken();
var _local4;
var _local3 = _local2.__get__token();
while (_local5 != mx.utils.StringTokenParser.tkEOF) {
if (_local3 == "@") {
_local5 = _local2.nextToken();
_local3 = _local2.token;
_local4 = new mx.xpath.FilterExpr(true, _local3, null);
__expr.splice(0, 0, _local4);
if (_local2.nextToken() == mx.utils.StringTokenParser.tkSymbol) {
if (_local2.__get__token() == "=") {
_local5 = _local2.nextToken();
_local4.__set__value(_local2.token);
}
}
} else if ((_local3 == "and") || (_local3 == "or")) {
__ops.splice(0, 0, _local3);
} else if ((_local3 != ")") && (_local3 != "(")) {
_local4 = new mx.xpath.FilterExpr(false, _local3, null);
__expr.splice(0, 0, _local4);
if (_local2.nextToken() == mx.utils.StringTokenParser.tkSymbol) {
if (_local2.__get__token() == "=") {
_local5 = _local2.nextToken();
_local4.__set__value(_local2.token);
}
}
}
_local5 = _local2.nextToken();
_local3 = _local2.token;
}
}
function get exprs() {
return(__expr);
}
function get ops() {
return(__ops);
}
}
Symbol 2556 MovieClip [__Packages.mx.utils.StringTokenParser] Frame 0
class mx.utils.StringTokenParser
{
var _source, _skipChars;
function StringTokenParser (source, skipChars) {
_source = source;
_skipChars = ((skipChars == undefined) ? null : (skipChars));
}
function get token() {
return(_token);
}
function getPos() {
return(_index);
}
function nextToken() {
var _local4;
var _local2;
var _local3 = _source.length;
skipBlanks();
if (_index >= _local3) {
return(tkEOF);
}
_local2 = _source.charCodeAt(_index);
if (((((_local2 >= 65) && (_local2 <= 90)) || ((_local2 >= 97) && (_local2 <= 122))) || ((_local2 >= 192) && (_local2 <= Number.POSITIVE_INFINITY))) || (_local2 == 95)) {
_local4 = _index;
_index++;
_local2 = _source.charCodeAt(_index);
while (((((((_local2 >= 65) && (_local2 <= 90)) || ((_local2 >= 97) && (_local2 <= 122))) || ((_local2 >= 48) && (_local2 <= 57))) || ((_local2 >= 192) && (_local2 <= Number.POSITIVE_INFINITY))) || (_local2 == 95)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
_token = _source.substring(_local4, _index);
return(tkSymbol);
}
if ((_local2 == 34) || (_local2 == 39)) {
_index++;
_local4 = _index;
_local2 = _source.charCodeAt(_local4);
while (((_local2 != 34) && (_local2 != 39)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
_token = _source.substring(_local4, _index);
_index++;
return(tkString);
}
if ((_local2 == 45) || ((_local2 >= 48) && (_local2 <= 57))) {
var _local5 = tkInteger;
_local4 = _index;
_index++;
_local2 = _source.charCodeAt(_index);
while (((_local2 >= 48) && (_local2 <= 57)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
if (_index < _local3) {
if (((((((_local2 >= 48) && (_local2 <= 57)) || (_local2 == 46)) || (_local2 == 43)) || (_local2 == 45)) || (_local2 == 101)) || (_local2 == 69)) {
_local5 = tkFloat;
}
while ((((((((_local2 >= 48) && (_local2 <= 57)) || (_local2 == 46)) || (_local2 == 43)) || (_local2 == 45)) || (_local2 == 101)) || (_local2 == 69)) && (_index < _local3)) {
_index++;
_local2 = _source.charCodeAt(_index);
}
}
_token = _source.substring(_local4, _index);
return(_local5);
}
_token = _source.charAt(_index);
_index++;
return(tkSymbol);
}
function skipBlanks() {
if (_index < _source.length) {
var _local2 = _source.charAt(_index);
while ((_local2 == " ") || ((_skipChars != null) && (skipChar(_local2)))) {
_index++;
_local2 = _source.charAt(_index);
}
}
}
function skipChar(ch) {
var _local2 = 0;
while (_local2 < _skipChars.length) {
if (ch == _skipChars[_local2]) {
return(true);
}
_local2++;
}
return(false);
}
static var tkEOF = -1;
static var tkSymbol = 0;
static var tkString = 1;
static var tkInteger = 2;
static var tkFloat = 3;
var _index = 0;
var _token = "";
}
Symbol 2557 MovieClip [__Packages.mx.xpath.FilterExpr] Frame 0
class mx.xpath.FilterExpr
{
function FilterExpr (attrInit, nameInit, valueInit) {
__attr = attrInit;
__name = nameInit;
__value = valueInit;
}
function get attr() {
return(__attr);
}
function set attr(newVal) {
__attr = newVal;
//return(attr);
}
function get name() {
return(__name);
}
function set name(newVal) {
__name = newVal;
//return(name);
}
function get value() {
return(__value);
}
function set value(newVal) {
__value = newVal;
//return(value);
}
var __attr = false;
var __value = null;
var __name = null;
}
Symbol 2558 MovieClip [__Packages.mx.data.binding.EndPoint] Frame 0
class mx.data.binding.EndPoint
{
function EndPoint () {
}
}
Symbol 2559 MovieClip [__Packages.mx.data.binding.Log] Frame 0
class mx.data.binding.Log
{
var level, name;
function Log (logLevel, logName) {
level = ((logLevel == undefined) ? (BRIEF) : (logLevel));
name = ((name == undefined) ? "" : (name));
}
function logInfo(msg, level) {
if (level == undefined) {
level = BRIEF;
}
onLog((((getDateString() + " ") + name) + ": ") + mx.data.binding.ObjectDumper.toString(msg));
}
function logData(target, message, info, level) {
if (level == undefined) {
level = VERBOSE;
}
var _local6 = ((name.length > 0) ? ((" " + name) + ": ") : " ");
var _local4 = ((target == null) ? "" : (target + ": "));
if (_local4.indexOf("_level0.") == 0) {
_local4 = _local4.substr(8);
}
var _local3 = ((getDateString() + _local6) + _local4) + substituteIntoString(message, info, 50);
if (showDetails && (info != null)) {
_local3 = _local3 + ("\n " + mx.data.binding.ObjectDumper.toString(info));
} else {
var _local2 = 0;
while (_local2 < nestLevel) {
_local3 = " " + _local3;
_local2++;
}
}
onLog(_local3);
}
function onLog(message) {
trace(message);
}
function getDateString() {
var _local1 = new Date();
return(((((((((_local1.getMonth() + 1) + "/") + _local1.getDate()) + " ") + _local1.getHours()) + ":") + _local1.getMinutes()) + ":") + _local1.getSeconds());
}
static function substituteIntoString(message, info, maxlen, rawDataType) {
var _local9 = "";
if (info == null) {
return(message);
}
var _local11 = message.split("<");
if (_local11 == null) {
return(message);
}
_local9 = _local9 + _local11[0];
var _local7 = 1;
while (_local7 < _local11.length) {
var _local8 = _local11[_local7].split(">");
var _local5 = _local8[0].split(".");
var _local1 = info;
var _local4 = rawDataType;
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2];
if (_local3 != "") {
_local4 = mx.data.binding.FieldAccessor.findElementType(_local4, _local3);
var _local6 = new mx.data.binding.FieldAccessor(null, null, _local1, _local3, _local4, null, null);
_local1 = _local6.getValue();
}
_local2++;
}
if (typeof(_local1) != "string") {
_local1 = mx.data.binding.ObjectDumper.toString(_local1);
}
if (_local1.indexOf("_level0.") == 0) {
_local1 = _local1.substr(8);
}
if ((maxlen != null) && (_local1.length > maxlen)) {
_local1 = _local1.substr(0, maxlen) + "...";
}
_local9 = _local9 + _local1;
_local9 = _local9 + _local8[1];
_local7++;
}
var _local14 = _local9.split(">");
_local9 = _local14.join(">");
_local14 = _local9.split("<");
_local9 = _local14.join("<");
return(_local9);
}
static var NONE = -1;
static var BRIEF = 0;
static var VERBOSE = 1;
static var DEBUG = 2;
static var INFO = 2;
static var WARNING = 1;
static var ERROR = 0;
var showDetails = false;
var nestLevel = 0;
}
Symbol 2560 MovieClip [__Packages.mx.utils.ClassFinder] Frame 0
class mx.utils.ClassFinder
{
function ClassFinder () {
}
static function findClass(fullClassName) {
if (fullClassName == null) {
return(null);
}
var _local3 = _global;
var _local4 = fullClassName.split(".");
var _local2 = 0;
while (_local2 < _local4.length) {
_local3 = _local3[_local4[_local2]];
_local2++;
}
if (_local3 == null) {
_global.__dataLogger.logData(null, "Could not find class '<classname>'", {classname:fullClassName}, mx.data.binding.Log.BRIEF);
}
return(_local3);
}
}
Symbol 2561 MovieClip [__Packages.mx.data.binding.Formatter] Frame 0
class mx.data.binding.Formatter extends mx.data.binding.DataAccessor
{
function Formatter () {
super();
}
}
Symbol 2562 MovieClip [__Packages.mx.data.kinds.Data] Frame 0
class mx.data.kinds.Data extends mx.data.binding.DataAccessor
{
var component, property, location;
function Data () {
super();
}
function getTypedValue(requestedType) {
var _local5;
var _local2 = getFieldAccessor().getValue();
var _local3 = null;
if (_local2 != null) {
if (_local2 instanceof Array) {
_local3 = "Array";
} else if ((_local2 instanceof XMLNode) || (_local2 instanceof XMLNode)) {
_local3 = "XML";
} else {
var _local4 = typeof(_local2);
_local3 = _local4.charAt(0).toUpperCase() + _local4.slice(1);
}
} else {
_local2 = null;
}
_local5 = new mx.data.binding.TypedValue(_local2, _local3, null);
return(_local5);
}
function getGettableTypes() {
return(null);
}
function setTypedValue(newValue) {
getFieldAccessor().setValue(newValue.value, newValue);
return(null);
}
function getSettableTypes() {
return(null);
}
function getFieldAccessor() {
return(component.createFieldAccessor(property, location, false));
}
}
Symbol 2563 MovieClip [__Packages.mx.data.types.Num] Frame 0
class mx.data.types.Num extends mx.data.binding.DataType
{
var formatter, dataAccessor, type, maxValue, validationError, minValue;
function Num () {
super();
}
function gettableTypes() {
return(["Number", "Integer", "String"]);
}
function getTypedValue(requestedType) {
var _local2;
if (requestedType == "String") {
if (formatter != null) {
if (formatter instanceof mx.data.formatters.NumberFormatter) {
mx.data.formatters.NumberFormatter(formatter).isInt = int;
}
_local2 = formatter.getTypedValue(requestedType);
} else {
_local2 = dataAccessor.getTypedValue();
if (_local2.value == null) {
_local2.value = "";
_local2.typeName = "String";
}
}
} else {
if (requestedType == "Integer") {
requestedType = "Number";
}
_local2 = dataAccessor.getTypedValue(requestedType);
if (_local2.type == null) {
_local2.type = type;
}
if (_local2.typeName == null) {
_local2.typeName = type.name;
}
if ((_local2.typeName != requestedType) && (requestedType != null)) {
_local2 = null;
}
if ((_local2.value != null) && (int)) {
_local2.value = Math.round(_local2.value);
}
}
return(_local2);
}
function settableTypes() {
return(["Number", "Integer", "String", "Boolean", null]);
}
function setTypedValue(newValue) {
if (newValue.value != null) {
if (newValue.typeName == "String") {
if (formatter != null) {
return(formatter.setTypedValue(newValue));
}
var _local3;
if (newValue.value.length == 0) {
newValue.value = null;
newValue.typeName = "Number";
_local3 = dataAccessor.setTypedValue(newValue);
} else {
var _local4 = convertStringToNumber(int, newValue);
_local3 = dataAccessor.setTypedValue(newValue);
}
return(((_local4 == null) ? (_local3) : (_local4)));
}
if (int) {
newValue.value = Math.round(newValue.value);
}
}
return(dataAccessor.setTypedValue(newValue));
}
static function convertStringToNumber(isInt, newValue) {
newValue.typeName = (isInt ? "Integer" : "Number");
if (isInt) {
newValue.value = parseInt(newValue.value);
} else {
newValue.value = parseFloat(newValue.value);
}
if (isNaN(newValue.value)) {
newValue.value = 0;
return([mx.data.binding.DataAccessor.conversionFailed(newValue, (isInt ? "Integer" : "Number"))]);
}
return(null);
}
function validate(value) {
var _local2 = Number(value);
if ((maxValue != null) && (_local2 > maxValue)) {
validationError(exceedsMaxError);
}
if ((minValue != null) && (_local2 < minValue)) {
validationError(lowerThanMinError);
}
if (int && (_local2 != Math.round(_local2))) {
validationError(integerError);
}
}
var exceedsMaxError = "This number exceeds the maximum allowed value.";
var lowerThanMinError = "This number is lower than the minimum allowed value.";
var integerError = "This number must be an integer.";
var int = false;
}
Symbol 2564 MovieClip [__Packages.mx.data.formatters.NumberFormatter] Frame 0
class mx.data.formatters.NumberFormatter extends mx.data.binding.Formatter
{
var dataAccessor, precision, isInt;
function NumberFormatter () {
super();
}
function getTypedValue(requestedType) {
if ((requestedType == "String") || (requestedType == null)) {
var _local3 = dataAccessor.getTypedValue();
if (_local3.value != null) {
var _local2;
if (precision > 0) {
var _local6 = (isInt ? 1 : (Math.pow(10, precision)));
_local2 = (Math.round(_local3.value * _local6) / _local6).toString();
if (_local2.length > 0) {
var _local5 = _local2.lastIndexOf(".");
var _local4 = 0;
if (_local5 < 0) {
_local2 = _local2 + ".";
_local4 = precision;
} else {
_local4 = precision - (_local2.length - (_local5 + 1));
}
_local2 = _local2 + "0000000000000000000000000000".substring(0, _local4);
}
} else {
_local2 = Math.round(_local3.value).toString();
}
return(new mx.data.binding.TypedValue(_local2, "String"));
}
return(new mx.data.binding.TypedValue("", "String"));
}
}
function getGettableTypes() {
return(["String"]);
}
function setTypedValue(newValue) {
if (newValue.typeName == "String") {
if (newValue.value.length == 0) {
return(dataAccessor.setTypedValue(new mx.data.binding.TypedValue(null, "Number")));
}
var _local3 = mx.data.types.Num.convertStringToNumber(isInt, newValue);
var _local4 = dataAccessor.setTypedValue(newValue);
return(((_local3 == null) ? (_local4) : (_local3)));
}
return([mx.data.binding.DataAccessor.conversionFailed(newValue, "Number")]);
}
function getSettableTypes() {
return(["String"]);
}
}
Symbol 2565 MovieClip [__Packages.GameClasses.GameStats] Frame 0
class GameClasses.GameStats extends Object
{
var SA, stats, DollText, head, left, mid, right, click, id_click, moving;
function GameStats (score, silver, gold, kubok, STR, Time) {
super();
SA = [score, silver, gold, kubok, STR, Time];
stats = _root.createEmptyMovieClip("stats", 67);
stats._x = 310;
stats._y = 70;
var _local5 = 55;
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 + 45;
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 = 18;
mid[_local4]._x = 30;
right[_local4]._x = 49;
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, _root.FontOrange, _root.FontYellow, 90);
}
_root.bl.onPress = EndScore;
}
function GetScoreString(C) {
if (C > 0) {
ShowString();
} else {
_root.bl.onPress = function () {
delete _root.bl.onPress;
_root.EndRound();
};
}
}
function ShowString() {
NAi++;
NA++;
var _local13 = 500;
switch (NA) {
case 0 :
if (SA[1] > 0) {
NA++;
_root.stats_s.start(_root.SoundOn);
var _local4 = left[NAi].createEmptyMovieClip("D", 0);
var _local5 = left[NAi].createEmptyMovieClip("D1", 1);
var _local6 = right[NAi].createEmptyMovieClip("D", 0);
var _local10 = _local4.createEmptyMovieClip("D2", 0);
var _local9 = _local4.createEmptyMovieClip("D1", 1);
var _local7 = _local10.attachMovie("fontile", "d", 0, {_x:-35, _y:-15});
_root.TextShow(_local9, "x" + SA[1], "TextFont", -2, 0, 0, 22, _root.FontWhite, 300, _root.FontBlue);
_root.TextShow(mid[NAi], ":", "TextFont", 0, 0, 0, 22, _root.FontWhite, 300, _root.FontBlue);
var _local3 = Math.ceil(SA[1] * 1);
_local6.attachMovie("grad_16", "grad_16", 0);
_local6.grad_16.text.text = DollText + String(_local3);
_local7.gotoAndStop(2);
_local4._x = (-_local4._width) + 33;
_local4._y = _local4._y + 2;
if (SA[2] > 0) {
_local10 = _local5.createEmptyMovieClip("D1", 0);
_local9 = _local5.createEmptyMovieClip("D2", 1);
_local7 = _local10.attachMovie("fontile", "d", 0, {_x:-35, _y:-15});
_local7.gotoAndStop(3);
_root.TextShow(mid[NAi], ":", "TextFont", 0, 0, 0, 22, _root.FontWhite, 300, _root.FontBlue);
_root.TextShow(_local9, "x" + SA[2], "TextFont", -2, 0, 0, 22, _root.FontWhite, 300, _root.FontBlue);
_local3 = _local3 + Math.ceil(SA[2] * 4);
_local5._x = (-_local5._width) + 33;
_local5._y = _local5._y + 2;
_local4._x = _local4._x - _local5._width;
}
TM = TM + _local3;
trace(TM);
trace(_local3);
var _local12 = _root.MONEY.score;
_root.MONEY.Reduce(GameClasses.GFunctions.create(this, GetScoreString, 1));
if (!_root.Cancel) {
Reduce(null, _local6, null, ["gradient", -3, 20, 0, 20, 0, 300, 0, _root.FontOrange, _root.FontYellow, 90], _local12, 0, 0, _local3, 0);
} else {
ShowString();
}
} else {
NAi--;
GetScoreString(1);
}
break;
case 2 :
if (SA[0] > 0) {
_root.stats_s.start(_root.SoundOn);
var _local4 = left[NAi].createEmptyMovieClip("D", 0);
var _local6 = right[NAi].createEmptyMovieClip("D", 0);
_root.TextShow(_local4, _root.TextScoreBonus.text, "TextFont", -3, 0, 0, 22, _root.FontWhite, 300, _root.FontBlue);
_root.TextShow(mid[NAi], ":", "TextFont", 0, 0, 0, 22, _root.FontWhite, 300, _root.FontBlue);
var _local3 = Math.ceil(SA[0] * 0.01);
if (!_root.time_bool) {
_local3 = _local3 + Math.ceil(SA[5] * (0.15 + (_root.level / 100)));
}
TM = TM + _local3;
trace(TM);
trace(_local3);
_local6.attachMovie("grad_16", "grad_16", 0);
_local6.grad_16.text.text = DollText + String(_local3);
_local4._x = -_local4._width;
if (!_root.Cancel) {
Reduce(null, _local6, null, ["gradient", -3, 20, 0, 20, 0, 300, 0, _root.FontOrange, _root.FontYellow, 90], 0, 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.time_bool)) {
_root.stats_s.start(_root.SoundOn);
var _local4 = left[NAi].createEmptyMovieClip("D", 0);
var _local6 = right[NAi].createEmptyMovieClip("D", 0);
_root.TextShow(_local4, _root.TextTimeBonus.text, "TextFont", -3, 0, 0, 22, _root.FontWhite, 300, _root.FontBlue);
_root.TextShow(mid[NAi], ":", "TextFont", 0, 0, 0, 22, _root.FontWhite, 300, _root.FontBlue);
var _local3 = Math.ceil(SA[5] * (0.15 + (_root.level / 100)));
TM = TM + _local3;
trace(TM);
trace(_local3);
_local6.attachMovie("grad_16", "grad_16", 0);
_local6.grad_16.text.text = DollText + String(_local3);
_local4._x = -_local4._width;
var _local11 = 300 * int(1 - _root.TIME.t);
if (!_root.Cancel) {
Reduce(null, _local6, null, ["gradient", -3, 20, 0, 20, 0, 300, 0, _root.FontOrange, _root.FontYellow, 90], _local11, 0, 365, _local3, 1);
} else {
trace("buga1");
_root.no_show_time = true;
_root.TIME.time._y = (_root.TIME.krug._y = 300);
ShowString();
}
} else {
NAi--;
GetScoreString(1);
}
break;
case 4 :
NAi--;
GetScoreString(1);
break;
case 5 :
_root.totalmoney_s.start(_root.SoundOn);
var _local4 = left[NAi].createEmptyMovieClip("D", 0);
var _local6 = right[NAi].createEmptyMovieClip("D", 0);
var _local5 = left[NAi].createEmptyMovieClip("D1", 1);
_local5._alpha = -100;
_local5.P = 10;
_local4._y = _local4._y + 30;
_local4._x = _local4._x - 90;
_root.Money_ADD = TM;
_root.TOTPOINTS = _root.TOTPOINTS + TM;
trace(TM);
trace(_local3);
_local4.attachMovie("grad_20", "grad_16", 0);
_local4.grad_16.text.text = DollText + String(TM);
_local4 = _local6.createEmptyMovieClip("lll", 10);
_local4._y = -10;
_local4._x = -85;
var _local8;
_local8 = flash.display.BitmapData.loadBitmap(_root.level_money_n2d);
_local4.attachBitmap(_local8, 0);
_local5.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;
}
};
click = _local6.createEmptyMovieClip("click", 1);
click._x = 10;
click._y = 150;
click._alpha = 0;
_root.TextShow(click, _root.TextClickToContinue.text, "TextFont", -2, 1, 1, 14, _root.FontWhite, 300, _root.FontBlue);
clearInterval(id_click);
id_click = setInterval(GameClasses.GFunctions.create(this, showClick), 33);
left[NAi]._x = 0;
right[NAi]._x = 0;
left[NAi]._y = left[NAi]._y + 25;
GetScoreString(0);
}
}
function showClick() {
if (up) {
click._alpha = click._alpha + 2;
if (click._alpha > 90) {
up = false;
}
} else {
click._alpha = click._alpha - 2;
if (click._alpha < 64) {
up = true;
}
}
}
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 = 500;
_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 _local3 = (getTimer() - T) / k;
if ((_local3 >= 1) || (_root.Cancel)) {
_local3 = 1;
clearInterval(moving);
if (isT) {
GetScoreString(1);
}
}
var _local5 = int(O1 + ((N1 - O1) * _local3));
var _local4 = int(O2 + ((N2 - O2) * _local3));
if (isT) {
_root.TIME.time._y = (_root.TIME.krug._y = _local5);
}
trace(String(_local4));
MC2.grad_16.text.text = DollText + String(_local4);
}
function EndScore() {
delete _root.bl.onPress;
trace("dfdfdfdf");
_root.attachMovie("black", "Cancel", 2, {_x:-100});
ShowString();
}
var NA = -1;
var NAi = -1;
var TM = 0;
var Cancel = false;
var up = true;
}
Symbol 2566 MovieClip [__Packages.GameClasses.GameSound] Frame 0
class GameClasses.GameSound extends Sound
{
function GameSound (s, MC) {
super(MC);
super.attachSound(s);
}
function start(SoundOn, s, l) {
if (SoundOn) {
super.start(s, l);
}
}
function stop() {
super.stop();
}
function setVolume(value) {
super.setVolume(value);
}
}
Symbol 312 MovieClip Frame 27
this._parent.StartMove();
Symbol 313 MovieClip [fish1] Frame 1
#initclip 164
Object.registerClass("fish1", GameClasses.Fish);
#endinitclip
Symbol 377 MovieClip Frame 33
this._parent.StartMove();
Symbol 378 MovieClip [fish2] Frame 1
#initclip 79
Object.registerClass("fish2", GameClasses.Fish);
#endinitclip
Symbol 442 MovieClip Frame 33
this._parent.StartMove();
Symbol 443 MovieClip [fish3] Frame 1
#initclip 80
Object.registerClass("fish3", GameClasses.Fish);
#endinitclip
Symbol 533 MovieClip Frame 27
this._parent.StartMove();
Symbol 534 MovieClip [fish4] Frame 1
#initclip 81
Object.registerClass("fish4", GameClasses.Turtle);
#endinitclip
Symbol 598 MovieClip Frame 33
this._parent.StartMove();
Symbol 599 MovieClip [fish5] Frame 1
#initclip 82
Object.registerClass("fish5", GameClasses.Fish);
#endinitclip
Symbol 663 MovieClip Frame 33
this._parent.StartMove();
Symbol 664 MovieClip [fish6] Frame 1
#initclip 83
Object.registerClass("fish6", GameClasses.Fish);
#endinitclip
Symbol 728 MovieClip Frame 33
this._parent.StartMove();
Symbol 729 MovieClip [fish7] Frame 1
#initclip 84
Object.registerClass("fish7", GameClasses.Fish);
#endinitclip
Symbol 793 MovieClip Frame 33
this._parent.StartMove();
Symbol 794 MovieClip [fish8] Frame 1
#initclip 85
Object.registerClass("fish8", GameClasses.Fish);
#endinitclip
Symbol 801 MovieClip [button_green] Frame 1
#initclip 86
Object.registerClass("button_green", GameClasses.GameButton);
#endinitclip
Symbol 813 MovieClip [button_down] Frame 1
#initclip 87
Object.registerClass("button_down", GameClasses.GameButton);
#endinitclip
Symbol 820 MovieClip [button_res] Frame 1
#initclip 88
Object.registerClass("button_res", GameClasses.GameButton);
#endinitclip
Symbol 850 MovieClip [bomb_ray] Frame 15
stop();
this.removeMovieClip();
Symbol 889 MovieClip [nuke] Frame 1
#initclip 89
Object.registerClass("nuke", GameClasses.TileClass);
#endinitclip
Symbol 889 MovieClip [nuke] Frame 23
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 894 MovieClip [hint_arrow] Frame 1
this.R = getTimer();
this.onEnterFrame = function () {
var _local3 = 1300;
var _local4 = ((getTimer() - this.R) % _local3) / _local3;
var _local2 = Math.sin(_local4 * Math.PI);
ar._y = 41 + (_local2 * 17);
ar.ar2._yscale = 100 - (_local2 * 20);
ar.ar2._xscale = 90 + (_local2 * 10);
};
Symbol 958 MovieClip [slide6] Frame 1
#initclip 90
Object.registerClass("slide6", GameClasses.TileClass);
#endinitclip
Symbol 958 MovieClip [slide6] Frame 36
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 965 MovieClip [button_B] Frame 1
#initclip 91
Object.registerClass("button_B", GameClasses.GameButton);
#endinitclip
Symbol 968 MovieClip [menumain] Frame 1
#initclip 92
Object.registerClass("menumain", GameClasses.GameMenu);
#endinitclip
Symbol 969 MovieClip [fly_text] Frame 20
stop();
this.removeMovieClip();
Symbol 970 MovieClip [fly_text2] Frame 25
stop();
this.removeMovieClip();
Symbol 971 MovieClip [fly_bonus3] Frame 25
stop();
this.removeMovieClip();
Symbol 972 MovieClip [fly_bonus4] Frame 25
stop();
this.removeMovieClip();
Symbol 979 MovieClip [button_help] Frame 1
#initclip 93
Object.registerClass("button_help", GameClasses.GameButton);
#endinitclip
Symbol 983 MovieClip [shine] Frame 15
stop();
this.removeMovieClip();
Symbol 992 MovieClip [eyebutton] Frame 1
#initclip 94
Object.registerClass("eyebutton", GameClasses.GameButton);
#endinitclip
Symbol 1000 MovieClip [button_small] Frame 1
#initclip 95
Object.registerClass("button_small", GameClasses.GameButton);
#endinitclip
Symbol 1013 MovieClip [blow_fon] Frame 8
stop();
_root.Decrease(this._parent);
this._parent.gotoAndStop(this._parent._currentframe - 1);
this.removeMovieClip();
Symbol 1063 MovieClip [dyno] Frame 1
#initclip 96
Object.registerClass("dyno", GameClasses.TileClass);
#endinitclip
Symbol 1063 MovieClip [dyno] Frame 24
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1081 MovieClip [timer] Frame 1
#initclip 97
Object.registerClass("timer", GameClasses.GameTimer);
#endinitclip
Symbol 1137 MovieClip [rocket] Frame 1
#initclip 98
Object.registerClass("rocket", GameClasses.TileClass);
#endinitclip
Symbol 1137 MovieClip [rocket] Frame 23
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1194 MovieClip [bomb] Frame 1
#initclip 99
Object.registerClass("bomb", GameClasses.TileClass);
#endinitclip
Symbol 1194 MovieClip [bomb] Frame 28
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1206 MovieClip [button] Frame 1
#initclip 100
Object.registerClass("button", GameClasses.GameButton);
#endinitclip
stop();
Symbol 1207 MovieClip [button_big] Frame 1
#initclip 101
Object.registerClass("button_big", GameClasses.GameButton);
#endinitclip
stop();
Symbol 1217 MovieClip Frame 1
stop();
Symbol 1217 MovieClip Frame 76
stop();
Symbol 1223 MovieClip Frame 1
stop();
Symbol 1223 MovieClip Frame 76
stop();
Symbol 1230 MovieClip Frame 1
stop();
Symbol 1230 MovieClip Frame 76
stop();
Symbol 1237 MovieClip Frame 1
stop();
Symbol 1237 MovieClip Frame 76
stop();
Symbol 1252 MovieClip Frame 1
stop();
Symbol 1252 MovieClip Frame 76
stop();
Symbol 1256 MovieClip Frame 1
stop();
Symbol 1256 MovieClip Frame 76
stop();
Symbol 1264 MovieClip Frame 1
vint.onEnterFrame = function () {
this._rotation = this._rotation + 1;
};
Symbol 1265 MovieClip Frame 1
stop();
Symbol 1265 MovieClip Frame 76
stop();
Symbol 1270 MovieClip Frame 1
stop();
Symbol 1270 MovieClip Frame 62
stop();
Symbol 1274 MovieClip Frame 1
stop();
Symbol 1274 MovieClip Frame 61
stop();
Symbol 1278 MovieClip Frame 1
stop();
Symbol 1278 MovieClip Frame 83
stop();
MC.T = getTimer();
MC.onEnterFrame = function () {
var _local2 = 5000 + Math.min(5000, (getTimer() - this.T) / 10);
var _local3 = ((getTimer() - this.T) % _local2) / _local2;
this._rotation = Math.sin((_local3 * Math.PI) * 2) * 10;
};
Symbol 1297 MovieClip Frame 1
stop();
Symbol 1297 MovieClip Frame 15
stop();
Symbol 1300 MovieClip Frame 1
stop();
Symbol 1300 MovieClip Frame 2
stop();
Symbol 1312 MovieClip [button_close] Frame 1
#initclip 102
Object.registerClass("button_close", GameClasses.GameButton);
#endinitclip
stop();
Symbol 1324 MovieClip Frame 1
stop();
Symbol 1359 MovieClip [button_hint] Frame 1
#initclip 103
Object.registerClass("button_hint", GameClasses.GameButton);
#endinitclip
Symbol 1406 MovieClip Frame 1
stop();
Symbol 1406 MovieClip Frame 70
stop();
this.gotoAndStop(1);
Symbol 1429 MovieClip [tank] Frame 1
#initclip 104
Object.registerClass("tank", GameClasses.Tank);
#endinitclip
Symbol 1445 MovieClip [item12] Frame 1
#initclip 105
Object.registerClass("item12", GameClasses.ItemTank);
#endinitclip
Symbol 1450 MovieClip [item10] Frame 1
#initclip 106
Object.registerClass("item10", GameClasses.ItemTank);
#endinitclip
Symbol 1457 MovieClip [item17] Frame 1
#initclip 107
Object.registerClass("item17", GameClasses.ItemTank);
#endinitclip
mc.R = random(30000);
mc.onEnterFrame = function () {
var _local2 = 30000;
var _local3 = ((Math.PI*2) * ((getTimer() + this.R) % _local2)) / _local2;
this._alpha = Math.min(100, Math.sin(_local3) * 400);
};
Symbol 1462 MovieClip [item19] Frame 1
#initclip 108
Object.registerClass("item19", GameClasses.ItemTank);
#endinitclip
Symbol 1467 MovieClip [item13] Frame 1
#initclip 109
Object.registerClass("item13", GameClasses.ItemTank);
#endinitclip
Symbol 1472 MovieClip [item8] Frame 1
#initclip 110
Object.registerClass("item8", GameClasses.ItemTank);
#endinitclip
Symbol 1477 MovieClip [item14] Frame 1
#initclip 111
Object.registerClass("item14", GameClasses.ItemTank);
#endinitclip
Symbol 1482 MovieClip [item20] Frame 1
#initclip 112
Object.registerClass("item20", GameClasses.ItemTank);
#endinitclip
Symbol 1490 MovieClip [item21] Frame 1
#initclip 113
Object.registerClass("item21", GameClasses.ItemTank);
#endinitclip
mc.R = random(10000);
mc.onEnterFrame = function () {
var _local2 = 2000;
var _local3 = ((Math.PI*2) * ((getTimer() + this.R) % _local2)) / _local2;
this._rotation = Math.sin(_local3) * 5;
};
Symbol 1495 MovieClip [item11] Frame 1
#initclip 114
Object.registerClass("item11", GameClasses.ItemTank);
#endinitclip
Symbol 1500 MovieClip [item9] Frame 1
#initclip 115
Object.registerClass("item9", GameClasses.ItemTank);
#endinitclip
Symbol 1505 MovieClip [item16] Frame 1
#initclip 116
Object.registerClass("item16", GameClasses.ItemTank);
#endinitclip
Symbol 1510 MovieClip [item1] Frame 1
#initclip 117
Object.registerClass("item1", GameClasses.ItemTank);
#endinitclip
Symbol 1515 MovieClip [item5] Frame 1
#initclip 118
Object.registerClass("item5", GameClasses.ItemTank);
#endinitclip
Symbol 1520 MovieClip [item3] Frame 1
#initclip 119
Object.registerClass("item3", GameClasses.ItemTank);
#endinitclip
Symbol 1557 MovieClip [slide1] Frame 1
#initclip 120
Object.registerClass("slide1", GameClasses.TileClass);
#endinitclip
Symbol 1557 MovieClip [slide1] Frame 36
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1595 MovieClip [slide2] Frame 1
#initclip 121
Object.registerClass("slide2", GameClasses.TileClass);
#endinitclip
Symbol 1595 MovieClip [slide2] Frame 36
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1632 MovieClip [slide3] Frame 1
#initclip 122
Object.registerClass("slide3", GameClasses.TileClass);
#endinitclip
Symbol 1632 MovieClip [slide3] Frame 36
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1670 MovieClip [slide4] Frame 1
#initclip 123
Object.registerClass("slide4", GameClasses.TileClass);
#endinitclip
Symbol 1670 MovieClip [slide4] Frame 36
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1708 MovieClip [slide5] Frame 1
#initclip 124
Object.registerClass("slide5", GameClasses.TileClass);
#endinitclip
Symbol 1708 MovieClip [slide5] Frame 36
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1712 MovieClip [item6] Frame 1
#initclip 125
Object.registerClass("item6", GameClasses.ItemTank);
#endinitclip
Symbol 1716 MovieClip [item7] Frame 1
#initclip 126
Object.registerClass("item7", GameClasses.ItemTank);
#endinitclip
Symbol 1754 MovieClip [slide7] Frame 1
#initclip 127
Object.registerClass("slide7", GameClasses.TileClass);
#endinitclip
Symbol 1754 MovieClip [slide7] Frame 36
if (this._name != _root.Blink) {
this.gotoAndStop(1);
} else {
this.gotoAndPlay(2);
}
Symbol 1769 MovieClip Frame 1
stop();
Symbol 1780 MovieClip [item27] Frame 1
#initclip 128
Object.registerClass("item27", GameClasses.ItemTank);
#endinitclip
mc.R = random(9000);
mc.onEnterFrame = function () {
var _local2 = 9000;
var _local3 = ((Math.PI*2) * ((getTimer() + this.R) % _local2)) / _local2;
this._rotation = Math.sin(_local3) * 10;
};
Symbol 1790 MovieClip Frame 1
if (this.R) {
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) * 400);
};
}
Symbol 1791 MovieClip [item31] Frame 1
#initclip 129
Object.registerClass("item31", GameClasses.ItemTank);
#endinitclip
mc.R = random(5000);
mc.onEnterFrame = function () {
var _local2 = 5000;
var _local3 = ((Math.PI*2) * ((getTimer() + this.R) % _local2)) / _local2;
this._rotation = Math.sin(_local3) * 10;
};
Symbol 1796 MovieClip [item32] Frame 1
#initclip 130
Object.registerClass("item32", GameClasses.ItemTank);
#endinitclip
Symbol 1801 MovieClip [item28] Frame 1
#initclip 131
Object.registerClass("item28", GameClasses.ItemTank);
#endinitclip
Symbol 1806 MovieClip [item29] Frame 1
#initclip 132
Object.registerClass("item29", GameClasses.ItemTank);
#endinitclip
Symbol 1811 MovieClip [item33] Frame 1
#initclip 133
Object.registerClass("item33", GameClasses.ItemTank);
#endinitclip
Symbol 1819 MovieClip [item35] Frame 1
#initclip 134
Object.registerClass("item35", GameClasses.ItemTank);
#endinitclip
mc.R = random(10000);
mc.onEnterFrame = function () {
var _local2 = 10000;
var _local3 = ((Math.PI*2) * ((getTimer() + this.R) % _local2)) / _local2;
this._rotation = Math.sin(_local3) * 3;
};
Symbol 1824 MovieClip [item24] Frame 1
#initclip 135
Object.registerClass("item24", GameClasses.ItemTank);
#endinitclip
Symbol 1838 MovieClip [item30] Frame 1
#initclip 136
Object.registerClass("item30", GameClasses.ItemTank);
#endinitclip
mc.R = random(5000);
mc.onEnterFrame = function () {
var _local3 = 5000;
var _local2 = ((getTimer() + this.R) % _local3) / _local3;
this._rotation = Math.sin((Math.PI*2) * _local2) * 7;
this.mc1._rotation = Math.sin((Math.PI*2) * ((_local2 + 0.9) % 1)) * 15;
this.mc2._rotation = Math.sin((Math.PI*2) * ((_local2 + 0.8) % 1)) * 13;
};
Symbol 1863 MovieClip Frame 1
stop();
Symbol 1870 MovieClip [button_rg] Frame 1
#initclip 137
Object.registerClass("button_rg", GameClasses.GameButton);
#endinitclip
stop();
Symbol 1896 MovieClip [item23] Frame 1
#initclip 138
Object.registerClass("item23", GameClasses.ItemTank);
#endinitclip
mc.R = random(5000);
mc.onEnterFrame = function () {
var _local3 = 3000;
var _local2 = ((getTimer() + this.R) % _local3) / _local3;
this._rotation = Math.sin((Math.PI*2) * _local2) * 3;
this.mc1._rotation = (-Math.sin((Math.PI*2) * ((_local2 + 0.9) % 1))) * 3.1;
this.mc2._rotation = (-Math.sin((Math.PI*2) * ((_local2 + 0.8) % 1))) * 3;
};
Symbol 1915 MovieClip [item26] Frame 1
#initclip 139
Object.registerClass("item26", GameClasses.ItemTank);
#endinitclip
mc.R = random(5000);
mc.onEnterFrame = function () {
var _local3 = 5000;
var _local2 = 8000;
var _local4 = ((getTimer() + this.R) % _local3) / _local3;
var _local5 = ((getTimer() + this.R) % _local2) / _local2;
this.mc1._rotation = Math.sin((Math.PI*2) * ((_local5 + 0.9) % 1)) * 38;
this.mc3._rotation = Math.sin((Math.PI*2) * ((_local4 + 0.1) % 1)) * 14;
this.mc4._rotation = (-Math.sin((Math.PI*2) * ((_local4 + 0.1) % 1))) * 6;
};
Symbol 1920 MovieClip [item2] Frame 1
#initclip 140
Object.registerClass("item2", GameClasses.ItemTank);
#endinitclip
Symbol 1936 MovieClip [gems_1] Frame 1
#initclip 141
Object.registerClass("gems_1", GameClasses.GemTank);
#endinitclip
Symbol 1940 MovieClip [gems_10] Frame 1
#initclip 142
Object.registerClass("gems_10", GameClasses.GemTank);
#endinitclip
Symbol 1944 MovieClip [gems_2] Frame 1
#initclip 143
Object.registerClass("gems_2", GameClasses.GemTank);
#endinitclip
Symbol 1948 MovieClip [gems_3] Frame 1
#initclip 144
Object.registerClass("gems_3", GameClasses.GemTank);
#endinitclip
Symbol 1952 MovieClip [gems_4] Frame 1
#initclip 145
Object.registerClass("gems_4", GameClasses.GemTank);
#endinitclip
Symbol 1956 MovieClip [gems_5] Frame 1
#initclip 146
Object.registerClass("gems_5", GameClasses.GemTank);
#endinitclip
Symbol 1960 MovieClip [gems_6] Frame 1
#initclip 147
Object.registerClass("gems_6", GameClasses.GemTank);
#endinitclip
Symbol 1964 MovieClip [gems_7] Frame 1
#initclip 148
Object.registerClass("gems_7", GameClasses.GemTank);
#endinitclip
Symbol 1968 MovieClip [gems_8] Frame 1
#initclip 149
Object.registerClass("gems_8", GameClasses.GemTank);
#endinitclip
Symbol 1972 MovieClip [gems_9] Frame 1
#initclip 150
Object.registerClass("gems_9", GameClasses.GemTank);
#endinitclip
Symbol 2036 MovieClip Frame 33
this._parent.StartMove();
Symbol 2037 MovieClip [fish9] Frame 1
#initclip 151
Object.registerClass("fish9", GameClasses.Fish);
#endinitclip
Symbol 2117 MovieClip Frame 37
this._parent.StartMove();
Symbol 2118 MovieClip [fish10] Frame 1
#initclip 152
Object.registerClass("fish10", GameClasses.Fish);
#endinitclip
Symbol 2180 MovieClip Frame 31
this._parent.StartMove();
Symbol 2181 MovieClip [fish11] Frame 1
#initclip 153
Object.registerClass("fish11", GameClasses.Fish);
#endinitclip
Symbol 2189 MovieClip [more_button1] Frame 1
#initclip 154
Object.registerClass("more_button1", GameClasses.GameButton);
#endinitclip
stop();
Symbol 2194 MovieClip [more_button2] Frame 1
#initclip 155
Object.registerClass("more_button2", GameClasses.GameButton);
#endinitclip
stop();
Symbol 2198 MovieClip [more_button3] Frame 1
#initclip 156
Object.registerClass("more_button3", GameClasses.GameButton);
#endinitclip
stop();
Symbol 2202 MovieClip [more_button4] Frame 1
#initclip 157
Object.registerClass("more_button4", GameClasses.GameButton);
#endinitclip
stop();
Symbol 2206 MovieClip [more_button5] Frame 1
#initclip 158
Object.registerClass("more_button5", GameClasses.GameButton);
#endinitclip
stop();
Symbol 2210 MovieClip [more_button6] Frame 1
#initclip 159
Object.registerClass("more_button6", GameClasses.GameButton);
#endinitclip
stop();
Symbol 2330 MovieClip Frame 53
this._parent.StartMove();
Symbol 2331 MovieClip [fish12] Frame 1
#initclip 160
Object.registerClass("fish12", GameClasses.Fish);
#endinitclip
Symbol 2352 MovieClip [button_gr] Frame 1
#initclip 161
Object.registerClass("button_gr", GameClasses.GameButton);
#endinitclip
Symbol 2359 MovieClip [button_blue] Frame 1
#initclip 162
Object.registerClass("button_blue", GameClasses.GameButton);
#endinitclip
Symbol 2377 MovieClip [button_yellow] Frame 1
#initclip 163
Object.registerClass("button_yellow", GameClasses.GameButton);
#endinitclip
Symbol 2415 MovieClip [big_bomb_eff] Frame 11
stop();
this.removeMovieClip();
Symbol 2428 MovieClip [small_bomb_eff] Frame 10
stop();
this.removeMovieClip();
Symbol 2438 MovieClip Frame 71
stop();
this.removeMovieClip();