Frame 1
stop();
MochiAd.showPreGameAd({id:"e906d8f807addede", res:"520x390"});
Frame 2
function Loading() {
_root.DownloadLink.value = "http://www.playrix.com/4-elements.html?utm_campaign=mochiads&utm_medium=flash&utm_source=4-elements";
GlobalTime = getTimer();
_root.onEnterFrame = LoadGame;
InitBot();
}
function LoadGame() {
var _local2 = 5000;
loadline._visible = true;
Load = _root.getBytesLoaded();
Total = _root.getBytesTotal();
var _local4 = getTimer() - GlobalTime;
if (Load >= ((Total * _local4) / _local2)) {
Load = (Total * _local4) / _local2;
}
var _local3 = (100 * Load) / Total;
KB.text = ((TextLoading.text + " (") + Math.floor(_local3)) + "%)";
var _local5 = loadline.line._width;
loadline._xscale = _local3;
if (Total <= Load) {
delete _root.onEnterFrame;
_root.gotoAndStop(4);
}
}
function InitBot() {
__com_mochibot__("bbc08194", this, 10301, true);
}
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
ISpyLevelxml = "<?xml version=\"1.0\"?><levels><level><objects><picture x=\"61\" y=\"357\" angle=\"156.3120\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"lamp_1\" visible=\"true\" offsetx=\"-24\" offsety=\"0\" splitItemId=\"lamp\"/><picture x=\"581\" y=\"179\" angle=\"306.2618\" xZoom=\"0.698394\" yZoom=\"0.698394\" objectId=\"lamp_2\" visible=\"true\" offsetx=\"-24\" offsety=\"-52\" splitItemId=\"lamp\"/><picture x=\"657\" y=\"386\" angle=\"0.000000\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"earth_dragon\" visible=\"true\" type=\"act\"/><picture x=\"0\" y=\"600\" angle=\"0\" xZoom=\"1\" yZoom=\"1\" objectId=\"earth_black\" visible=\"true\"/><picture x=\"415\" y=\"575\" angle=\"43.51968\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"key_5\" visible=\"true\" offsetx=\"-13\" offsety=\"-8\" splitItemId=\"key\"/><picture x=\"329\" y=\"559\" angle=\"322.8934\" xZoom=\"1.060189\" yZoom=\"1.060189\" objectId=\"key_4\" visible=\"true\" offsetx=\"-40\" offsety=\"-44\" splitItemId=\"key\"/><picture x=\"423\" y=\"219\" angle=\"143.7191\" xZoom=\"0.796339\" yZoom=\"0.796339\" objectId=\"key_3\" visible=\"true\" offsetx=\"10\" offsety=\"0\" splitItemId=\"key\"/><picture x=\"324\" y=\"290\" angle=\"322.9269\" xZoom=\"0.925466\" yZoom=\"0.925466\" objectId=\"key_2\" visible=\"true\" offsetx=\"-7\" offsety=\"17\" splitItemId=\"key\"/><picture x=\"420\" y=\"328\" angle=\"0.000000\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"key_1\" visible=\"true\" offsetx=\"19\" offsety=\"24\" splitItemId=\"key\"/><picture x=\"255\" y=\"261\" angle=\"344.6415\" xZoom=\"1.660568\" yZoom=\"1.660567\" objectId=\"axe_6\" visible=\"false\" offsetx=\"-47\" offsety=\"15\" splitItemId=\"axe\"/><picture x=\"349\" y=\"164\" angle=\"17.08357\" xZoom=\"1.149443\" yZoom=\"1.149443\" objectId=\"axe_5\" visible=\"true\" offsetx=\"2\" offsety=\"15\" splitItemId=\"axe\"/><picture x=\"620\" y=\"205\" angle=\"243.0971\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"axe_4\" visible=\"true\" offsetx=\"-16\" offsety=\"21\" splitItemId=\"axe\"/><picture x=\"472\" y=\"195\" angle=\"311.4848\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"axe_3\" visible=\"true\" offsetx=\"-30\" offsety=\"-23\" splitItemId=\"axe\"/><picture x=\"294\" y=\"388\" angle=\"64.83670\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"axe_2\" visible=\"true\" offsetx=\"-43\" offsety=\"-49\" splitItemId=\"axe\"/><picture x=\"150\" y=\"339\" angle=\"330.4406\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"axe_1\" visible=\"true\" offsetx=\"-25\" offsety=\"-33\" splitItemId=\"axe\"/><picture x=\"357\" y=\"446\" angle=\"4.916214\" xZoom=\"0.692280\" yZoom=\"0.692280\" objectId=\"watering_can_6\" visible=\"false\" offsetx=\"-32\" offsety=\"-26\" splitItemId=\"watering_can\"/><picture x=\"610\" y=\"314\" angle=\"233.5463\" xZoom=\"0.941835\" yZoom=\"0.941835\" objectId=\"watering_can_5\" visible=\"true\" offsetx=\"-30\" offsety=\"4\" splitItemId=\"watering_can\"/><picture x=\"338\" y=\"325\" angle=\"77.78916\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"watering_can_4\" visible=\"true\" offsetx=\"-26\" offsety=\"5\" splitItemId=\"watering_can\"/><picture x=\"263\" y=\"360\" angle=\"0.000000\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"watering_can_3\" visible=\"true\" offsetx=\"-36\" offsety=\"-43\" splitItemId=\"watering_can\"/><picture x=\"520\" y=\"262\" angle=\"264.0210\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"watering_can_2\" visible=\"true\" offsetx=\"-46\" offsety=\"-22\" splitItemId=\"watering_can\"/><picture x=\"745\" y=\"479\" angle=\"53.77506\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"watering_can_1\" visible=\"true\" offsetx=\"8\" offsety=\"-41\" splitItemId=\"watering_can\"/><picture x=\"415\" y=\"354\" angle=\"90\" xZoom=\"0.2\" yZoom=\"0.2\" objectId=\"earth_key\" visible=\"false\" splitItemId=\"1\"/><picture x=\"558\" y=\"358\" angle=\"0.000000\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"earth_lamp\" visible=\"false\"/><picture x=\"252\" y=\"293\" angle=\"0.000000\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"earth_chest_2\" visible=\"false\"/><picture x=\"262\" y=\"258\" angle=\"0.000000\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"earth_chest_1\" visible=\"true\"/><picture x=\"422\" y=\"450\" angle=\"0.000000\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"earth_bush_rise\" visible=\"false\"/><picture x=\"400\" y=\"300\" angle=\"0.000000\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"earth_light\" visible=\"false\"/><picture x=\"268\" y=\"244\" angle=\"0.000000\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"earth_chest\" visible=\"true\" type=\"act\"/><picture x=\"424\" y=\"445\" angle=\"0.000000\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"earth_stones\" visible=\"true\" type=\"act\"/><picture x=\"422\" y=\"477\" angle=\"0.000000\" xZoom=\"1.000000\" yZoom=\"1.000000\" objectId=\"earth_bush\" visible=\"false\" type=\"act\"/></objects><actions><region id=\"earth_dragon\" splitItemId=\"lamp\"><action show=\"true\" objectId=\"earth_lamp\"/><action show=\"true\" objectId=\"earth_light\"/><action show=\"false\" objectId=\"earth_black\"/></region><region id=\"earth_chest\" splitItemId=\"key\"><action show=\"true\" objectId=\"earth_chest_2\"/><action show=\"true\" objectId=\"axe_6\" /><action show=\"false\" objectId=\"earth_chest_1\"/><action show=\"false\" objectId=\"earth_chest\"/></region><region id=\"earth_stones\" splitItemId=\"axe\"><action show=\"true\" objectId=\"watering_can_6\" /><action show=\"false\" objectId=\"earth_stones\"/><action show=\"true\" objectId=\"earth_bush\"/></region><region id=\"earth_bush\" splitItemId=\"watering_can\"><action show=\"true\" objectId=\"earth_bush_rise\"/><action show=\"true\" objectId=\"earth_key\"/><action show=\"false\" objectId=\"earth_bush\"/></region></actions></level></levels>";
levelxml = "<Levels><Level name=\"il1\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundGnome</Style><Line>.................</Line><Line>.1111..111111111.</Line><Line>.11111.111111111.</Line><Line>.111111111111111.</Line><Line>.000111111111000.</Line><Line>.e00111111111000.</Line><Line>.000111111111000.</Line><Line>.111111111111111.</Line><Line>.111111111111111.</Line><Line>.11111111.111111.</Line><Line>.11111111..11111.</Line><Line>.................</Line><CheckPoints/><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"1\"><Rect x=\"13\" y=\"5\" width=\"3\" height=\"3\"/><Timer initTime=\"600\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il2\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundGnome</Style><Line>.......................................</Line><Line>.....11111111111.........000000000.....</Line><Line>.....11111111111111.....00111111100....</Line><Line>...1111111111111101...001111111111100..</Line><Line>..110111111111101011.0.0111111111110.0.</Line><Line>.111e001111111100000000001111111110000.</Line><Line>..110111111111101011.0.0111111111110.0.</Line><Line>...1111111111111101...001111111111100..</Line><Line>...1111111111111101....0111111111110...</Line><Line>.....11111111111111....0011111111100...</Line><Line>.....11111111111........00000000000....</Line><Line>.......................................</Line><CheckPoints/><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"5\"><Rect x=\"28\" y=\"4\" width=\"3\" height=\"3\"/><Timer initTime=\"601\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il3\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundGnome</Style><Line>..........................................</Line><Line>............000+0+1......m+0++00..........</Line><Line>.........0000010+mm...0..1++0m00000.......</Line><Line>.........000101+m1m..+++.1m1+101000.......</Line><Line>.......00010111+0+0.++.++0+++m0111000.....</Line><Line>.......011101010+0+++....+++0m1101010.....</Line><Line>.....0001011101+m1m......1m1+1010111010...</Line><Line>.....0101010101+0+m......m+000000000000...</Line><Line>...0000000000000++1......1++++0+0000000+0.</Line><Line>..mm011101110mm...............01111011110.</Line><Line>..1111111111111...............01111011110.</Line><Line>..111111m111111...............11111m11111.</Line><Line>..1111111111111+..............11111m11111.</Line><Line>..1111m111m1111+..............11111111111.</Line><Line>.+1111111111111+..............11111111111.</Line><Line>.+1111111111111+..............11111111111.</Line><Line>.+1111111111111...............m111111111m.</Line><Line>.+1111111111111...............11111111111.</Line><Line>..1m111111111m1...............11101010111.</Line><Line>..m11110001111m...............11110001111.</Line><Line>........e.....................10000000001.</Line><Line>................................mm000mm...</Line><Line>.................................mm0mm....</Line><Line>..........................................</Line><CheckPoints><Point x=\"14\" y=\"19\" r=\"3\"/><Point x=\"28\" y=\"18\" r=\"3\"/><Point x=\"35\" y=\"2\" r=\"3\"/></CheckPoints><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"1\"><Rect x=\"34\" y=\"2\" width=\"3\" height=\"3\"/><Timer initTime=\"601\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il4\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundGnome</Style><Line>.............................................................</Line><Line>..110111...11111111111..111m....0010000....000mmmmm1111111...</Line><Line>.11001111.111111R111111111m1....00m00000.mmm.0mmmmm11111000..</Line><Line>.10111111001R111111111111m.......1m000000mmm.0mmmmm11011110..</Line><Line>.10111111011111111.111111+.....000m10001..mm.0m...m11111000..</Line><Line>.e000110R111111101R10110R+mmmmm0m0V1001R1VVV.R1VVVV111110000.</Line><Line>.10111111011111111.111111+.....000m10001..mm.0m...m11111000..</Line><Line>.10111111001R111111111111m.......1m000000mmm.0mmmmm11011110..</Line><Line>.1001111110111111111111111m......01000000mmm.0mmmmm11111110..</Line><Line>.11001111.111111R11111111mmm....00m00000.mmm.0mmmmm11111000..</Line><Line>..110111...11111111111..m1m1....0010000....000mmmmm1111111...</Line><Line>.............................................................</Line><BonusInfo><Bonus r=\"6\"/><Bonus r=\"5\"/><Bonus r=\"5\"/><Bonus r=\"3\"/><Bonus r=\"7\"/><Bonus r=\"5\"/><Bonus r=\"4\"/><Bonus r=\"4\"/><Bonus r=\"4\"/><Bonus r=\"4\"/><Bonus r=\"5\"/><Bonus r=\"5\"/><Bonus r=\"5\"/><Bonus r=\"5\"/><Bonus r=\"5\"/><Bonus r=\"5\"/><Bonus r=\"6\"/></BonusInfo><CheckPoints/><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"0\"><Rect x=\"56\" y=\"5\" width=\"3\" height=\"3\"/><Timer initTime=\"601\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il5\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundGnome</Style><Line>..........................................</Line><Line>.0011111110D11111111......................</Line><Line>.1011111111111111100......................</Line><Line>.0011111111m1111000.....Rmmmm11...........</Line><Line>.101111111mm11110.......m....1L...........</Line><Line>.e0111111mmm11100+m++++.m.mm.1Lm..........</Line><Line>.101111111mm11110.....++V.mR1L0mm0........</Line><Line>.0011111111m1111000.....m.mm.1Lm.0........</Line><Line>.101111111U111111100....m....1L..0........</Line><Line>.0011111110111111111....Rmmmm11..0........</Line><Line>.................................0........</Line><Line>..............................0000000.....</Line><Line>..............................1..1..1.....</Line><Line>...........................0000000000000..</Line><Line>...........................1111111111111..</Line><Line>..........................111111111111111.</Line><Line>..........................11..111m111..11.</Line><Line>..........................111111mDm111111.</Line><Line>..........................1111111m1111111.</Line><Line>..........................111111111111111.</Line><Line>...........................1111111111111..</Line><Line>..............................1100011.....</Line><Line>.................................0........</Line><Line>............................D1111H1111D...</Line><Line>............................1....1....1...</Line><Line>............................11111111111...</Line><Line>............................11111111111...</Line><Line>............................11111111111...</Line><Line>............................11110001111...</Line><Line>............................11110001111...</Line><Line>............................11110001111...</Line><Line>............................11111111111...</Line><Line>............................11111111111...</Line><Line>............................11111111111...</Line><Line>..........................................</Line><BonusInfo><Bonus r=\"8\"/><Bonus r=\"6\"/><Bonus r=\"7\"/><Bonus r=\"3\"/><Bonus r=\"3\"/><Bonus r=\"8\"/><Bonus r=\"1\"/><Bonus r=\"3\"/><Bonus r=\"6\"/><Bonus r=\"7\"/><Bonus r=\"6\"/><Bonus r=\"5\"/><Bonus r=\"11\"/><Bonus r=\"5\"/><Bonus r=\"11\"/></BonusInfo><CheckPoints><Point x=\"18\" y=\"29\" r=\"1\"/><Point x=\"33\" y=\"29\" r=\"1\"/><Point x=\"33\" y=\"2\" r=\"3\"/></CheckPoints><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"6\"><Rect x=\"32\" y=\"4\" width=\"3\" height=\"3\"/><Timer initTime=\"601\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il6\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundKnight</Style><Line>...........................................</Line><Line>............111111111555101................</Line><Line>..........1111511111115111011..............</Line><Line>.........111115R5155515101100..............</Line><Line>.........10111111111115101110..............</Line><Line>.........00111111111115101110..............</Line><Line>..000000001110VR555151110110000000.........</Line><Line>.00.000..00111111111115101110....0.........</Line><Line>.0.......10111111111115101110....0.........</Line><Line>.0.......111115R5155515101100....0.........</Line><Line>.0........1111511111115111011....0.........</Line><Line>.0..........111111111555101......0.........</Line><Line>.0...............................0.........</Line><Line>.00.........................11110001111....</Line><Line>.000..5501111155...........1111110111111...</Line><Line>..000.0001111115..........111111111111111..</Line><Line>...0000.1111111..........11111101110111111.</Line><Line>....005.11111115.........1D111L11111R111D1.</Line><Line>..50055.11515115.........1111....5....1111.</Line><Line>..50....1111111..........5R5555555555555L5.</Line><Line>..00111100111115.........5R555555U555555L5.</Line><Line>..11111100011155..........111111111111111..</Line><Line>..11115110001000..........111111111111111..</Line><Line>..111111110010.0..........111110101011111..</Line><Line>..111151111100..............0011.+.1100....</Line><Line>..1111111100000..............000+++000.....</Line><Line>..511111150..010..............11.+.11......</Line><Line>..55.55.5500..00e..0.............+.........</Line><Line>...............0..000++++H++++++++.........</Line><Line>...................0.......................</Line><Line>...........................................</Line><BonusInfo><Bonus r=\"5\"/><Bonus r=\"4\"/><Bonus r=\"5\"/><Bonus r=\"5\"/><Bonus r=\"3\"/><Bonus r=\"4\"/><Bonus r=\"4\"/><Bonus r=\"3\"/><Bonus r=\"11\"/><Bonus r=\"10\"/><Bonus r=\"11\"/><Bonus r=\"2\"/><Bonus r=\"10\"/><Bonus r=\"8\"/></BonusInfo><CheckPoints><Point x=\"1\" y=\"23\" r=\"2\"/><Point x=\"34\" y=\"22\" r=\"3\"/><Point x=\"33\" y=\"2\" r=\"1\"/><Point x=\"30\" y=\"3\" r=\"2\"/><Point x=\"25\" y=\"3\" r=\"2\"/><Point x=\"20\" y=\"4\" r=\"3\"/></CheckPoints><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"0\"><Rect x=\"18\" y=\"1\" width=\"3\" height=\"3\"/><Timer initTime=\"601\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il7\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundKnight</Style><Line>..................</Line><Line>...11111511.00....</Line><Line>..1111115111511...</Line><Line>..1111115111511...</Line><Line>.11111115111111...</Line><Line>.10111111111550...</Line><Line>.e011111CmmmL5000.</Line><Line>.10111111111550.0.</Line><Line>.11111115111111.0.</Line><Line>..1111115111511.0.</Line><Line>..1111115111511.0.</Line><Line>...11111511.00..0.</Line><Line>................0.</Line><Line>................0.</Line><Line>................0.</Line><Line>................0.</Line><Line>................0.</Line><Line>.....51111000000+.</Line><Line>....511111100...+.</Line><Line>...1111111110...+.</Line><Line>...1111111111...+.</Line><Line>...1111111111.R.n.</Line><Line>...5111111111...+.</Line><Line>...1151111111...+.</Line><Line>...D111111115...+.</Line><Line>...n11111115....+.</Line><Line>...RnL15111...U.+.</Line><Line>................+.</Line><Line>................+.</Line><Line>................+.</Line><Line>................+.</Line><Line>...............++.</Line><Line>.........05+55++L.</Line><Line>.........0........</Line><Line>.........+........</Line><Line>..1111..nCn..111..</Line><Line>..1111111n111111..</Line><Line>..11111111111111..</Line><Line>..11111111111111..</Line><Line>..11111111111111..</Line><Line>...111111111111...</Line><Line>....111.0C0.11....</Line><Line>...011...5...10...</Line><Line>...V00000H0000V...</Line><Line>...n1111151111n...</Line><Line>...n1111111111n...</Line><Line>...n1115111511n...</Line><Line>...n1111000111n...</Line><Line>...n5111000115n...</Line><Line>...n1111000111n...</Line><Line>...n1115111511n...</Line><Line>...n1111111111n...</Line><Line>...n1111151111n...</Line><Line>...nnnnnnnnnnnn...</Line><Line>..................</Line><BonusInfo><Bonus r=\"4\"/><Bonus r=\"4\"/><Bonus r=\"2\"/><Bonus r=\"1\"/><Bonus r=\"11\"/><Bonus r=\"1\"/><Bonus r=\"5\"/><Bonus r=\"6\"/><Bonus r=\"1\"/><Bonus r=\"1\"/><Bonus r=\"10\"/><Bonus r=\"2\"/><Bonus r=\"10\"/></BonusInfo><CheckPoints><Point x=\"16\" y=\"48\" r=\"1\"/><Point x=\"16\" y=\"29\" r=\"1\"/><Point x=\"16\" y=\"22\" r=\"2\"/><Point x=\"8\" y=\"5\" r=\"1\"/></CheckPoints><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"5\"><Rect x=\"8\" y=\"5\" width=\"3\" height=\"3\"/><Timer initTime=\"601\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il8\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundGnome</Style><Line>..................................................................</Line><Line>.010000SSS11111.D11001S1S111100SS0011111SSS11.00.......00.........</Line><Line>.01111011S1111100115001111111100SS011111SSC11.00......001.........</Line><Line>.011111111111111S1111001111111100S011111S1111.00....000111........</Line><Line>.011111111111111S11110111C1111110SD01111SC111500111.011111.000....</Line><Line>.0111S1101111111S1110011111111111SS01115S11111011111011151.0000.0.</Line><Line>.0e0011S11111110V11001111111111100001150C11115011111001110000000..</Line><Line>.0111S1101111111S1110011111111111SS01115S11111011111011151.0000.0.</Line><Line>.011111111111111S11110111C1111110SU01111SC111500111.011111.000....</Line><Line>.011111111111111S1111001111111100S011111S1111.00....000111........</Line><Line>.01111011S1111100115001111111100SS011111SSC11.00......001.........</Line><Line>.010000SSS11111.U11001S1S111100SS0011111SSS11.00.......00.........</Line><Line>..................................................................</Line><BonusInfo><Bonus r=\"5\"/><Bonus r=\"2\"/><Bonus r=\"3\"/><Bonus r=\"1\"/><Bonus r=\"2\"/><Bonus r=\"3\"/><Bonus r=\"4\"/><Bonus r=\"3\"/><Bonus r=\"1\"/><Bonus r=\"3\"/><Bonus r=\"3\"/><Bonus r=\"5\"/></BonusInfo><CheckPoints/><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"0\"><Rect x=\"61\" y=\"5\" width=\"3\" height=\"3\"/><Timer initTime=\"601\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il9\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundGnome</Style><Line>........................................</Line><Line>............0001111SS.111111SSS.........</Line><Line>............01011111SS111111S001555++++.</Line><Line>............010111111S1111111001555++.0.</Line><Line>............010111111..111111001555++.0.</Line><Line>...........00501111500.011111001555++.0.</Line><Line>...........05e1111000000011110015m5++.0.</Line><Line>...........00501111500.011111001mmm++.+.</Line><Line>............010111111..111111001mmm++.+.</Line><Line>............010111111S1111111001mmm++.0.</Line><Line>............01011111SS111111S001mmm++.0.</Line><Line>............0001111SS.111111SSS.......0.</Line><Line>......................................0.</Line><Line>......................................+.</Line><Line>......................................0.</Line><Line>......................................0.</Line><Line>......................................0.</Line><Line>......................................0.</Line><Line>......................................0.</Line><Line>......................................+.</Line><Line>.000000000000000......................0.</Line><Line>.000S151S151S000......................0.</Line><Line>.000100000001000..........1111155.....0.</Line><Line>.000501515105000.........1111111115...+.</Line><Line>.000105000501000.........1111111111...0.</Line><Line>.000S0100010S00000000....5111111111...+.</Line><Line>.000105000501000....0...05511111115+..0.</Line><Line>.000501515105000....00000555111111C++0+.</Line><Line>.000100000001000........05511111115+....</Line><Line>.000S151S151S000.........5111111111.....</Line><Line>.000000000000000.........1111111111.....</Line><Line>.........................1111111115.....</Line><Line>..........................1111155.......</Line><Line>........................................</Line><BonusInfo><Bonus r=\"6\"/></BonusInfo><CheckPoints><Point x=\"38\" y=\"28\" r=\"1\"/><Point x=\"38\" y=\"6\" r=\"1\"/><Point x=\"20\" y=\"6\" r=\"1\"/><Point x=\"6\" y=\"8\" r=\"3\"/></CheckPoints><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"7\"><Rect x=\"7\" y=\"7\" width=\"3\" height=\"3\"/><Timer initTime=\"540\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il10\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundDragon</Style><Line>.................................................................</Line><Line>.......................................0000000...................</Line><Line>...222222222222..2221112...0...........S.....0......2222333......</Line><Line>..0011222212202111111131...00000...000000000.0......211222333333.</Line><Line>..0111112211101111112322..111111...021111120.0.00..3211112222223.</Line><Line>.10001111211101111223210.5111111...012111210.0..00.1111113111123.</Line><Line>.10111111211101112330210055111110..011232110.0...001111111000123.</Line><Line>.1e011112221001223000110005511110000113C3110S0000000111122000123.</Line><Line>.10111111211101112330210055111110..011232110.0...001111111000123.</Line><Line>.10001111211101111223210.5111111...012111210.0..00.1111113111123.</Line><Line>..0111112211101111112322..111111...021111120.0.00..3211112222223.</Line><Line>..0011222212202111111131...00000...000000000.0......211222333333.</Line><Line>...222222222222..2221112...0...........S.....0......2222333......</Line><Line>.......................................0000000...................</Line><Line>.................................................................</Line><BonusInfo><Bonus r=\"5\"/></BonusInfo><CheckPoints/><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"0\"><Rect x=\"58\" y=\"6\" width=\"3\" height=\"3\"/><Timer initTime=\"570\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il11\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundGnome</Style><Line>....................................................</Line><Line>.....0000000000000..................................</Line><Line>....001111111111100.................................</Line><Line>....011S1S1S1S1S110.................................</Line><Line>....011111212111110.................................</Line><Line>....011S1100011S110.................................</Line><Line>....011121000121110.................................</Line><Line>....011S1100011S110.................................</Line><Line>....011111212111110.................................</Line><Line>....011S1S1S1S1S110.................................</Line><Line>....001111111111100.................................</Line><Line>.....1+++++H+++++1..................................</Line><Line>....151111111111151.................................</Line><Line>....n5nnnnnnnnnnn5n.................................</Line><Line>....333333333333333.................................</Line><Line>....222222222222222.................................</Line><Line>..R.666666666666666.................................</Line><Line>..V.7777777H7777777.V...............................</Line><Line>....555555505555555.L...............................</Line><Line>. R.666666606666666.................................</Line><Line>....555555505555555.L...............................</Line><Line>....111111101111111.................................</Line><Line>...........0........................................</Line><Line>.........10001......................................</Line><Line>.......111101111....................................</Line><Line>....111112202211111.................................</Line><Line>....111122555221111.................................</Line><Line>....111325555523111.................................</Line><Line>.....113351B153311..................................</Line><Line>......22255555222...................................</Line><Line>.....1..1111111..1..................................</Line><Line>.....1111111111111..................................</Line><Line>.....1111111111111...................11111..........</Line><Line>......11111111111.......00000...22211111115.0000000.</Line><Line>.......111000111......+0000000..2221111115000.....0.</Line><Line>...........0........+1+S0000000..2211111115001111.0.</Line><Line>...........0........0.0S0000000..2211111151101001.0.</Line><Line>...........00000555B+++S000000000221111B5111000L1.e.</Line><Line>....................0.0S0000000..2211111151101001.0.</Line><Line>....................+1+S0000000..2211111115001111.0.</Line><Line>......................+0000000..2221111115000.....0.</Line><Line>........................00000...22211111115.0000000.</Line><Line>.....................................11111..........</Line><Line>....................................................</Line><BonusInfo><Bonus r=\"5\"/><Bonus r=\"16\"/><Bonus r=\"3\"/><Bonus r=\"10\"/><Bonus r=\"3\"/><Bonus r=\"16\"/><Bonus r=\"16\"/><Bonus r=\"16\"/><Bonus r=\"3\"/><Bonus r=\"6\"/><Bonus r=\"5\"/><Bonus r=\"5\"/></BonusInfo><CheckPoints><Point x=\"12\" y=\"7\" r=\"2\"/><Point x=\"11\" y=\"40\" r=\"3\"/></CheckPoints><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"5\"><Rect x=\"10\" y=\"38\" width=\"3\" height=\"3\"/><Timer initTime=\"511\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il12\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundDragon</Style><Line>...................</Line><Line>.........1.........</Line><Line>........101........</Line><Line>.......10001.......</Line><Line>......1000001......</Line><Line>.....101000101.....</Line><Line>....11111111111....</Line><Line>...1111111111111...</Line><Line>..111111111111111..</Line><Line>.2111111.1.1111112.</Line><Line>.2211111.1.1111122.</Line><Line>..22.111.1.111.22..</Line><Line>.........1.........</Line><Line>.....115020511.....</Line><Line>..1111151B1511111..</Line><Line>..111115010511111..</Line><Line>..111115555511111..</Line><Line>...1111111111111...</Line><Line>...1111111111111...</Line><Line>...1111221221111...</Line><Line>.....111111111.....</Line><Line>......211B112......</Line><Line>..01111..1..11110..</Line><Line>.0111111.1.1111110.</Line><Line>.R11111..V..11111L.</Line><Line>.5111111.1.1111115.</Line><Line>.1111111.1.1111111.</Line><Line>.11111100000111111.</Line><Line>.11111111011111111.</Line><Line>.55555...0...55555.</Line><Line>...111...1...111...</Line><Line>...11111.1.11111...</Line><Line>..111111.1.111111..</Line><Line>.11111111V11111111.</Line><Line>.11111111311111111.</Line><Line>.11112222122221111.</Line><Line>.11111111111111111.</Line><Line>.11111111111111111.</Line><Line>.......11111.......</Line><Line>.11111...B...11111.</Line><Line>.1111111.1.1111111.</Line><Line>..111211000112111..</Line><Line>...1112001002111...</Line><Line>....11121112111....</Line><Line>..m..111111111..m..</Line><Line>..mm..S11H11S..mm..</Line><Line>..m...1112111...m..</Line><Line>.....1112m2111.....</Line><Line>....11m2m1m2m11....</Line><Line>...1112111112111...</Line><Line>..11m211111112m11..</Line><Line>.11121111011112111.</Line><Line>.11211110001111211.</Line><Line>.12111100000111121.</Line><Line>.11111100e00111111.</Line><Line>.11111111111111111.</Line><Line>...................</Line><BonusInfo><Bonus r=\"5\"/><Bonus r=\"2\"/><Bonus r=\"8\"/><Bonus r=\"2\"/><Bonus r=\"8\"/><Bonus r=\"6\"/><Bonus r=\"4\"/><Bonus r=\"7\"/></BonusInfo><CheckPoints/><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"0\"><Rect x=\"8\" y=\"51\" width=\"3\" height=\"3\"/><Timer initTime=\"421\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il13\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundGnome</Style><Line>..................................................</Line><Line>.................................111111111........</Line><Line>.........................00000...1111111111.11....</Line><Line>........................0011100.....1111611121....</Line><Line>.......................001111100..5111111111111...</Line><Line>.......................011151110.5511111111121000.</Line><Line>.....0000000000000000000115B5110S0001121611111000.</Line><Line>........1.1............011151110.5511111111121000.</Line><Line>....111.1.1.111........001111100..5111111111111...</Line><Line>.1..11222222211..1......0011100.....1111611121....</Line><Line>.11m.12M222M21.m11.......00000...1111111111.11....</Line><Line>..1m1.2M222M2.1m1................111111111........</Line><Line>..1m112B222B211m11................................</Line><Line>.1mmm1MMM2MMM1mmm1................................</Line><Line>.11m111m111m111m11................................</Line><Line>.55555555555555555................................</Line><Line>.55111111111111155.........e......................</Line><Line>..5511111H1111155......511000115..................</Line><Line>...5111112111115.....5551111111555................</Line><Line>.....115111511.......5111111111115................</Line><Line>.....1551B1551.......5511111111155................</Line><Line>.....111555111.......5511111111155................</Line><Line>.....110111011.......111.01110.111................</Line><Line>.....1700B0071.......1111.212.1111................</Line><Line>.......11011.........1111111111111................</Line><Line>......1111111........1111110111111................</Line><Line>.....111111111.......111.11111.111................</Line><Line>.....111010111...SS..1111111111111................</Line><Line>.....110000011..0SS0..11100000111.................</Line><Line>......00.0.00..0S..S0..111101111..................</Line><Line>.........0....0S.33.S0.....0......................</Line><Line>.........00000B0SSSS0B000000......................</Line><Line>..............0S.33.S0............................</Line><Line>...............0S..S0.............................</Line><Line>................0SS0..............................</Line><Line>.................SS...............................</Line><Line>..................................................</Line><BonusInfo><Bonus r=\"5\"/><Bonus r=\"4\"/><Bonus r=\"4\"/><Bonus r=\"7\"/><Bonus r=\"2\"/><Bonus r=\"3\"/><Bonus r=\"5\"/><Bonus r=\"5\"/></BonusInfo><CheckPoints><Point x=\"26\" y=\"5\" r=\"1\"/><Point x=\"8\" y=\"8\" r=\"2\"/><Point x=\"12\" y=\"32\" r=\"3\"/><Point x=\"21\" y=\"30\" r=\"2\"/><Point x=\"50\" y=\"30\" r=\"3\"/></CheckPoints><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"0\"><Rect x=\"46\" y=\"29\" width=\"3\" height=\"3\"/><Timer initTime=\"421\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il14\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>WaterTurtle</Style><Line>.................................................</Line><Line>............1...........1...........1............</Line><Line>...........1B1...000...1B1...000...1B1...........</Line><Line>..........11111110.01111111110.01111111..........</Line><Line>.........1111111.....1111111.....1111111.........</Line><Line>........111111111...111111111...111111111........</Line><Line>.......11111111111.11111111111.11111111111.......</Line><Line>......1111111111111111111111111111111111111......</Line><Line>.....111111111.111111112U211111111.111111111.....</Line><Line>....11111112U2.111111111.111111111.2U21111111....</Line><Line>...11111111111..1111111...1111111..11111111111...</Line><Line>..111101111111...11111.....11111...111111101111..</Line><Line>.11110C011111.....111.......111.....111110C01111.</Line><Line>..1111011111.......1.........1.......1111101111..</Line><Line>...1111111111.......................1111111111...</Line><Line>....1111111111.....................1111111111....</Line><Line>.....1111111111...................1111111111.....</Line><Line>......1111111111.................1111111111......</Line><Line>.......111111111.................111111111.......</Line><Line>.......111111111.................111111111.......</Line><Line>......1111111111.................1111111111......</Line><Line>......1111111111.................1111111111......</Line><Line>.....1111111111.........0.........1111111111.....</Line><Line>.....1111111110.......B.H.B.......0111111111.....</Line><Line>.....11111111110........0........01111111111.....</Line><Line>.....111111511110.......0.......011115111111.....</Line><Line>.....0111155511110......0......0111155511110.....</Line><Line>......0111155011110....000....0111105511110......</Line><Line>.......0111100011110..10101..0111100011110.......</Line><Line>........0111105511110.01010.0111155011110........</Line><Line>.........011115551111.10101.111155511110.........</Line><Line>..........01111511111.U1U1U.11111511110..........</Line><Line>...........0111111111.10101.1111111110...........</Line><Line>............011111111111011.110111110............</Line><Line>.............01111111110101.10001110.............</Line><Line>..............0111111111111.1e01110..............</Line><Line>...............111111111111.111111...............</Line><Line>.................111111111...111.................</Line><Line>.................................................</Line><BonusInfo><Bonus r=\"8\"/><Bonus r=\"8\"/><Bonus r=\"8\"/><Bonus r=\"7\"/><Bonus r=\"8\"/><Bonus r=\"8\"/><Bonus r=\"6\"/><Bonus r=\"6\"/><Bonus r=\"3\"/><Bonus r=\"2\"/><Bonus r=\"3\"/><Bonus r=\"2\"/><Bonus r=\"2\"/><Bonus r=\"2\"/></BonusInfo><CheckPoints><Point x=\"40\" y=\"25\" r=\"4\"/><Point x=\"35\" y=\"33\" r=\"3\"/><Point x=\"13\" y=\"33\" r=\"2\"/><Point x=\"8\" y=\"25\" r=\"4\"/><Point x=\"24\" y=\"4\" r=\"4\"/><Point x=\"24\" y=\"20\" r=\"2\"/></CheckPoints><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"4\"><Rect x=\"23\" y=\"17\" width=\"3\" height=\"3\"/><Timer initTime=\"450\"/><UV u=\"3\" v=\"0\"/><Map><Line>FFF</Line><Line>FFF</Line><Line>FFF</Line></Map></EnergyReceiver></EnergyReceivers></Level><Level name=\"il15\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundGnome</Style><Line>..................................</Line><Line>.......000........................</Line><Line>....110010011.....................</Line><Line>.....1111111......................</Line><Line>....111111111.....................</Line><Line>....111111111.....................</Line><Line>....111121111.....................</Line><Line>.....1.1B1.1......................</Line><Line>........0.........................</Line><Line>........0.........................</Line><Line>........0.........................</Line><Line>.....111S111...........0000000000.</Line><Line>....1111V1111.....1111.e........0.</Line><Line>...11111S11111....1111101111111.0.</Line><Line>..0000000000000...1111000111111.0.</Line><Line>.D0.L.............111R111111111.S.</Line><Line>.RS.US11111111L...1111111111111.0.</Line><Line>..0.S6666666666...111111111111R.S.</Line><Line>..0.11111111111...SSSSSSSSSSSSS.0.</Line><Line>.D0.L1111111111...D31111111110000.</Line><Line>..0.2S22S2S2S22...3111111111110.0.</Line><Line>.RS.55555555555...1111111111111.0.</Line><Line>..0.11111111111...1111111111111.S.</Line><Line>..0.11111111111...1111111111111.0.</Line><Line>.D0.1111111111L...2222222222222.0.</Line><Line>.RS.55555555555...3333333333333.0.</Line><Line>..0.11111111111...R66666666666R.U.</Line><Line>.D0.L1111111111.................0.</Line><Line>.RS.55555555555.................0.</Line><Line>..0.11111111111..0000000000000000.</Line><Line>..S.11111H11111..0................</Line><Line>..0..111222111...0................</Line><Line>..00.11111111...00................</Line><Line>...000000000000000................</Line><Line>......111111......................</Line><Line>..................................</Line><BonusInfo><Bonus r=\"2\"/><Bonus r=\"2\"/><Bonus r=\"1\"/><Bonus r=\"4\"/><Bonus r=\"12\"/><Bonus r=\"2\"/><Bonus r=\"2\"/><Bonus r=\"12\"/><Bonus r=\"2\"/><Bonus r=\"2\"/><Bonus r=\"4\"/><Bonus r=\"6\"/><Bonus r=\"2\"/><Bonus r=\"1\"/><Bonus r=\"18\"/><Bonus r=\"2\"/><Bonus r=\"11\"/><Bonus r=\"2\"/><Bonus r=\"5\"/><Bonus r=\"1\"/><Bonus r=\"4\"/><Bonus r=\"2\"/><Bonus r=\"9\"/></BonusInfo><CheckPoints><Point x=\"32\" y=\"12\" r=\"1\"/><Point x=\"32\" y=\"6\" r=\"1\"/><Point x=\"25\" y=\"6\" r=\"1\"/><Point x=\"17\" y=\"6\" r=\"1\"/><Point x=\"8\" y=\"2\" r=\"3\"/><Point x=\"2\" y=\"6\" r=\"1\"/><Point x=\"2\" y=\"8\" r=\"1\"/><Point x=\"2\" y=\"11\" r=\"1\"/><Point x=\"2\" y=\"16\" r=\"1\"/><Point x=\"9\" y=\"36\" r=\"1\"/></CheckPoints><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"0\"><Rect x=\"7\" y=\"32\" width=\"3\" height=\"3\"/><Timer initTime=\"464\"/></EnergyReceiver></EnergyReceivers></Level><Level name=\"il16\"><Chips><Chip n=\"19\"/><Chip n=\"18\"/><Chip n=\"17\"/><Chip n=\"16\"/></Chips><Style>GroundGryphon</Style><Line>.................</Line><Line>.0000.3333333333.</Line><Line>.0000.3333333333.</Line><Line>.1000.3333333333.</Line><Line>.5....3223333223.</Line><Line>.5.3333333233333.</Line><Line>.5.3333332233333.</Line><Line>.5.3322333333323.</Line><Line>.5..332333333223.</Line><Line>.10.332222222233.</Line><Line>.0e.333333333333.</Line><Line>.................</Line><BonusInfo/><CheckPoints/><EnergyReceivers><Texture name=\"#Receivers_1\"/><EnergyReceiver cameraSens=\"0\"><Rect x=\"2\" y=\"8\" width=\"3\" height=\"3\"/><Timer initTime=\"421\"/></EnergyReceiver></EnergyReceivers></Level></Levels>";
textxml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><Texts><menu_buttons><button text=\"Sound On\" x=\"0\" y=\"0\" funct=\"FSound\"/><button text=\"Download\" x=\"0\" y=\"40\" funct=\"FDownload\"/><button text=\"Restart level\" x=\"0\" y=\"80\" funct=\"FRestartLevel\"/><button text=\"New game\" x=\"0\" y=\"120\" funct=\"FNewGame\"/><button text=\"Resume\" x=\"0\" y=\"160\" funct=\"FResume\"/><button text=\"Sound Off\" x=\"175\" y=\"0\" funct=\"FSound\"/></menu_buttons><string id=\"DownloadLink\" value=\"http://www.playrix.com/4-elements.html\"/><string id=\"NagTime\" value=\"2\"/><string id=\"MaxLevel\" value=\"21\"/><string id=\"TextDownload\" text=\"Download\"/><string id=\"TextPlay\" text=\"Start\"/><string id=\"TextMenu\" text=\"Menu\"/><string id=\"TextMap\" text=\"Map\"/><string id=\"TextHint\" text=\"Hint\"/><string id=\"TextScore\" text=\"Score: \"/><string id=\"TextLevel\" text=\"Level \"/><string id=\"TextLoading\" text=\"Loading\"/><string id=\"TextContinue\" text=\"Continue\"/><string id=\"TextRestart\" text=\"Restart\"/><string id=\"TextClickToContinue\" text=\"Click to continue...\"/><string id=\"TextOk\" text=\"Ok\"/><string id=\"TextYes\" text=\"Yes\"/><string id=\"TextNo\" text=\"No\"/><string id=\"TextHelp\" text=\"How to play\"/><string id=\"TextLevelComplete\" text=\"Level Complete!\"/><string id=\"TextTip\" text=\"TIP:\"/><string id=\"TextSolved\" text=\"SOLVED\"/><string id=\"TextLose\" text1=\"Out of time!\" text2=\"No more moves!\"/><string id=\"TextStatistics\" text=\"Statistics\"/><string id=\"TextLevelTime\" text=\"Level Time:\" textSeconds=\" s\"/><string id=\"TextTimeBonus\" text=\"Time Bonus:\"/><string id=\"TextChain\" text=\"Longest Chain:\"/><string id=\"TextTiles\" text=\"Tiles Filled:\"/><string id=\"TextLevelScore\" text=\"Level Score:\"/><string id=\"TextTotalScore\" text=\"Total Score:\"/><string id=\"TextNewGame\" text=\"Do you really want to start a new game?\"/><string id=\"TextEarth\" text=\"EARTH\"/><string id=\"TextSpyPieces\" text=\"Pieces left:\"/><string id=\"TextSpyReady\" text=\"Ready for use\"/><string id=\"TextSpy_key\" text=\"Key\"/><string id=\"TextSpy_axe\" text=\"Pickaxe\"/><string id=\"TextSpy_lamp\" text=\"Lamp\"/><string id=\"TextSpy_watering_can\" text=\"Watering can\"/><string id=\"TextSpy_earth_dragon\" text=\"Dragon statue\"/><string id=\"TextSpy_earth_chest\" text=\"Locked chest\"/><string id=\"TextSpy_earth_stones\" text=\"Rockfall\"/><string id=\"TextSpy_earth_bush\" text=\"Dried tree\"/><string id=\"TextLevel0\" text=\"Dwarf\"/><string id=\"TextLevel1\" text=\"Knight\"/><string id=\"TextLevel2\" text=\"Dragon\"/><string id=\"TextLevel3\" text=\"Griffin\"/><string id=\"Text1Level\" text=\"Clear the way for the energy|to reach the altar!\" x=\"250\" y=\"80\"/><string id=\"TextBonus1\" text=\"Spade power-up #BonusCharged#% charged.\"/><string id=\"TextBonus2\" text=\"Bomb power-up #BonusCharged#% charged.\"/><string id=\"WISE_TIP1\" text=\"When you create a chain of 5 or more pieces, it results in an explosion at its end. The blast removes pieces and clears tiles.\"/><string id=\"WISE_TIP2\" text=\"The longer the chain of pieces is, the more powerful the explosion at its end will be.\"/><string id=\"WISE_TIP3\" text=\"You can knock stones off the game field by an explosion from a long chain.\"/><string id=\"WISE_TIP4\" text=\"The Flaming Arrows can be activated not only by the flowing energy of the Element but also by other arrows hitting them.\"/><string id=\"WISE_TIP5\" text=\"Use the Spade power-up in narrow areas when it is hard to make a chain of 3 or more pieces.\"/><string id=\"WISE_TIP6\" text=\"The ice can be broken not only by using the frozen piece in a chain with matching ones but also with an explosion from a long chain.\"/><string id=\"WISE_TIP7\" text=\"The Spade power-up cannot be used on frozen pieces.\"/><string id=\"WISE_TIP8\" text=\"The Flaming Arrows remove everything in their way, including frozen pieces, stones and even stone slabs.\"/><string id=\"WISE_TIP9\" text=\"Use the Bomb power-up to easily get through piles of stone and ice.\"/><string id=\"WISE_TIP10\" text=\"An explosion that you get by making a long chain of pieces removes one layer of ground in the tiles within the range of the blast.\"/><string id=\"WISE_TIP11\" text=\"Small images of pieces next to the power-ups below the game field show which pieces you need to make chains with in order to charge a particular power-up.\"/><string id=\"WISE_TIP12\" text=\"You can use the Bomb power-up not only to remove obstacles like stones and frozen pieces from your way.\"/><string id=\"WISE_TIP13\" text=\"If you select a fairly long chain you will see vibrating pieces at its end. They show the range of the resulting explosion.\"/><string id=\"WISE_TIP14\" text=\"When you can't make a chain of pieces to clear the way for the energy, it might be a good idea to use the power-ups you've charged.\"/><string id=\"WISE_TIP15\" text=\"If you can't make a chain of 3 or more pieces for the energy to flow further, try to make chains in other available areas of the game field.\"/><string id=\"WISE_TIP16\" text=\"The Flaming Arrow clears only one layer of ground in its way.\"/><string id=\"TextHint0\" text=\"Good job! We've got the Earth Magic key and now we can open the first book of elemental magic!\"/><string id=\"TextHint1\" text=\"This is the magic energy of the Earth. It flows through the tiles you've cleared. You need to clear tiles to create a path for it all the way to the altar.\"/><string id=\"TextHint2\" text=\"To complete the level, clear tiles on the game field and drive the elemental energy to the altar.\"/><string id=\"TextHint3\" text=\"Here's the multi-level ground the mage has warned us about. You'll have to remove the tiles several times to clear the way for the energy.\"/><string id=\"TextHint4\" text=\"The further you go, the more challenges you will face on your way. Now you have to deal with frozen pieces. To break the ice you need to make a chain of three or more pieces including the frozen one.\"/><string id=\"TextHint5\" text=\"You need to make chains of three or more matching pieces to clear tiles. Make a chain with these three pieces to see how it works!\"/><string id=\"TextHint6\" text=\"Not always will you see the magic altar on the game field. This arrow will tell you which direction you should go in to reach it.\"/><string id=\"TextHint7\" text=\"The liquid in this vessel shows how much time you have left to complete the level.\"/><string id=\"TextHint8\" text=\"Watch the time! There is not much left!\"/><string id=\"TextHint9\" text=\"Hi! I told the mage about the challenges we face on our way and he gave us a magic power-up we can use - a Spade. But you need to charge it before it can be utilized.\"/><string id=\"TextHint10\" text=\"The mage continues to follow our progress. Now we have one more power-up - a Bomb! Use it to remove several pieces or stones from the game field.\"/><string id=\"TextHint11\" text=\"However, it is still dark in here and I don't think we'll be able to find other items. Let's use the lamp we found! Click on the lamp to pick it up.\"/><string id=\"TextHint12\" text=\"Wow, this is a Flaming Arrow. The ancients surely knew how to properly use the power of the 4 Elements. Drive the energy to this bonus and the arrow will shoot, clearing all pieces in its way!\"/><string id=\"TextHint13\" text=\"This is a stone. You can't make a chain of matching pieces with it or through it.\"/><string id=\"TextHint14\" text=\"This is a stone slab. You can neither clear nor move it.\"/><string id=\"TextHint15\" text=\"Most levels do not fit onto the screen. The map will guide you and help you find the way. To see the map, press this button.\"/><string id=\"TextHint16\" text=\"Oops... the time has run out. Keep your chin up, let's try again!\"/><string id=\"TextHint17\" text=\"So, here are the two cards. Spot all the differences between them.\"/><string id=\"TextHint18\" text=\"If you need my help, press this button.\"/><string id=\"TextHint19\" text=\"These light indicators show how many differences are still to be found. Every time you find a difference a red indicator will turn green.\"/><string id=\"TextHint20\" text=\"This is a dragon statue. You can hang the lantern here.\"/><string id=\"TextHint21\" text=\"Hooray! Seems like you've found the key! Click on it to pick it up from the altar!\"/><string id=\"TextHint22\" text=\"Well done! The first magic card is restored! There is just one more task left. You need to compare it to the original and eliminate all the differences. Only then will the card recover its magic power!\"/><string id=\"TextHint23\" text=\"Splendid! The first card has been fully restored! But to bring back the full power of Earth to our world, you need to collect and restore three more cards.\"/><string id=\"TextHint24\" text=\"The open Book of Earth Magic is in front of you. It once contained magic cards with images of magical creatures and heroes of the element. But when the altars were destroyed the images disappeared.\"/><string id=\"TextHint25\" text=\"You need to restore the content of the book and thus bring back its magic power. Then the power of Earth will return to our world. Now it is time to go.\"/><string id=\"TextHint26\" text=\"The Book of Earth Magic is now restored! The fields of the magic land will become fertile again and its inhabitants will no longer starve. You are our hero! However, this is just one of the 4 Elements. A long journey lies ahead of us.\"/><string id=\"TextHint27\" text=\"We have restored one of the altars of Earth Magic! Now I can revive some of the magic power of the book.\"/><string id=\"TextHint28\" text=\"Wow!... I feel the key is somewhere here. But when it's pitch dark like this we won't find a thing. We need a lamp!\"/><string id=\"TextHint29\" text=\"The lamp looks like this. But it is broken and its pieces are scattered around the cave. You need to collect them all.\"/><string id=\"TextHint30\" text=\"I can see a piece of the lamp!|Click on it to pick it up.\"/><string id=\"TextHint31\" text=\"And here's another piece!|Click on it!\"/><string id=\"TextHint32\" text=\"Well, we have the light. Now you need to collect and use the other items to get the key to the book. Press this button in case you need my help.\"/><string id=\"TextHint33\" text=\"The Book of Earth Magic is free from the bonds. Click on the book to open it.\"/><string id=\"TextHint34\" text=\"Hi! I am a fairy. I was sent by the mage to help you in your difficult mission. Here are four ancient books of magic. You need to restore their power, so that peace and prosperity could return to this magic land. But first you will have to remove the bonds of an evil spell. I will help you find the key. Press Start and let's go!\"/><string id=\"TextHint35\" text=\"And here there used to be ancient writings full of wisdom. But after the disaster came to pass, all the letters got mixed up. The writings lost their meaning and along with it, their magic power.\"/><string id=\"TextHint36\" text=\"Hooray, you did it! The Spade power-up is charged now! You can use it to clear any tile on the game field.\"/><string id=\"TextHint37\" text=\"Excellent! You've charged the new Bomb power-up. Now you can use it!\"/><string id=\"TextHint38\" text=\"The Spade power-up can clear the ground in any tile. However it will only work if you use it on a tile that hasn't been cleared yet.\"/><string id=\"TextHint39\" text=\"You decided to try the new power-up? I can't wait to see it in action! Choose an area of pieces you'd like to explode.\"/><string id=\"TextHint40\" text=\"The image next to the power-up shows which pieces you need to match to charge it.\"/><string id=\"TextHint41\" text=\"The more pieces you match in a row the more energy is added to the power-up. This bar shows you when the power-up is fully charged.\"/><string id=\"TextHint42\" text=\"Excellent! We are now working on the second card! If you'd like to see the cards you've already restored, click on the corresponding bookmark!\"/><string id=\"TextHint43\" text=\"This is a treasure chest.|You can open it with a key.\"/><string id=\"TextHint44\" text=\"There used to be a passage here.|Try to clear it using the pickaxe.\"/><string id=\"TextHint45\" text=\"Oh, the tree has dried up!|You need to water it.\"/><string id=\"TextHint46\" text=\"I see you are having some difficulties. This looks like a tough spot. But remember, you've got the Spade power-up!\"/><string id=\"TextHint47\" text=\"I see you are having some difficulties. This looks like a tough spot. Charge the Spade power-up.\"/><string id=\"TextBook0\" text=\"Deep under the ground lives|a mysterious race - the Dwarves.|They are stocky, long-bearded,|wise and strong. The underground|palaces they dwell in are|fascinating in their beauty.|Their skillful hands create|amazing things. They are kind|and generous. Yet they will|never submit to those with|mercenary intentions.\"/><string id=\"TextBook1\" text=\"Brave Knights of Earth secure|peace for the inhabitants of|the Magic land. Best of the best|from the human race, they are|known for their strength and|endurance, vigilance and agility.|Their life is full of danger and|adventure. Birds and animals,|the wind and the trees - all|the powers of nature aid|them in their mission.\"/><string id=\"TextBook2\" text=\"Right in the heart of an ancient|forest lies a cave which holds|immeasurable riches of the Earth.|The cave is guarded by a dragon!|It will do no harm and is generous|to the one who finds the way to|the hidden treasure. But the Dragon|is sly and will not tell that the|glitter of gold is deceitful and|misleading. Its true value is|knowledge and wisdom!\"/><string id=\"TextBook3\" text=\"There's a place at the end of|the Earth where it meets the sky.|There at the foot of the high|mountain grows the Tree of Life.|Its fruit grant eternal life.|No one has ever been able to try|it for it is guarded by the|vigilant Griffin who keeps the|Tree under constant watch. It|can read one's mind and has the|strength of a lion and the|eye of an eagle.\"/><string id=\"TextNagFeatures\" text1=\"Download the Full Version|for Free and enjoy|these features:\"text2=\"- 4 books of magic to unlock and study|- 16 mysterious cards to collect|- 64 captivating levels with 20| challenging bonus tasks|- Gripping storyline presented in| beautiful animation|- Stunning visual effects and| fantastic bonuses|- Fully animated adorable little| fairy as your aide\"t1x=\"145\" t2x=\"35\" t1y=\"80\" t2y=\"170\"/><string id=\"TextNagComplete\" text1=\"Good Job!||You've restored the Book of Earth Magic! Now the power of Earth will return to the magic world.\"text2=\"Do you think you have what it takes to continue this perilous journey and restore 3 more books of magic to save the kingdom in the Full Version of 4 Elements?\"t1x=\"190\" t2x=\"185\" t1y=\"130\" t2y=\"260\"/><string id=\"TextNagNew\" text1=\"\" text2=\"You are welcome to try again or get a fresh start in the Full Version of 4 Elements\" t1x=\"190\" t2x=\"190\" t1y=\"150\" t2y=\"210\"/></Texts>";
stop();
Stage.scaleMode = "noScale";
Stage.showMenu = false;
this._lockroot = true;
loadline._visible = false;
if (!Path) {
Path = "";
}
var VersionPl = String($version).split(" ")[1].split(",")[0];
var LGXML = (new GameClasses.LoadGameXML(this, "ISpyLevelxml", "levelxml", "textxml", Loading));
Frame 4
function TextShow(Inside, Str, l, W, H, C, WT, HT, format, underline, SC, EC, ROT, BOL) {
function Attach(STR) {
if (att) {
Inside.TEXT.attachMovie(STR + l, 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._y = Y;
if (Inside.TEXT[U]._width != undefined) {
wid = Inside.TEXT[U]._width;
X = X + (wid + W);
Len++;
}
}
function AttachLetter(InS, Str) {
InS.createTextField("TEXT", InS.getNextHighestDepth(), 0, -10, 0, 0);
InS.TEXT.multiline = true;
InS.TEXT.embedFonts = (l == "GameFont") || (l == BOL);
InS.TEXT.autoSize = "left";
InS.TEXT.selectable = false;
var format = new TextFormat();
format.font = l;
format.size = WT;
format.bold = true;
format.color = HT;
format.align = "left";
format.leftMargin = 0;
format.rightMargin = 0;
InS.TEXT.text = Str;
InS.TEXT.setTextFormat(format);
if ((InS.TEXT._width < 5) || (l == "gradient")) {
format.font = BOL;
InS.TEXT.embedFonts = true;
InS.TEXT.text = Str;
InS.TEXT.setTextFormat(format);
}
if (l == "gradient") {
var Wi = InS.TEXT._width;
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 - 10;
InS.s.setMask(InS.TEXT);
}
}
if (!Inside) {
return(undefined);
}
if ((l == undefined) || (l == "0")) {
l = "GameFont";
W = -2;
H = 12;
C = 1;
WT = 18;
HT = _root.FontWhite;
}
if ((H == 0) || (H == undefined)) {
H = 12;
}
if (!BOL) {
BOL = "GameFont";
} else if (l != "gradient") {
l = BOL;
}
if (l == "BOLDFONT") {
WT = WT - 5;
}
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(Str.substr(0, 1) + l, "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);
var i = 0;
while (i < Str.length) {
var j = Str.substr(i, 1);
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) {
HT = underline;
if (l == "gradient") {
l = BOL;
}
for (var NNN in Inside.TEXT) {
var mc1 = Inside.TEXT[NNN];
var mc2 = mc1.duplicateMovieClip(mc1._name + "S", mc1.getDepth() - 5000);
mc2._x = mc1._x + 1;
mc2._y = mc1._y + 1;
if (att) {
var Ccc = new Color(mc2);
Ccc.setRGB(underline);
} else {
AttachLetter(mc2, mc1.TEXT.text);
}
}
}
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 InitSpy(N) {
_root.GameStatus = "spy";
GameClasses.GFunctions.ClearAll(_root, 1, 1);
if (N == undefined) {
N = 0;
}
var _local6 = _root.ISPY_Level[N];
var _local19 = _root.createEmptyMovieClip("SPY", 50);
_local19.attachMovie("spy_fon_" + N, "spy_fon_" + N, 0);
_local19.attachMovie("spy_border_" + N, "spy_border_" + N, 1);
Ramka = _local19.attachMovie("ramka_SPY", "ramka_SPY", 2);
Items = _local19.createEmptyMovieClip("Items", 20);
FLY = _local19.createEmptyMovieClip("FLY", 30);
_root.InitHintButton(Ramka.hint, GameClasses.GFunctions.create(this, ShowSPYHint), 30000);
FLY.attachMovie("button_uzk_s", "Menu", 9, {_x:36, _y:12});
FLY.Menu.InitFunction(_root.ShowMenu);
FLY.Menu.InitText(_root.TextMenu.text);
_root.TextShow(Ramka.hint.Text, _root.TextHint.text, undefined, W, H, C, WT, HT, 1000, 0);
var _local11 = _local6[0];
var _local10 = 1;
var _local20 = _root.GetBlack(Items, 0);
_local20.onPress = FailPressSPY;
_local20._height = 300;
var _local7 = 0;
while (_local7 < _local11.length) {
var _local3 = _local11[_local7];
var _local4 = Items.attachMovie(_local3.objectId, _local3.objectId, ((_local11.length - _local7) * 2) + 10);
_local4._x = int(_local3.x) * 0.65;
_local4._y = 390 - (int(_local3.y) * 0.65);
_local4._xscale = Number(_local3.xZoom) * 100;
_local4._yscale = Number(_local3.yZoom) * 100;
_local4._rotation = -Number(_local3.angle);
_local4._visible = _local3.visible == "true";
if (_local3.splitItemId) {
_local4.offsetx = _local3.offsetx;
_local4.offsety = _local3.offsety;
_local4.splitItemId = _local3.splitItemId;
_local4.onPress = GameClasses.GFunctions.create(this, FlyToPic, _local4);
if (Ramka[_local3.splitItemId] == undefined) {
var _local9 = Ramka["e" + _local10];
_local9.attachMovie("black", "BL", 99, {_x:-30, _y:-30, _width:60, _height:60, _alpha:0});
Ramka["e" + _local10]._name = _local3.splitItemId;
Ramka["ee" + _local10]._name = _local3.splitItemId + "1";
Ramka[_local3.splitItemId + "1"].count = 0;
_local9.BL.onRollOver = GameClasses.GFunctions.create(_root, _root.ItemOver, _local9, Ramka[_local3.splitItemId + "1"]);
_local10++;
var _local5 = 0;
while (_local5 < _local6[1].length) {
if (_local6[1][_local5].Name == _local3.splitItemId) {
Ramka[_local3.splitItemId].Act = _local6[1][_local5].Act;
Ramka[_local3.splitItemId].id = _local6[1][_local5].id;
break;
}
_local5++;
}
}
Ramka[_local3.splitItemId + "1"].count++;
TextShow(Ramka[_local3.splitItemId + "1"].text, String(Ramka[_local3.splitItemId + "1"].count), "Arial", 0, 0, 1, 16, 16777215);
var _local12 = Ramka[_local3.splitItemId];
var _local8 = _local12.attachMovie(_local3.objectId, _local3.objectId, _local7, {_x:int(_local3.offsetx) * 0.65, _y:(-int(_local3.offsety)) * 0.65});
_local8._x = _local8._x + (_local8._width / 2);
_local8._y = _local8._y - (_local8._height / 2);
} else if (_local3.type == "act") {
_local4.onRollOver = ActItemOver;
_local4.onRollOut = (_local4.onReleaseOutside = ActItemOut);
}
_local4.gotoAndStop(1);
_local4.useHandCursor = false;
_local4.tabEnabled = false;
_local7++;
}
Items.earth_black.onPress = null;
delete Items.lamp_2.onPress;
_root.Hint(28);
}
function ItemOver(MC, MC1) {
var _local2 = "";
_local2 = _local2 + (_root["TextSpy_" + MC._name].text + "|");
if (MC1) {
_local2 = _local2 + ((_root.TextSpyPieces.text + " ") + MC1.count);
} else {
_local2 = _local2 + _root.TextSpyReady.text;
}
_root.ToolTip(MC.BL, _local2);
}
function FailPressSPY() {
_root.FailSPY_s.start(_root.SoundOn);
}
function ShowSPYHint() {
var _local4 = _root.ISPY_Level[0][0];
var _local5 = null;
var _local3 = 0;
while (_local3 < _local4.length) {
var _local2 = _local4[_local3].objectId;
if (((_local4[_local3].splitItemId && (Items[_local2])) && (Items[_local2]._visible == true)) && (Items[_local2].onPress)) {
_local5 = Items[_local2];
break;
}
_local3++;
}
if (_local5) {
_root.SetHint((_local5._width * 2) / 3, (_local5._height * 2) / 3, _local5);
return(true);
}
if (Items.earth_chest._visible) {
_root.SetHint(Items.earth_chest._width / 2, Items.earth_chest._height / 2, Items.earth_chest, 0, 0, 60);
Hint(43);
return(true);
}
if (Items.earth_stones._visible) {
_root.SetHint(Items.earth_stones._width / 2, Items.earth_stones._height / 2, Items.earth_stones, 0, 0, 60);
Hint(44);
return(true);
}
if (Items.earth_bush._visible) {
_root.SetHint(30, 40, Items.earth_bush, 0, 0, 60);
Hint(45);
return(true);
}
}
function ActItemOver() {
if (!this.act) {
this.act = true;
this.gotoAndPlay(2);
ToolTip(this, _root["TextSpy_" + this._name].text, 1);
}
}
function ActItemOut() {
if (this.act) {
ToolTipOut();
this.act = false;
this.gotoAndStop(1);
}
}
function GetYOf(MC) {
if (MC._name == "eath_key") {
return(260);
}
return(Ramka[MC.splitItemId][MC._name]._y + Ramka[MC.splitItemId]._y);
}
function GetXOf(MC) {
if (MC._name == "eath_key") {
return(190);
}
return(Ramka[MC.splitItemId][MC._name]._x + Ramka[MC.splitItemId]._x);
}
function FlyToPic(MC) {
clearInterval(show_key_int);
if (MC._name == "lamp_1") {
Items.lamp_2.onPress = GameClasses.GFunctions.create(this, FlyToPic, Items.lamp_2);
}
_root.FromHint();
_root.SuccessSPY_s.start(_root.SoundOn);
delete MC.onPress;
MC.SHINE.removeMovieClip();
var _local5 = new Spline(MC._x, 220 + random(80), GetXOf(MC));
var _local4 = new Spline(MC._y, 130 + random(40), GetYOf(MC));
var _local6 = new Spline(MC._rotation, 50 + random(100), 0);
var _local7 = Items.createEmptyMovieClip("C" + getTimer(), Items.getNextHighestDepth());
InitShleif(_local7, 50, _local5, _local4, 2000, 0, 0);
clearInterval(_root["flying_to" + MC._name]);
_root["flying_to" + MC._name] = setInterval(Flying, 0, _local5, _local4, _local6, MC, MC._xscale, MC._yscale, getTimer());
}
function Flying(SPx, SPy, Rot, MC, SCx, SCy, T) {
var _local3 = (getTimer() - T) / 2000;
if (_local3 >= 1) {
_local3 = 1;
clearInterval(_root["flying_to" + MC._name]);
Ramka[MC.splitItemId][MC._name].removeMovieClip();
CheckAll(Ramka[MC.splitItemId], MC);
if (MC._name != "earth_key") {
MC.removeMovieClip();
}
}
MC._xscale = SCx + ((100 - SCx) * _local3);
MC._yscale = SCy + ((100 - SCy) * _local3);
MC._x = SPx.getPoint(_local3);
MC._y = SPy.getPoint(_local3);
MC._rotation = Rot.getPoint(_local3);
}
function CheckAll(MC, MC1) {
_root.Hint(31);
Ramka[MC._name + "1"].count--;
TextShow(Ramka[MC._name + "1"].text, String(Ramka[MC._name + "1"].count), "Arial", 0, 0, 1, 16, 16777215);
_root.ItemArriveSPY_s.start(_root.SoundOn);
if (MC1._name == "earth_key") {
_root.Hint(0);
return(260);
}
if (Ramka[MC._name + "1"].count <= 0) {
_root.Hint(11);
MC.attachMovie(MC._name, "D", 10);
MC.attachMovie(MC._name, "S", 5, {_alpha:50});
var _local3 = new Color(MC.S);
_local3.setRGB(0);
Ramka[MC._name + "1"].gotoAndStop(2);
MC.Is = false;
MC.dep = MC.getDepth();
MC.x = MC._x;
MC.y = MC._y;
MC.Timer2 = getTimer() + 100;
_root.SetHint(30, 30, MC, 0, 0);
MC.attachMovie("black", "BL", 99, {_x:-30, _y:-30, _width:60, _height:60, _alpha:0});
MC.onPress = GameClasses.GFunctions.create(this, Move, MC);
MC.onRollOver = function () {
ItemOver(MC);
this.D._y = -4;
this.D._x = -3;
this.S._y = 2;
this.S._x = 2;
};
MC.onRollOut = (MC.onReleaseOutside = function () {
ToolTipOut();
this.D._y = 0;
this.D._x = 0;
this.S._y = 0;
this.S._x = 0;
});
}
}
function Move(MC) {
ToolTipOut();
if (MC.Timer2 < getTimer()) {
MC.Timer2 = getTimer() + 100;
if (_root.Hint_Arr[20] != 1) {
_root.FromHint();
}
_root.Hint(20, GameClasses.GFunctions.create(_root, _root.SetHint, (Items.earth_dragon._width * 1) / 2, (Items.earth_dragon._height * 1) / 2, Items.earth_dragon));
MC.SHINE.removeMovieClip();
var _local4 = FLY.attachMovie(MC._name, MC._name, 99, {_x:MC._x, _y:MC._y});
_local4.id = MC.id;
_local4.Act = MC.Act;
_local4.MC = MC;
Move2(_local4);
MC._visible = false;
_local4.onMouseDown = GameClasses.GFunctions.create(this, Move2, _local4);
}
}
function Move2(MC) {
MC.MC.Timer2 = getTimer() + 100;
if (!MC.Is) {
_root.ClickBonus_s.start(_root.SoundOn);
MC.Is = true;
MC.xx = 0;
MC.yy = 0;
MC.onEnterFrame = Follow;
} else if (MC.Is && (Ramka.bl.hitTest(_root._xmouse, _root._ymouse))) {
_root.ClickBonus_s.start(_root.SoundOn);
MC.MC._visible = true;
MC.removeMovieClip();
} else if (MC.Is && (Items[MC.id].act)) {
_root.addChipInChain_s.start(_root.SoundOn);
Ramka[MC._name + "1"].gotoAndStop(3);
GameClasses.GFunctions.ClearAll(MC.MC, 1, 1, 1);
_root.TextShow(MC.MC, _root.TextSolved.text, "GameFont", -3, 0, 1, 20, 7820629, 1000, 16777215);
MC.MC._visible = true;
delete MC.MC.onPress;
delete Items[MC.id].onRollOver;
delete Items[MC.id].onRollOut;
delete Items[MC.id].onReleaseOutside;
delete Ramka[MC._name].onRollOver;
delete Ramka[MC._name].onRollOut;
delete Ramka[MC._name].onReleaseOutside;
Items[MC.id].gotoAndStop(1);
ACT(MC.Act);
MC.removeMovieClip();
}
}
function ACT(Act) {
ToolTipOut();
_root.FromHint();
_root.Hint(32);
var _local2 = 0;
while (_local2 < Act.length) {
Items[Act[_local2].objectId]._visible = Act[_local2].show == "true";
if (Act[_local2].objectId == "earth_bush_rise") {
Items[Act[_local2].objectId].gotoAndPlay(1);
_root.SetHint(20, 10, Items, Items.earth_key._x, Items.earth_key._y);
} else if (Act[_local2].objectId == "earth_key") {
show_key_int = setInterval(function () {
clearInterval(show_key_int);
_root.Hint(21);
_root.SetHint(20, 10, Items, Items.earth_key._x, Items.earth_key._y);
}, 20000);
}
_local2++;
}
}
function Follow() {
this._x = _root._xmouse - this.xx;
this._y = _root._ymouse - this.yy;
}
function RestartAll() {
}
function RestartAll1() {
GameClasses.GFunctions.ClearAll(_root, 1, 1);
_root.GameLevel++;
_root.InitBooks();
}
function InitDifArr() {
Diff_Ar = [[[116, 201], [120, 282], [0, 36], [164, 43]], [[52, 261], [160, 316], [65, 62], [168, 94]], [[44, 38], [182, 75], [178, 50], [0, 29]], [[179, 93], [39, 292], [184, 81], [16, 52]]];
}
function InitDiff(N) {
_root.GameStatus = "diff";
check_diff_click = getTimer();
GameClasses.GFunctions.ClearAll(_root, 1, 1);
if (N == undefined) {
N = 0;
}
TTTNNN = N;
TotDiff = 4;
Diff_int = new Array(4);
var _local11 = _root.createEmptyMovieClip("Diff", 50);
diff_cur = _local11.attachMovie("diff_cur", "diff_cur", 9);
diff_cur.onEnterFrame = DiffFollow;
var _local7 = _local11.attachMovie("diff_bg", "bg", 0);
var _local10 = _local7.c1.attachMovie("card" + N, "C1", 0);
var _local12 = _local7.c2.attachMovie("card" + N, "C2", 0);
_local7.Menu.onPress = _root.ShowMenu;
_root.TextShow(_local7.Menu.Text, _root.TextMenu.text, undefined, W, H, C, WT, HT, 1000, 0);
_root.TextShow(_local7.hint.Text, _root.TextHint.text, undefined, W, H, C, WT, HT, 1000, 0);
_root.InitHintButton(_local7.hint, GameClasses.GFunctions.create(this, ShowDiffHint, N), 30000);
_local10.gotoAndStop("m5");
_local12.gotoAndStop("m5");
InitDifArr();
_root.Hint(17);
var _local3 = 0;
while (_local3 < 4) {
var _local4 = _local10.attachMovie(("dif_" + N) + _local3, ("d" + N) + _local3, _local3 + 5);
_local4.tabEnabled = false;
_local4._x = Diff_Ar[N][_local3][0] * 0.65;
_local4._y = (228 - (Diff_Ar[N][_local3][1] * 0.65)) - _local4._height;
_local4.onMouseDown = GameClasses.GFunctions.create(this, ActDif, _local4);
var _local6 = _local7.attachMovie("checker", "ch" + _local3, _local3 + 10, {_x:260, _y:320 - (33 * _local3)});
_local6.gotoAndStop(1);
_local3++;
}
}
function ShowDiffHint(N) {
var _local3 = 0;
while (_local3 < 4) {
var _local2 = Diff.bg.c1.C1[("d" + N) + _local3];
if (_local2._visible) {
_root.SetHint((_local2._width * 2) / 3, (_local2._height * 2) / 3, Diff.bg.c2.C2, _local2._x + (_local2._width / 2), _local2._y + (_local2._height / 2));
_root.SetHint((_local2._width * 2) / 3, (_local2._height * 2) / 3, _local2, _local2._width / 2, _local2._height / 2);
return(true);
}
_local3++;
}
}
function ActDif(MC) {
if ((((!_root.menumain) && (!_root.Game_Hint)) && (MC.hitTest(_root._xmouse, _root._ymouse) || (MC.hitTest(diff_cur.cur)))) && ((check_diff_click + 500) < getTimer())) {
_root.GoodClickDiff_s.start(_root.SoundOn);
check_diff_click = getTimer();
MC._visible = false;
TotDiff--;
var _local3 = Diff.bg["ch" + TotDiff];
var _local13 = Diff.createEmptyMovieClip("M1" + getTimer(), Diff.getNextHighestDepth());
var _local12 = Diff.createEmptyMovieClip("M2" + getTimer(), Diff.getNextHighestDepth());
var _local7 = MC._x + (MC._width / 2);
var _local5 = MC._y + (MC._height / 2);
var _local6 = _local3._x + 5;
var _local4 = _local3._y + 5;
var _local11 = new Spline(Diff.bg.c1._x + _local7, 20 + random(20), _local6);
var _local9 = new Spline(Diff.bg.c2._x + _local7, 500 - random(20), _local6);
var _local10 = new Spline(Diff.bg.c1._y + _local5, 200 + random(40), _local4);
var _local8 = new Spline(Diff.bg.c2._y + _local5, 200 + random(40), _local4);
InitShleif(_local13, 60, _local11, _local10, 3000, 0, 1, 0, 1);
InitShleif(_local12, 60, _local9, _local8, 3000, 0, 1, 0, 1);
clearInterval(Diff_int[TotDiff]);
Diff_int[TotDiff] = setInterval(ChangeDiff, 3000, _local3, TotDiff);
delete MC.onMouseDown;
}
}
function ChangeDiff(MC, TF) {
clearInterval(Diff_int[TF]);
MC.gotoAndStop(2);
if (TF == 0) {
_root.LevelComplete_s.start(_root.SoundOn);
ShowLevelComplete();
_root.GameLevel++;
clearInterval(Diff_int[0]);
Diff_int[0] = setInterval(function () {
clearInterval(Diff_int[0]);
_root.InitBooks(1);
}, 8000);
}
}
function InitShleif(MC, N, SPx, SPy, T, sx, sy, type, id) {
if (!type) {
type = "shleif";
}
var _local2 = 0;
while (_local2 < N) {
var _local1 = MC.attachMovie(type, "S" + _local2, _local2, {_x:SPx.getPoint(0), _y:SPy.getPoint(0)});
if (id) {
_local1.id = _local2;
}
_local1._xscale = random(50) + 15;
_local1._yscale = _local1._xscale;
_local1.T = getTimer();
_local1.TT = T;
_local1.SPx = SPx;
_local1.SPy = SPy;
_local1.sx = int(sx);
_local1.sy = int(sy);
_local1.onEnterFrame = RotateShleif;
_local2++;
}
}
function RotateShleif() {
if (getTimer() >= (this.T + this.TT)) {
this.removeMovieClip();
} else if (this._xscale < 10) {
this._xscale = random(50) + 15;
this._yscale = this._xscale;
var _local2 = (getTimer() - this.T) / this.TT;
if (this.id < 20) {
this._x = ((this.SPx.getPoint(_local2) + random(4)) - 2) + this.sx;
this._y = ((this.SPy.getPoint(_local2) + random(4)) - 2) + this.sy;
} else {
this._x = ((this.SPx.getPoint(_local2) + random(20)) - 10) + this.sx;
this._y = ((this.SPy.getPoint(_local2) + random(20)) - 10) + this.sy;
}
} else {
if (this.id < 20) {
this._xscale = this._xscale - (random(100) / 5);
} else {
this._xscale = this._xscale - (random(20) / 5);
}
this._yscale = this._xscale;
this._rotation = this._rotation + 1;
}
}
function DiffFollow() {
if (_root._xmouse > 260) {
this._x = (_root._xmouse - 260) + 10;
} else {
this._x = (_root._xmouse + 260) - 17;
}
this._y = _root._ymouse;
if (!(this.hitTest(this._parent.bg.c1) || (this.hitTest(this._parent.bg.c2)))) {
this._x = -1000;
}
}
function InitArrSlide() {
var _local1 = 0;
while (_local1 < 20) {
Slides_Arr[_local1] = 0;
_local1++;
}
Slides_Arr[0] = (Slides_Arr[1] = 1);
}
function SetLevel() {
if (GameLevel >= MaxLevel.value) {
ShowNag(1);
return(undefined);
}
if (GameLevel == 0) {
InitSpy();
} else if (GameLevel == 5) {
InitDiff(0);
} else if (GameLevel == 10) {
InitDiff(1);
} else if (GameLevel == 15) {
InitDiff(2);
} else if (GameLevel == 20) {
InitDiff(3);
} else {
InitRound();
}
}
function InitBooks(c) {
stopAllSounds();
GameClasses.GFunctions.ClearAll(_root, 1, 1);
_root.attachMovie("Books", "Books", 9, {Open_Book:c});
}
function InitRound() {
Make__Chain = "";
GameClasses.GFunctions.ClearAll(_root, 1, 1);
maxsx = 6;
maxsy = 4;
Chain = new Array();
Matrix = CopyMatrix(LEVELS[Level].map);
Musor = LEVELS[Level].musor;
Bonuses = LEVELS[Level].bonus;
ChangeEnergyReceiver(0);
ChangeCheckPoint(0);
BeginEnergy = FindFirstE();
CurrentI = int(BeginEnergy.i);
CurrentJ = int(BeginEnergy.j);
LastDiameter = Diameter(CurrentI, CurrentJ, CheckPoint.y, CheckPoint.x);
_root.createEmptyMovieClip("game", 10);
_root.attachMovie("black", "GameMask", 20, {_width:520, _height:390});
_root.attachMovie("gamepanel", "gamepanel", 30);
_root.createEmptyMovieClip("recarr", 40);
TIMER = gamepanel.timer;
var RTime = (int(LEVELS[0].energy[0].time) * 1000);
TIMER.onLoad = function () {
this.SetTime(RTime);
};
gamepanel.map.onPress = ShowMap;
gamepanel.Menu.onPress = ShowMenu;
game.onEnterFrame = function () {
if ((this.LastT < getTimer()) || (!this.LastT)) {
this.LastT = getTimer() + 300;
MaskTiles();
}
};
_root.TextShow(gamepanel.map.Text, _root.TextMap.text, undefined, W, H, C, WT, HT, 1000, 0);
_root.TextShow(gamepanel.sc_n, _root.TextScore.text, "GameFont", -2, 0, 2, 16, 0, 1000, 13421772);
_root.TextShow(gamepanel.level, GetLevelString(), "GameFont", -2, 13, 1, 16, 0, 1000, 13421772);
SCORE = new GameClasses.Score(gamepanel.score, int(TotalScore));
gamepanel.Menu.onLoad = function () {
this.InitText(_root.TextMenu.text);
};
game._x = (((-Matrix[0].length) * FonSize) + 520) / 2;
game._y = (((-Matrix.length) * FonSize) + 350) / 2;
recarr._x = 260;
recarr._y = 175;
recarr.attachMovie("recarr", "a", 0, {_x:1000});
recarr.a.PA = 0;
recarr._visible = false;
game.setMask(GameMask);
if (Level == 14) {
MoveField(getTimer(), 300, 0, 0);
} else {
MoveField(getTimer(), 0, 0, 0);
}
maxsx = 5;
maxsy = 3;
score = (Tiles_score = (Chain_score = 0));
DrawField();
DrawFon();
GameStatus = "play1";
if (Level < 8) {
gamepanel.b2._visible = false;
}
if (Level < 4) {
gamepanel.b1._visible = false;
}
start_s.start(SoundOn);
EnergyMove_s.startE();
}
function CanStart() {
GameStatus = "play";
if (Level == 0) {
Hint(5);
} else if (Level == 1) {
Hint(6);
} else if (Level == 2) {
Hint(13);
} else if (Level == 3) {
Hint(12);
} else if (Level == 4) {
Hint(9);
} else if (Level == 5) {
Hint(4);
} else if (Level == 6) {
Hint(15);
} else if (Level == 7) {
Hint(14);
} else if (Level == 8) {
Hint(10);
} else if (Level == 9) {
Hint(3);
}
}
function GetLevelString(C) {
var _local2 = "|";
if (C) {
_local2 = ". ";
}
return(((((TextEarth.text + ": ") + _root["TextLevel" + Math.floor(Level / 4)].text) + _local2) + TextLevel.text) + int(Level + 1));
}
function MaskTiles() {
var _local3 = int((CurrentI - SizeI) - 6);
while (_local3 <= int((CurrentI + SizeI) + 6)) {
var _local2 = int((CurrentJ - SizeJ) - 6);
while (_local2 <= int((CurrentJ + SizeJ) + 6)) {
var _local1 = game[FindName(_local3, _local2)];
if (_local1 && (!((((_local1.hitTest(GameMask) || (_local3 >= int(((CurrentI - SizeI) - 1) + LastCurrentI))) || (_local3 <= int((CurrentI + SizeI) + LastCurrentI))) || (_local2 >= int(((CurrentJ - SizeJ) - 1) + LastCurrentJ))) || (_local2 <= int((CurrentJ + SizeJ) + LastCurrentJ))))) {
_local1.Hide();
} else if (_local1 && (!_local1.active)) {
_local1.Show();
}
_local2++;
}
_local3++;
}
}
function MoveArrow(c) {
recarr._visible = true;
var _local1 = Math.atan2(CheckPoint.y - CurrentI, CheckPoint.x - CurrentJ);
if (_local1 < 0) {
_local1 = _local1 + (Math.PI*2);
}
recarr.a.A = _local1;
if (c) {
recarr.a.PA = _local1;
} else if (Math.abs(Math.sin(recarr.a.PA) - Math.sin(recarr.a.A)) < 0.2) {
recarr.a.PA = recarr.a.A;
}
recarr.a.onEnterFrame = MoveArrow2;
}
function MoveArrow2() {
if (Math.abs(recarr.a.A - recarr.a.PA) < 0.03) {
recarr.a.PA = recarr.a.A;
delete recarr.a.onEnterFrame;
} else if (recarr.a.A > recarr.a.PA) {
recarr.a.PA = recarr.a.PA + 0.03;
} else {
recarr.a.PA = recarr.a.PA - 0.03;
}
var _local1 = recarr.a.PA;
recarr.a.PA = _local1;
var _local4 = 1;
var _local3 = Math.cos(_local1) * _local4;
var _local2 = Math.sin(_local1) * _local4;
var _local5 = 0.6;
if (Math.abs(Math.tan(_local1)) < _local5) {
_local2 = (_local2 * 220) / Math.abs(_local3);
_local3 = (_local3 / Math.abs(_local3)) * 220;
} else {
_local3 = (_local3 * 135) / Math.abs(_local2);
_local2 = (_local2 / Math.abs(_local2)) * 135;
}
_local1 = (57.2957795130823 * _local1) + 90;
recarr.a._rotation = _local1;
recarr.a._x = _local3;
recarr.a._y = _local2;
}
function FindFirstE() {
var _local1 = 0;
var _local3 = 0;
while (_local3 < Matrix.length) {
var _local2 = 0;
while (_local2 < Matrix[0].length) {
if (Matrix[_local3][_local2] == "e") {
if (Math.abs(CheckPoint.x - _local2) > Math.abs(CheckPoint.y - _local3)) {
if (CheckPoint.x > _local2) {
_local1 = 0;
} else {
_local1 = 180;
}
} else if (CheckPoint.y > _local3) {
_local1 = 90;
} else {
_local1 = -90;
}
return({i:_local3, j:_local2, R:_local1});
}
_local2++;
}
_local3++;
}
}
function ChangeCheckPoint(N) {
if ((LEVELS[Level].checkpoints.length == 0) && (N == 0)) {
CheckPointN = N;
CheckPoint = {};
CheckPoint.y = int(EnergyReceiver.y - (EnergyReceiver.height / 2));
CheckPoint.x = int(EnergyReceiver.x + (EnergyReceiver.width / 2));
CheckPoint.r = 3;
MoveArrow();
}
if (LEVELS[Level].checkpoints.length > N) {
CheckPointN = N;
CheckPoint = LEVELS[Level].checkpoints[CheckPointN];
LastDiameter = Diameter(CurrentI, CurrentJ, CheckPoint.y, CheckPoint.x);
MoveArrow();
} else {
recarr._visible = false;
LastDiameter = 0;
}
}
function ChangeEnergyReceiver(N) {
EnergyReceiverN = N;
EnergyReceiver = LEVELS[Level].energy[EnergyReceiverN];
}
function GetDepth(i, j) {
return(((i * Matrix[0].length) + j) + 10000);
}
function InitFon(i, j, cc) {
if ((Matrix[i][j] != ".") && (Matrix[i][j] != undefined)) {
var _local3 = int(Matrix[i][j]);
if (cc) {
game.fon[FindName(i, j)].gotoAndStop(Matrix[i][j] + 1);
}
game.border[FindName(i, j) + "u"].removeMovieClip();
game.border[FindName(i, j) + "d"].removeMovieClip();
game.border[FindName(i, j) + "l"].removeMovieClip();
game.border[FindName(i, j) + "r"].removeMovieClip();
if (((_local3 > int(Matrix[i + 1][j])) || (Matrix[i + 1][j] == ".")) || (Matrix[i + 1][j] == undefined)) {
game.border[FindName(i, j) + "d"].removeMovieClip();
game.border.attachMovie("dborder", FindName(i, j) + "d", game.border.getNextHighestDepth(), {_x:(FonSize * j) + SX, _y:(FonSize * i) + SY});
} else if (_local3 < int(Matrix[i + 1][j])) {
game.border[FindName(i + 1, j) + "u"].removeMovieClip();
game.border.attachMovie("uborder", FindName(i + 1, j) + "u", game.border.getNextHighestDepth(), {_x:(FonSize * j) + SX, _y:(FonSize * (i + 1)) + SY});
}
if (((_local3 > int(Matrix[i - 1][j])) || (Matrix[i - 1][j] == ".")) || (Matrix[i - 1][j] == undefined)) {
game.border[FindName(i, j) + "u"].removeMovieClip();
game.border.attachMovie("uborder", FindName(i, j) + "u", game.border.getNextHighestDepth(), {_x:(FonSize * j) + SX, _y:(FonSize * i) + SY});
} else if (_local3 < int(Matrix[i - 1][j])) {
game.border[FindName(i - 1, j) + "d"].removeMovieClip();
game.border.attachMovie("dborder", FindName(i - 1, j) + "d", game.border.getNextHighestDepth(), {_x:(FonSize * j) + SX, _y:(FonSize * (i - 1)) + SY});
}
if (((_local3 > int(Matrix[i][j + 1])) || (Matrix[i][j + 1] == ".")) || (Matrix[i][j + 1] == undefined)) {
game.border[FindName(i, j) + "r"].removeMovieClip();
game.border.attachMovie("rborder", FindName(i, j) + "r", game.border.getNextHighestDepth(), {_x:(FonSize * j) + SX, _y:(FonSize * i) + SY});
} else if (_local3 < int(Matrix[i][j + 1])) {
game.border[FindName(i, j + 1) + "l"].removeMovieClip();
game.border.attachMovie("lborder", FindName(i, j + 1) + "l", game.border.getNextHighestDepth(), {_x:(FonSize * (j + 1)) + SX, _y:(FonSize * i) + SY});
}
if (((_local3 > int(Matrix[i][j - 1])) || (Matrix[i][j - 1] == ".")) || (Matrix[i][j - 1] == undefined)) {
game.border[FindName(i, j) + "l"].removeMovieClip();
game.border.attachMovie("lborder", FindName(i, j) + "l", game.border.getNextHighestDepth(), {_x:(FonSize * j) + SX, _y:(FonSize * i) + SY});
} else if (_local3 < int(Matrix[i][j - 1])) {
game.border[FindName(i, j - 1) + "r"].removeMovieClip();
game.border.attachMovie("rborder", FindName(i, j - 1) + "r", game.border.getNextHighestDepth(), {_x:(FonSize * (j - 1)) + SX, _y:(FonSize * i) + SY});
}
}
}
function DrawFon() {
var _local5 = game.fon.createEmptyMovieClip("fon", 1);
_local5._x = (_local5._y = FonSize / 2);
var _local4 = 0;
while (_local4 < Matrix.length) {
var _local3 = 0;
while (_local3 < Matrix[0].length) {
if (Matrix[_local4][_local3] == ".") {
if ((Matrix[_local4][_local3 + 1] != ".") && (Matrix[_local4][_local3 + 1] != undefined)) {
_local5.attachMovie("borderline" + elementn, "T", _local5.getNextHighestDepth(), {_x:_local3 * FonSize, _y:_local4 * FonSize, _rotation:270});
}
if ((Matrix[_local4][_local3 - 1] != ".") && (Matrix[_local4][_local3 - 1] != undefined)) {
_local5.attachMovie("borderline" + elementn, "T", _local5.getNextHighestDepth(), {_x:_local3 * FonSize, _y:_local4 * FonSize, _rotation:90});
}
if ((Matrix[_local4 + 1][_local3] != ".") && (Matrix[_local4 + 1][_local3] != undefined)) {
_local5.attachMovie("borderline" + elementn, "T", _local5.getNextHighestDepth(), {_x:_local3 * FonSize, _y:_local4 * FonSize, _rotation:0});
if ((Matrix[_local4][_local3 + 1] != ".") && (Matrix[_local4][_local3 + 1] != undefined)) {
_local5.attachMovie("bordercornerinside" + elementn, "T", _local5.getNextHighestDepth(), {_x:_local3 * FonSize, _y:_local4 * FonSize, _rotation:90});
}
if ((Matrix[_local4][_local3 - 1] != ".") && (Matrix[_local4][_local3 - 1] != undefined)) {
_local5.attachMovie("bordercornerinside" + elementn, "T", _local5.getNextHighestDepth(), {_x:_local3 * FonSize, _y:_local4 * FonSize, _rotation:180});
}
}
if ((Matrix[_local4 - 1][_local3] != ".") && (Matrix[_local4 - 1][_local3] != undefined)) {
_local5.attachMovie("borderline" + elementn, "T", _local5.getNextHighestDepth(), {_x:_local3 * FonSize, _y:_local4 * FonSize, _rotation:180});
if ((Matrix[_local4][_local3 - 1] != ".") && (Matrix[_local4][_local3 - 1] != undefined)) {
_local5.attachMovie("bordercornerinside" + elementn, "T", _local5.getNextHighestDepth(), {_x:_local3 * FonSize, _y:_local4 * FonSize, _rotation:-90});
}
if ((Matrix[_local4][_local3 + 1] != ".") && (Matrix[_local4][_local3 + 1] != undefined)) {
_local5.attachMovie("bordercornerinside" + elementn, "T", _local5.getNextHighestDepth(), {_x:_local3 * FonSize, _y:_local4 * FonSize, _rotation:0});
}
}
if ((((Matrix[_local4 - 1][_local3 - 1] != ".") && (Matrix[_local4 - 1][_local3 - 1] != undefined)) && (Matrix[_local4][_local3 - 1] == ".")) && (Matrix[_local4 - 1][_local3] == ".")) {
_local5.attachMovie("bordercorner" + elementn, "T", _local5.getNextHighestDepth(), {_x:_local3 * FonSize, _y:_local4 * FonSize, _rotation:90});
}
if ((((Matrix[_local4 - 1][_local3 + 1] != ".") && (Matrix[_local4 - 1][_local3 + 1] != undefined)) && (Matrix[_local4 - 1][_local3] == ".")) && (Matrix[_local4][_local3 + 1] == ".")) {
_local5.attachMovie("bordercorner" + elementn, "T", _local5.getNextHighestDepth(), {_x:_local3 * FonSize, _y:_local4 * FonSize, _rotation:180});
}
if ((((Matrix[_local4 + 1][_local3 + 1] != ".") && (Matrix[_local4 + 1][_local3 + 1] != undefined)) && (Matrix[_local4][_local3 + 1] == ".")) && (Matrix[_local4 + 1][_local3] == ".")) {
_local5.attachMovie("bordercorner" + elementn, "T", _local5.getNextHighestDepth(), {_x:_local3 * FonSize, _y:_local4 * FonSize, _rotation:-90});
}
if ((((Matrix[_local4 + 1][_local3 - 1] != ".") && (Matrix[_local4 + 1][_local3 - 1] != undefined)) && (Matrix[_local4][_local3 - 1] == ".")) && (Matrix[_local4 + 1][_local3] == ".")) {
_local5.attachMovie("bordercorner" + elementn, "T", _local5.getNextHighestDepth(), {_x:_local3 * FonSize, _y:_local4 * FonSize, _rotation:0});
}
}
_local3++;
}
_local4++;
}
_local5 = game.fon.createEmptyMovieClip("fond", 0);
var _local7 = game.eff.createEmptyMovieClip("fond", 0);
_local5._x = (_local5._y = (_local7._x = (_local7._y = -50)));
var _local3 = 0;
_local4 = _local3;
MaxI = (Matrix.length * FonSize) + 100;
MaxJ = (Matrix[0].length * FonSize) + 100;
while (_local4 <= MaxI) {
_local5.attachMovie("underfon" + elementn, "F", _local5.getNextHighestDepth(), {_x:_local3, _y:_local4});
_local7.attachMovie("underfon" + elementn, "F", _local7.getNextHighestDepth(), {_x:_local3, _y:_local4});
_local3 = _local3 + 256;
if (_local3 >= MaxJ) {
_local4 = _local4 + 256;
_local3 = 0;
}
}
_local7.onPress = null;
_local7.useHandCursor = false;
var _local10 = _root.createEmptyMovieClip("CENT", _root.getNextHighestDepth());
_local10._x = 260;
_local10._y = 150;
TextShow(_local10, GetLevelString(), "gradient", -2, 40, 1, 40, 0, 1000, 0, 16776960, 13421568, 90);
_local10._alpha = 0;
_local10.onEnterFrame = function () {
if (!this.VV) {
if (this._alpha < 300) {
this._alpha = this._alpha + 5;
} else {
this.VV = true;
}
} else {
this._xscale = this._xscale + 5;
this._alpha = this._alpha - 15;
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
};
_local7.onEnterFrame = function () {
if (this._alpha < 5) {
delete this.onEnterFrame;
this.removeMovieClip();
CanStart();
}
this._alpha = this._alpha - 0.5;
};
}
function DrawField() {
game.createEmptyMovieClip("fon", 0);
game.createEmptyMovieClip("border", 20);
game.createEmptyMovieClip("en", 10);
game.createEmptyMovieClip("eff", 99999);
var _local13 = 0;
i = 0;
while (i < LEVELS[Level].energy.length) {
var _local8 = LEVELS[Level].energy[i];
game.eff.attachMovie("receiver1", "r" + i, i + 50, {_x:_local8.x * FonSize, _y:((_local8.y - _local8.height) + 1) * FonSize});
var _local11 = 0;
while (_local11 < _local8.height) {
var _local9 = 0;
while (_local9 < _local8.height) {
Matrix[_local8.y - _local11][_local8.x + _local9] = "r";
_local9++;
}
_local11++;
}
i++;
}
var i = 0;
while (i < Matrix.length) {
var _local12 = 0;
while (_local12 < Matrix[0].length) {
if (Matrix[i][_local12] != ".") {
var _local3 = "";
var _local10;
var _local5 = false;
var _local7 = false;
var _local6 = false;
if (Matrix[i][_local12] == "m") {
_local5 = false;
_local7 = true;
_local6 = false;
Matrix[i][_local12] = 1;
_local3 = "rock";
} else if (Matrix[i][_local12] == "+") {
_local5 = false;
_local7 = true;
_local6 = false;
Matrix[i][_local12] = 0;
_local3 = "rock";
} else if (Matrix[i][_local12] == "n") {
_local5 = true;
_local7 = true;
_local6 = false;
Matrix[i][_local12] = 1;
_local3 = "rock";
} else if (Matrix[i][_local12] == "S") {
_local5 = true;
_local7 = false;
_local6 = true;
Matrix[i][_local12] = 1;
_local3 = "stone";
} else if (Matrix[i][_local12] == "4") {
_local5 = true;
_local7 = false;
_local6 = false;
Matrix[i][_local12] = 0;
} else if (Matrix[i][_local12] == "5") {
_local5 = true;
_local7 = false;
_local6 = false;
Matrix[i][_local12] = 1;
} else if (Matrix[i][_local12] == "6") {
_local5 = true;
_local7 = false;
_local6 = false;
Matrix[i][_local12] = 2;
} else if (Matrix[i][_local12] == "7") {
_local5 = true;
_local7 = false;
_local6 = false;
Matrix[i][_local12] = 3;
} else if (((Matrix[i][_local12] == "V") || (Matrix[i][_local12] == "U")) || (Matrix[i][_local12] == "D")) {
_local3 = "bonus";
_local10 = [1, 0, 0, Bonuses[_local13++], Matrix[i][_local12]];
Matrix[i][_local12] = 0;
} else if (((Matrix[i][_local12] == "H") || (Matrix[i][_local12] == "R")) || (Matrix[i][_local12] == "L")) {
_local3 = "bonus";
_local10 = [0, 1, 0, Bonuses[_local13++], Matrix[i][_local12]];
Matrix[i][_local12] = 0;
} else if (Matrix[i][_local12] == "B") {
_local3 = "bonus";
_local10 = [1, 1, 1, Bonuses[_local13++], Matrix[i][_local12]];
Matrix[i][_local12] = 0;
} else if (Matrix[i][_local12] == "C") {
_local3 = "bonus";
_local10 = [1, 1, 0, Bonuses[_local13++], Matrix[i][_local12]];
Matrix[i][_local12] = 0;
} else if (Matrix[i][_local12] == "r") {
_local3 = "receiverfon1";
}
var _local14 = GetDepth(i, _local12);
var _local4 = game.fon.attachMovie("fon" + elementn, FindName(i, _local12), _local14, {_x:(FonSize * _local12) + SX, _y:(FonSize * i) + SY, _alpha:50});
if (_local3 == "") {
if (((Level == 0) && (i == 5)) && (((_local12 == 4) || (_local12 == 5)) || (_local12 == 6))) {
_local3 = "s1";
} else {
_local3 = GetRandomSlide(1);
if ((((Level == 0) && ((i == 4) || (i == 6))) && (((_local12 == 4) || (_local12 == 5)) || (_local12 == 6))) && (_local3 == "s1")) {
_local3 = "s2";
}
if ((((Level == 0) && (i == 5)) && ((_local12 == 3) || (_local12 == 7))) && (_local3 == "s1")) {
_local3 = "s3";
}
}
}
_local4.gotoAndStop(Number(Matrix[i][_local12]) + 1);
if (((Level == 4) && (i == 5)) && (_local12 == 18)) {
_local4.onEnterFrame = function () {
if (this._currentframe == 1) {
delete this.onEnterFrame;
}
if (this.hitTest(GameMask) && (!this.TI)) {
this.TI = TIMER.GetTime() + 30;
}
if (TIMER.GetTime() > this.TI) {
Hint(47);
delete this.onEnterFrame;
}
};
}
_local4 = game.attachMovie(_local3, FindName(i, _local12), _local14, {_x:((FonSize * _local12) + ((FonSize - Size) / 2)) + SX, _y:((FonSize * i) + ((FonSize - Size) / 2)) + SY, _alpha:MaxAlpha});
if ((Level == 0) && (_local3 == "receiverfon1")) {
_local4.onEnterFrame = function () {
if (TIMER.GetTime() > 30) {
TOOL_TIP2(_root.Text1Level.text, _root.Text1Level.x, _root.Text1Level.y);
delete this.onEnterFrame;
}
};
}
if ((_local3 != "bonus") && (_local3 != "receiverfon1")) {
_local4.InitSlide(_local3, _local7, _local5, _local6);
} else {
_local4.swapDepths(_local4.getDepth() + 10000);
_local4.bonus = true;
_local4.InitSlide(_local10);
_local4._x = _local4._x + (Size / 2);
_local4._y = _local4._y + (Size / 2);
}
if (Matrix[i][_local12] == "e") {
game.en.attachMovie("en1", FindName(i, _local12), GetDepth(i, _local12), {_x:(SX + (_local12 * FonSize)) + (FonSize / 2), _y:(SY + (i * FonSize)) + (FonSize / 2), _xscale:(FonSize / Size) * 100, _yscale:(FonSize / Size) * 100, _alpha:50});
}
}
_local12++;
}
i++;
}
var i = 0;
while (i < Matrix.length) {
var _local12 = 0;
while (_local12 < Matrix[0].length) {
InitFon(i, _local12);
_local12++;
}
i++;
}
}
function GetRandomSlide(c, j) {
var _local1 = random(4) + 1;
return("s" + _local1);
}
function MoveField(T, TT, StepI, StepJ) {
if (((Level == 4) && (game.fon[FindName(5, 18)]._currentframe > 1)) && (game._x < -200)) {
return(undefined);
}
if (((Level == 9) && (game[FindName(7, 39)].bonus)) && (game._x < -1000)) {
return(undefined);
}
if ((((Level == 12) && (game[FindName(6, 27)].bonus)) && (game._x < -600)) && (CheckPointN > 2)) {
return(undefined);
}
var _local9 = CurrentI;
var _local4 = Math.max(3, CurrentI + StepI);
var _local8 = CurrentJ;
var _local3 = CurrentJ + StepJ;
var _local2 = CheckPoint.y - _local4;
var _local1 = CheckPoint.x - _local3;
var _local7 = Math.max(Math.abs(_local2), Math.abs(_local1));
_local2 = int((maxsy * _local2) / _local7);
_local1 = int((maxsx * _local1) / _local7);
iss = ((LastCurrentI == undefined) ? (_local2) : (LastCurrentI));
jss = ((LastCurrentJ == undefined) ? (_local1) : (LastCurrentJ));
var _local5 = 165 - ((_local4 + _local2) * FonSize);
if (_local5 > 0) {
_local5 = -1;
}
var _local6 = 260 - ((_local3 + _local1) * FonSize);
if (_local6 > 0) {
_local6 = -1;
}
clearInterval(moving_field);
moving_field = setInterval(MovingField, 0, T, TT, _local9, _local4, _local8, _local3, iss, jss, _local2, _local1, game._y, game._x, _local5, _local6);
}
function MovingField(T, TT, i1, i2, j1, j2, iss, jss, is, js, fgy, fgx, lgy, lgx) {
var _local3 = getTimer();
var _local2 = 1;
if (_local3 >= (T + TT)) {
clearInterval(moving_field);
} else {
_local2 = (_local3 - T) / TT;
}
var _local1 = fgy + ((lgy - fgy) * _local2);
if ((_local1 <= 0) && (_local1 > (((-Matrix.length) + 11) * FonSize))) {
if (_local1 != game._y) {
CurrentI = i1 + ((i2 - i1) * _local2);
LastCurrentI = iss + ((is - iss) * _local2);
game._y = _local1;
}
}
if (Matrix.length < 13) {
game._y = (((-Matrix.length) * FonSize) + 350) / 2;
LastCurrentI = 0;
CurrentI = Matrix.length / 2;
}
_local1 = fgx + ((lgx - fgx) * _local2);
if ((_local1 <= 0) && (_local1 > (((-Matrix[0].length) + 16) * FonSize))) {
if (_local1 != game._x) {
game._x = _local1;
CurrentJ = j1 + ((j2 - j1) * _local2);
LastCurrentJ = jss + ((js - jss) * _local2);
}
}
if (Matrix[0].length < 18) {
game._x = (((-Matrix[0].length) * FonSize) + 520) / 2;
LastCurrentJ = 0;
CurrentJ = Matrix[0].length / 2;
}
CheckCheckPoint(CurrentI, CurrentJ);
MoveArrow(TT == 0);
if (TT == 0) {
MaskTiles();
}
if ((((LEVELS[Level].checkpoints.length - 1) <= CheckPointN) && (Math.abs((EnergyReceiver.x - CurrentJ) - LastCurrentJ) < SizeJ)) && (Math.abs((EnergyReceiver.y - CurrentI) - LastCurrentI) < SizeI)) {
recarr._visible = false;
}
updateAfterEvent();
}
function CheckCheckPoint(i, j) {
if (Diameter(i, j, CheckPoint.y, CheckPoint.x) <= int(CheckPoint.r)) {
ChangeCheckPoint(CheckPointN + 1);
}
}
function Press(chk) {
if (chk != undefined) {
this=chk;//parameter overwritten
}
_root.mouse_move.removeMovieClip();
var _local3 = 0;
while (_local3 < Hint_Light.length) {
Hint_Light[_local3].removeMovieClip();
_local3++;
}
delete Hint_Light;
TIMER.StartTimer();
if ((GameStatus == "play") && (!(this.isRock || (this.isStone)))) {
var _local5 = Chain[Chain.length - 1];
if ((_local5 == this._name) && (Make__Chain == "")) {
Chain.push(this._name);
FillFon();
} else if (((_local5 == this._name) && (Make__Chain == "hit")) && (Chain.length <= 1)) {
Make__Chain = "";
} else if ((_local5 == this._name) && (Make__Chain == "hit")) {
Make__Chain = "";
ReleaseTile();
} else if (((Chain.length > 0) && (Chain[Chain.length - 2] == this._name)) && (Make__Chain == "hit")) {
ClearFon();
Chain.pop();
FillFon();
} else if ((Chain.length > 0) && (Make__Chain == "hit")) {
var _local4 = true;
_local3 = 0;
while (_local3 < Chain.length) {
if (this._name == Chain[_local3]) {
_local4 = false;
break;
}
_local3++;
}
if (_local4) {
var _local9 = FindI(_local5);
var _local7 = FindJ(_local5);
var _local8 = FindI(this._name);
var _local6 = FindJ(this._name);
ClearFon();
if ((this.Name == game[_local5].Name) && (((Math.abs(_local9 - _local8) == 1) && ((_local7 - _local6) == 0)) || (((_local9 - _local8) == 0) && (Math.abs(_local7 - _local6) == 1)))) {
Chain.push(this._name);
} else {
Make__Chain = "";
Chain = new Array();
Chain.push(this._name);
}
FillFon();
}
} else if (Chain.length == 0) {
ClearFon();
MakeChain = true;
Chain = new Array();
Chain.push(this._name);
FillFon();
}
} else if ((GameStatus.substr(0, 8) == "actbonus") && ((GameStatus.substr(8, 1) != 1) || ((!this.isStone) && (!this.isIce)))) {
gamepanel["b" + GameStatus.substr(8, 1)].Act(this);
} else if ((GameStatus.substr(0, 9) == "actbonus1") && (((Matrix[FindI(this._name)][FindJ(this._name)] == 0) || (this.isStone)) || (this.isIce))) {
_root.Hint(38);
}
}
function NearName(Name1, Name2) {
var _local2 = FindI(Name1);
var _local1 = FindJ(Name1);
var _local5 = FindI(Name2);
var _local4 = FindJ(Name2);
var _local3 = false;
if (((!_local3) && (game[FindName(_local2, _local1)].Name == game[Name2].Name)) && ((Math.abs(_local2 - _local5) + Math.abs(_local1 - _local4)) < 2)) {
_local3 = true;
NearTile = game[FindName(_local2, _local1)];
}
if (((!_local3) && (game[FindName(_local2 - 1, _local1)].Name == game[Name2].Name)) && ((Math.abs((_local2 - 1) - _local5) + Math.abs(_local1 - _local4)) < 2)) {
_local3 = true;
NearTile = game[FindName(_local2 - 1, _local1)];
}
if (((!_local3) && (game[FindName(_local2 + 1, _local1)].Name == game[Name2].Name)) && ((Math.abs((_local2 + 1) - _local5) + Math.abs(_local1 - _local4)) < 2)) {
_local3 = true;
NearTile = game[FindName(_local2 + 1, _local1)];
}
if (((!_local3) && (game[FindName(_local2, _local1 - 1)].Name == game[Name2].Name)) && ((Math.abs(_local2 - _local5) + Math.abs((_local1 - 1) - _local4)) < 2)) {
_local3 = true;
NearTile = game[FindName(_local2, _local1 - 1)];
}
if (((!_local3) && (game[FindName(_local2, _local1 + 1)].Name == game[Name2].Name)) && ((Math.abs(_local2 - _local5) + Math.abs((_local1 + 1) - _local4)) < 2)) {
_local3 = true;
NearTile = game[FindName(_local2, _local1 + 1)];
}
if (!_local3) {
NearTile = game[FindName(_local2, _local1)];
}
return(_local3);
}
function Over(chk) {
if ((((((Make__Chain == "") && (GameMask.hitTest(_xmouse, _ymouse))) && (this.hitTest(_xmouse, _ymouse))) && (this._name != Chain[Chain.length - 1])) && (MakeChain)) && (NearName(this._name, Chain[Chain.length - 1]) || (cheat))) {
var _local4;
if (!cheat) {
_local4 = NearTile;
} else {
_local4 = this;
}
if ((_local4._name != Chain[Chain.length - 1]) && ((_local4._name != Chain[Chain.length - 2]) || (_local4.wasover < (getTimer() - 400)))) {
_local4.wasover = getTimer();
var _local3 = 0;
while (_local3 < Chain.length) {
if (_local4._name == Chain[_local3]) {
var _local2 = _local3 + 1;
while (_local2 < Chain.length) {
ClearChainFon(_local2);
_local2++;
}
Chain = Chain.slice(0, _local3);
break;
}
_local3++;
}
var _local8 = FindI(Chain[Chain.length - 1]);
var _local6 = FindJ(Chain[Chain.length - 1]);
var _local7 = FindI(_local4._name);
var _local5 = FindJ(_local4._name);
if ((Chain.length == 0) || ((Math.abs(_local8 - _local7) + Math.abs(_local6 - _local5)) < 2)) {
Chain.push(_local4._name);
}
FillFon();
}
}
}
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 FillFon() {
var _local2 = Math.max(Chain.length - 2, 0);
while (_local2 < Chain.length) {
ClearBombing(_local2);
_local2++;
}
_root.addChipInChain_s.start(SoundOn);
_local2 = 0;
while (_local2 < Chain.length) {
game[Chain[_local2]].StartShine();
if (Chain.length > 2) {
game[Chain[_local2]].StartZZZ();
} else {
game[Chain[_local2]].StopZZZ();
}
if (_local2 != 0) {
var _local6 = FindI(Chain[_local2 - 1]);
var _local5 = FindJ(Chain[_local2 - 1]);
var _local4 = FindI(Chain[_local2]);
var _local3 = FindJ(Chain[_local2]);
AttachArrow(_local6, _local5, _local4, _local3);
} else {
var _local6 = FindI(Chain[_local2]);
var _local5 = FindJ(Chain[_local2]);
}
_local2++;
}
FillBombing();
}
function ClearFon() {
for (var _local1 in Chain) {
ClearChainFon(_local1);
}
game.eff.rays.removeMovieClip();
}
function ClearChainFon(i) {
ClearBombing(i);
game[Chain[i]].StopZZZ();
game[Chain[i]].StopShine();
game.eff[Chain[i]].removeMovieClip();
}
function FillBombing() {
game.eff.rays.removeMovieClip();
var _local7 = FindI(Chain[Chain.length - 1]);
var _local6 = FindJ(Chain[Chain.length - 1]);
var _local3 = 0;
if (Chain.length > 8) {
_local3 = 3;
} else if (Chain.length > 6) {
_local3 = 2;
} else if (Chain.length > 4) {
_local3 = 1;
}
if (_local3 > 0) {
game.eff.attachMovie("bonusrays", "rays", 999, {_x:(_local6 + 0.5) * FonSize, _y:(_local7 + 0.5) * FonSize, _width:((2 * _local3) + 1) * FonSize, _height:((2 * _local3) + 1) * FonSize});
game.eff.rays.onEnterFrame = function () {
this._rotation = random(360);
};
var _local5 = _local7 - _local3;
while (_local5 <= (_local7 + _local3)) {
var _local2 = _local6 - _local3;
while (_local2 <= (_local6 + _local3)) {
if ((Math.abs(_local5 - _local7) + Math.abs(_local2 - _local6)) <= _local3) {
var _local4 = game[FindName(_local5, _local2)];
_local4.StartZZZ();
_local4.bombed = true;
}
_local2++;
}
_local5++;
}
}
}
function ClearBombing(i) {
var _local6 = FindI(Chain[i]);
var _local5 = FindJ(Chain[i]);
var _local3 = 3;
i = _local6 - _local3;
while (i <= (_local6 + _local3)) {
var _local2 = _local5 - _local3;
while (_local2 <= (_local5 + _local3)) {
var _local1 = game[FindName(i, _local2)];
if (_local1.bombed) {
_local1.StopZZZ();
_local1.bombed = false;
}
_local2++;
}
i++;
}
game.eff.rays.removeMovieClip();
}
function BlowBombing(Name, L) {
var _local5 = FindI(Name);
var _local6 = FindJ(Name);
var _local4 = 0;
if (L > 8) {
_local4 = 3;
} else if (L > 6) {
_local4 = 2;
} else if (L > 4) {
_local4 = 1;
}
if (_local4 > 0) {
BombExplode_s.start(SoundOn);
var _local8 = game.eff.attachMovie("vzryv", "vz", game.eff.getNextHighestDepth(), {_x:game[Name]._x + 15, _y:game[Name]._y + 15, _rotation:random(300)});
_local8._xscale = (_local8._yscale = _local4 * 120);
var _local3 = _local6 - _local4;
while (_local3 <= (_local6 + _local4)) {
var _local1 = _local5 - _local4;
while (_local1 <= (_local5 + _local4)) {
if ((Math.abs(_local1 - _local5) + Math.abs(_local3 - _local6)) <= _local4) {
var _local2 = game[FindName(_local1, _local3)];
_local2.bombed = false;
if ((!_local2.isStone) && (!_local2.bonus)) {
_local2.Remove(_local1 - _local5, _local3 - _local6);
}
if (!_local2.isStone) {
ChangeFon(_local1, _local3, 0);
}
}
_local1++;
}
FallColomn(_local3);
_local3++;
}
}
CheckEnergy();
}
function ChangeFon(i, j, c) {
if (((Matrix[i][j] != "e") && (Matrix[i][j] > 0)) && (!T.isStone)) {
game.fon[FindName(i, j)].gotoAndStop((--Matrix[i][j]) + 1);
InitFon(i, j);
if (c) {
CheckEnergy();
}
}
}
function AttachArrow(i2, j2, i, j) {
if (game.eff[FindName(i, j)] == undefined) {
var _local3 = game.eff.getNextHighestDepth();
if (j2 < j) {
mc = game.eff.attachMovie("strela", FindName(i, j), _local3, {_x:((FonSize * j) + SX) + (FonSize / 2), _y:((FonSize * i) + SY) + (FonSize / 2)});
} else if (j < j2) {
mc = game.eff.attachMovie("strela", FindName(i, j), _local3, {_x:((FonSize * j) + SX) + (FonSize / 2), _y:((FonSize * i) + SY) + (FonSize / 2), _rotation:180});
} else if (i > i2) {
mc = game.eff.attachMovie("strela", FindName(i, j), _local3, {_x:((FonSize * j) + SX) + (FonSize / 2), _y:((FonSize * i) + SY) + (FonSize / 2), _rotation:90});
} else if (i2 > i) {
mc = game.eff.attachMovie("strela", FindName(i, j), _local3, {_x:((FonSize * j) + SX) + (FonSize / 2), _y:((FonSize * i) + SY) + (FonSize / 2), _rotation:270});
}
}
return(mc);
}
function ReleaseTile() {
if (MakeChain) {
if ((Chain.length > 1) && (Make__Chain == "")) {
MakeChain = false;
BlowChain();
FromHint();
StartShowHint();
} else {
Make__Chain = "hit";
}
}
}
function FindName(i, j) {
return((("sY" + i) + "X") + j);
}
function BlowChain() {
var _local1 = Chain.length;
if (_local1 > Chain_score) {
Chain_score = _local1;
}
var _local3 = _local1 > 2;
ClearFon();
FillBombing();
Make__Chain = "";
game.eff.rays.removeMovieClip();
if (_local3) {
if (!Hint_Arr[5]) {
FromHint(1);
}
clearChain_s.start(SoundOn);
var _local2 = 0;
switch (game[Chain[0]].Name.substr(1, 1)) {
case "1" :
_local2 = 1;
break;
case "4" :
_local2 = 2;
}
if ((_local2 == 1) && (Level == 4)) {
gamepanel["b" + _local2].Add(0.125 * _local1);
} else if ((_local2 == 2) && (Level == 8)) {
gamepanel["b" + _local2].Add(0.125 * _local1);
} else {
gamepanel["b" + _local2].Add(0.05 * _local1);
}
DelTile(0);
ShowScore(game[Chain[_local1 - 1]], _local1);
clearInterval(getting_hint12);
getting_hint12 = setInterval(function () {
Hint(2);
clearInterval(getting_hint12);
}, 2000);
} else {
Chain = new Array();
}
}
function ShowScore(MC, L) {
var _local1 = L * 5;
if (L > 4) {
_local1 = _local1 + 5;
}
if (L > 6) {
_local1 = _local1 + 10;
}
if (L > 8) {
_local1 = _local1 + 15;
}
score = score + _local1;
SCORE.Add(_local1);
var _local3 = game.eff.attachMovie("fly_text", "f" + getTimer(), game.eff.getNextHighestDepth(), {_x:MC._x + 15, _y:MC._y + 15});
TextShow(_local3.e, "+" + String(_local1), "GameFont", 0, 0, 1, 18, 16776960, 1000, 0);
}
function LastInLine(t) {
var _local4 = true;
var _local7 = Chain[t];
var _local5 = FindJ(_local7);
var _local2 = t + 1;
while (_local2 < Chain.length) {
if (_local5 == FindJ(Chain[_local2])) {
_local4 = false;
break;
}
_local2++;
}
if (_local4) {
var _local6 = FindI(_local7);
var _local1 = ((_local6 - Chain.length) + t) - 2;
while (_local1 < (((_local6 + Chain.length) - t) + 3)) {
if (game[FindName(_local1, _local5)].inchain) {
_local4 = false;
break;
}
_local1++;
}
}
if (_local4) {
FallColomn(_local5);
}
}
function DelTile(t) {
clearInterval(deltile);
var _local1 = Chain[t];
var _local4 = FindI(_local1);
var _local3 = FindJ(_local1);
if (game[_local1].bombed == false) {
if (game[_local1].isIce) {
game[_local1].blowIce();
} else {
game[_local1].Remove();
ChangeFon(_local4, _local3, 1);
}
LastInLine(t);
}
game.eff.attachMovie("blow", _local1, GetDepth(_local4, _local3), {_x:((FonSize * _local3) + SX) + (FonSize / 2), _y:((FonSize * _local4) + SY) + (FonSize / 2), _alpha:20});
t++;
if (t == Chain.length) {
BlowBombing(Chain[t - 1], Chain.length);
Chain = new Array();
} else {
deltile = setInterval(DelTile, DelTileTime, t);
}
}
function CheckEnergy() {
var _local9 = CurrentJ;
var _local10 = CurrentI;
var _local4 = LastDiameter;
clearInterval(endfall);
var _local8 = 0;
while (_local8 < Matrix.length) {
var _local6 = 0;
while (_local6 < Matrix[0].length) {
var _local2 = 0;
var _local3 = "1";
var _local5 = 0;
if (!((Matrix[_local8][_local6] > 0) || (Matrix[_local8][_local6] == "."))) {
if (Matrix[_local8][_local6 - 1] == "e") {
_local2 = _local2 + 1;
}
if (Matrix[_local8 - 1][_local6] == "e") {
_local2 = _local2 + 2;
}
if (Matrix[_local8][_local6 + 1] == "e") {
_local2 = _local2 + 4;
}
if (Matrix[_local8 + 1][_local6] == "e") {
_local2 = _local2 + 8;
}
}
if (_local2 != 0) {
if (((_local2 == 8) || (_local2 == 13)) || (_local2 == 9)) {
_local5 = 270;
} else if ((((_local2 == 2) || (_local2 == 6)) || (_local2 == 10)) || (_local2 == 7)) {
_local5 = 90;
} else if (((_local2 == 4) || (_local2 == 12)) || (_local2 == 14)) {
_local5 = 180;
}
if ((((_local2 == 3) || (_local2 == 6)) || (_local2 == 9)) || (_local2 == 12)) {
_local3 = "2_1";
} else if ((((_local2 == 7) || (_local2 == 11)) || (_local2 == 14)) || (_local2 == 13)) {
_local3 = "3";
} else if (_local2 == 15) {
_local3 = "4";
} else if ((_local2 == 5) || (_local2 == 10)) {
_local3 = "2_2";
}
if (game.en[FindName(_local8, _local6)] == undefined) {
Matrix[_local8][_local6] = "g";
Tiles_score++;
if (((_local8 == 5) && (_local6 == 5)) && (Level == 0)) {
Hint(1);
}
game.en.attachMovie("en" + _local3, FindName(_local8, _local6), GetDepth(_local8, _local6), {_rotation:_local5, _x:(SX + (_local6 * FonSize)) + (FonSize / 2), _y:(SY + (_local8 * FonSize)) + (FonSize / 2), _xscale:(FonSize / Size) * 100, _yscale:(FonSize / Size) * 100, _alpha:50});
if (_root.EnergyMove_s.Volume <= 80) {
_root.EnergyMove_s.Volume = _root.EnergyMove_s.Volume + 10;
}
var _local7 = Diameter(CheckPoint.y, CheckPoint.x, _local8, _local6);
if (_local7 < _local4) {
_local4 = _local7;
_local10 = _local8;
_local9 = _local6;
}
if (_local4 < (LastDiameter - MaxEnD)) {
LastDiameter = _local4 + 1;
MoveField(getTimer(), 1500, _local10 - CurrentI, _local9 - CurrentJ);
}
if (_local4 <= int(CheckPoint.r)) {
ChangeCheckPoint(CheckPointN + 1);
_local4 = LastDiameter;
}
}
}
_local6++;
}
_local8++;
}
var _local17 = false;
_local8 = 0;
while (_local8 < EnergyReceiver.height) {
var _local6 = 0;
while (_local6 < EnergyReceiver.width) {
if (Matrix[EnergyReceiver.y - _local8][EnergyReceiver.x + _local6] == "e") {
_local17 = true;
break;
}
_local6++;
}
_local8++;
}
if (_local17 && (GameStatus != "endround")) {
recarr.removeMovieClip();
TIMER.StopTimer();
ReleaseTile();
FromHint();
menumain.removeMovieClip();
map.removeMovieClip();
GameStatus = "endround";
ShowLevelComplete();
clearInterval(_root.end_round_int);
_root.LevelComplete_s.start(_root.SoundOn);
_root.end_round_int = setInterval(function () {
clearInterval(_root.end_round_int);
EndingRound();
}, 3000);
}
}
function GetBlack(MC, N, D, NA) {
if (!MC) {
MC = _root;
}
if (!N) {
N = 0;
}
if (!D) {
D = MC.getNextHighestDepth();
}
if (!NA) {
NA = "bl";
}
MC[NA].removeMovieClip();
var _local2 = MC.attachMovie("black", NA, D, {_width:520, _height:390, _alpha:N});
_local2.onPress = null;
_local2.useHandCursor = false;
return(_local2);
}
function EndingRound() {
GetBlack(game.eff, 0, 1000);
var _local1 = game.eff.r0;
_local1.rot._visible = false;
var _local2 = _local1.attachMovie("earth_bush_rise", "earth_bush_rise", 0, {_x:55, _y:15});
}
function ShowStats() {
EnergyMove_s.stop();
GetBlack(_root, 50, 122);
ReleaseTile();
FromHint();
L_C.removeMovieClip();
ClearMovie(_root, 1, 0);
stats.removeMovieClip();
stats = _root.createEmptyMovieClip("stats", 123);
stats._x = 260;
stats._y = 10;
stats.createEmptyMovieClip("headtext", 90);
stats.attachMovie("stats_div", "SD", 91, {_y:30});
var _local2 = 0;
while (_local2 < 7) {
var _local8 = stats.createEmptyMovieClip("L" + _local2, (_local2 * 3) + 1);
var _local7 = stats.createEmptyMovieClip("R" + _local2, (_local2 * 3) + 2);
_local8._y = (_local7._y = 30 + (_local2 * 27));
_local8._x = 20;
_local7._x = 25;
_local2++;
}
TextShow(stats.headtext, TextStatistics.text, "gradient", 0, 15, 1, 30, 0, 1000, 0, 16777113, 65280, 90, BOLDFONT);
var _local5 = int(TIMER.GetTime());
if (_local5 < 60) {
var _local4 = "0:";
var _local3 = _local5;
} else {
var _local4 = int(_local5 / 60) + ":";
var _local3 = _local5 % 60;
}
if (_local3 < 10) {
var _local4 = _local4 + ("0" + _local3);
} else {
var _local4 = _local4 + _local3;
}
_local5 = TIMER.GetLastTime() * 5;
score = score + _local5;
TotalScore = TotalScore + score;
var _local6 = new Array({}, {L:TextLevelTime, R:String(_local4)}, {L:TextTimeBonus, R:String(_local5)}, {L:TextChain, R:String(Chain_score)}, {L:TextTiles, R:String(Tiles_score)}, {L:TextLevelScore, R:String(score)}, {L:TextTotalScore, R:String(TotalScore)});
TIMER.DisAppear();
clearInterval(scoring);
scoring = setInterval(GetScoreString, 100, 1, _local6);
totalTime = totalTime + levelTime;
levelTime = 0;
END_ST_P = false;
bl.onPress = function () {
END_ST_P = true;
};
score = 0;
}
function GetScoreString(i, SA) {
if (!END_ST_P) {
StatValue_s.start(SoundOn);
}
clearInterval(scoring);
TextShow(stats["L" + i], SA[i].L.text, "gradient", -3, 0, 2, 20, 0, 1000, 0, 16776960, 65280, 90, BOLDFONT);
TextShow(stats["R" + i], SA[i].R, "gradient", -2, 0, 0, 22, 0, 1000, 0, 16777215, 8947967, 90, BOLDFONT);
i++;
if (i != SA.length) {
scoring = setInterval(GetScoreString, (END_ST_P ? 0 : 300), i, SA);
} else {
bl.onPress = EndRound;
var _local4 = stats.createEmptyMovieClip("TIP", 98);
_local4._y = 235 + int(_root.TextHint0.y);
_root.TextShow(_local4, (_root.TextTip.text + "|") + _root["WISE_TIP" + int(Level + 1)].text, "gradient", -2, 15, 1, 18, 0, 450, 0, 16777164, 16776960, 90, BOLDFONT);
_local4 = stats.attachMovie("button_uzk_s", "b", 99, {_y:350});
_local4.InitText(TextOk.text);
_local4.InitFunction(EndRound);
}
}
function EndRound() {
if ((((Level + 1) < int(_root.MaxLevel.value)) && (_root.NagTime.value != "0")) && (((Level + 1) % int(_root.NagTime.value)) == 0)) {
ShowNag();
} else if ((Level + 1) >= int(_root.MaxLevel.value)) {
ShowNag(1);
} else {
End_Round();
}
}
function End_Round() {
ClearMovie(_root, 1, 1);
Level++;
GameLevel++;
InitBooks(1);
}
function ShowNag(c) {
GameClasses.GFunctions.ClearAll(_root, 1, 1);
nag.removeMovieClip();
var nag = _root.attachMovie("nag", "nag", 456);
var _local6 = "";
var _local5 = "";
var _local4 = 0;
var _local3;
if (c) {
_local4 = 1;
if (_root.GameLevel >= _root.MaxLevel.value) {
_local3 = _root.TextNagComplete;
_local6 = (((_local3.text1 + "||") + _root.TextScore.text) + " ") + TotalScore;
_local5 = _local3.text2;
_root.TextShow(nag.t1, _local6, "GameFont", -2, 16, _local4, 18, _root.FontWhite, 350, 0, 0, 0, 0, BOLDFONT);
_root.TextShow(nag.t2, _local5, "GameFont", -2, 16, _local4, 18, _root.FontWhite, 350, 0, 0, 0, 0, BOLDFONT);
} else {
TotalScore = TotalScore + score;
score = 0;
_local3 = _root.TextNagNew;
_local6 = (_root.TextScore.text + " ") + int(TotalScore);
_local5 = _local3.text2;
_root.TextShow(nag.t1, _local6, "GameFont", -2, 16, _local4, 18, _root.FontWhite, 350, 0, 0, 0, 0, BOLDFONT);
_root.TextShow(nag.t2, _local5, "GameFont", -2, 16, _local4, 18, _root.FontWhite, 350, 0, 0, 0, 0, BOLDFONT);
}
nag.b1.onLoad = function () {
this.InitText(_root.TextRestart.text);
};
nag.b1.onPress = _root.NNEWGAME;
} else {
_local3 = _root.TextNagFeatures;
_local6 = _local3.text1;
_local5 = _local3.text2;
nag.b1.onLoad = function () {
this.InitText(_root.TextContinue.text);
};
nag.b1.onPress = _root.End_Round;
_root.TextShow(nag.t1, _local6, "GameFont", -2, 16, _local4, 18, 16777113, 350, 0, 0, 0, 0, BOLDFONT);
_root.TextShow(nag.t2, _local5, "GameFont", -2, 16, _local4, 18, _root.FontWhite, 350, 0, 0, 0, 0, BOLDFONT);
}
nag.t1._x = int(_local3.t1x);
nag.t2._x = int(_local3.t2x);
nag.t1._y = int(_local3.t1y);
nag.t2._y = int(_local3.t2y);
nag.b2.onPress = FunctionDownload;
nag.b2.onLoad = function () {
this.InitText(_root.TextDownload.text);
};
if (_root.NagTime.value == "0") {
nag.b2._visible = false;
nag.b1._x = nag.b1._x + 50;
}
}
function FallingSlideOld(i, j) {
var _local2 = i;
var _local4 = true;
while (_local4) {
_local2++;
if (Matrix[_local2][j] == undefined) {
_local2--;
while (Matrix[_local2][j] == ".") {
_local2--;
}
break;
}
if (game[FindName(_local2, j)]._name != undefined) {
_local2--;
while (Matrix[_local2][j] == ".") {
_local2--;
}
break;
}
}
var _local8 = GetDepth(_local2, j);
var _local6 = game[FindName(i, j)];
var _local5 = FindName(_local2, j);
_local6._name = _local5;
_local6.swapDepths(_local8);
var _local7 = getTimer();
clearInterval(_root["m" + _local5]);
_root["m" + _local5] = setInterval(FALL, 0, _local5, _local6._y, ((_local2 * FonSize) + SX) + ((FonSize - Size) / 2), _local7);
}
function FallDown() {
Fall = true;
var _local2 = 0;
while (_local2 < Chain.length) {
var _local3 = FindJ(Chain[_local2]);
clearInterval(_root["FC" + _local3]);
_root["FC" + _local3] = setInterval(FallColomn, 500, _local3);
_local2++;
}
}
function FallingSlide(i, j) {
var _local2 = Matrix.length;
var _local4 = true;
do {
if (!_local4) {
break;
}
_local2--;
} while (!((game[FindName(_local2, j)] == undefined) && (Matrix[_local2][j] != ".")));
if (_local2 < 0) {
trace((i + " ") + j);
}
var _local8 = GetDepth(_local2, j);
var _local5 = game[FindName(i, j)];
var _local6 = FindName(_local2, j);
_local5._name = _local6;
_local5.StopZZZ();
_local5.StopShine();
_local5.swapDepths(_local8);
var _local7 = getTimer();
clearInterval(_root["m" + _local6]);
_root["m" + _local6] = setInterval(FALL, 0, _local6, _local5._y, ((_local2 * FonSize) + SX) + ((FonSize - Size) / 2), _local7);
}
function FallColomn(j) {
clearInterval(_root["FC" + j]);
var _local3 = 0;
var _local8 = 0;
while (_local8 < Matrix.length) {
if ((game[FindName(_local8, j)].bonus && (game[FindName(_local8, j)].wasuse)) || (j < 0)) {
_local3 = 0;
break;
}
if (((game[FindName(_local8, j)] == undefined) && (Matrix[_local8][j] != ".")) && (Matrix[_local8][j] != undefined)) {
_local3++;
}
_local8++;
}
if (_local3) {
_local3 = 0;
_local8 = Matrix.length - 1;
while (((Matrix[_local8][j] == ".") || (game[FindName(_local8, j)].isIce)) || (game[FindName(_local8, j)].bonus)) {
_local8--;
}
while (_local8 >= 0) {
if (game[FindName(_local8, j)].isIce) {
if (_local3) {
_local3 = 0;
var _local4 = _local8 + 1;
while (_local4 < Matrix.length) {
if ((game[FindName(_local4, j)] == undefined) && (Matrix[_local4][j] != ".")) {
_local3++;
} else if (game[FindName(_local4, j)].isIce) {
break;
}
_local4++;
}
_local8++;
var _local7 = _local3 - 1;
while (_local7 >= 0) {
var _local5 = _local8 + _local7;
var _local10 = GetDepth(_local5 + 100, j);
var _local6 = GetRandomSlide(0, j);
var _local9 = game.attachMovie(_local6, FindName(_local5 + 100, j), _local10, {_x:((FonSize * j) + ((FonSize - Size) / 2)) + SX, _y:((FonSize * (_local5 - _local3)) + ((FonSize - Size) / 2)) + SY, _alpha:0});
_local9.InitSlide(_local6, _local6 == "rock");
FallingSlide(_local5 + 100, j);
_local7--;
}
}
_local3 = 0;
} else if ((game[FindName(_local8, j)] == undefined) && (Matrix[_local8][j] != ".")) {
_local3++;
} else if ((_local3 && (!game[FindName(_local8, j)].isIce)) && (!game[FindName(_local8, j)].bonus)) {
FallingSlide(_local8, j);
}
_local8--;
}
_local3 = 0;
_local8 = 0;
while (_local8 < Matrix.length) {
if ((game[FindName(_local8, j)] == undefined) && (Matrix[_local8][j] != ".")) {
_local3++;
}
_local8++;
}
if (_local3) {
_local8 = 0;
while (Matrix[_local8][j] == ".") {
_local8++;
}
var _local7 = _local3 - 1;
while (_local7 >= 0) {
var _local5 = (_local8 + _local7) - _local3;
var _local10 = GetDepth(_local5 + 100, j);
var _local6 = GetRandomSlide(0, j);
var _local9 = game.attachMovie(_local6, FindName(_local5 + 100, j), _local10, {_x:((FonSize * j) + ((FonSize - Size) / 2)) + SX, _y:((FonSize * (_local5 - _local3)) + ((FonSize - Size) / 2)) + SY, _alpha:0});
_local9.InitSlide(_local6, _local6 == "rock");
FallingSlide(_local5 + 100, j);
_local7--;
}
}
}
}
function FALL(Name, y0, Y, t0) {
Fall = true;
var _local3 = getTimer();
var _local5 = SlideFall;
var _local2 = game[Name];
_local2._y = y0 - (((_local3 - t0) * (y0 - Y)) / _local5);
if (_local2._alpha < MaxAlpha) {
_local2._alpha = ((_local3 - t0) * MaxAlpha) / _local5;
}
if (_local3 > (t0 + _local5)) {
Fall = false;
_local2._y = Y;
_local2._alpha = MaxAlpha;
_local5 = getTimer();
clearInterval(_root["m" + Name]);
}
}
function BonusFall(TJ, R) {
if (R == undefined) {
clearInterval(_root["FC" + TJ]);
_root["FC" + TJ] = setInterval(FallColomn, 100, TJ);
} else {
var _local2 = TJ - R;
while (_local2 <= (int(TJ) + int(R))) {
clearInterval(_root["FC" + _local2]);
_root["FC" + _local2] = setInterval(FallColomn, 100 * Math.abs(TJ - _local2), _local2);
_local2++;
}
}
}
function ToE(Name) {
if (_root.EnergyMove_s.Volume >= 10) {
_root.EnergyMove_s.Volume = _root.EnergyMove_s.Volume - 10;
}
Matrix[FindI(Name)][FindJ(Name)] = "e";
if (game[Name].bonus) {
game[Name].Blow();
}
clearInterval(endfall);
endfall = setInterval(CheckEnergy, 0);
}
function Diameter(i1, j1, i2, j2) {
return(Math.sqrt(((i2 - i1) * (i2 - i1)) + ((j2 - j1) * (j2 - j1))));
}
function CopyMatrix(A2) {
var _local5 = new Array();
var _local4;
var _local2 = 0;
while (_local2 < A2.length) {
_local4 = new Array();
var _local1 = 0;
while (_local1 < A2[0].length) {
_local4.push(A2[_local2][_local1]);
_local1++;
}
_local5.push(_local4);
_local2++;
}
return(_local5);
}
function ClearMovie(MC, CI, CM) {
GameClasses.GFunctions.ClearAll(MC, CM, CI);
}
function SetHint(w, h, MC, x, y, N, Na, T) {
if (!MC) {
MC = _root;
}
if (!x) {
x = 0;
}
if (!y) {
y = 0;
}
if (!h) {
h = w;
}
if (!Na) {
Na = "shleif2";
MC.SHINE.removeMovieClip();
T = 4000;
}
var _local6 = MC.createEmptyMovieClip("SHINE", MC.getNextHighestDepth());
_local6._x = x;
_local6._y = y;
_local6._alpha = ((T == 4000) ? 80 : 100);
if (!N) {
N = 30;
}
if ((w < 10) || (h < 10)) {
N = N - 10;
}
if ((w > 30) && (h > 30)) {
N = N + 20;
}
var _local4 = 0;
while (_local4 < N) {
var _local3 = _local6.attachMovie(Na, "s" + _local4, _local4);
_local3._x = w - (2 * random(w));
_local3._y = h - (2 * random(h));
_local3.w = w;
_local3.h = h;
_local3.P = T + getTimer();
_local3.TT = random(1000);
_local3.T = getTimer() - random(500);
_local3.NR = (_local3._xscale = (_local3._yscale = 50));
_local3.onEnterFrame = function () {
if (this.P >= getTimer()) {
var _local2 = (getTimer() - this.T) / this.TT;
if (_local2 >= 1) {
this.T = getTimer();
this._x = this.w - (2 * random(this.w));
this._y = this.h - (2 * random(this.h));
this.NR = (this._xscale = (this._yscale = random(50) + 50));
}
this._xscale = (this._yscale = this.NR + ((30 - this.NR) * _local2));
if (this._xscale < 0) {
this._xscale = (this._yscale = 30);
}
this._rotation = this._rotation + 2;
} else {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
_local4++;
}
}
function InitHintButton(MC, F, T) {
MC.mc.onPress = GameClasses.GFunctions.create(_root, HintPressed, MC, F, T);
MC.obvod._alpha = 100;
MC.bl._y = -42;
MC.line._y = -2;
}
function HintPressed(MC, F, T) {
if (F()) {
MC.bl._y = 0;
MC.line._y = 40;
MC.T = getTimer();
MC.TT = T;
MC.F = F;
delete MC.mc.onPress;
MC.onEnterFrame = function () {
var _local3 = (getTimer() - this.T) / this.TT;
if (_local3 >= 1) {
_root.InitHintButton(MC, this.F, this.TT);
_root.SetHint(20, 20, this, 20, 20);
_root.bonusComplete_s.start(_root.SoundOn);
delete this.onEnterFrame;
} else {
MC.bl._y = -40 * _local3;
MC.line._y = 38 - (38 * _local3);
}
};
}
}
function ShowMap() {
if (GameStatus == "play") {
TIMER.StopTimer();
_root.attachMovie("map", "map", 76);
var _local4 = Math.floor(Math.min(328 / Matrix[0].length, 246 / Matrix.length));
_root.TextShow(map.Name, GetLevelString(1), "GameFont", -2, 13, 1, 16, 0, 1000, 13421772);
var _local3 = 0;
while (_local3 < Matrix.length) {
var _local2 = 0;
while (_local2 < Matrix[0].length) {
if (Matrix[_local3][_local2] != ".") {
var _local6 = map.ins.attachMovie("black", FindName(_local3, _local2), GetDepth(_local3, _local2), {_x:_local2 * _local4, _y:_local3 * _local4, _width:_local4, _height:_local4, _alpha:40});
if (Matrix[_local3][_local2] == "e") {
var _local5 = new Color(_local6);
_local5.setRGB(3394611);
}
}
_local2++;
}
_local3++;
}
var _local10 = SizeJ - 1;
var _local11 = SizeI - 2;
map.ins._x = map.ins._x + (((328 - map.ins._width) / 2) - _local4);
map.ins._y = map.ins._y + (((246 - map.ins._height) / 2) - _local4);
if ((Level != 0) && (Level != 15)) {
map.ram._width = ((2 * _local10) * _local4) - _local4;
map.ram._height = (2 * _local11) * _local4;
map.ram._x = map.ins._x + ((((CurrentJ - _local10) + 1) + LastCurrentJ) * _local4);
map.ram._y = map.ins._y + (((CurrentI - _local11) + LastCurrentI) * _local4);
} else {
map.ram._x = 1000;
}
map.ins.attachMovie("EnergyReceiver_map", "EnergyReceiver", 19875, {_x:(EnergyReceiver.x + 1.5) * _local4, _y:(EnergyReceiver.y - 0.5) * _local4});
var _local13 = map.ins.attachMovie("map_arr", "map_arr", 19874, {_x:(BeginEnergy.j + 0.5) * _local4, _y:(BeginEnergy.i + 0.5) * _local4, _rotation:BeginEnergy.R});
_local3 = CheckPoint.y;
var _local2 = CheckPoint.x;
}
}
function ShowMenu() {
if ((!Game_Hint) && (((GameStatus == "play") || (GameStatus == "diff")) || (GameStatus == "spy"))) {
TIMER.StopTimer();
_root.attachMovie("menu", "menumain", 102);
}
}
function FunctionResume() {
_root.menumain.removeMovieClip();
}
function FunctionDownload() {
getURL (_root.DownloadLink.value, "_blank");
}
function FunctionRestartLevel() {
ClearMovie(_root, 1, 1);
SetLevel();
}
function FunctionExitLevel() {
ClearMovie(_root, 1, 1);
if (GameStatus == "spy") {
GameLevel++;
var _local2 = 0;
} else if (GameStatus == "diff") {
GameLevel++;
var _local2 = 1;
} else {
GameLevel++;
Level++;
var _local2 = 1;
}
InitBooks(_local2);
}
function FunctionSound() {
var _local1 = 0;
while (_local1 < (menu_buttons.length - 1)) {
if (menu_buttons[_local1].funct == "FSound") {
break;
}
_local1++;
}
var _local2 = menu_buttons[menu_buttons.length - 1].text;
menu_buttons[menu_buttons.length - 1].text = menu_buttons[_local1].text;
menu_buttons[_local1].text = _local2;
menumain.buttons["b" + _local1].InitText(_local2, 0, -2, "GameFont", -2, 20, 1, 20, 16777215, 1000, 0);
SoundOn = !SoundOn;
}
function FunctionNewGame() {
var _local2 = new GameClasses.GameHint(_root.createEmptyMovieClip("sSssS", 777), TextNewGame.text, 140, 150, GameClasses.GFunctions.create(_root, ShowNag, 1), FromHint);
}
function NNEWGAME() {
Level = (GameLevel = (score = (TotalScore = 0)));
InitArrSlide();
InitBooks();
}
function FromHint(c) {
if ((c || (Hint_arr[5] == 1)) || (GameStatus != "play")) {
if ((!Game_Hint.BLACK) || (Game_Hint.BLACK.onPress != null)) {
Game_Hint.removeMovieClip();
}
map.removeMovieClip();
menumain.removeMovieClip();
var _local1 = 0;
while (_local1 < Hint_Light.length) {
Hint_Light[_local1].removeMovieClip();
_local1++;
}
delete Hint_Light;
}
}
function Hint(N, F) {
clearInterval(getting_hint12);
if ((!Hint_Arr[N]) && ((!Game_Hint) || (Level == 0))) {
Hint_Arr[N] = 1;
ShowHint(N, F);
}
}
function GetHint() {
var _local5 = [];
var _local7 = 0;
var _local8 = [];
var _local4 = 0;
while (_local4 < Matrix.length) {
var _local6 = [];
var _local3 = 0;
while (_local3 < Matrix[0].length) {
_local6.push(0);
_local3++;
}
_local5.push(_local6);
_local4++;
}
_local4 = int(((CurrentI - SizeI) + LastCurrentI) + 1);
while (_local4 < int(((CurrentI + SizeI) + LastCurrentI) - 1)) {
var _local3 = int(((CurrentJ - SizeJ) + LastCurrentJ) + 1);
while (_local3 < int(((CurrentJ + SizeJ) + LastCurrentJ) - 1)) {
var _local1 = [];
if (((_local5[_local4][_local3] == 0) && (Matrix[_local4][_local3] != ".")) && (game[FindName(_local4, _local3)].Name.length < 4)) {
FindForHint(_local4, _local3, _local5, _local1);
FindForHint(_local4, _local3, _local5, _local1);
}
if ((_local1.length > _local7) && (_local1.length > 3)) {
_local7 = _local1.length;
_local8 = _local1;
}
var _local2 = 0;
while (_local2 < _local1.length) {
_local5[FindI(_local1[_local2]._name)][FindJ(_local1[_local2]._name)] = 0;
_local2++;
}
_local3++;
}
_local4++;
}
LightHint(_local8);
return(_local8);
}
function FindForHint(i, j, M, A) {
M[i][j] = 1;
var _local4 = game[FindName(i, j)];
A.push(_local4);
if ((((i >= int(((CurrentI - SizeI) + LastCurrentI) + 1)) && (i < int(((CurrentI + SizeI) + LastCurrentI) - 1))) && (j >= int(((CurrentJ - SizeJ) + LastCurrentJ) + 1))) && (j < int(((CurrentJ + SizeJ) + LastCurrentJ) - 1))) {
if ((_local4.Name == game[FindName(i, int(j + 1))].Name) && (M[i][j + 1] == 0)) {
FindForHint(i, int(j + 1), M, A);
} else if ((_local4.Name == game[FindName(i, int(j - 1))].Name) && (M[i][j - 1] == 0)) {
FindForHint(i, int(j - 1), M, A);
} else if ((_local4.Name == game[FindName(int(i + 1), j)].Name) && (M[i + 1][j] == 0)) {
FindForHint(int(i + 1), j, M, A);
} else if ((_local4.Name == game[FindName(int(i - 1), j)].Name) && (M[i - 1][j] == 0)) {
FindForHint(int(i - 1), j, M, A);
}
}
}
function LightHint(Arr) {
var _local1 = 0;
while (_local1 < Hint_Light.length) {
Hint_Light[_local1].removeMovieClip();
_local1++;
}
delete Hint_Light;
var _local8 = Arr[0];
var _local9 = false;
P = _local8;
Hint_Light = [];
_local1 = 1;
while (_local1 < Arr.length) {
if (Arr[_local1] == _local8) {
_local9 = true;
P = _local8;
} else {
N = Arr[_local1];
var _local6 = FindI(P._name);
var _local3 = FindI(N._name);
var _local4 = FindJ(P._name);
var _local2 = FindJ(N._name);
if (_local9) {
var _local5 = AttachArrow(_local3, _local2, _local6, _local4);
} else {
var _local5 = AttachArrow(_local6, _local4, _local3, _local2);
}
if (_local5) {
Hint_Light.push(_local5);
}
P = N;
}
_local1++;
}
}
function StartShowHint() {
clearInterval(getting_hint);
getting_hint = setInterval(function () {
if (((((GameStatus == "play") && (Hint_Light[1] == undefined)) && (Chain.length < 3)) && (LastCurrentI == 0)) && (LastCurrentJ == 0)) {
GetHint();
} else if (GameStatus != "play") {
clearInterval(getting_hint);
}
}, 7000);
}
function ShowHint(N, F) {
FromHint();
var _local3 = 160;
var _local2 = 100;
var _local4 = 0;
var _local7 = 0;
if (F) {
F();
F = null;
}
switch (N) {
case 0 :
Hint_Arr[N] = 0;
F = RestartAll1;
_local3 = _local3 + 20;
_local2 = _local2 + 140;
break;
case 1 :
_local3 = _local3 + 10;
_local2 = _local2 - 90;
_local4 = 5;
F = GameClasses.GFunctions.create(_root, Hint, 2);
break;
case 2 :
_local3 = _local3 - 100;
_local2 = _local2 + 20;
_local4 = -2;
_root.SetHint(45, 45, game.eff.r0, 45, 45);
break;
case 3 :
_local4 = 5;
_local3 = _local3 + 105;
_local2 = _local2 - 70;
_root.SetHint(15, 15, game[FindName(7, 8)], 15, 15);
break;
case 4 :
_local4 = 3;
_local3 = _local3 + 60;
_local2 = _local2 - 65;
_root.SetHint(15, 15, game[FindName(24, 6)], 15, 15);
break;
case 5 :
_local3 = _local3 - 25;
_local2 = _local2 - 65;
_local4 = 5;
_local7 = 1;
_root.SetHint(45, 15, game.eff, game[FindName(5, 5)]._x + 15, game[FindName(5, 5)]._y + 15);
Hint_Light = [];
_root.mouse_move.removeMovieClip();
_root.attachMovie("mouse_move", "mouse_move", 987, {_x:game[FindName(5, 4)]._x - 15, _y:game[FindName(5, 4)]._y - 18});
break;
case 6 :
_root.SetHint(15, 25, recarr.a, 0, -5);
_local4 = -2;
_local3 = _local3 - 90;
_local2 = _local2 + 20;
break;
case 7 :
_root.SetHint(TIMER._width / 2, TIMER._height / 2, TIMER, -10, 175, 80);
_local3 = _local3 - 40;
_local2 = _local2 + 50;
_local4 = -2;
break;
case 8 :
_root.SetHint(TIMER._width / 2, TIMER._height / 2, TIMER, -10, 175, 80);
_local3 = _local3 - 40;
_local2 = _local2 + 50;
_local4 = -2;
break;
case 9 :
_local4 = 5;
_local2 = _local2 + 80;
_root.SetHint(20, 20, gamepanel.b1, 20, 20);
F = GameClasses.GFunctions.create(_root, Hint, 40);
break;
case 10 :
_local4 = 5;
_local3 = _local3 + 70;
_local2 = _local2 + 110;
_root.SetHint(20, 20, gamepanel.b2, 20, 20);
break;
case 11 :
_local3 = _local3 + 100;
_local2 = _local2 + 110;
_local4 = 3;
_local7 = 1;
_root.SetHint(30, 30, Ramka.lamp, 0, 0, 60);
break;
case 12 :
_local3 = _local3 - 140;
_local2 = _local2 - 70;
_local4 = -3;
_root.SetHint(15, 15, game[FindName(7, 12)]);
break;
case 13 :
_local4 = 3;
_local3 = _local3 + 20;
_local2 = _local2 + 40;
_root.SetHint(15, 15, game[FindName(18, 3)], 15, 15);
break;
case 14 :
_local4 = 5;
_local3 = _local3 + 80;
_local2 = _local2 - 25;
_root.SetHint(15, 15, game[FindName(6, 7)], 15, 15);
break;
case 15 :
_local2 = _local2 + 135;
_local3 = _local3 - 5;
_local4 = 3;
_root.SetHint(gamepanel.map._width / 2, gamepanel.map._height / 4, gamepanel.map, 20, 20);
break;
case 16 :
LevelLose_s.start(SoundOn);
Hint_Arr[N] = 0;
F = FunctionRestartLevel;
break;
case 17 :
_local3 = _local3 + 40;
_local2 = _local2 + 10;
F = GameClasses.GFunctions.create(_root, Hint, 18);
break;
case 18 :
_local2 = _local2 + 140;
_local3 = _local3 - 140;
_local4 = -5;
_root.SetHint(20, 20, _root.Diff.bg.hint, 20, 20);
break;
case 19 :
_local2 = _local2 - 30;
_local3 = _local3 + 90;
_local4 = 5;
_root.SetHint(10, 60, _root.Diff.bg.ch3, 0, 50);
F = GameClasses.GFunctions.create(_root, Hint, 18);
break;
case 20 :
_local3 = _local3 - 120;
_local2 = _local2 + 20;
_local4 = -2;
_local7 = 1;
break;
case 21 :
_local4 = -4;
_local3 = _local3 - 80;
_local2 = _local2 + 70;
_local7 = 1;
break;
case 22 :
_local2 = _local2 + 100;
break;
case 23 :
_local2 = _local2 + 120;
break;
case 24 :
_local3 = _local3 + 100;
_local2 = _local2 + 50;
_local4 = 2;
F = GameClasses.GFunctions.create(_root, Hint, 35);
break;
case 25 :
_local3 = _local3 - 80;
_local2 = _local2 + 80;
_local4 = -3;
_local7 = 1;
_root.SetHint(_root.Books.Button_clip.playb._width / 3, _root.Books.Button_clip.playb._height / 3, _root.Books.Button_clip.playb);
break;
case 26 :
break;
case 27 :
_root.Books.Show = 1;
_root.Slides_Arr[_root.GameLevel] = 0;
_local2 = _local2 + 144;
_local3 = _local3 + 60;
F = GameClasses.GFunctions.create(_root.Books, _root.Books.Opened);
break;
case 28 :
_local3 = _local3 + 50;
F = GameClasses.GFunctions.create(_root, Hint, 29);
break;
case 29 :
_local3 = _local3 + 100;
_local2 = _local2 + 110;
_local4 = 3;
_root.SetHint(30, 30, Ramka.lamp, 0, 0, 60);
F = GameClasses.GFunctions.create(_root, Hint, 30);
break;
case 30 :
_local3 = _local3 + 20;
_local2 = _local2 + 40;
_local4 = 2;
_local7 = 1;
ShowSPYHint();
break;
case 31 :
_local7 = 1;
if (Items.lamp_1.onPress) {
_local3 = _local3 + 20;
_local2 = _local2 + 40;
_local4 = 2;
ShowSPYHint();
} else if (Items.lamp_2.onPress) {
_local3 = _local3 - 155;
_local2 = _local2 + 70;
_local4 = -3;
ShowSPYHint();
} else {
return(undefined);
}
break;
case 32 :
_local2 = _local2 + 110;
_local4 = 3;
_root.SetHint(Ramka.hint._width / 2, Ramka.hint._height / 4, Ramka.hint, 20, 20);
break;
case 33 :
_root.Books.playb.InitFunction(FromHint);
_root.Books.playb.area._y = -1000;
_root.SetHint(_root.Books.BookL_clip._width / 2, _root.Books.BookL_clip._height / 2, _root.Books.BookL_clip, _root.Books.BookL_clip._width / 2, _root.Books.BookL_clip._height / 2);
_local3 = _local3 + 105;
_local4 = 2;
_local7 = 1;
break;
case 34 :
_local3 = _local3 + 50;
_local2 = _local2 - 20;
F = GameClasses.GFunctions.create(_root, _root.SetHint, _root.Books.playb._width / 3, _root.Books.playb._height / 3, _root.Books.playb);
break;
case 35 :
_local3 = _local3 - 155;
_local2 = _local2 + 50;
_local4 = -2;
F = GameClasses.GFunctions.create(_root, Hint, 25);
break;
case 36 :
_local4 = 5;
_local2 = _local2 + 130;
break;
case 37 :
_local4 = 5;
_local3 = _local3 + 70;
_local2 = _local2 + 130;
break;
case 38 :
break;
case 39 :
break;
case 40 :
_local4 = 5;
_local3 = _local3 + 40;
_local2 = _local2 + 150;
_root.SetHint(8, 8, gamepanel.b1, 45, 35);
break;
case 41 :
return(undefined);
case 42 :
_local3 = _local3 - 5;
_local2 = _local2 - 80;
_local4 = 2;
break;
case 43 :
_local3 = _local3 - 0;
_local2 = _local2 + 0;
_local4 = 5;
Hint_Arr[N] = 0;
break;
case 44 :
_local3 = _local3 + 60;
_local2 = _local2 + 40;
_local4 = 4;
Hint_Arr[N] = 0;
break;
case 45 :
_local3 = _local3 + 95;
_local2 = _local2 + 20;
_local4 = 4;
Hint_Arr[N] = 0;
break;
case 46 :
break;
case 47 :
if (gamepanel.b1.fill >= 1) {
Hint(46);
return(undefined);
}
break;
case 48 :
}
if (_local3 || (_local2)) {
_local3 = ((_root["TextHint" + N].x == undefined) ? (_local3) : (_local3 + int(_root["TextHint" + N].x)));
_local2 = ((_root["TextHint" + N].x == undefined) ? (_local2) : (_local3 + int(_root["TextHint" + N].y)));
if (!F) {
F = _root.FromHint;
}
TIMER.StopTimer();
var _local8 = new GameClasses.GameHint(_root.createEmptyMovieClip("Game_Hint", 771), _root["TextHint" + N].text, _local3, _local2, F, null, _local4, _local7);
}
}
function ShowLevelComplete() {
var _local3 = _root.createEmptyMovieClip("L_C", 87);
_local3._x = 260;
_local3._y = 150;
TextShow(_local3, _root.TextLevelComplete.text, "gradient", 0, 0, 1, 50, 0, 1000, 0, 16777215, 16776960, 90);
_local3._xscale = (_local3._yscale = 10);
_local3.onEnterFrame = function () {
this._xscale = this._xscale + 4;
this._yscale = this._xscale;
if (this._xscale >= 100) {
delete this.onEnterFrame;
}
};
}
function InitSound() {
function AddSound(NameA, MC) {
for (var _local4 in NameA) {
_root[NameA[_local4]] = new GameClasses.GameSound(NameA[_local4], MC);
}
}
if ((!_root.SoundsClip1) || (!_root.SoundsClip2)) {
_root.createEmptyMovieClip("SoundsClip1", 198);
_root.createEmptyMovieClip("SoundsClip2", 199);
var _local3 = ["addChipInChain_s", "AddNewText_s", "BombExplode_s", "bonusComplete_s", "button_s", "clearChain_s", "ClickBonus_s", "CrossBonus_s", "DoBonus1_s", "DoBonus2_s", "FailSPY_s", "FlyAndOpenBook_s", "GoodClickDiff_s", "IceBreak_s", "ItemArriveSPY_s", "LevelComplete_s", "LevelLose_s", "ListingPage_s", "MoveHint_s", "start_s", "StatValue_s", "SuccessSPY_s", "UnlockBook_s"];
AddSound(_local3, _root.SoundsClip1);
_root.addChipInChain_s.setVolume(60);
_root.addChipInChain_s.C = 0;
_root.EnergyMove_s = new GameClasses.GameSound("EnergyMove_s", _root.SoundsClip2);
_root.EnergyMove_s.setVolume(0);
_root.EnergyMove_s.Volume = 0;
}
}
function ToolTip(MC, TXT, c) {
clearInterval(tool_tip);
tool_tip = setInterval(TOOL_TIP, 700, MC, TXT);
if (!c) {
MC.onRollOut = (MC.onReleaseOutside = ToolTipOut);
}
}
function TOOL_TIP(MC, TXT) {
clearInterval(tool_tip);
_root.attachMovie("tool_clip", "tool_clip", 888);
TextShow(tool_clip.txt, TXT, "GameFont", -2, 18, 1, 20, 16777215, 300, 0, 0, 0, 0, BOLDFONT);
var _local5 = tool_clip.txt._width;
var _local3 = tool_clip.txt._height;
tool_clip.ramka._width = _local5 + 30;
tool_clip.ramka._height = _local3 + 10;
tool_clip.ramka._x = 0;
tool_clip.ramka._y = (-_local3) - 15;
tool_clip.txt._x = (_local5 / 2) + 15;
tool_clip.txt._y = (-_local3) - 2;
tool_clip._x = _root._xmouse;
tool_clip._y = _root._ymouse;
tool_clip.onEnterFrame = function () {
var _local3 = _root._xmouse;
var _local4 = _root._ymouse;
if ((this._width + _local3) > 520) {
this._x = _local3 - this._width;
} else {
this._x = _local3;
}
this._y = _local4;
};
}
function ToolTipOut() {
clearInterval(tool_tip);
tool_clip.removeMovieClip();
}
function TOOL_TIP2(TXT, x, y) {
ToolTipOut();
_root.attachMovie("tool_clip2", "tool_clip", 888);
TextShow(tool_clip.txt, TXT, "GameFont", -3, 15, 1, 18, 16777215, 300, 0, 0, 0, 0, BOLDFONT);
var _local3 = tool_clip.txt._width;
var _local2 = tool_clip.txt._height;
tool_clip.ramka._width = _local3 + 30;
tool_clip.ramka._height = _local2 + 10;
tool_clip.ramka._x = 0;
tool_clip.ramka._y = (-_local2) - 15;
tool_clip.txt._x = (_local3 / 2) + 15;
tool_clip.txt._y = (-_local2) - 2;
tool_clip._x = x;
tool_clip._y = y;
clearInterval(tool_tip);
tool_tip = setInterval(ToolTipOut, 5000);
}
stop();
stop();
stop();
var BOLDFONT = "BOLDFONT";
var SoundOn = true;
var FontWhite = 16777215;
var GameStatus = "play";
var checkmaskinterval;
var notBlock = true;
var SizeI = 8;
var SizeJ = 10;
var MaxEnD = 3;
var CurrentI = 42;
var CurrentJ = 0;
var FonSize = 32;
var Size = 30;
var MaxAlpha = 100;
var SX = 0;
var SY = 0;
var Chain;
var MakeChain = false;
var SlideFall = 500;
var cheat = false;
var DelTileTime = 50;
var GameLevel = 0;
var Level = 0;
var Matrix;
var Musor;
var CheckPointN = 0;
var EnergyReceiverN = 0;
var CheckPoint;
var EnergyReceiver;
var LastDiameter;
var LastCurrentI;
var LastCurrentJ;
var maxsx = 6;
var maxsy = 4;
var Chain;
var elementn = 1;
var Slides_Arr = new Array(20);
var TotalScore = 0;
var TotalTime = 0;
var Hint_Arr = new Array(49);
var Make__Chain = "";
oKey = {};
oKey.onKeyDown = function () {
if (Key.isDown(35)) {
cheat = !cheat;
}
if (Key.isDown(36)) {
}
};
Key.addListener(oKey);
InitSound();
GameClasses.GFunctions.ClearAll(_root, 1, 1);
InitArrSlide();
InitBooks();
Symbol 7 MovieClip [poly] Frame 1
stop();
Symbol 693 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.7");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 694 MovieClip [__Packages.GameClasses.LoadGameXML] Frame 0
class GameClasses.LoadGameXML
{
var MCRoot, Loading, ISPYxml, LEVELxml, TEXTxml;
function LoadGameXML (MCRoot, iSPYPath, levelPath, textPath, Loading) {
this.MCRoot = MCRoot;
this.Loading = Loading;
ISPYxml = new XML(_root[iSPYPath]);
ISPYxml.ignoreWhite = true;
LoadSPYXML(ISPYxml);
LEVELxml = new XML(_root[levelPath]);
LEVELxml.ignoreWhite = true;
initcountXML(LEVELxml);
TEXTxml = new XML(_root[textPath]);
TEXTxml.ignoreWhite = true;
initTEXTXML(TEXTxml);
}
function initTEXTXML(ThisXML) {
MCRoot.Dialogs = new Array();
var _local13 = ThisXML.firstChild;
if (_local13 != undefined) {
var _local4 = _local13.childNodes;
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3].nodeName == "text") {
var _local9 = "";
var _local12 = _local4[_local3].attributes.id;
var _local10 = _local4[_local3].childNodes;
var _local7 = 0;
while (_local7 < _local10.length) {
_local9 = _local9 + (_local10[_local7].attributes.text + "|");
_local7++;
}
_local9 = _local9.substr(0, -1);
MCRoot[_local12] = _local9;
} else if (_local4[_local3].nodeName == "string") {
var _local8 = (MCRoot[_local4[_local3].attributes.id] = {});
for (var _local12 in _local4[_local3].attributes) {
_local8[_local12] = _local4[_local3].attributes[_local12];
}
} else if (_local4[_local3].nodeName == "menu_buttons") {
MCRoot.menu_buttons = new Array();
var _local6 = _local4[_local3].childNodes;
var _local5 = 0;
while (_local5 < _local6.length) {
var _local8 = {};
for (var _local12 in _local6[_local5].attributes) {
_local8[_local12] = _local6[_local5].attributes[_local12];
}
MCRoot.menu_buttons.push(_local8);
_local5++;
}
} else if (_local4[_local3].nodeName == "logo") {
var _local8 = {};
for (var _local12 in _local4[_local3].attributes) {
_local8[_local12] = _local4[_local3].attributes[_local12];
}
var _local11 = _root.logos.createEmptyMovieClip(_local8.name, _root.logos.getNextHighestDepth());
_local11._x = _local8.x;
_local11._y = _local8.y;
_local11.loadMovie(_local8.path);
}
_local3++;
}
if (!(--XMLCount)) {
Loading();
}
} else {
Text();
}
}
function initcountXML(ThisXML) {
var _local19 = ThisXML.firstChild;
if (_local19 != undefined) {
MCRoot.loadbar._visible = true;
var _local18 = (MCRoot.LEVELS = new Array());
var _local17 = _local19.childNodes;
var _local10 = 0;
while (_local10 < _local17.length) {
var _local7 = {};
_local7.Name = _local17[_local10].attributes.name;
var _local3 = _local17[_local10].childNodes;
var _local13 = new Array();
var _local2 = 0;
var _local8 = 0;
while (_local8 < _local3[_local2].childNodes.length) {
_local13.push(_local3[_local2].childNodes[_local8].attributes.n);
_local8++;
}
_local7.chips = _local13;
_local2++;
_local7.name = _local3[_local2].firstChild.toString();
var _local9 = new Array();
_local2++;
while (_local3[_local2].nodeName == "Line") {
var _local11 = _local3[_local2].firstChild.toString().split("");
_local9.push(_local11);
}
_local7.map = _local9;
if (_local3[_local2].nodeName == "BonusInfo") {
var _local12 = new Array();
_local8 = 0;
while (_local8 < _local3[_local2].childNodes.length) {
_local12.push(_local3[_local2].childNodes[_local8].attributes.r);
_local8++;
}
_local7.bonus = _local12;
_local2++;
}
if (_local3[_local2].nodeName == "Musor") {
var _local16 = new Array();
_local8 = 0;
while (_local8 < _local3[_local2].childNodes.length) {
_local16.push(_local3[_local2].childNodes[_local8].attributes.max);
_local8++;
}
_local7.musor = _local16;
_local2++;
}
var _local14 = new Array();
_local8 = 0;
while (_local8 < _local3[_local2].childNodes.length) {
var _local6 = {};
_local6.x = int(_local3[_local2].childNodes[_local8].attributes.x);
_local6.y = (_local9.length - int(_local3[_local2].childNodes[_local8].attributes.y)) - 1;
_local6.r = int(_local3[_local2].childNodes[_local8].attributes.r);
_local14.push(_local6);
_local8++;
}
_local7.checkpoints = _local14;
var _local15 = new Array();
_local2++;
_local8 = 1;
while (_local8 < _local3[_local2].childNodes.length) {
var _local4 = {};
var _local5 = _local3[_local2].childNodes[_local8];
_local4.x = int(_local5.firstChild.attributes.x);
_local4.y = (_local9.length - int(_local5.firstChild.attributes.y)) - 1;
_local4.width = int(_local5.firstChild.attributes.width);
_local4.height = int(_local5.firstChild.attributes.height);
_local4.time = int(_local5.childNodes[1].attributes.initTime);
_local15.push(_local4);
_local8++;
}
_local7.energy = _local15;
_local18[_local10] = _local7;
_local10++;
}
MCRoot.GlobalTime = getTimer();
if (!(--XMLCount)) {
Loading();
}
} else {
Text();
}
}
function LoadSPYXML(ThisXML) {
MCRoot.ISPY_Level = new Array();
var _local14 = ThisXML.firstChild;
if (_local14 != undefined) {
var _local12 = _local14.childNodes;
var _local8 = 0;
while (_local8 < _local12.length) {
var _local9 = new Array(2);
var _local4 = _local12[_local8].childNodes[0].childNodes;
var _local10 = new Array();
var _local2 = 0;
while (_local2 < _local4.length) {
var _local7 = {};
for (var _local13 in _local4[_local2].attributes) {
_local7[_local13] = _local4[_local2].attributes[_local13];
}
_local10.push(_local7);
_local2++;
}
_local9[0] = _local10;
_local4 = _local12[_local8].childNodes[1].childNodes;
_local10 = new Array();
_local2 = 0;
while (_local2 < _local4.length) {
var _local5 = {};
_local5.Name = _local4[_local2].attributes.splitItemId;
_local5.id = _local4[_local2].attributes.id;
_local5.Act = [];
var _local3 = 0;
while (_local3 < _local4[_local2].childNodes.length) {
var _local6 = {};
for (var _local11 in _local4[_local2].childNodes[_local3].attributes) {
_local6[_local11] = _local4[_local2].childNodes[_local3].attributes[_local11];
}
_local5.Act.push(_local6);
_local3++;
}
_local10[_local2] = _local5;
_local2++;
}
_local9[1] = _local10;
MCRoot.ISPY_Level[_local8] = _local9;
_local8++;
}
if (!(--XMLCount)) {
Loading();
}
} else {
Text();
}
}
function Text() {
MCRoot.KB.text = "Could not find game files";
}
var XMLCount = 3;
}
Symbol 695 MovieClip [__Packages.GameClasses.TileClass] Frame 0
class GameClasses.TileClass extends MovieClip
{
var useHandCursor, inside, ice, onPress, onMouseUp, onEnterFrame, onRollOver, onRollOut, blink, attachMovie, _name, Shine, swapDepths, getDepth;
function TileClass () {
super();
}
function InitSlide(Name, isRock, isIce, isStone) {
this.Name = Name;
this.isRock = isRock;
this.isIce = isIce;
this.isStone = isStone;
useHandCursor = false;
Hide();
}
function Hide() {
active = false;
inside.removeMovieClip();
if (isIce) {
ice.removeMovieClip();
}
onPress = null;
onMouseUp = null;
onEnterFrame = null;
onRollOver = Over;
onRollOut = Out;
}
function Over() {
if (!((isRock || (isStone)) || (isIce))) {
blink.removeMovieClip();
if (Name == "s2") {
attachMovie("blinkf", "blink", 5);
} else {
attachMovie("blink", "blink", 5);
}
}
if ((_root.GameStatus.substr(0, 9) == "actbonus2") || ((((_root.GameStatus.substr(0, 8) == "actbonus") && (!isStone)) && (!isIce)) && (_root.Matrix[_root.FindI(_name)][_root.FindJ(_name)] > 0))) {
_root.gamepanel["b" + _root.GameStatus.substr(8, 1)].Over(this);
}
}
function Out() {
if ((_root.GameStatus.substr(0, 9) == "actbonus2") || (((_root.GameStatus.substr(0, 8) == "actbonus") && (!isStone)) && (!isIce))) {
_root.gamepanel["b" + _root.GameStatus.substr(8, 1)].Out(this);
}
}
function StartZZZ() {
if ((!inchain) && (!isStone)) {
inchain = true;
inside.onEnterFrame = GameClasses.GFunctions.create(this, ZZZ);
}
}
function ZZZ() {
inside._x = 1 - (2 * Math.random());
inside._y = 1 - (2 * Math.random());
Shine._x = 1 - (2 * Math.random());
Shine._y = 1 - (2 * Math.random());
}
function StopZZZ() {
if (inchain) {
bombed = false;
inchain = false;
inside._x = 0;
inside._y = 0;
inside.onEnterFrame = null;
}
}
function Release() {
if (((!_root.menumain) && (!_root.map)) && ((!_root.Game_Hint) || (_root.Level == 0))) {
_root.ReleaseTile();
}
}
function Show() {
active = true;
if ((!isRock) && (!isStone)) {
onEnterFrame = _root.Over;
onMouseUp = Release;
}
onPress = _root.Press;
inside.removeMovieClip();
attachMovie(Name + "i", "inside", 0);
if (isIce) {
ice.removeMovieClip();
attachMovie("ice", "ice", 1);
}
if (isStone) {
ice.removeMovieClip();
}
}
function StartShine() {
if (!shine) {
shine = true;
Shine.removeMovieClip();
if (Name == "s2") {
attachMovie("whitef", "Shine", 2, {_alpha:30});
} else {
attachMovie("white", "Shine", 2, {_alpha:30});
}
}
}
function StopShine() {
if (shine) {
shine = false;
Shine.removeMovieClip();
}
}
function blowIce() {
isIce = false;
ice.removeMovieClip();
}
function Remove(i, j) {
if (isIce) {
_root.IceBreak_s.start(_root.SoundOn);
ice.removeMovieClip();
}
_root.game.fon[_name].lopata_eff.removeMovieClip();
i = int(i);
j = int(j);
onPress = null;
onMouseUp = null;
onEnterFrame = null;
onRollOver = null;
onRollOut = null;
_name = "rrr" + getTimer();
swapDepths(getDepth() - 9000);
onEnterFrame = function () {
this.inside._xscale = this.inside._xscale - 7;
this.inside._rotation = this.inside._rotation + (random(10) - 5);
var _local2 = this.inside._xscale;
this.inside._yscale = _local2;
this.inside._x = (15 - (0.15 * _local2)) + ((j * (100 - _local2)) / 10);
this.inside._y = (15 - (0.15 * _local2)) + ((i * (100 - _local2)) / 10);
if (_local2 < 5) {
this.removeMovieClip();
}
};
}
var Name = "";
var active = false;
var shine = false;
var inchain = false;
var bombed = false;
var bonus = false;
var isStone = false;
var isRock = false;
var isIce = false;
}
Symbol 696 MovieClip [__Packages.GameClasses.GFunctions] Frame 0
class GameClasses.GFunctions extends Object
{
function GFunctions () {
super();
}
static function create() {
var _local2 = function () {
var _local2 = arguments.callee.obj;
var _local3 = arguments.callee.func;
var _local4 = arguments.callee.arg;
return(_local3.apply(_local2, _local4));
};
_local2.obj = arguments[0];
_local2.func = arguments[1];
_local2.arg = arguments.splice(2, arguments.length - 1);
return(_local2);
}
static function ClearAll(mc, M, I, III) {
for (var _local5 in mc) {
if ((((typeof(mc[_local5]) == "movieclip") && (String(mc).split(".").length < String(mc[_local5]).split(".").length)) && (_local5 != "SoundsClip1")) && (_local5 != "SoundsClip2")) {
if ((_local5 == "TEXT") && (M)) {
mc[_local5].removeMovieClip();
} else {
ClearAll(mc[_local5], M, I);
if (M) {
mc[_local5].removeMovieClip();
}
}
}
if (I) {
clearInterval(mc[_local5]);
}
}
if ((((M && (!III)) && (mc != _root)) && (mc != _root.SoundsClip1)) && (mc != _root.SoundsClip2)) {
mc.removeMovieClip();
}
if (mc == _root) {
_root.InitSound();
}
}
}
Symbol 697 MovieClip [__Packages.GameClasses.CrossBonus] Frame 0
class GameClasses.CrossBonus extends MovieClip
{
var cross, R, TI, _name, TJ, attachMovie, fon, body, swapDepths, moving, removeMovieClip, arr1, arr2, arr3, arr4, arr5, arr6, arr7, arr8;
function CrossBonus () {
super();
}
function InitSlide(AR) {
cross = AR;
R = Math.min(20, AR[3]);
Moving();
TI = _root.FindI(_name);
TJ = _root.FindJ(_name);
}
function Moving() {
var _local2;
if (cross[0]) {
if (cross[4] != "D") {
_local2 = attachMovie("movesmallarrowbonus", "arr1", 1, {_xscale:-100});
_local2.gotoAndPlay(random(40));
}
if (cross[4] != "U") {
_local2 = attachMovie("movesmallarrowbonus", "arr2", 2, {_rotation:180});
_local2.gotoAndPlay(random(40));
}
}
if (cross[1]) {
if (cross[4] != "L") {
_local2 = attachMovie("movesmallarrowbonus", "arr3", 3, {_xscale:-100, _rotation:90});
_local2.gotoAndPlay(random(40));
}
if (cross[4] != "R") {
_local2 = attachMovie("movesmallarrowbonus", "arr4", 4, {_rotation:270});
_local2.gotoAndPlay(random(40));
}
}
if (cross[2]) {
_local2 = attachMovie("movesmallarrowbonus", "arr5", 5, {_xscale:-100, _rotation:45});
_local2.gotoAndPlay(random(40));
_local2 = attachMovie("movesmallarrowbonus", "arr6", 6, {_rotation:235});
_local2.gotoAndPlay(random(40));
_local2 = attachMovie("movesmallarrowbonus", "arr7", 7, {_xscale:-100, _rotation:135});
_local2.gotoAndPlay(random(40));
_local2 = attachMovie("movesmallarrowbonus", "arr8", 8, {_xscale:-100, _rotation:325});
_local2.gotoAndPlay(random(40));
}
if (cross[2]) {
attachMovie("bodybonus8", "body", 100);
attachMovie("bodybonus8fon", "fon", 0);
} else if (!cross[1]) {
attachMovie("bodybonus2", "body", 100);
attachMovie("bodybonus2fon", "fon", 0);
} else if (!cross[0]) {
attachMovie("bodybonus2", "body", 100, {_rotation:90});
attachMovie("bodybonus2fon", "fon", 0, {_rotation:90});
} else {
attachMovie("bodybonus4", "body", 100);
attachMovie("bodybonus4fon", "fon", 0);
}
}
function Blow(c) {
_root.FromHint();
if (c == undefined) {
fon._visible = false;
body._visible = false;
if (wasuse) {
return(undefined);
}
_root.CrossBonus_s.start(_root.SoundOn);
c = 1;
swapDepths(_root.GetDepth(TI + 100, TJ));
wasuse = true;
for (var _local4 in this) {
if (_local4.substr(0, 3) == "arr") {
this[_local4].gotoAndStop(1);
}
}
} else {
if (cross[0]) {
if (cross[4] != "U") {
BlowTile(TI + c, TJ);
}
if (cross[4] != "D") {
BlowTile(TI - c, TJ);
}
}
if (cross[1]) {
if (cross[4] != "L") {
BlowTile(TI, TJ + c);
}
if (cross[4] != "R") {
BlowTile(TI, TJ - c);
}
}
if (cross[2]) {
BlowTile(TI + c, TJ + c);
BlowTile(TI - c, TJ - c);
BlowTile(TI - c, TJ + c);
BlowTile(TI + c, TJ - c);
}
c++;
}
if (c <= R) {
clearInterval(moving);
moving = setInterval(GameClasses.GFunctions.create(this, Blowing, getTimer(), c), 0);
} else {
if (cross[1] || (cross[2])) {
_root.BonusFall(TJ, R);
} else {
_root.BonusFall(TJ);
}
_root.CheckEnergy();
removeMovieClip();
}
}
function BlowTile(i, j) {
_root.SetHint(15, 15, _root.game.eff, _root.game[_root.FindName(i, j)]._x + 15, _root.game[_root.FindName(i, j)]._y + 15, 10, "shleif3", 500);
if ((_root.Matrix[i][j] != ".") && (_root.Matrix[i][j] != undefined)) {
var _local7 = _root.Matrix[i][j] == "e";
_root.Matrix[i][j] = Math.max(1, _root.Matrix[i][j] - 1);
var _local3 = _root.game[_root.FindName(i, j)];
var _local2 = _root.Chain;
for (var _local6 in _local2) {
if (_local2[_local6] == _local3._name) {
_root.ClearFon();
_root.Chain = [];
}
}
if (_local3.bonus && (!_local3.wasuse)) {
_local3.Blow();
_root.ChangeFon(i, j, 1);
} else {
_local3.Remove();
_root.ChangeFon(i, j, 1);
}
if (_local7) {
_root.Matrix[i][j] = "e";
}
}
}
function Blowing(T, c) {
var _local6 = 200;
var _local4 = getTimer();
var _local7 = _root.FonSize;
var _local8 = (c - 1) * _local7;
var _local10 = c * _local7;
var _local5 = 1;
if (_local4 < (T + _local6)) {
_local5 = (_local4 - T) / _local6;
} else {
clearInterval(moving);
Blow(c);
}
var _local3 = _local8 + ((_local10 - _local8) * _local5);
arr1._x = 0;
arr2._x = 0;
arr3._x = _local3;
arr4._x = -_local3;
arr5._x = _local3;
arr6._x = -_local3;
arr7._x = _local3;
arr8._x = -_local3;
arr1._y = -_local3;
arr2._y = _local3;
arr3._y = 0;
arr4._y = 0;
arr5._y = -_local3;
arr6._y = _local3;
arr7._y = _local3;
arr8._y = -_local3;
}
var bombed = false;
var bonus = true;
var wasuse = false;
var blowint = true;
}
Symbol 698 MovieClip [__Packages.GameClasses.GameBonus] Frame 0
class GameClasses.GameBonus extends MovieClip
{
var type, _name, P, onRollOver, foll, _visible, useHandCursor, onPress, up2, up1, attachMovie;
function GameBonus () {
super();
type = int(_name.substr(1, 1));
P = _root;
ToBegin();
onRollOver = ThisOver;
}
function ThisOver() {
var _local3 = _root["TextBonus" + type].text;
_local3 = _local3.split("#BonusCharged#").join(String(int(fill * 100)));
if (fill >= 1) {
_local3 = _root.TextSpyReady.text;
}
if (!foll) {
_root.ToolTip(this, _local3);
}
}
function Add(N) {
if (fill < 1) {
fill = fill + N;
if (fill >= 1) {
fill = 1;
if (_visible) {
_root.Hint(35 + type);
}
_root.bonusComplete_s.start(_root.SoundOn && (_visible));
useHandCursor = true;
onPress = Press;
_root.SetHint(20, 20, this, 20, 20);
}
if (_visible) {
_root.Hint(41);
}
up1._y = (up2._y = 38 * (1 - fill));
}
}
function Act(MC) {
var _local6 = P.FindI(MC._name);
var _local8 = P.FindJ(MC._name);
if ((type == 1) && (P.Matrix[_local6][_local8] > 0)) {
_root.DoBonus1_s.start(_root.SoundOn);
P.ChangeFon(_local6, _local8, 1);
_root.game.fon[MC._name].lopata_eff.removeMovieClip();
delete foll.onEnterFrame;
foll.removeMovieClip();
_root.GameStatus = "play";
delete onPress;
} else if ((type == 1) && (P.Matrix[_local6][_local8] == 0)) {
_root.Hint(38);
} else if (type == 2) {
_root.ClearBombing(6);
_root.Chain = [];
_root.DoBonus2_s.start(_root.SoundOn);
var _local11 = P.game.eff.attachMovie("vzryv", "vz", P.game.eff.getNextHighestDepth(), {_x:MC._x + 15, _y:MC._y + 15, _rotation:random(300), _xscale:180, _yscale:180});
var _local5 = _local8 - 2;
while (_local5 <= (_local8 + 2)) {
var _local3 = _local6 - 2;
while (_local3 <= (_local6 + 2)) {
if ((Math.abs(_local6 - _local3) + Math.abs(_local8 - _local5)) < 3) {
var _local7 = P.FindName(_local3, _local5);
var _local4 = P.game[_local7];
if (!(_local4.isStone || (_local4.bonus))) {
_local4.removeMovieClip();
}
}
_local3++;
}
P.FallColomn(_local5);
_local5++;
}
delete foll.onEnterFrame;
foll.removeMovieClip();
_root.GameStatus = "play";
delete onPress;
}
ToBegin();
}
function Over(MC) {
if (type == 2) {
_root.Chain = [0, 0, 0, 0, 0, 0, MC._name];
_root.FillBombing();
} else {
_root.game.fon[MC._name].attachMovie("lopata_eff", "lopata_eff", 99);
}
}
function Out(MC) {
if (type == 2) {
_root.ClearBombing(6);
} else {
_root.game.fon[MC._name].lopata_eff.removeMovieClip();
}
}
function ToBegin() {
useHandCursor = false;
fill = 0;
up1._y = (up2._y = 44);
}
function Press() {
_root.Chain = [];
_root.ClickBonus_s.start(_root.SoundOn);
if (_root.GameStatus == "play") {
if (_visible) {
if (type > 1) {
_root.Hint(37 + type);
}
}
_root.GameStatus = "actbonus" + type;
ToBegin();
onPress = Release;
foll.removeMovieClip();
attachMovie(("bonus" + type) + "fon", "foll", 1, {_x:_root._xmouse + 10, _y:_root._ymouse + 20});
foll.onEnterFrame = function () {
this._x = (_root._xmouse + 10) - this._parent._x;
this._y = (_root._ymouse + 20) - this._parent._y;
};
}
}
function Release() {
_root.Chain = [];
_root.ClickBonus_s.start(_root.SoundOn);
fill = 1;
_root.GameStatus = "play";
up1._y = (up2._y = -2);
onPress = Press;
delete foll.onEnterFrame;
foll.removeMovieClip();
}
var active = false;
var Full = false;
var fill = 0;
var N = 0;
}
Symbol 699 MovieClip [__Packages.GameClasses.GameTimer] Frame 0
class GameClasses.GameTimer extends MovieClip
{
var t, top, mask, Tii, onEnterFrame, B, TI, E;
function GameTimer () {
super();
t = 0;
mask._y = (top._y = scale);
Tii = getTimer();
onEnterFrame = Appear;
}
function Appear() {
var _local2 = (getTimer() - Tii) / 3000;
if (_local2 >= 1) {
_local2 = 1;
delete onEnterFrame;
StopTimer();
B = getTimer();
}
mask._y = (top._y = (1 - _local2) * scale);
}
function DisAppear() {
onEnterFrame = function () {
this.top._y = this.top._y + 4;
this.mask._y = this.top._y;
if (this.top._y >= this.scale) {
delete this.onEnterFrame;
}
};
}
function SetTime(N) {
if (TI == undefined) {
B = getTimer();
} else {
var _local2 = getTimer();
B = _local2 - ((N * (_local2 - B)) / TI);
}
E = B + N;
TI = N;
}
function StartTimer() {
if (S > 0) {
E = E + (getTimer() - S);
B = B + (getTimer() - S);
S = 0;
}
onEnterFrame = ShowTime;
}
function StopTimer() {
_root.fly.red.removeMovieClip();
clearInterval(_root.showing_hint);
if (S == 0) {
S = getTimer();
delete onEnterFrame;
}
}
function ShowTime() {
t = (getTimer() - B) / (E - B);
if (t >= 1) {
_root.Hint(16);
t = 1;
delete onEnterFrame;
if (!_root.Failed) {
_root.Failed = 1;
_root.FallDown();
}
}
if (t > 0.8) {
_root.Hint(8);
}
mask._y = (top._y = t * scale);
}
function GetLastTime() {
return(Math.ceil(((1 - t) * TI) / 1000));
}
function GetTime() {
return(Math.floor((t * TI) / 1000));
}
function CountDown() {
onEnterFrame = function () {
this.mask._y = this.mask._y + 3;
this.top._y = this.mask._y;
if (this.mask._y >= this.scale) {
this.top._y = (this.mask._y = this.scale);
delete this.onEnterFrame;
}
};
}
var S = 0;
var scale = 325;
}
Symbol 700 MovieClip [__Packages.GameClasses.GameButton] Frame 0
class GameClasses.GameButton extends MovieClip
{
var area, _name, txt, createEmptyMovieClip, _parent, _xscale, _yscale, gotoAndPlay, onPress;
function GameButton () {
super();
InitButton(area);
}
function InitFunction(F) {
this.F = F;
}
function InitText(T, x, y, l, W, H, C, WT, HT) {
this.T = T;
if (!this[_name + "_text"]) {
txt = createEmptyMovieClip(_name + "_text", _parent.getNextHighestDepth());
txt._x = 0;
txt._y = 0;
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;
}
}
txt._xscale = 10000 / _xscale;
txt._yscale = 10000 / _yscale;
_root.TextShow(txt, T, l, W, H, C, WT, HT, 1000, 0);
}
function InitButton(B) {
gotoAndPlay("a");
if (onPress) {
F = onPress;
}
delete onPress;
B.onRollOver = function () {
this._parent.gotoAndPlay("a");
};
B.onRollOut = function () {
this._parent.gotoAndPlay("a");
};
B.onReleaseOutside = function () {
this._parent.gotoAndPlay("n");
this._parent.txt._y = this._parent.txt._y - 1;
};
B.onPress = function () {
_root.button_s.start(_root.SoundOn);
this._parent.gotoAndPlay("p");
this._parent.txt._y = this._parent.txt._y + 1;
};
B.onRelease = function () {
this._parent.F();
this._parent.gotoAndPlay("n");
this._parent.txt._y = this._parent.txt._y - 1;
};
}
var T = "O";
var F = null;
var sx = 0;
var sy = -2;
}
Symbol 701 MovieClip [__Packages.GameClasses.Books] Frame 0
class GameClasses.Books extends MovieClip
{
var bl, BookL_clip, attachMovie, createEmptyMovieClip, BOOK, Book_clip, CurrOpened, CurrCard, Arr3, p2, p1, NextI, note, Note_clip, STR, Button_clip, playb, downloadb, Show, Image_clip, DD1, Image_clipN, DDN1, DDN2, CurrText;
function Books () {
super();
bl = _root.GetBlack(this, 0, 1);
bl._visible = false;
BookL_clip = attachMovie("book_e", "BookL_clip", 10, {_x:69, _y:25});
createEmptyMovieClip("Note_clip", 19);
createEmptyMovieClip("Book_clip", 9);
BOOK = new GameClasses.Book(Book_clip, this);
if (_root.GameLevel == 0) {
_root.Hint(34);
BookL_clip.lock._visible = true;
} else {
BookL_clip.lock._visible = false;
ShowBook();
if (_root.GameLevel >= 6) {
Book_clip.onPress = GameClasses.GFunctions.create(BOOK, BOOK.Move);
}
}
if (_root.GameLevel == 1) {
_root.Hint(33);
BookL_clip.lock._visible = true;
BookL_clip.lock.onEnterFrame = function () {
if (this._currentframe < this._totalframes) {
this.gotoAndStop(this._currentframe + 1);
} else {
delete this.onEnterFrame;
}
};
}
var _local5 = Math.max(0, Math.floor((_root.GameLevel - 2) / 5));
var _local6 = "card" + _local5;
CurrOpened = (CurrCard = _local5);
if (_root.ArrBook4 == undefined) {
_root.ArrBook4 = new Array();
_root.ArrBookm4 = new Array();
InitText(_root.TextBook0.text);
InitText(_root.TextBook1.text);
InitText(_root.TextBook2.text);
InitText(_root.TextBook3.text);
}
var _local4 = 0;
while (_local4 < 4) {
if ((_local4 > CurrCard) || (_root.GameLevel == 0)) {
this["ppp" + _local4]._visible = false;
} else {
this["ppp" + _local4]._visible = true;
this["ppp" + _local4].onPress = GameClasses.GFunctions.create(this, OpenBookMark, _local4);
}
_local4++;
}
delete this["ppp" + CurrCard].onPress;
Arr3 = _root.ArrBook4[_local5];
TypeText(p2.p.p, p1.p.p, null, _local6, NextI);
p2.p.p.attachMovie("book_button", "b", 99, {_x:250, _y:348, _xscale:107, _yscale:115});
note = new GameClasses.Notebook(Note_clip, 250, 350, 1, 1);
TypeNoteText(Note_clip.p2, Note_clip.p1, STR, _local6, NextI);
Button_clip = attachMovie("book_button", "button_play", 95, {_x:515, _y:350});
Note_clip._visible = false;
Button_clip._visible = false;
playb.onPress = _root.SetLevel;
downloadb.onPress = _root.FunctionDownload;
downloadb.swapDepths(4);
Button_clip.playb.onPress = _root.SetLevel;
playb.onLoad = function () {
this.InitText(_root.TextPlay.text);
};
downloadb.onLoad = function () {
this.InitText(_root.TextDownload.text);
};
Button_clip.playb.onLoad = function () {
this.InitText(_root.TextPlay.text);
};
p2.p.p.b.playb.onLoad = function () {
this.InitText(_root.TextPlay.text);
};
p2.p.p.b.onPress = null;
p2.p.p.b.useHandCursor = false;
NextI = (_root.GameLevel - 2) % 5;
if (NextI < 0) {
NextI = 0;
}
SetText(NextI);
SetNoteText(NextI);
if (Open_Book) {
BOOK.Opened();
BookL_clip._visible = false;
}
InitBookmarks(_local5);
Note_clip["b" + CurrCard].swapDepths(1000);
}
function InitBookmarks(N) {
var _local2 = 0;
while (_local2 < 4) {
var _local3 = Note_clip.attachMovie("bookmark", "b" + _local2, _local2, {_x:((N < _local2) ? -200 : -245), _y:(_local2 * 80) + 20});
_local3.b.gotoAndStop(_local2 + 1);
if (_local2 <= CurrCard) {
_local3.onPress = GameClasses.GFunctions.create(this, OpenMark, _local2);
}
_local2++;
}
}
function OpenBookMark(N) {
OpenMark(N);
MoveBook();
}
function OpenMark(N) {
var _local5;
var _local3;
if (N != CurrOpened) {
if (N == CurrCard) {
_local3 = NextI;
_local5 = 5;
} else if (CurrOpened == CurrCard) {
_local5 = NextI;
_local3 = 5;
} else {
_local5 = 5;
_local3 = 5;
}
PrintNoteText(Note_clip.p4, Note_clip.p3, _root.ArrBook4[N][5 - _local3], "card" + N, _local3);
PrintNoteText(Note_clip.p2, Note_clip.p1, _root.ArrBook4[CurrOpened][5 - _local5], "card" + CurrOpened, _local5);
TypeText(p2.p.p, p1.p.p, _root.ArrBook4[N][5 - _local3], "card" + N, _local3 - 1);
Note_clip["b" + CurrOpened].swapDepths(CurrOpened);
Prints(Note_clip.p2.Text_clip2, _root["TextLevel" + CurrOpened].text);
CurrOpened = N;
Prints(Note_clip.p4.Text_clip2, _root["TextLevel" + CurrOpened].text);
Note_clip["b" + CurrOpened].swapDepths(1000);
note.Open(1, 1);
Block();
}
}
function ShowBook() {
bl._visible = false;
BookL_clip._visible = true;
BookL_clip.book.onPress = GameClasses.GFunctions.create(this, MoveBook);
BookL_clip.book.onRollOver = function () {
if ((this._currentframe == 1) || (this._currentframe == 60)) {
this.gotoAndPlay(2);
} else {
this.gotoAndPlay((this._totalframes - this._currentframe) + 1);
}
};
BookL_clip.book.onRollOut = (BookL_clip.book.onReleaseOutside = (BookL_clip.book.onRelease = function () {
this.gotoAndPlay((this._totalframes - this._currentframe) + 1);
}));
}
function MoveBook() {
BookL_clip._visible = false;
BOOK.Move();
bl._visible = true;
Block();
}
function SwitchBlack() {
bl.A = bl._alpha;
bl.onEnterFrame = function () {
var _local2 = ((this.A > 20) ? -1 : 1);
this._alpha = this._alpha + _local2;
if (((_local2 > 0) && (this._alpha > 30)) || ((_local2 < 0) && (this._alpha < 0))) {
delete this.onEnterFrame;
}
};
}
function ShowNote() {
bl._visible = true;
bl._alpha = 30;
Opened();
Note_clip._xscale = Book_clip.suc._xscale + 9;
Note_clip._yscale = Book_clip.suc._yscale + 1;
Note_clip._x = 274;
Note_clip._visible = true;
Button_clip._visible = true;
Note_clip._y = 43;
var _local2 = 0;
while (_local2 <= CurrCard) {
Note_clip["b" + _local2].swapDepths(_local2);
Note_clip["b" + _local2]._x = -220;
Note_clip["b" + _local2].CC = CurrOpened;
Note_clip["b" + _local2].ii = _local2;
Note_clip["b" + _local2].onEnterFrame = function () {
if (this._x <= -245) {
delete this.onEnterFrame;
if (this.CC == this.ii) {
this.swapDepths(1000);
}
} else {
this._x = this._x - 1;
}
};
_local2++;
}
}
function Opened() {
Show = int(_root.Slides_Arr[_root.GameLevel]);
_root.Slides_Arr[_root.GameLevel] = 1;
if (_root.GameLevel == 1) {
_root.Hint(24);
} else if (_root.GameLevel == 2) {
_root.Hint(27);
}
if ((NextI < 5) && (!Show)) {
ChangeText(NextI++);
SetText(NextI);
}
}
function UnShowNote() {
Block();
_root.FromHint();
SwitchBlack();
Button_clip._visible = false;
Note_clip._visible = false;
}
function M(c) {
if (c > 3) {
c = 3;
}
return("m" + int(c + 2));
}
function InitText(STR) {
var _local6 = [STR.length];
Arr3 = [];
Arr3[0] = STR;
var _local3 = 0;
while (_local3 < STR.length) {
_local6[_local3] = 0;
_local3++;
}
var _local5 = new Array(5);
_local3 = 0;
while (_local3 < 5) {
_local5[_local3] = new Array();
_local3++;
}
var _local7 = (STR.length - STR.split(" ").length) - STR.split("|").length;
STR = GetNextString(STR, 0, _local7 / 11, _local6, _local5[4]);
Arr3.push(STR);
STR = GetNextString(STR, 0, _local7 / 11, _local6, _local5[3]);
Arr3.push(STR);
STR = GetNextString(STR, 0, _local7 / 11, _local6, _local5[2]);
Arr3.push(STR);
STR = GetNextString(STR, 0, _local7 / 11, _local6, _local5[1]);
Arr3.push(STR);
STR = GetNextString(STR, 0, _local7 / 11, _local6, _local5[0]);
Arr3.push(STR);
_root.ArrBook4.push(Arr3);
_root.ArrBookm4.push(_local5);
}
function TypeText(MC1, MC2, STR, PIC, c) {
var _local3 = MC1.createEmptyMovieClip("Text_clip", 11);
var _local4 = MC1.createEmptyMovieClip("Text_clip", 111);
Image_clip = MC2.attachMovie(PIC, "c", 2);
Image_clip.gotoAndStop(M(c));
_local4._xscale = (_local4._yscale = (_local3._xscale = (_local3._yscale = (Image_clip._xscale = (Image_clip._yscale = 115)))));
_local3._x = _local3._x + 125;
_local3._y = _local3._y + 70;
_local4._x = _local4._x + 125;
_local4._y = _local4._y + 40;
Image_clip._x = 33;
Image_clip._y = 38;
DD1 = _local3.createEmptyMovieClip("DD1", 19);
if (STR == null) {
SetText(c);
} else {
Prints(_local3, STR);
}
Prints(_local4, _root["TextLevel" + CurrOpened].text);
}
function TypeNoteText(MC1, MC2, STR, PIC, c) {
var _local3 = MC1.createEmptyMovieClip("Text_clip", 11);
var _local4 = MC1.createEmptyMovieClip("Text_clip2", 111);
var _local5 = Note_clip.p4.createEmptyMovieClip("Text_clip2", 111);
Image_clipN = MC2.attachMovie(PIC, "c", 2);
Image_clipN.gotoAndStop(M(c));
_local5._xscale = (_local5._yscale = (_local4._xscale = (_local4._yscale = (_local3._xscale = (_local3._yscale = (Image_clipN._xscale = (Image_clipN._yscale = 115)))))));
_local3._x = _local3._x + 125;
_local3._y = _local3._y + 70;
_local4._x = _local4._x + 125;
_local4._y = _local4._y + 40;
_local5._x = _local5._x + 125;
_local5._y = _local5._y + 40;
Image_clipN._x = 33;
Image_clipN._y = 38;
DDN1 = _local3.createEmptyMovieClip("DDN1", 19);
DDN2 = _local3.createEmptyMovieClip("DDN2", 18);
SetNoteText(c);
Prints(_local4, _root["TextLevel" + CurrOpened].text);
}
function GetLetterText(MC, n) {
return(MC.TEXT[MC.TEXT.Arr[n]]);
}
function ChangeText(N) {
Block(4000);
_root.AddNewText_s.start(_root.SoundOn);
if (N < 5) {
Image_clipN.gotoAndPlay(M(N - 1));
Image_clipN.END = Image_clipN._currentframe + 65;
Image_clipN.onEnterFrame = function () {
if (this._currentframe == this.END) {
delete this.onEnterFrame;
} else {
this.gotoAndStop(this._currentframe + 1);
}
};
Image_clip.gotoAndStop(M(N));
DDN1._alpha = 0;
DDN2._alpha = 100;
DDN1.ttt = this;
DDN1.time = getTimer();
for (var _local5 in _root.ArrBookm4[CurrCard][N]) {
var _local3 = GetLetterText(DDN2, _root.ArrBookm4[CurrCard][N][_local5]);
_local3.X = _local3._x;
_local3.Y = _local3._y;
_local3.time = getTimer();
_local3.onEnterFrame = function () {
var _local2 = (getTimer() - this.time) / 40;
this._x = this.X + ((random(3) - 1) / 2);
this._y = this.Y + ((random(3) - 1) / 2);
if (_local2 >= 100) {
this._x = this.X;
this._y = this.Y;
delete this.onEnterFrame;
}
};
_local3 = GetLetterText(DDN1, _root.ArrBookm4[CurrCard][N][_local5]);
_local3.X = _local3._x;
_local3.Y = _local3._y;
_local3.time = getTimer();
_local3.onEnterFrame = function () {
var _local2 = (getTimer() - this.time) / 40;
this._x = this.X + ((random(3) - 1) / 4);
this._y = this.Y + ((random(3) - 1) / 4);
if (_local2 >= 100) {
this._x = this.X;
this._y = this.Y;
delete this.onEnterFrame;
}
};
}
DDN1.onEnterFrame = function () {
var _local3 = (getTimer() - this.time) / 40;
this._alpha = _local3;
this._parent.DDN2._alpha = 100 - _local3;
if (this._alpha >= 100) {
this.TEXT._x = 0;
this.TEXT._y = 0;
delete this.onEnterFrame;
this._parent.DDN2._alpha = 0;
if (this.ttt.NextI == 5) {
this.ttt.OpenNextMark();
_root.Hint(23);
} else if (this.ttt.NextI == 4) {
_root.Hint(22);
}
if (_root.GameLevel == 7) {
_root.Hint(42);
}
}
};
}
}
function OpenNextMark() {
this["ppp" + CurrCard].onPress = GameClasses.GFunctions.create(this, OpenBookMark, CurrCard);
var _local3 = ++CurrCard;
Note_clip["b" + CurrCard].onPress = GameClasses.GFunctions.create(this, OpenMark, CurrCard);
if (_local3 == 4) {
_root.Hint(26);
}
NextI = 0;
this["ppp" + CurrCard]._visible = true;
delete this["ppp" + CurrCard].onPress;
Note_clip["b" + _local3]._x = -220;
Note_clip["b" + _local3].onEnterFrame = function () {
if (this._x <= -245) {
delete this.onEnterFrame;
} else {
this._x = this._x - 1;
}
};
}
function GetNextString(STR, k1, k2, Arr2, ARRR) {
var _local6 = k1;
while (_local6 < k2) {
var _local1 = random(STR.length);
var _local3 = 0;
while ((Arr2[_local1] || (STR.substr(_local1, 1) == "|")) || (STR.substr(_local1, 1).charCodeAt() < 64)) {
_local1++;
if (_local1 >= STR.length) {
_local1 = 0;
}
_local3++;
if (_local3 >= STR.length) {
trace(">");
break;
}
}
Arr2[_local1] = 1;
var _local2 = random(STR.length);
_local3 = 0;
while ((Arr2[_local2] || (STR.substr(_local2, 1) == "|")) || (STR.substr(_local2, 1).charCodeAt() < 64)) {
_local2++;
if (_local2 >= STR.length) {
_local2 = 0;
}
_local3++;
if (_local3 >= STR.length) {
trace(">m");
break;
}
}
Arr2[_local2] = 1;
ARRR.push(_local1);
ARRR.push(_local2);
var _local8 = STR.substr(_local1, 1);
var _local7 = STR.substr(_local2, 1);
STR = (STR.substr(0, _local1) + _local7) + STR.substr(_local1 + 1, 500);
STR = (STR.substr(0, _local2) + _local8) + STR.substr(_local2 + 1, 500);
_local6++;
}
return(STR);
}
function SetText(c) {
if (c <= 5) {
Prints(DD1, Arr3[5 - c]);
CurrText = Arr3[5 - c];
}
}
function SetNoteText(c) {
if (c < 5) {
Prints(DDN1, Arr3[5 - (c + 1)]);
Prints(DDN2, Arr3[5 - c]);
DDN1._alpha = 0;
DDN2._alpha = 100;
}
}
function Prints(MC, STR) {
_root.TextShow(MC, STR, "GameFont", -3, 15, 1, 18, 6697728, 200);
}
function PrintNoteText(MC1, MC2, T, P, c) {
var _local2 = MC1.createEmptyMovieClip("Text", 11);
var _local3 = MC2.attachMovie(P, "c", 2);
_local3.gotoAndStop(M(c - 1));
_local2._xscale = (_local2._yscale = (_local3._xscale = (_local3._yscale = 115)));
_local2._x = _local2._x + 125;
_local2._y = _local2._y + 70;
_local3._x = 33;
_local3._y = 38;
Prints(_local2, T);
}
function Block(N) {
if (!N) {
N = 2000;
}
var _local3 = _root.GetBlack(this, 0, 99, "bbbblll");
_local3.T = getTimer() + N;
_local3.onEnterFrame = function () {
if (getTimer() > this.T) {
this.removeMovieClip();
}
};
}
var Open_Book = false;
}
Symbol 702 MovieClip [__Packages.GameClasses.Book] Frame 0
class GameClasses.Book
{
var THIS, suc, v, f, ft, l, m, spax, spay, spaz, spaxx, spX, spY, spasc, spx, moving;
function Book (MC, p1) {
THIS = p1;
suc = MC.createEmptyMovieClip("suc", 0);
suc._x = 260;
suc._y = 250;
suc.createEmptyMovieClip("a", 2);
suc.createEmptyMovieClip("n", 9);
suc.createEmptyMovieClip("b", 4);
v = [0, 0, 0, -175, 0, 45, -175, 273, 45, 175, 0, 45, 175, 273, 45, -175, 0, 0, -175, 273, 0, 175, 0, 0, 173, 273, 0, -175, 0, -2, 175, 0, -2];
f = [1, 2, 3, 6, 5, 8, 9, 1, 10, 2, 6, 4, 6, 2, 5, 4, 8, 3];
ft = ["front_3d", "list_left_3d", "kor_r_3d", "pages_lo_3d", "pages_so_3d", "pages_so2_3d"];
l = new GameClasses.Figure3D(suc.a, v, f, ft);
f = [4, 3, 2, 7, 8, 5, 3, 10, 1, 2, 6, 4, 6, 2, 5, 4, 8, 3];
ft = ["back_3d", "list_right_3d", "kor_l_3d", "pages_lo_3d", "pages_so_3d", "pages_so2_3d"];
m = new GameClasses.Figure3D(suc.b, v, f, ft);
InitSplines();
DRAW();
p1.p1 = suc.a.list_left_3d1;
p1.p2 = suc.b.list_right_3d1;
}
function KeyMove() {
OK.onKeyDown = GameClasses.GFunctions.create(this, KeyControl);
Key.addListener(OK);
}
function InitSplines() {
spax = new Spline(0, 90, 180, 270, 360, 450);
spay = new Spline(-180, -180, -170, -170, -170, -180);
spaz = new Spline(-90, -90, -90, -100, -90, -90);
spaxx = new Spline(0, 0, 0, 2, 5, 90);
spX = new Spline(130, 200, 300, 300, 300, 300, 275);
spY = new Spline(100, 150, 150, 150, 160, 180, 195);
spasc = new Spline();
spx = new Spline();
var _local3 = 0;
while (_local3 < 6) {
spasc.addKey(42 + (_local3 * 9));
var _local2 = Math.cos(((_local3 * 90) * Math.PI) / 180);
if ((Math.abs(_local2) > 0.05) && (_local3 < 5)) {
_local2 = _local2 / (-Math.abs(_local2));
} else {
_local2 = 0;
}
_local2 = _local2 * ((273 * (45 + (_local3 * 5))) / 200);
spx.addKey(_local2);
_local3++;
}
spx.Calculate();
spasc.Calculate();
suc._xscale = (suc._yscale = spasc.getPoint(0));
suc._x = spX.getPoint(0) + spx.getPoint(0);
suc._y = spY.getPoint(0);
}
function Opened() {
var _local2 = 1;
forward = true;
ax0 = spax.getPoint(_local2);
ay0 = spay.getPoint(_local2);
az0 = spaz.getPoint(_local2);
axx = spaxx.getPoint(_local2);
suc._xscale = (suc._yscale = spasc.getPoint(_local2));
suc._x = spx.getPoint(_local2) + spX.getPoint(_local2);
suc._y = spY.getPoint(_local2);
DRAW();
THIS.ShowNote();
}
function Move() {
_root.FlyAndOpenBook_s.start(_root.SoundOn);
THIS.UnShowNote();
forward = !forward;
clearInterval(moving);
moving = setInterval(GameClasses.GFunctions.create(this, Moving, getTimer()), 0);
}
function Moving(T) {
var _local2 = (getTimer() - T) / 1500;
if (_local2 >= 1) {
_local2 = 1;
clearInterval(moving);
if (forward) {
THIS.ShowNote();
} else {
THIS.ShowBook();
}
}
if (!forward) {
_local2 = 1 - _local2;
}
ax0 = spax.getPoint(_local2);
ay0 = spay.getPoint(_local2);
az0 = spaz.getPoint(_local2);
axx = spaxx.getPoint(_local2);
suc._xscale = (suc._yscale = spasc.getPoint(_local2));
suc._x = spx.getPoint(_local2) + spX.getPoint(_local2);
suc._y = spY.getPoint(_local2);
DRAW();
}
function DRAW() {
ax0 = ax0 % 360;
ay0 = ay0 % 360;
az0 = az0 % 360;
l.Draw(((ax0 + axx) * Math.PI) / 180, (ay0 * Math.PI) / 180, (az0 * Math.PI) / 180);
m.Draw((((-ax0) + axx) * Math.PI) / 180, ((ay0 * Math.PI) / 180) + Math.PI, (az0 * Math.PI) / 180);
SWAP();
}
function SWAP() {
if ((suc.a.front_3d0._visible == true) && (vis)) {
vis = false;
suc.a.swapDepths(suc.b);
}
if ((suc.a.front_3d0._visible == false) && (!vis)) {
vis = true;
suc.a.swapDepths(suc.b);
}
}
function KeyControl() {
if (Key.getAscii() == 100) {
trace((((((ax0 + " ") + ay0) + " ") + az0) + " ") + axx);
}
if (Key.isDown(37)) {
ay0 = ay0 - 2;
}
if (Key.isDown(39)) {
ay0 = ay0 + 2;
}
if (Key.isDown(36)) {
az0 = az0 - 2;
}
if (Key.isDown(35)) {
az0 = az0 + 2;
}
if (Key.isDown(38)) {
ax0 = ax0 + 2;
}
if (Key.isDown(40)) {
ax0 = ax0 - 2;
}
if (Key.isDown(16)) {
axx = axx + 2;
}
if (Key.isDown(17)) {
axx = axx - 2;
}
if (Key.isDown(33)) {
suc._xscale = suc._xscale + 5;
suc._yscale = suc._yscale + 5;
}
if (Key.isDown(34)) {
suc._xscale = suc._xscale - 5;
suc._yscale = suc._yscale - 5;
}
DRAW();
}
var forward = false;
var canclick = true;
var axx = 0;
var ax0 = 0;
var ay0 = -180;
var az0 = -90;
var vis = true;
var startx = 260;
var starty = 195;
var OK = {};
}
Symbol 703 MovieClip [__Packages.GameClasses.Figure3D] Frame 0
class GameClasses.Figure3D
{
var vertex, facet, textures, This, xe, ye, ze, rx, ry, xi, yi, zi, fa, fb, fc, facetc;
function Figure3D (mc, V, F, T, S) {
vertex = V;
facet = F;
textures = T;
This = mc;
Init();
Scale = S != true;
}
function Init() {
xd = 0;
yd = 0;
zd = 0;
xe = new Array();
ye = new Array();
ze = new Array();
rx = new Array();
ry = new Array();
xi = new Array();
yi = new Array();
zi = new Array();
var _local2 = 0;
while (_local2 < (vertex.length / 3)) {
xi[_local2] = vertex[_local2 * 3];
yi[_local2] = vertex[(_local2 * 3) + 1];
zi[_local2] = vertex[(_local2 * 3) + 2];
_local2++;
}
fa = new Array();
fb = new Array();
fc = new Array();
facetc = new Array(facet.length);
_local2 = 0;
while (_local2 < (facet.length / 3)) {
fa[_local2] = facet[_local2 * 3];
fb[_local2] = facet[(_local2 * 3) + 1];
fc[_local2] = facet[(_local2 * 3) + 2];
var _local4 = textures[_local2] + _local2;
This[_local4].removeMovieClip();
This.attachMovie("poly", _local4, _local2);
var _local3 = This[_local4].p.attachMovie(textures[_local2], "p", 10);
var _local5 = {};
_local5.x = (_local3._width + _local3.getBounds().xMin) / 100;
_local5.y = (_local3._height + _local3.getBounds().yMin) / 100;
facetc[_local2] = _local5;
This[_local4]._visible = 0;
_local2++;
}
}
function Rotate(ax, ay, az) {
var _local5 = new Array();
var _local4 = new Array();
var _local3 = new Array();
var _local9 = Math.sin(ax);
var _local11 = Math.cos(ax);
var _local7 = Math.sin(ay);
var _local10 = Math.cos(ay);
var _local6 = Math.sin(az);
var _local8 = Math.cos(az);
var _local2 = 0;
while (_local2 < (vertex.length / 3)) {
_local4[_local2] = (yi[_local2] * _local11) - (zi[_local2] * _local9);
_local3[_local2] = (yi[_local2] * _local9) + (zi[_local2] * _local11);
_local5[_local2] = (xi[_local2] * _local10) + (_local3[_local2] * _local7);
ze[_local2] = (_local3[_local2] * _local10) - (xi[_local2] * _local7);
xe[_local2] = (_local5[_local2] * _local8) - (_local4[_local2] * _local6);
ye[_local2] = (_local5[_local2] * _local6) + (_local4[_local2] * _local8);
_local2++;
}
Focus();
}
function Draw(ax, ay, az) {
Rotate(ax, ay, az);
var sort = new Array();
var i = 0;
while (i < (facet.length / 3)) {
var xx = rx[fa[i]];
var yy = ry[fa[i]];
var nm = (textures[i] + i);
var dx = (xx - rx[fb[i]]);
var dy = (yy - ry[fb[i]]);
var dx1 = (xx - rx[fc[i]]);
var dy1 = (yy - ry[fc[i]]);
var a2 = (1024 + (kP * Math.atan2(dy1, dx1)));
var a1 = ((3072 - (kP * Math.atan2(dy, dx))) + a2);
var f = int(4095 & (a1 + 1));
var P = This[nm].p.p;
var lx = Math.sqrt((dx * dx) + (dy * dy));
var ly = Math.sqrt((dx1 * dx1) + (dy1 * dy1));
if (Scale) {
lx = lx / facetc[i].x;
ly = ly / facetc[i].y;
}
if (f < 2049) {
with (This[nm]) {
_x = xx;
_y = yy;
_rotation = 0.087890625 * a2;
gotoAndStop(f);
P._x = -0.5;
P._y = -0.5;
P._yscale = ly + 1;
P._xscale = lx + 1;
_visible = 1;
}
} else {
This[nm]._visible = 0;
}
sort.push({z:(ze[fa[i]] + ze[fb[i]]) + ze[fc[i]], f:nm});
i++;
}
sort.sortOn("z", 18);
var i = 0;
while (i < ((facet.length / 3) - 5)) {
This[sort[i].f].swapDepths(i);
i++;
}
}
function Focus() {
var _local2 = 0;
while (_local2 < (vertex.length / 3)) {
var _local3 = 1;
rx[_local2] = (xe[_local2] + xd) * _local3;
ry[_local2] = (ye[_local2] + yd) * _local3;
_local2++;
}
}
var kP = 651.898646904403;
var Foc = 10000;
var K = 10;
var xd = 0;
var yd = 0;
var zd = 0;
var Scale = false;
}
Symbol 704 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 705 MovieClip [__Packages.GameClasses.Notebook] Frame 0
class GameClasses.Notebook
{
var MC, W, H, Msx, Msy, Mlx, Mly, Mx, My, xd, yd, x1, y1, BookTexts, moving;
function Notebook (MC, w, h, BookTexts, l) {
this.MC = MC;
Init(w, h);
if (l) {
InitB();
}
InitPages(BookTexts);
}
function Init(w, h) {
W = w;
H = h;
MC.attachMovie("p1", "p1", 9, {_x:-W});
MC.attachMovie("p4", "p4", 10);
MC.attachMovie("p3", "p3", 40, {_x:W});
MC.attachMovie("p2", "p2", 20);
MC.attachMovie("l", "l", 30, {_x:W, _y:H});
MC.p2.l._width = (MC.p3.l._width = 1);
MC.p2.l._height = (MC.p3.l._height = 1);
MC.l.l._x = (MC.l.ll._x = (-W) * 2.5);
MC.l.l._y = (MC.l.ll._y = (MC.b._y = (MC.w._y = (-H) * 1.5)));
MC.l.l._width = (MC.l.ll._width = W * 2.5);
MC.l.l._height = (MC.l.ll._height = H * 3);
MC.p3.setMask(MC.l.l);
MC.p2.setMask(MC.l.ll);
MC.w.setMask(MC.p3.l);
MC.b.setMask(MC.p2.l);
}
function Initt(c) {
MC.w.removeMovieClip();
MC.b.removeMovieClip();
MC.attachMovie("whiteline", "w", 41);
MC.attachMovie("blackline", "b", 21);
MC.w.setMask(MC.p3.l);
MC.b.setMask(MC.p2.l);
MC.p2.l._width = (MC.p3.l._width = W);
MC.p2.l._height = (MC.p3.l._height = H);
MC.b._height = (MC.w._height = H * 3);
if (c == "d") {
MC.p2._x = 0;
MC.p3._x = W;
MC.l._x = W;
MC.l._rotation = 0;
MC.b._x = -1000;
Msx = 0;
Msy = H;
Mlx = 0;
Mly = 0;
Mx = W;
My = H;
} else if (c == "u") {
MC.p2._x = 0;
MC.p3._x = W;
MC.l._x = W;
MC.l._rotation = 0;
Msx = 0;
Msy = 0;
Mlx = 0;
Mly = H;
Mx = W;
My = 0;
} else if (c == "U") {
MC.p3._x = -2 * W;
MC.p2._x = -W;
MC.l._x = -W;
MC.l._rotation = 180;
Msx = 0;
Msy = 0;
Mlx = 0;
Mly = H;
Mx = -W;
My = 0;
} else if (c == "D") {
MC.p3._x = -2 * W;
MC.p2._x = -W;
MC.l._x = -W;
MC.l._rotation = 180;
MC.b._x = -1000;
Msx = 0;
Msy = H;
Mlx = 0;
Mly = 0;
Mx = -W;
My = H;
}
xd = Mx;
yd = My;
x1 = Mx;
y1 = My;
}
function D(x1, x2, y1, y2) {
return(Math.sqrt(Math.pow(x1 - x2, 2) + Math.pow(y1 - y2, 2)));
}
function Calll(c, x, y) {
if (x == undefined) {
x1 = MC[c]._x;
y1 = MC[c]._y;
} else {
x1 = x;
y1 = y;
}
var _local5 = D(x1, Msx, y1, Msy);
if (_local5 > W) {
x1 = Msx + (((x1 - Msx) * W) / _local5);
y1 = Msy + (((y1 - Msy) * W) / _local5);
}
_local5 = D(x1, Mlx, y1, Mly);
var _local3 = D(W, 0, H, 0);
if (_local5 > _local3) {
x1 = Mlx + (((x1 - Mlx) * _local3) / _local5);
y1 = Mly + (((y1 - Mly) * _local3) / _local5);
}
var _local7 = Mx;
var _local6 = My;
var _local9 = (x1 + _local7) / 2;
var _local8 = (y1 + _local6) / 2;
MC.l._x = (MC.b._x = (MC.w._x = _local9));
MC.l._y = (MC.b._y = (MC.w._y = _local8));
var _local2 = Math.atan2(_local6 - y1, _local7 - x1);
if (c == "d") {
MC.p3._x = x1 + (H * Math.sin(2 * _local2));
MC.p3._y = y1 - (H * Math.cos(2 * _local2));
} else if (c == "u") {
MC.p3._x = x1;
MC.p3._y = y1;
} else if (c == "U") {
if (_local2 == 0) {
_local2 = Math.PI;
}
MC.p3._x = x1 - (W * Math.cos(2 * _local2));
MC.p3._y = y1 - (W * Math.sin(2 * _local2));
} else if (c == "D") {
if (_local2 == 0) {
_local2 = Math.PI;
}
MC.p3._x = x1 + (_local3 * Math.sin((2 * _local2) - Math.atan(W / H)));
MC.p3._y = y1 - (_local3 * Math.cos((2 * _local2) - Math.atan(W / H)));
}
_local2 = _local2 * 57.2957795130823;
MC.l._rotation = (MC.b._rotation = (MC.w._rotation = _local2));
MC.p3._rotation = 2 * _local2;
}
function InitPages(BookTexts) {
for (var _local3 in BookTexts) {
MC[_local3].TEXT.removeMovieClip();
MC[_local3].TEXT1.removeMovieClip();
MC[_local3].TEXT2.removeMovieClip();
if (BookTexts[_local3].value.length < 10) {
AttachArt(MC[_local3], BookTexts[_local3].value);
} else {
AttachText(MC[_local3], BookTexts[_local3].value, BookTexts[_local3].s, BookTexts[_local3].d);
}
}
}
function Open(BookTexts, dir) {
_root.ListingPage_s.start(_root.SoundOn);
this.BookTexts = BookTexts;
InitPages(BookTexts);
var _local3 = new Spline();
_local3.addKey(H);
_local3.addKey(H * 0.75);
_local3.addKey(H);
_local3.Calculate();
var _local4 = getTimer();
var _local5 = 1500;
if (dir) {
Initt("d");
} else {
Initt("D");
}
notOpening = false;
MC.onEnterFrame = GameClasses.GFunctions.create(this, Move, _local4, _local5, _local3, dir);
}
function Move(T, TT, MS, dir) {
var _local3 = getTimer();
var _local2 = 1;
if (_local3 >= (T + TT)) {
_local2 = 1;
delete MC.onEnterFrame;
ResetImage();
} else {
_local2 = (_local3 - T) / TT;
}
if (dir) {
Calll("d", W - ((2 * W) * _local2), MS.getPoint(_local2));
} else {
Calll("D", (-W) + ((2 * W) * _local2), MS.getPoint(_local2));
}
}
function ResetImage() {
MC._parent.Opened();
notOpening = true;
MC.p2.l._width = (MC.p3.l._width = 1);
MC.p2.l._height = (MC.p3.l._height = 1);
MC.w.removeMovieClip();
MC.b.removeMovieClip();
}
function InitB() {
}
function AttachText(MC, Text, show, pa) {
TypeText(MC, Text, show, pa);
}
function AttachArt(MC, Str) {
MC.createEmptyMovieClip("TEXT", 0);
MC.TEXT.a.removeMovieClip();
var _local2 = MC.TEXT.attachMovie(Str, "a", 0);
}
function TypeText(MC, arttext, show, pa) {
var _local8 = 5;
MC.TEXT1.removeMovieClip();
MC.TEXT2.removeMovieClip();
var _local3 = 0;
if (pa.p == 2) {
var _local6 = MC.createEmptyMovieClip("TEXT1", MC.getNextHighestDepth());
_local3 = _local3 + (TypeText2(_local6, pa.t, 0, pa) + 10);
_local6 = MC.createEmptyMovieClip("TEXT2", MC.getNextHighestDepth());
_local6._y = _local3;
_local3 = _local3 + TypeText2(_local6, arttext, show, pa);
} else if (pa.p == 1) {
var _local6 = MC.createEmptyMovieClip("TEXT1", MC.getNextHighestDepth());
_local3 = _local3 + TypeText2(_local6, arttext, show);
_local6 = MC.createEmptyMovieClip("TEXT2", MC.getNextHighestDepth());
_local6._alpha = 0;
_local6._y = _local3;
_local3 = _local3 + TypeText2(_local6, pa.t, 0, pa);
} else {
var _local6 = MC.createEmptyMovieClip("TEXT1", MC.getNextHighestDepth());
_local3 = _local3 + TypeText2(_local6, arttext, show, pa);
}
}
function TypeText2(MC, arttext, show, pa) {
var _local9 = 0;
arttext = arttext.split("|").join(newline);
var _local8 = W - 32;
MC._y = MC._y + 20;
MC._x = 10;
MC.createTextField("TEXT", MC.getNextHighestDepth(), 7, 0, 0, 0);
if (typeof(pa) == "number") {
_local8 = _local8 + 20;
MC._x = 0;
MC._y = MC._y + pa;
}
MC.TEXT.multiline = true;
MC.TEXT.embedFonts = true;
MC.TEXT.autoSize = "left";
MC.TEXT.selectable = false;
var _local7 = new TextFormat();
_local7.font = "GameFont";
_local7.size = 10;
_local7.leading = 0;
_local7.bold = true;
_local7.color = 7811857 /* 0x773311 */;
_local7.align = "left";
_local7.leftMargin = 0;
_local7.rightMargin = 0;
var _local4 = arttext.split(" ");
var _local5 = "";
MC.TEXT._visible = false;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local6 = (_local5 + " ") + _local4[_local2];
MC.TEXT.text = _local6;
MC.TEXT.setTextFormat(_local7);
if (MC.TEXT._width > _local8) {
_local5 = _local5 + (newline + _local4[_local2]);
} else {
_local5 = _local5 + (" " + _local4[_local2]);
}
_local2++;
}
MC.TEXT.text = _local5;
MC.TEXT.setTextFormat(_local7);
MC.TEXT._visible = true;
_local9 = MC._height;
if (show) {
notOpening = false;
MC.TEXT.text = "";
clearInterval(moving);
var _local10 = 0;
var _local11 = 8000;
moving = setInterval(GameClasses.GFunctions.create(this, TypeTextSlow, getTimer(), MC.TEXT, _local5, _local7, _local11), _local10);
}
return(_local9);
}
function TypeTextSlow(T, MC, Text, format, Time) {
var _local2 = (getTimer() - T) / Time;
notOpening = false;
if (_local2 >= 1) {
_local2 = 1;
clearInterval(moving);
notOpening = true;
}
var _local3 = Text.substr(0, int(_local2 * Text.length));
MC.text = _local3;
MC.setTextFormat(format);
}
var notOpening = true;
}
Symbol 706 MovieClip [__Packages.GameClasses.GameMenu] Frame 0
class GameClasses.GameMenu extends MovieClip
{
var buttons, head;
function GameMenu () {
super();
var _local6 = _root.menu_buttons;
var _local4 = 0;
while (_local4 < (_local6.length - 1)) {
var _local5 = buttons.attachMovie("button_shir_s", "b" + _local4, (_local4 * 3) + 1);
_local5._x = _local6[_local4].x;
_local5._y = _local6[_local4].y;
_local5.InitText(_local6[_local4].text, 0, -2, "GameFont", -2, 20, 1, 20, 16777215, 1000, 0);
_local5.InitFunction(_root["Function" + _local6[_local4].funct.substr(1, 100)]);
_local4++;
}
_root.TextShow(head, _root.TextMenu.text, "gradient", -2, 12, 1, 28, 0, 1000, 0, 16777215, 16776960, 90);
}
}
Symbol 707 MovieClip [__Packages.GameClasses.GameHint] Frame 0
class GameClasses.GameHint extends Object
{
var This, Text, X, Y, F1, F2, ramka, text, BLACK, b1, showt, b2, xs, ys;
function GameHint (This, Text, X, Y, F1, F2, K, M) {
super();
_root.blcup.removeMovieClip();
this.This = This;
this.Text = Text;
this.X = X;
this.Y = Y;
this.F1 = F1;
this.F2 = F2;
ramka = This.attachMovie("ramka_tip", "ramka", 10, {useHandCursor:false});
text = This.createEmptyMovieClip("text", 20);
_root.TextShow(text, Text, "GameFont", -3, 16, 1, 18, _root.FontWhite, 220, 0, 0, 0, 0, _root.BOLDFONT);
var _local19 = text._width;
var _local7 = text._height;
text._x = 125;
text._y = 20;
if (M != 1) {
BLACK = This.attachMovie("black", "BLACK", 0, {_x:-2000, _y:-2000, _width:4000, _height:4000, _alpha:0, useHandCursor:false});
b1 = This.attachMovie("button_uzk_s", "b1", 30);
if ((F2 == null) || (F2 == undefined)) {
BLACK.onPress = null;
clearInterval(showt);
showt = setInterval(GameClasses.GFunctions.create(this, BLclick), 2000);
b1.InitText(_root.TextOk.text);
b1._x = 125;
b1._y = _local7 + 23;
} else {
b2 = This.attachMovie("button_uzk_s", "b2", 40);
BLACK.onPress = null;
b1._x = 75;
b2._x = 185;
b1._y = (b2._y = _local7 + 23);
b1.InitText(_root.TextYes.text);
b2.InitText(_root.TextNo.text);
}
} else {
_local7 = _local7 - 25;
}
InitRamka(_local7 + 45);
b1.InitFunction(GameClasses.GFunctions.create(this, AGA));
b2.InitFunction(GameClasses.GFunctions.create(this, NEA));
This._x = X;
This._y = Y;
if ((This._y + ramka._height) > 450) {
This._y = 50;
}
var _local4 = ramka.fairy;
_local4.body.gotoAndStop(1);
_local4.head.gotoAndStop(2);
if (K < -3) {
_local4._x = _local4._x + 110;
_local4._xscale = -100;
K = K + 2;
}
if (K > 3) {
_local4._x = _local4._x + 110;
_local4._xscale = -100;
K = K - 2;
}
if (K < 0) {
ramka._xscale = -100;
ramka._x = ramka._x + 250;
}
var _local8 = Math.max(Math.abs(K), 1);
_local4.body.gotoAndStop(_local8);
if (_local8 > 1) {
_local4.head.ROT = 1;
}
_root.SetHint(3, 3, _local4.body.uk, 0, 0, 14, "shleif", 999999);
_root.MoveHint_s.start(_root.SoundOn);
}
function BLclick() {
clearInterval(showt);
BLACK.onPress = GameClasses.GFunctions.create(this, AGA);
}
function DeleteTip() {
clearInterval(showt);
GameClasses.GFunctions.ClearAll(This, 1, 1);
}
function AGA() {
DeleteTip();
F1();
}
function NEA() {
DeleteTip();
F2();
}
function InitRamka(y) {
y = y + 15;
y = Math.max(y, 99);
ramka.up._y = 0;
ramka.md._y = 19;
ramka.dw._y = y - 80;
ramka.md._height = Math.max(0, y - 99);
ramka.fairy._y = ramka.dw._y - 30;
}
function Follow() {
xs = This._x - _root._xmouse;
ys = This._y - _root._ymouse;
This.onEnterFrame = GameClasses.GFunctions.create(this, Moving);
}
function UnFollow() {
delete This.onEnterFrame;
trace((int(This._x - 160) + " ") + int(This._y - 100));
}
function Moving() {
This._x = _root._xmouse + xs;
This._y = _root._ymouse + ys;
}
}
Symbol 708 MovieClip [__Packages.GameClasses.Score] Frame 0
class GameClasses.Score
{
var ScoreText, scoring;
function Score (ScoreText, sc) {
this.ScoreText = ScoreText;
score = sc;
ScoreText._y = ScoreText._y + 2;
ScoreText._x = ScoreText._x - 1;
AddScore = 0;
ShowScore();
}
function ScoreAddScore(chk) {
var _local2 = 5;
if (chk == "y") {
_local2 = 20;
}
if (AddScore > 0) {
score = score + _local2;
AddScore = AddScore - _local2;
ShowScore();
} else {
clearInterval(scoring);
AddScore = 0;
}
}
function ShowScore() {
_root.TextShow(ScoreText, String(score), "Arial", -3, 0, 0, 12, 0, 1000, 13421772);
}
function Add(Score1, chk) {
AddScore = AddScore + Score1;
var _local2 = 10;
if (AddScore < 30) {
_local2 = 200;
} else if (AddScore < 100) {
_local2 = 20;
} else if (AddScore > 300) {
chk = "y";
}
clearInterval(scoring);
scoring = setInterval(GameClasses.GFunctions.create(this, ScoreAddScore, chk), _local2);
}
var score = 0;
var AddScore = 0;
}
Symbol 709 MovieClip [__Packages.GameClasses.GameSound] Frame 0
class GameClasses.GameSound extends Sound
{
var Nu, duration, CurrV;
function GameSound (s, MC) {
super(MC);
super.attachSound(s);
var _local3 = MC.createEmptyMovieClip(s, MC.getNextHighestDepth());
_local3.S = this;
_local3.onEnterFrame = function () {
if (this._name == "EnergyMove_s") {
if (this.S.CurrV < this.S.Volume) {
this.S.CurrV++;
this.S.setVolume(this.S.CurrV);
} else if (this.S.CurrV > this.S.Volume) {
this.S.CurrV--;
this.S.setVolume(this.S.CurrV);
}
}
if ((this.S.position <= 0) || (this.S.position >= this.S.duration)) {
this.S.Can = true;
}
};
}
function start(SoundOn, s, l) {
var _local3 = true;
_local3 = SoundOn && ((C == 1) || (Can));
if (_local3) {
Can = false;
super.start(s, l);
}
}
function startE() {
clearInterval(Nu);
Nu = setInterval(GameClasses.GFunctions.create(this, startE), duration - 100);
if (_root.SoundOn) {
if (!CurrV) {
CurrV = 0;
}
super.start();
}
}
function stop() {
clearInterval(Nu);
super.stop();
}
var C = 1;
var Can = true;
}
Symbol 37 MovieClip [fon1] Frame 1
stop();
Symbol 37 MovieClip [fon1] Frame 2
stop();
Symbol 37 MovieClip [fon1] Frame 3
stop();
Symbol 37 MovieClip [fon1] Frame 4
stop();
Symbol 48 MovieClip [en1] Frame 8
stop();
_root.ToE(this._name);
Symbol 50 MovieClip [en2_1] Frame 8
stop();
_root.ToE(this._name);
Symbol 55 MovieClip [en2_2] Frame 8
stop();
_root.ToE(this._name);
Symbol 57 MovieClip [en3] Frame 8
stop();
_root.ToE(this._name);
Symbol 62 MovieClip [en4] Frame 8
stop();
_root.ToE(this._name);
stop();
Symbol 65 MovieClip [blow] Frame 18
stop();
this.removeMovieClip();
Symbol 74 MovieClip [s1] Frame 1
#initclip 33
Object.registerClass("s1", GameClasses.TileClass);
#endinitclip
Symbol 75 MovieClip [s2] Frame 1
#initclip 18
Object.registerClass("s2", GameClasses.TileClass);
#endinitclip
Symbol 76 MovieClip [s3] Frame 1
#initclip 19
Object.registerClass("s3", GameClasses.TileClass);
#endinitclip
Symbol 77 MovieClip [s4] Frame 1
#initclip 20
Object.registerClass("s4", GameClasses.TileClass);
#endinitclip
Symbol 84 MovieClip [rock] Frame 1
#initclip 21
Object.registerClass("rock", GameClasses.TileClass);
#endinitclip
Symbol 91 MovieClip [stone] Frame 1
#initclip 22
Object.registerClass("stone", GameClasses.TileClass);
#endinitclip
Symbol 99 MovieClip [bonus] Frame 1
#initclip 23
Object.registerClass("bonus", GameClasses.CrossBonus);
#endinitclip
Symbol 112 MovieClip [bonus1] Frame 1
#initclip 24
Object.registerClass("bonus1", GameClasses.GameBonus);
#endinitclip
Symbol 118 MovieClip [bonus2] Frame 1
#initclip 25
Object.registerClass("bonus2", GameClasses.GameBonus);
#endinitclip
Symbol 139 MovieClip [timer] Frame 1
#initclip 26
Object.registerClass("timer", GameClasses.GameTimer);
#endinitclip
Symbol 147 MovieClip [button_uzk_s] Frame 1
#initclip 27
Object.registerClass("button_uzk_s", GameClasses.GameButton);
#endinitclip
Symbol 147 MovieClip [button_uzk_s] Frame 10
stop();
Symbol 147 MovieClip [button_uzk_s] Frame 18
stop();
Symbol 209 MovieClip [blink] Frame 30
this.removeMovieClip();
Symbol 217 MovieClip [earth_bush] Frame 1
stop();
Symbol 217 MovieClip [earth_bush] Frame 20
this.gotoAndPlay(2);
Symbol 228 MovieClip [earth_bush_rise] Frame 1
if ((_root.GameStatus == "endround") && (this.C == 1)) {
this.gotoAndStop(45);
} else {
this.C = 0;
}
Symbol 228 MovieClip [earth_bush_rise] Frame 41
if (_root.GameStatus == "endround") {
stop();
_root.ShowStats();
this.C = 1;
}
Symbol 228 MovieClip [earth_bush_rise] Frame 100
stop();
_root.RestartAll();
Symbol 233 MovieClip [earth_chest] Frame 1
stop();
Symbol 233 MovieClip [earth_chest] Frame 20
this.gotoAndPlay(2);
Symbol 244 MovieClip [earth_dragon] Frame 1
stop();
Symbol 244 MovieClip [earth_dragon] Frame 20
this.gotoAndPlay(2);
Symbol 260 MovieClip [earth_stones] Frame 1
stop();
Symbol 260 MovieClip [earth_stones] Frame 20
this.gotoAndPlay(2);
Symbol 345 MovieClip [checker] Frame 1
stop();
Symbol 439 MovieClip [card3] Frame 1
stop();
Symbol 439 MovieClip [card3] Frame 65
stop();
Symbol 439 MovieClip [card3] Frame 130
stop();
Symbol 439 MovieClip [card3] Frame 195
stop();
Symbol 439 MovieClip [card3] Frame 260
stop();
Symbol 454 MovieClip [card2] Frame 1
stop();
Symbol 454 MovieClip [card2] Frame 65
stop();
Symbol 454 MovieClip [card2] Frame 130
stop();
Symbol 454 MovieClip [card2] Frame 195
stop();
Symbol 454 MovieClip [card2] Frame 260
stop();
Symbol 469 MovieClip [card0] Frame 1
stop();
Symbol 469 MovieClip [card0] Frame 65
stop();
Symbol 469 MovieClip [card0] Frame 130
stop();
Symbol 469 MovieClip [card0] Frame 195
stop();
Symbol 469 MovieClip [card0] Frame 260
stop();
Symbol 484 MovieClip [card1] Frame 1
stop();
Symbol 484 MovieClip [card1] Frame 65
stop();
Symbol 484 MovieClip [card1] Frame 130
stop();
Symbol 484 MovieClip [card1] Frame 195
stop();
Symbol 484 MovieClip [card1] Frame 260
stop();
Symbol 510 MovieClip Frame 1
stop();
Symbol 510 MovieClip Frame 21
_root.UnlockBook_s.start(_root.SoundOn);
Symbol 534 MovieClip [button] Frame 1
#initclip 28
Object.registerClass("button", GameClasses.GameButton);
#endinitclip
Symbol 534 MovieClip [button] Frame 10
stop();
Symbol 534 MovieClip [button] Frame 18
stop();
Symbol 542 MovieClip [button_shir_s] Frame 1
#initclip 29
Object.registerClass("button_shir_s", GameClasses.GameButton);
#endinitclip
Symbol 542 MovieClip [button_shir_s] Frame 10
stop();
Symbol 542 MovieClip [button_shir_s] Frame 18
stop();
Symbol 543 MovieClip [Books] Frame 1
#initclip 30
Object.registerClass("Books", GameClasses.Books);
#endinitclip
Symbol 565 MovieClip [button_small] Frame 1
#initclip 31
Object.registerClass("button_small", GameClasses.GameButton);
#endinitclip
Symbol 565 MovieClip [button_small] Frame 10
stop();
Symbol 565 MovieClip [button_small] Frame 18
stop();
Symbol 572 MovieClip Frame 1
stop();
Symbol 572 MovieClip Frame 30
stop();
Symbol 572 MovieClip Frame 60
stop();
Symbol 597 MovieClip [map] Frame 1
stop();
bl.onPress = (close.onPress = function () {
this._parent.removeMovieClip();
_root.UnShowMap();
});
bl.useHandCursor = false;
Symbol 617 MovieClip Frame 1
this.gotoAndPlay(40);
Symbol 617 MovieClip Frame 51
var C = (random(7) + 2);
this.C = C;
Symbol 617 MovieClip Frame 56
this.C--;
if (this.C <= 0) {
var r = (random(20) + 30);
this._parent.k1.gotoAndPlay(r);
this._parent.k2.gotoAndPlay(r);
} else {
this._parent.k1.gotoAndPlay(52);
this._parent.k2.gotoAndPlay(52);
}
Symbol 630 MovieClip Frame 1
if ((this.was == "r") || (this.ROT == 1)) {
this.r = 2;
this.was = "l";
} else {
this.r = 3;
this.was = "r";
}
this.N = (getTimer() + random(2000)) + 500;
this.onEnterFrame = function () {
if (getTimer() > this.N) {
this.N = (getTimer() + random(2000)) + 500;
this.gotoAndStop(this.r);
}
};
Symbol 630 MovieClip Frame 2
this.r = 1;
Symbol 630 MovieClip Frame 3
this.r = 1;
Symbol 635 MovieClip [menu] Frame 1
#initclip 32
Object.registerClass("menu", GameClasses.GameMenu);
#endinitclip
bl.onPress = null;
bl.useHandCursor = false;
Symbol 636 MovieClip [fly_text] Frame 30
stop();
this.removeMovieClip();
Symbol 671 MovieClip Frame 1
stop();
Symbol 677 MovieClip [blinkf] Frame 30
this.removeMovieClip();
Symbol 685 MovieClip [vzryv] Frame 9
stop();
this.removeMovieClip();