Frame 1
function get_txt(txt) {
if (_global.xml_lang[txt] == undefined) {
return(txt);
}
return(String(_global.xml_lang[txt]));
}
function _find_xml(name, item_xml) {
var _local2 = item_xml.childNodes;
var _local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1].nodeName == name) {
return(_local2[_local1]);
}
if (_local2[_local1].hasChildNodes()) {
var _local3 = _find_xml(name, _local2[_local1]);
if (_local3 != -1) {
return(_local3);
}
}
_local1++;
}
return(-1);
}
function show_trivia_txt(mc, dtxt, txt) {
dtxt.text = "";
mc.dtxt = dtxt;
mc.txt = txt;
mc.cur_let = 0;
mc.onEnterFrame = function () {
var _local4 = this.dtxt;
var _local5 = this.txt;
var _local8 = 0;
while (_local8 < 2) {
_local4.text = _local4.text + _local5.charAt(this.cur_let);
this.cur_let++;
if (_local5.charCodeAt(this.cur_let) == 32) {
var _local9 = _local4.text;
var _local10 = _local4.textHeight;
var _local3 = _local5.indexOf(" ", this.cur_let + 1);
var _local7 = _local5.indexOf("\r", this.cur_let + 1);
if (_local7 != -1) {
if (_local7 < _local3) {
_local3 = _local7;
}
}
if (_local3 == -1) {
_local3 = _local5.length;
}
var _local12 = _local3 - this.cur_let;
var _local6 = "";
var _local2 = this.cur_let;
while (_local2 < _local3) {
_local6 = _local6 + _local5.charAt(_local2);
_local2++;
}
_local4.text = _local4.text + _local6;
var _local11 = _local4.textHeight;
_local4.text = _local9;
if (_local11 != _local10) {
_local4.text = _local4.text + "\r";
this.cur_let++;
}
}
_local8++;
}
};
}
function root_load_and_play() {
if ((data_xml.loaded && (lang_xml.loaded)) && (ad_preloaded_showed)) {
_root.play();
}
}
function itemHandler1(obj, item) {
getURL ("http://badim.ru", "_blank");
}
function itemHandler2(obj, item) {
getURL ("http://kongregate.com/accounts/Badim", "_blank");
}
function itemHandler3(obj, item) {
getURL ("http://www.realore.com/", "_blank");
}
function itemHandler4(obj, item) {
getURL ("http://blitzgamer.com//", "_blank");
}
stop();
XML.prototype.ignoreWhite = true;
trace("ru.badim.utilz.1.5");
MovieClip.prototype.addESplash = function (color, knokout) {
var ttl = 10;
this.onEnterFrame = function () {
var _local2 = new flash.filters.GlowFilter(color, 0.8, ttl * 2, ttl * 2, 3, 1, false, knokout);
ttl--;
if (ttl < 1) {
this.filters = [];
delete this.onEnterFrame;
return(false);
}
this.filters = [_local2];
};
};
MovieClip.prototype.attachFontBut = function (tlname, tname, obj, act) {
var _local2 = this.attachMovie(tlname, tname, this.getNextHighestDepth(), obj);
_local2.make_me_font_but(act);
if (obj._label == undefined) {
_local2.dtxt.text = get_txt(tname);
} else {
_local2.dtxt.text = obj._label;
}
return(_local2);
};
MovieClip.prototype.make_me_font_but = function (act) {
var ntf = new TextFormat();
ntf.color = "0xf9860b";
var rtf = new TextFormat();
rtf.color = "0xd81b1b";
this.dtxt.setTextFormat(ntf);
this.dtxt.setNewTextFormat(ntf);
if (typeof(act) == "function") {
this.act = act;
}
this.set_label = function (txt) {
this._label = txt;
this.dtxt.text = txt;
};
this.set_disable = function (val) {
this._disabled = val;
if (val) {
this._alpha = 50;
} else {
this._alpha = 100;
}
this.gotoAndStop(this._def_frame);
};
this.onRollOver = function () {
if (!this._disabled) {
_root.snd.menu_toggle.start();
this.dtxt.text = ("-" + this._label) + "-";
this.dtxt.setTextFormat(rtf);
}
};
this.onRollOut = (this.onReleaseOutside = function () {
this.dtxt.text = this._label;
this.dtxt.setTextFormat(ntf);
});
this.onPress = function () {
if (!this._disabled) {
}
};
this.onRelease = function () {
if (!this._disabled) {
_root.snd.menu_click.start();
this.act();
}
};
};
MovieClip.prototype.attachBut = function (tlname, tname, obj, act) {
var _local2 = this.attachMovie(tlname, tname, this.getNextHighestDepth(), obj);
_local2.make_me_but(act);
if (obj._label == undefined) {
_local2.dtxt.text = get_txt(tname);
} else {
_local2.dtxt.text = obj._label;
}
_local2.set_label = function (txt) {
this.dtxt.text = txt;
};
return(_local2);
};
MovieClip.prototype.make_me_but = function (act) {
if (typeof(act) == "function") {
this.act = act;
}
this.gotoAndStop(1);
this._def_frame = 1;
this.set_disable = function (val) {
this._disabled = val;
if (val) {
this._alpha = 50;
this._def_frame = 4;
} else {
this._alpha = 100;
this._def_frame = 1;
}
this.gotoAndStop(this._def_frame);
};
this.onRollOver = function () {
if (!this._disabled) {
_root.snd.menu_toggle.start();
this.gotoAndStop(2);
}
};
this.onRollOut = (this.onReleaseOutside = function () {
this.gotoAndStop(this._def_frame);
});
this.onPress = function () {
if (!this._disabled) {
this.gotoAndStop(3);
this._press();
}
};
this.onRelease = function () {
if (!this._disabled) {
_root.snd.menu_click.start();
this.gotoAndStop(2);
this.act();
}
};
};
_global.mochiads_obj = {id:"4a5fff1a7a29b870", res:"700x440"};
_global.mochiscore_game_main_id = function () {
return(_global.mochiads_obj.id);
};
_global.mochiscore_ids_arr = ["a12c25e0f8022e07", "73d8f7f276d156f7", "dbc1172e50d6862f", "90794297a5f09034"];
_global.mochiscore_id = function () {
return(_global.mochiscore_ids_arr[_global.game_dif]);
};
_global.mochiads_id = function () {
return(_global.mochiads_obj.id);
};
_global.options_playsounds = true;
_global.options_showads = true;
_global.options_onefile = true;
_global.cheats_on = false;
_global.options_multylang = false;
_global.options_mochiad_preloader = true;
_global.options_mochiad_afterscore = true;
_global.options_mochiad_afterwin = true;
_global.options_lvleditor = false;
if (_global.options_lvleditor) {
_global.options_showgrid = true;
_global.options_colision_rings = true;
_global.options_show_points = true;
} else {
_global.options_showgrid = false;
_global.options_colision_rings = false;
_global.options_show_points = false;
}
CONST_PATH = "";
CONST_PATH_DATA = CONST_PATH + "data/";
CONST_PATH_GXF_DATA = CONST_PATH_DATA + "gfx/";
CONST_PATH_SXF_DATA = CONST_PATH_DATA + "sfx/";
var this_date = new Date();
_global.refresh_add = "";
if (this._url.indexOf("http") != -1) {
_global.refresh_add = "?fa" + this_date.valueOf();
}
if (_global.options_showads && (_global.options_mochiad_preloader)) {
_global.ad_preloaded_showed = false;
MochiAd.showPreloaderAd({id:_global.mochiads_id(), res:_global.mochiads_obj.res, ad_timeout:2000, ad_finished:function () {
_global.ad_preloaded_showed = true;
root_load_and_play();
}});
} else {
_global.ad_preloaded_showed = true;
}
var data_xml;
var lang_xml;
if (_global.options_onefile) {
data_xml = new XML("<data><maps><map bg_id=\"1\" stars=\"5\" char_start_y=\"165\" char_start_x=\"127\"><roads><road nextRoads=\"\" exy=\"0|270\" sxy=\"700|270\" id=\"3\" /><road nextRoads=\"\" exy=\"700|250\" sxy=\"0|250\" id=\"2\" /></roads><trees><tree _type=\"50\" _y=\"213\" _x=\"674\" /><tree _type=\"50\" _y=\"212\" _x=\"622\" /><tree _type=\"50\" _y=\"212\" _x=\"568\" /><tree _type=\"50\" _y=\"211\" _x=\"516\" /><tree _type=\"50\" _y=\"210\" _x=\"463\" /><tree _type=\"30\" _y=\"221\" _x=\"320\" /><tree _type=\"30\" _y=\"221\" _x=\"283\" /><tree _type=\"50\" _y=\"158\" _x=\"22\" /><tree _type=\"50\" _y=\"9\" _x=\"201\" /><tree _type=\"50\" _y=\"209\" _x=\"23\" /><tree _type=\"50\" _y=\"10\" _x=\"152\" /><tree _type=\"50\" _y=\"360\" _x=\"24\" /><tree _type=\"50\" _y=\"308\" _x=\"25\" /><tree _type=\"50\" _y=\"304\" _x=\"139\" /><tree _type=\"30\" _y=\"221\" _x=\"248\" /></trees><objs><obj _type=\"1\" _y=\"34\" _x=\"96\" /><obj _type=\"3\" _y=\"108\" _x=\"287\" /><obj _type=\"4\" _y=\"256\" _x=\"82\" /><obj _type=\"4\" _y=\"290\" _x=\"531\" /><obj _type=\"4\" _y=\"290\" _x=\"600\" /><obj _type=\"4\" _y=\"291\" _x=\"670\" /></objs></map><map bg_id=\"2\" stars=\"5\" char_start_y=\"346\" char_start_x=\"313\"><roads><road nextRoads=\"2|3|5\" exy=\"470|170\" sxy=\"470|400\" id=\"6\" /><road nextRoads=\"\" exy=\"470|0\" sxy=\"470|170\" id=\"5\" /><road nextRoads=\"5|3\" exy=\"470|170\" sxy=\"0|170\" id=\"4\" /><road nextRoads=\"\" exy=\"0|150\" sxy=\"450|150\" id=\"3\" /><road nextRoads=\"\" exy=\"450|400\" sxy=\"450|150\" id=\"2\" /><road nextRoads=\"5|3|2\" exy=\"450|150\" sxy=\"450|0\" id=\"1\" /></roads><trees><tree _type=\"50\" _y=\"102\" _x=\"412\" /><tree _type=\"30\" _y=\"282\" _x=\"421\" /><tree _type=\"30\" _y=\"198\" _x=\"418\" /><tree _type=\"30\" _y=\"283\" _x=\"392\" /><tree _type=\"30\" _y=\"196\" _x=\"389\" /><tree _type=\"30\" _y=\"282\" _x=\"268\" /><tree _type=\"30\" _y=\"283\" _x=\"237\" /><tree _type=\"30\" _y=\"195\" _x=\"268\" /><tree _type=\"30\" _y=\"196\" _x=\"239\" /><tree _type=\"30\" _y=\"284\" _x=\"125\" /><tree _type=\"30\" _y=\"196\" _x=\"96\" /><tree _type=\"30\" _y=\"284\" _x=\"96\" /><tree _type=\"50\" _y=\"115\" _x=\"115\" /><tree _type=\"50\" _y=\"115\" _x=\"66\" /><tree _type=\"50\" _y=\"115\" _x=\"21\" /><tree _type=\"50\" _y=\"56\" _x=\"413\" /><tree _type=\"50\" _y=\"14\" _x=\"414\" /><tree _type=\"50\" _y=\"289\" _x=\"505\" /><tree _type=\"50\" _y=\"336\" _x=\"504\" /><tree _type=\"50\" _y=\"381\" _x=\"503\" /><tree _type=\"50\" _y=\"192\" _x=\"504\" /><tree _type=\"50\" _y=\"145\" _x=\"505\" /><tree _type=\"50\" _y=\"22\" _x=\"627\" /><tree _type=\"30\" _y=\"194\" _x=\"124\" /><tree _type=\"50\" _y=\"23\" _x=\"679\" /></trees><objs><obj _type=\"1\" _y=\"32\" _x=\"570\" /><obj _type=\"3\" _y=\"182\" _x=\"652\" /><obj _type=\"2\" _y=\"50\" _x=\"289\" /><obj _type=\"4\" _y=\"172\" _x=\"33\" /></objs></map><map bg_id=\"3\" stars=\"5\" char_start_y=\"362\" char_start_x=\"72\"><roads><road nextRoads=\"\" exy=\"430|400\" sxy=\"430|220\" id=\"13\" /><road nextRoads=\"\" exy=\"700|220\" sxy=\"430|220\" id=\"12\" /><road nextRoads=\"13|12\" exy=\"430|220\" sxy=\"220|220\" id=\"11\" /><road nextRoads=\"\" exy=\"220|0\" sxy=\"220|220\" id=\"10\" /><road nextRoads=\"11|10\" exy=\"220|220\" sxy=\"0|220\" id=\"9\" /><road nextRoads=\"4\" exy=\"450|200\" sxy=\"450|400\" id=\"6\" /><road nextRoads=\"4\" exy=\"450|200\" sxy=\"700|200\" id=\"5\" /><road nextRoads=\"3\" exy=\"200|200\" sxy=\"450|200\" id=\"4\" /><road nextRoads=\"\" exy=\"0|200\" sxy=\"200|200\" id=\"3\" /><road nextRoads=\"3\" exy=\"200|200\" sxy=\"200|0\" id=\"2\" /><road nextRoads=\"\" exy=\"0|80\" sxy=\"80|80\" id=\"8\" /><road nextRoads=\"8\" exy=\"80|80\" sxy=\"80|0\" id=\"7\" /><road nextRoads=\"\" exy=\"100|0\" sxy=\"100|100\" id=\"1\" /><road nextRoads=\"1\" exy=\"100|100\" sxy=\"0|100\" id=\"0\" /></roads><trees><tree _type=\"30\" _y=\"166\" _x=\"84\" /><tree _type=\"30\" _y=\"244\" _x=\"349\" /><tree _type=\"50\" _y=\"1\" _x=\"162\" /><tree _type=\"50\" _y=\"253\" _x=\"390\" /><tree _type=\"50\" _y=\"162\" _x=\"695\" /><tree _type=\"50\" _y=\"255\" _x=\"696\" /><tree _type=\"50\" _y=\"2\" _x=\"257\" /><tree _type=\"50\" _y=\"386\" _x=\"394\" /><tree _type=\"50\" _y=\"389\" _x=\"484\" /><tree _type=\"50\" _y=\"255\" _x=\"484\" /><tree _type=\"30\" _y=\"121\" _x=\"249\" /><tree _type=\"30\" _y=\"169\" _x=\"120\" /><tree _type=\"30\" _y=\"294\" _x=\"477\" /><tree _type=\"30\" _y=\"246\" _x=\"522\" /><tree _type=\"50\" _y=\"161\" _x=\"255\" /><tree _type=\"50\" _y=\"161\" _x=\"160\" /><tree _type=\"30\" _y=\"168\" _x=\"294\" /><tree _type=\"30\" _y=\"121\" _x=\"166\" /><tree _type=\"30\" _y=\"293\" _x=\"396\" /></trees><objs><obj _type=\"4\" _y=\"203\" _x=\"574\" /><obj _type=\"4\" _y=\"203\" _x=\"639\" /><obj _type=\"4\" _y=\"80\" _x=\"34\" /></objs></map><map bg_id=\"4\" stars=\"5\" char_start_y=\"199\" char_start_x=\"336\"><roads><road nextRoads=\"12\" exy=\"230|80\" sxy=\"230|0\" id=\"59\" /><road nextRoads=\"\" exy=\"470|0\" sxy=\"470|80\" id=\"49\" /><road nextRoads=\"\" exy=\"180|400\" sxy=\"180|270\" id=\"33\" /><road nextRoads=\"8\" exy=\"250|300\" sxy=\"230|320\" id=\"32\" /><road nextRoads=\"18\" exy=\"180|270\" sxy=\"200|250\" id=\"31\" /><road nextRoads=\"17\" exy=\"230|320\" sxy=\"230|400\" id=\"30\" /><road nextRoads=\"\" exy=\"470|400\" sxy=\"470|320\" id=\"23\" /><road nextRoads=\"23|23|16\" exy=\"470|320\" sxy=\"450|300\" id=\"22\" /><road nextRoads=\"6\" exy=\"500|250\" sxy=\"520|270\" id=\"21\" /><road nextRoads=\"21|15\" exy=\"520|270\" sxy=\"520|400\" id=\"20\" /><road nextRoads=\"32|17\" exy=\"230|320\" sxy=\"180|270\" id=\"18\" /><road nextRoads=\"23|16\" exy=\"470|320\" sxy=\"230|320\" id=\"17\" /><road nextRoads=\"15\" exy=\"520|270\" sxy=\"470|320\" id=\"16\" /><road nextRoads=\"14\" exy=\"520|130\" sxy=\"520|270\" id=\"15\" /><road nextRoads=\"49|13\" exy=\"470|80\" sxy=\"520|130\" id=\"14\" /><road nextRoads=\"12\" exy=\"230|80\" sxy=\"470|80\" id=\"13\" /><road nextRoads=\"11\" exy=\"180|130\" sxy=\"230|80\" id=\"12\" /><road nextRoads=\"33|18\" exy=\"180|270\" sxy=\"180|130\" id=\"11\" /><road nextRoads=\"31|1\" exy=\"200|250\" sxy=\"250|300\" id=\"8\" /><road nextRoads=\"8\" exy=\"250|300\" sxy=\"450|300\" id=\"7\" /><road nextRoads=\"22|7\" exy=\"450|300\" sxy=\"500|250\" id=\"6\" /><road nextRoads=\"6\" exy=\"500|250\" sxy=\"500|150\" id=\"5\" /><road nextRoads=\"5\" exy=\"500|150\" sxy=\"450|100\" id=\"4\" /><road nextRoads=\"4\" exy=\"450|100\" sxy=\"250|100\" id=\"3\" /><road nextRoads=\"3\" exy=\"250|100\" sxy=\"200|150\" id=\"2\" /><road nextRoads=\"2\" exy=\"200|150\" sxy=\"200|250\" id=\"1\" /></roads><trees><tree _type=\"50\" _y=\"195\" _x=\"102\" /><tree _type=\"50\" _y=\"352\" _x=\"69\" /><tree _type=\"50\" _y=\"195\" _x=\"57\" /><tree _type=\"50\" _y=\"196\" _x=\"13\" /><tree _type=\"50\" _y=\"206\" _x=\"596\" /><tree _type=\"50\" _y=\"203\" _x=\"682\" /><tree _type=\"50\" _y=\"203\" _x=\"641\" /><tree _type=\"50\" _y=\"76\" _x=\"518\" /><tree _type=\"50\" _y=\"75\" _x=\"180\" /><tree _type=\"30\" _y=\"392\" _x=\"435\" /><tree _type=\"30\" _y=\"393\" _x=\"254\" /><tree _type=\"50\" _y=\"356\" _x=\"430\" /><tree _type=\"50\" _y=\"357\" _x=\"265\" /><tree _type=\"30\" _y=\"6\" _x=\"438\" /><tree _type=\"50\" _y=\"45\" _x=\"428\" /><tree _type=\"30\" _y=\"4\" _x=\"257\" /><tree _type=\"50\" _y=\"41\" _x=\"265\" /></trees><objs><obj _type=\"1\" _y=\"30\" _x=\"92\" /></objs></map><map bg_id=\"5\" stars=\"5\" char_start_y=\"340\" char_start_x=\"606\"><roads><road nextRoads=\"\" exy=\"180|0\" sxy=\"180|120\" id=\"9\" /><road nextRoads=\"9\" exy=\"180|120\" sxy=\"700|120\" id=\"8\" /><road nextRoads=\"\" exy=\"700|140\" sxy=\"160|140\" id=\"7\" /><road nextRoads=\"7\" exy=\"160|140\" sxy=\"160|0\" id=\"6\" /><road nextRoads=\"\" exy=\"500|400\" sxy=\"500|200\" id=\"5\" /><road nextRoads=\"2\" exy=\"520|180\" sxy=\"520|400\" id=\"4\" /><road nextRoads=\"\" exy=\"80|0\" sxy=\"80|180\" id=\"3\" /><road nextRoads=\"3\" exy=\"80|180\" sxy=\"520|180\" id=\"2\" /><road nextRoads=\"5\" exy=\"500|200\" sxy=\"60|200\" id=\"1\" /><road nextRoads=\"1\" exy=\"60|200\" sxy=\"60|0\" id=\"0\" /></roads><trees><tree _type=\"30\" _y=\"86\" _x=\"688\" /><tree _type=\"30\" _y=\"166\" _x=\"691\" /><tree _type=\"30\" _y=\"164\" _x=\"588\" /><tree _type=\"30\" _y=\"212\" _x=\"546\" /><tree _type=\"50\" _y=\"176\" _x=\"551\" /><tree _type=\"50\" _y=\"8\" _x=\"214\" /><tree _type=\"50\" _y=\"12\" _x=\"253\" /><tree _type=\"50\" _y=\"83\" _x=\"374\" /><tree _type=\"50\" _y=\"83\" _x=\"412\" /><tree _type=\"50\" _y=\"18\" _x=\"372\" /><tree _type=\"50\" _y=\"17\" _x=\"414\" /><tree _type=\"50\" _y=\"78\" _x=\"116\" /><tree _type=\"50\" _y=\"10\" _x=\"117\" /><tree _type=\"30\" _y=\"364\" _x=\"469\" /><tree _type=\"30\" _y=\"364\" _x=\"544\" /><tree _type=\"30\" _y=\"392\" _x=\"546\" /><tree _type=\"30\" _y=\"391\" _x=\"471\" /><tree _type=\"50\" _y=\"79\" _x=\"256\" /><tree _type=\"50\" _y=\"80\" _x=\"215\" /><tree _type=\"30\" _y=\"336\" _x=\"546\" /><tree _type=\"30\" _y=\"334\" _x=\"469\" /><tree _type=\"30\" _y=\"226\" _x=\"471\" /></trees><objs><obj _type=\"1\" _y=\"244\" _x=\"139\" /><obj _type=\"2\" _y=\"328\" _x=\"291\" /></objs></map><map bg_id=\"6\" stars=\"5\" char_start_y=\"200\" char_start_x=\"352\"><roads><road nextRoads=\"\" exy=\"0|270\" sxy=\"700|270\" id=\"3\" /><road nextRoads=\"\" exy=\"700|250\" sxy=\"0|250\" id=\"2\" /><road nextRoads=\"\" exy=\"0|130\" sxy=\"700|130\" id=\"1\" /><road nextRoads=\"\" exy=\"700|150\" sxy=\"0|150\" id=\"0\" /></roads><trees><tree _type=\"50\" _y=\"9\" _x=\"444\" /><tree _type=\"50\" _y=\"51\" _x=\"445\" /><tree _type=\"50\" _y=\"6\" _x=\"269\" /><tree _type=\"30\" _y=\"295\" _x=\"367\" /><tree _type=\"30\" _y=\"295\" _x=\"395\" /><tree _type=\"30\" _y=\"297\" _x=\"419\" /><tree _type=\"30\" _y=\"295\" _x=\"337\" /><tree _type=\"50\" _y=\"51\" _x=\"273\" /><tree _type=\"50\" _y=\"307\" _x=\"454\" /><tree _type=\"50\" _y=\"305\" _x=\"537\" /><tree _type=\"50\" _y=\"91\" _x=\"529\" /><tree _type=\"50\" _y=\"304\" _x=\"675\" /><tree _type=\"50\" _y=\"303\" _x=\"630\" /><tree _type=\"50\" _y=\"304\" _x=\"585\" /><tree _type=\"50\" _y=\"94\" _x=\"274\" /><tree _type=\"50\" _y=\"309\" _x=\"276\" /><tree _type=\"50\" _y=\"90\" _x=\"674\" /><tree _type=\"50\" _y=\"94\" _x=\"448\" /><tree _type=\"50\" _y=\"92\" _x=\"625\" /><tree _type=\"50\" _y=\"90\" _x=\"578\" /><tree _type=\"50\" _y=\"91\" _x=\"163\" /><tree _type=\"50\" _y=\"306\" _x=\"166\" /><tree _type=\"50\" _y=\"306\" _x=\"19\" /><tree _type=\"50\" _y=\"305\" _x=\"68\" /><tree _type=\"50\" _y=\"306\" _x=\"114\" /><tree _type=\"50\" _y=\"91\" _x=\"115\" /><tree _type=\"50\" _y=\"92\" _x=\"67\" /><tree _type=\"30\" _y=\"295\" _x=\"307\" /><tree _type=\"50\" _y=\"92\" _x=\"19\" /></trees></map><map bg_id=\"7\" stars=\"5\" char_start_y=\"194\" char_start_x=\"401\"><roads><road nextRoads=\"\" exy=\"600|0\" sxy=\"600|180\" id=\"13\" /><road nextRoads=\"13\" exy=\"600|180\" sxy=\"700|180\" id=\"12\" /><road nextRoads=\"\" exy=\"700|200\" sxy=\"600|200\" id=\"11\" /><road nextRoads=\"11\" exy=\"600|200\" sxy=\"500|400\" id=\"14\" /><road nextRoads=\"\" exy=\"180|0\" sxy=\"180|170\" id=\"10\" /><road nextRoads=\"10\" exy=\"180|170\" sxy=\"330|170\" id=\"9\" /><road nextRoads=\"9\" exy=\"330|170\" sxy=\"330|280\" id=\"8\" /><road nextRoads=\"8\" exy=\"330|280\" sxy=\"130|280\" id=\"7\" /><road nextRoads=\"7\" exy=\"130|280\" sxy=\"130|400\" id=\"6\" /><road nextRoads=\"\" exy=\"150|400\" sxy=\"150|300\" id=\"5\" /><road nextRoads=\"5\" exy=\"150|300\" sxy=\"350|300\" id=\"4\" /><road nextRoads=\"4\" exy=\"350|300\" sxy=\"350|150\" id=\"3\" /><road nextRoads=\"3\" exy=\"350|150\" sxy=\"200|150\" id=\"2\" /><road nextRoads=\"2\" exy=\"200|150\" sxy=\"200|0\" id=\"1\" /></roads><trees><tree _type=\"50\" _y=\"17\" _x=\"379\" /><tree _type=\"50\" _y=\"66\" _x=\"381\" /><tree _type=\"50\" _y=\"112\" _x=\"381\" /><tree _type=\"50\" _y=\"289\" _x=\"385\" /><tree _type=\"50\" _y=\"159\" _x=\"383\" /><tree _type=\"30\" _y=\"344\" _x=\"311\" /><tree _type=\"30\" _y=\"214\" _x=\"497\" /><tree _type=\"50\" _y=\"18\" _x=\"232\" /><tree _type=\"50\" _y=\"19\" _x=\"142\" /><tree _type=\"50\" _y=\"113\" _x=\"233\" /><tree _type=\"50\" _y=\"67\" _x=\"233\" /><tree _type=\"50\" _y=\"378\" _x=\"185\" /><tree _type=\"50\" _y=\"380\" _x=\"90\" /><tree _type=\"50\" _y=\"334\" _x=\"185\" /><tree _type=\"70\" _y=\"193\" _x=\"31\" /></trees><objs><obj _type=\"1\" _y=\"28\" _x=\"90\" /><obj _type=\"3\" _y=\"36\" _x=\"309\" /><obj _type=\"4\" _y=\"311\" _x=\"31\" /><obj _type=\"4\" _y=\"311\" _x=\"530\" /><obj _type=\"4\" _y=\"310\" _x=\"601\" /><obj _type=\"4\" _y=\"309\" _x=\"671\" /></objs></map><map bg_id=\"8\" stars=\"5\" char_start_y=\"340\" char_start_x=\"613\"><roads><road nextRoads=\"\" exy=\"440|0\" sxy=\"440|400\" id=\"15\" /><road nextRoads=\"\" exy=\"340|400\" sxy=\"340|0\" id=\"14\" /><road nextRoads=\"\" exy=\"360|400\" sxy=\"360|0\" id=\"13\" /><road nextRoads=\"\" exy=\"420|0\" sxy=\"420|400\" id=\"12\" /><road nextRoads=\"\" exy=\"380|400\" sxy=\"380|0\" id=\"11\" /><road nextRoads=\"\" exy=\"400|0\" sxy=\"400|400\" id=\"10\" /></roads><trees><tree _type=\"70\" _y=\"364\" _x=\"667\" /><tree _type=\"70\" _y=\"300\" _x=\"667\" /><tree _type=\"70\" _y=\"364\" _x=\"291\" /><tree _type=\"70\" _y=\"363\" _x=\"485\" /><tree _type=\"50\" _y=\"215\" _x=\"665\" /><tree _type=\"50\" _y=\"140\" _x=\"563\" /><tree _type=\"50\" _y=\"140\" _x=\"609\" /><tree _type=\"30\" _y=\"262\" _x=\"568\" /><tree _type=\"70\" _y=\"367\" _x=\"95\" /><tree _type=\"30\" _y=\"212\" _x=\"258\" /><tree _type=\"30\" _y=\"212\" _x=\"143\" /><tree _type=\"50\" _y=\"275\" _x=\"17\" /><tree _type=\"50\" _y=\"146\" _x=\"19\" /><tree _type=\"50\" _y=\"256\" _x=\"478\" /><tree _type=\"70\" _y=\"367\" _x=\"30\" /></trees><objs><obj _type=\"1\" _y=\"28\" _x=\"90\" /><obj _type=\"2\" _y=\"280\" _x=\"203\" /><obj _type=\"2\" _y=\"150\" _x=\"203\" /><obj _type=\"4\" _y=\"-9\" _x=\"170\" /><obj _type=\"4\" _y=\"-10\" _x=\"483\" /><obj _type=\"4\" _y=\"-10\" _x=\"576\" /><obj _type=\"4\" _y=\"-9\" _x=\"233\" /><obj _type=\"4\" _y=\"-10\" _x=\"668\" /></objs></map><map bg_id=\"9\" stars=\"5\" char_start_y=\"339\" char_start_x=\"313\"><roads><road nextRoads=\"\" exy=\"420|0\" sxy=\"420|400\" id=\"12_13\" /><road nextRoads=\"\" exy=\"180|400\" sxy=\"180|0\" id=\"10_11\" /><road nextRoads=\"7_8\" exy=\"200|220\" sxy=\"200|200\" id=\"2_7\" /><road nextRoads=\"3_4\" exy=\"400|200\" sxy=\"400|220\" id=\"6_3\" /><road nextRoads=\"\" exy=\"200|400\" sxy=\"200|220\" id=\"7_8\" /><road nextRoads=\"7_8\" exy=\"200|220\" sxy=\"400|220\" id=\"6_7\" /><road nextRoads=\"6_7|6_3\" exy=\"400|220\" sxy=\"400|400\" id=\"5_6\" /><road nextRoads=\"\" exy=\"400|0\" sxy=\"400|200\" id=\"3_4\" /><road nextRoads=\"3_4\" exy=\"400|200\" sxy=\"200|200\" id=\"2_3\" /><road nextRoads=\"2_3|2_7\" exy=\"200|200\" sxy=\"200|0\" id=\"1_2\" /></roads><points><point y=\"0\" x=\"420\" id=\"13\" /><point y=\"400\" x=\"420\" id=\"12\" /><point y=\"400\" x=\"180\" id=\"11\" /><point y=\"0\" x=\"180\" id=\"10\" /><point y=\"400\" x=\"200\" id=\"8\" /><point y=\"220\" x=\"200\" id=\"7\" /><point y=\"220\" x=\"400\" id=\"6\" /><point y=\"400\" x=\"400\" id=\"5\" /><point y=\"0\" x=\"400\" id=\"4\" /><point y=\"200\" x=\"400\" id=\"3\" /><point y=\"200\" x=\"200\" id=\"2\" /><point y=\"0\" x=\"200\" id=\"1\" /></points><trees><tree _type=\"70\" _y=\"20\" _x=\"298\" /><tree _type=\"70\" _y=\"17\" _x=\"353\" /><tree _type=\"70\" _y=\"17\" _x=\"243\" /><tree _type=\"70\" _y=\"384\" _x=\"300\" /><tree _type=\"70\" _y=\"382\" _x=\"243\" /><tree _type=\"70\" _y=\"381\" _x=\"354\" /><tree _type=\"50\" _y=\"254\" _x=\"364\" /><tree _type=\"50\" _y=\"253\" _x=\"233\" /><tree _type=\"50\" _y=\"164\" _x=\"363\" /><tree _type=\"50\" _y=\"164\" _x=\"234\" /><tree _type=\"30\" _y=\"388\" _x=\"156\" /><tree _type=\"30\" _y=\"388\" _x=\"136\" /><tree _type=\"30\" _y=\"389\" _x=\"118\" /><tree _type=\"30\" _y=\"389\" _x=\"96\" /><tree _type=\"30\" _y=\"389\" _x=\"75\" /><tree _type=\"30\" _y=\"388\" _x=\"52\" /><tree _type=\"30\" _y=\"387\" _x=\"31\" /><tree _type=\"30\" _y=\"-4\" _x=\"139\" /><tree _type=\"70\" _y=\"200\" _x=\"508\" /><tree _type=\"70\" _y=\"227\" _x=\"462\" /><tree _type=\"70\" _y=\"171\" _x=\"462\" /><tree _type=\"70\" _y=\"226\" _x=\"628\" /><tree _type=\"70\" _y=\"227\" _x=\"682\" /><tree _type=\"70\" _y=\"174\" _x=\"626\" /><tree _type=\"30\" _y=\"389\" _x=\"11\" /><tree _type=\"50\" _y=\"382\" _x=\"680\" /><tree _type=\"50\" _y=\"383\" _x=\"639\" /><tree _type=\"50\" _y=\"385\" _x=\"597\" /><tree _type=\"50\" _y=\"385\" _x=\"558\" /><tree _type=\"50\" _y=\"385\" _x=\"521\" /><tree _type=\"50\" _y=\"10\" _x=\"640\" /><tree _type=\"50\" _y=\"12\" _x=\"597\" /><tree _type=\"50\" _y=\"12\" _x=\"556\" /><tree _type=\"50\" _y=\"13\" _x=\"516\" /><tree _type=\"50\" _y=\"11\" _x=\"683\" /><tree _type=\"70\" _y=\"174\" _x=\"679\" /></trees><objs><obj _type=\"2\" _y=\"90\" _x=\"600\" /><obj _type=\"2\" _y=\"310\" _x=\"601\" /><obj _type=\"1\" _y=\"17\" _x=\"93\" /><obj _type=\"3\" _y=\"221\" _x=\"52\" /></objs></map><map bg_id=\"10\" stars=\"5\" char_start_y=\"209\" char_start_x=\"168\"><roads><road nextRoads=\"\" exy=\"300|400\" sxy=\"350|300\" id=\"13_14\" /><road nextRoads=\"13_14\" exy=\"350|300\" sxy=\"400|250\" id=\"12_13\" /><road nextRoads=\"12_13\" exy=\"400|250\" sxy=\"500|200\" id=\"11_12\" /><road nextRoads=\"11_12\" exy=\"500|200\" sxy=\"700|200\" id=\"10_11\" /><road nextRoads=\"\" exy=\"400|0\" sxy=\"400|100\" id=\"5_6\" /><road nextRoads=\"5_6\" exy=\"400|100\" sxy=\"350|200\" id=\"4_5\" /><road nextRoads=\"4_5\" exy=\"350|200\" sxy=\"300|250\" id=\"3_4\" /><road nextRoads=\"3_4\" exy=\"300|250\" sxy=\"200|300\" id=\"2_3\" /><road nextRoads=\"2_3\" exy=\"200|300\" sxy=\"0|300\" id=\"1_2\" /></roads><points><point y=\"400\" x=\"300\" id=\"14\" /><point y=\"300\" x=\"350\" id=\"13\" /><point y=\"250\" x=\"400\" id=\"12\" /><point y=\"200\" x=\"500\" id=\"11\" /><point y=\"200\" x=\"700\" id=\"10\" /><point y=\"0\" x=\"400\" id=\"6\" /><point y=\"100\" x=\"400\" id=\"5\" /><point y=\"200\" x=\"350\" id=\"4\" /><point y=\"250\" x=\"300\" id=\"3\" /><point y=\"300\" x=\"200\" id=\"2\" /><point y=\"300\" x=\"0\" id=\"1\" /></points><trees><tree _type=\"70\" _y=\"2\" _x=\"689\" /><tree _type=\"70\" _y=\"363\" _x=\"368\" /><tree _type=\"70\" _y=\"399\" _x=\"350\" /><tree _type=\"70\" _y=\"241\" _x=\"545\" /><tree _type=\"70\" _y=\"242\" _x=\"589\" /><tree _type=\"70\" _y=\"243\" _x=\"642\" /><tree _type=\"70\" _y=\"242\" _x=\"693\" /><tree _type=\"70\" _y=\"108\" _x=\"341\" /><tree _type=\"70\" _y=\"66\" _x=\"351\" /><tree _type=\"70\" _y=\"252\" _x=\"70\" /><tree _type=\"70\" _y=\"252\" _x=\"126\" /><tree _type=\"70\" _y=\"253\" _x=\"179\" /><tree _type=\"70\" _y=\"12\" _x=\"350\" /><tree _type=\"30\" _y=\"345\" _x=\"502\" /><tree _type=\"50\" _y=\"379\" _x=\"528\" /><tree _type=\"70\" _y=\"252\" _x=\"20\" /><tree _type=\"30\" _y=\"324\" _x=\"475\" /></trees><objs><obj _type=\"1\" _y=\"30\" _x=\"91\" /><obj _type=\"4\" _y=\"-30\" _x=\"181\" /><obj _type=\"4\" _y=\"-29\" _x=\"291\" /><obj _type=\"4\" _y=\"10\" _x=\"480\" /><obj _type=\"4\" _y=\"10\" _x=\"622\" /><obj _type=\"4\" _y=\"251\" _x=\"661\" /><obj _type=\"2\" _y=\"149\" _x=\"200\" /><obj _type=\"7\" _y=\"162\" _x=\"550\" /></objs></map></maps></data>");
data_xml.loaded = true;
var strs = [];
strs.push({lang_name:"\u0420\u0443\u0441\u0441\u043A\u0438\u0439", lang_translator:"Reksnes", txt:"<lang game=\"\u0418\u0433\u0440\u0430\u0442\u044C\" scores=\"\u041E\u0447\u043A\u0438\" more_games=\"\u0414\u0440\u0443\u0433\u0438\u0435 \u0438\u0433\u0440\u044B\" about=\"About\" next=\"\u0414\u0430\u043B\u0435\u0435\" exit=\"\u0412\u044B\u0445\u043E\u0434\" name=\"\u0418\u043C\u044F\" dname=\"\u0418\u0433\u0440\u043E\u043A\" bonus_go=\"\u0411\u043E\u043D\u0443\u0441!\" bonus_lost=\"\u0411\u043E\u043D\u0443\u0441 \u0443\u0442\u0435\u0440\u044F\u043D\" loading=\"\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430\" speed_bonus_add=\"\u0421\u043A\u043E\u0440\u043E\u0441\u0442\u044C!\" live=\"\u0416\u0438\u0437\u043D\u044C\" inviciple=\"\u041D\u0435\u0443\u044F\u0437\u0432\u0438\u043C\u043E\u0441\u0442\u044C\" time=\"\u0412\u0440\u0435\u043C\u044F\" sound_on=\"\u0417\u0432\u0443\u043A \u0432\u043A\u043B\u044E\u0447\u0435\u043D\" sound_off=\"\u0417\u0432\u0443\u043A \u0432\u044B\u043A\u043B\u044E\u0447\u0435\u043D\" gather_all_stars=\"\u0421\u043E\u0431\u0435\u0440\u0438 \u0432\u0441\u0435 \u0437\u0432\u0435\u0437\u0434\u043E\u0447\u043A\u0438\" gotoExit=\"\u041F\u043E\u0440\u0430 \u0434\u043E\u043C\u043E\u0439\" go=\"\u0412\u043F\u0435\u0440\u0435\u0434!\" sandbox=\"\u041B\u0435\u0433\u043A\u043E\" normal=\"\u0421\u0440\u0435\u0434\u043D\u0435\" hard=\"\u0422\u044F\u0436\u0435\u043B\u043E\" impossible=\"\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u043E\" back=\"\u041D\u0430\u0437\u0430\u0434\" />"});
strs.push({lang_name:"Hungarian", lang_translator:"P\u00E9ter Szil\u00E1gyi", txt:"<lang game=\"Start\" scores=\"Neh\u00E9zs\u00E9g\" more_games=\"M\u00E9g t\u00F6bb j\u00E1t\u00E9k\" about=\"N\u00E9vjegy\" next=\"K\u00F6vetkez\u0151\" exit=\"Kij\u00E1rat\" name=\"N\u00E9v\" dname=\"J\u00E1t\u00E9kos\" bonus_go=\"B\u00F3nusz!\" bonus_lost=\"A b\u00F3nusz elveszett\" loading=\"T\u00F6lt\u00E9s\" speed_bonus_add=\"Sebess\u00E9g!\" live=\"\u00E9let\" inviciple=\"L\u00E1thatatlan\" time=\"Id\u0151\" sound_on=\"Zene be\" sound_off=\"Zene ki\" gather_all_stars=\"Gy\u0171jtsd \u00F6ssze a csillagokat\" gotoExit=\"Itt az id\u0151 hazamenni!\" go=\"Indul\u00E1s!\" sandbox=\"K\u00F6nny\u0171\" normal=\"Norm\u00E1l\" hard=\"Neh\u00E9z\" impossible=\"Lehetetlen\" back=\"Vissza\" />"});
strs.push({lang_name:"English", lang_translator:"Reksnes", txt:"<lang game=\"Go!\" scores=\"Scores\" more_games=\"More games\" about=\"About\" next=\"Next\" exit=\"Exit\" name=\"Name\" dname=\"Player\" bonus_go=\"Bonus!\" bonus_lost=\"Bonus lost\" loading=\"Loading\" speed_bonus_add=\"Speed!\" live=\"Life\" inviciple=\"Inviciple\" time=\"Time\" sound_on=\"Sound on\" sound_off=\"Sound off\" gather_all_stars=\"Gather all Stars\" gotoExit=\"Time back to Home\" go=\"Go!\" sandbox=\"Sandbox\" normal=\"Normal\" hard=\"Hard\" impossible=\"Impossible\" back=\"Back\" />"});
if (_root.dlang == undefined) {
_root.dlang = 2;
}
lang_xml = new XML(strs[_root.dlang].txt);
lang_xml.loaded = true;
_global.xml_lang = lang_xml.firstChild.attributes;
} else {
data_xml = new XML();
data_xml.onLoad = function (succes) {
trace("_succes:" + succes);
trace("_this:" + this);
root_load_and_play();
};
data_xml.load((CONST_PATH_DATA + "data.xml") + _global.refresh_add);
lang_xml = new XML();
lang_xml.onLoad = function (succes) {
trace("_succes:" + succes);
trace("_this:" + this);
_global.xml_lang = this.firstChild.attributes;
root_load_and_play();
};
lang_xml.load((CONST_PATH_DATA + "lang_en.xml") + _global.refresh_add);
}
_root.bar_mc.onEnterFrame = function () {
var _local4 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
this._xscale = (_local4 * 100) / _local3;
};
var my_cm = new ContextMenu(menuHandler);
my_cm.builtInItems.zoom = false;
my_cm.builtInItems.print = false;
my_cm.builtInItems.quality = false;
my_cm.builtInItems.play = false;
my_cm.builtInItems.loop = false;
my_cm.builtInItems.rewind = false;
my_cm.builtInItems.forward_back = false;
my_cm.customItems.push(new ContextMenuItem(get_txt("more_games"), itemHandler1));
this.menu = my_cm;
if (this._url.indexOf("file:") != -1) {
fscommand ("showmenu", false);
}
_root.createEmptyMovieClip("sdk_mc", 15433);
_root.sdk_mc.loadMovie("sdc.swf");
_root.kongregateServices.connect();
root_load_and_play();
Instance of Symbol 19 MovieClip in Frame 1
on (release) {
getURL ("http://www.amscom.ru", "_self");
}
Frame 3
function drawPoly(mc, start_xy, xy, lineStyle, fillStyle) {
mc.lineStyle(lineStyle._t, lineStyle._color, lineStyle._alpha);
if (fillStyle._alpha > 0) {
mc.beginFill(fillStyle._color, fillStyle._alpha);
}
var _local4;
var _local3;
_local4 = start_xy[0] + xy[0][0];
_local3 = start_xy[1] + xy[0][1];
mc.moveTo(_local4, _local3);
var _local1 = 1;
while (_local1 < xy.length) {
_local4 = start_xy[0] + xy[_local1][0];
_local3 = start_xy[1] + xy[_local1][1];
mc.lineTo(_local4, _local3);
_local1++;
}
if (fillStyle._alpha > 0) {
mc.endFill();
}
}
function drawLine(mc, xy, t_xy, lineStyle) {
mc.lineStyle(lineStyle._t, lineStyle._color, lineStyle._alpha);
mc.moveTo(xy[0], xy[1]);
mc.lineTo(t_xy[0], t_xy[1]);
}
function drawGrid(mc, start_xy, cols, rows, tw, th, lineStyle, fillStyle) {
mc.lineStyle(lineStyle._t, lineStyle._color, lineStyle._alpha);
var _local7 = cols * tw;
var _local8 = rows * th;
if (fillStyle._alpha > 0) {
mc.beginFill(fillStyle._color, fillStyle._alpha);
}
var _local4 = start_xy[0];
var _local3 = start_xy[1];
mc.moveTo(_local4, _local3);
mc.lineTo(_local4 + _local7, _local3);
mc.lineTo(_local4 + _local7, _local8 + _local3);
mc.lineTo(_local4, _local8 + _local3);
mc.lineTo(_local4, _local3);
if (fillStyle._alpha > 0) {
mc.endFill();
}
var _local1 = 0;
while (_local1 < rows) {
mc.moveTo(_local4, (_local1 * th) + _local3);
mc.lineTo(_local4 + _local7, (_local1 * th) + _local3);
_local1++;
}
_local1 = 0;
while (_local1 < cols) {
mc.moveTo(_local4 + (_local1 * tw), _local3);
mc.lineTo(_local4 + (_local1 * tw), _local8 + _local3);
_local1++;
}
}
function drawExCircle(mc, start_xy, r, lineStyle, fillStyle) {
mc.lineStyle(lineStyle._t, lineStyle._color, lineStyle._alpha);
if ((fillStyle._alpha != 0) or (fillStyle == undefined)) {
mc.beginFill(fillStyle._color, fillStyle._alpha);
}
var _local3 = start_xy[0];
var _local2 = start_xy[1];
mc.moveTo(_local3 + r, _local2);
mc.curveTo(r + _local3, (0.414213562373095 * r) + _local2, (0.707106781186547 * r) + _local3, (0.707106781186547 * r) + _local2);
mc.curveTo((0.414213562373095 * r) + _local3, r + _local2, _local3, r + _local2);
mc.curveTo((-0.414213562373095 * r) + _local3, r + _local2, (-0.707106781186547 * r) + _local3, (0.707106781186547 * r) + _local2);
mc.curveTo((-r) + _local3, (0.414213562373095 * r) + _local2, (-r) + _local3, _local2);
mc.curveTo((-r) + _local3, (-0.414213562373095 * r) + _local2, (-0.707106781186547 * r) + _local3, (-0.707106781186547 * r) + _local2);
mc.curveTo((-0.414213562373095 * r) + _local3, (-r) + _local2, _local3, (-r) + _local2);
mc.curveTo((0.414213562373095 * r) + _local3, (-r) + _local2, (0.707106781186547 * r) + _local3, (-0.707106781186547 * r) + _local2);
mc.curveTo(r + _local3, (-0.414213562373095 * r) + _local2, r + _local3, _local2);
if ((fillStyle._alpha != 0) or (fillStyle == undefined)) {
mc.endFill();
}
}
function drawCross(mc, x, y, r, color) {
mc.lineStyle(3, color);
mc.moveTo(x, y);
mc.lineTo(x + r, y + r);
mc.moveTo(x, y);
mc.lineTo(x - r, y + r);
mc.moveTo(x, y);
mc.lineTo(x + r, y - r);
mc.moveTo(x, y);
mc.lineTo(x - r, y - r);
}
function drawPath(mc, sx, sy, xy, element_width, element_height, lineColor, lineAlpha, lineTicknes, distMax, lineColorA, lineAlphaA, lineTicknesA) {
mc.lineStyle(lineTicknes, lineColor, lineAlpha);
var _local3 = ((xy[0][0] * element_width) + (element_width / 2)) + sx;
var _local2 = ((xy[0][1] * element_height) + (element_height / 2)) + sy;
var _local9 = xy[0][2];
var _local8 = 0;
mc.moveTo(_local3, _local2);
var _local1 = 1;
while (_local1 < xy.length) {
var _local5 = _local3;
var _local4 = _local2;
_local3 = ((xy[_local1][0] * element_width) + (element_width / 2)) + sx;
_local2 = ((xy[_local1][1] * element_height) + (element_height / 2)) + sy;
_local9 = xy[_local1][2];
if (distMax == 0) {
if (_local8 == 0) {
drawArrow(mc, _local5, _local4, _local3, _local2, 0, 0, lineColorA, lineAlphaA, lineTicknesA);
_local8 = 1;
} else {
drawArrow(mc, _local5, _local4, _local3, _local2, 0, 0, lineColor, lineAlpha, lineTicknes);
_local8 = 0;
}
} else if (_local9 > distMax) {
drawArrow(mc, _local5, _local4, _local3, _local2, 0, 0, lineColorA, lineAlphaA, lineTicknesA);
} else {
drawArrow(mc, _local5, _local4, _local3, _local2, 0, 0, lineColor, lineAlpha, lineTicknes);
}
_local1++;
}
}
function load_sfx() {
for (var _local3 in _root.snd) {
var _local2 = _local3 + ext;
_root.snd[_local3].attachSound(_local2);
}
}
function step_ini() {
var _local5 = _root.step;
var _local2 = 0;
while (_local2 < _local5.length) {
var _local4 = _local5[_local2];
_local4.onSoundComplete = function () {
if (!_root.reqest_stop) {
var _local2 = random(_root.step.length);
_root.step[_local2].start();
} else {
_root.step_paying = false;
}
};
_local2++;
}
}
function step_start() {
if (!_root.step_paying) {
_root.step_paying = true;
_root.reqest_stop = false;
var _local2 = random(_root.step.length);
_root.step[_local2].start();
}
}
function step_stop() {
_root.reqest_stop = true;
}
function show_main() {
trace("__main_depth:" + main_depth);
var _local8 = _root.attachMovie("main_menu_scr", "main", main_depth);
var _local7 = 350;
var _local6 = 40;
var _local13 = 0;
var _local12 = 70;
var _local11 = 0;
var _local17 = _local8.attachFontBut("butFont", "but" + (_local11++), {_x:_local7, _y:_local6}, null);
_local7 = _local7 + _local13;
_local6 = _local6 + _local12;
var _local15 = _local8.attachFontBut("butFont", "but" + (_local11++), {_x:_local7, _y:_local6}, null);
_local7 = _local7 + _local13;
_local6 = _local6 + _local12;
var _local16 = _local8.attachFontBut("butFont", "but" + (_local11++), {_x:_local7, _y:_local6}, null);
_local7 = _local7 + _local13;
_local6 = _local6 + _local12;
_local17.set_label(get_txt("game"));
_local17.act = function () {
show_choosedif_game();
};
_local15.set_label(get_txt("scores"));
_local15.act = function () {
show_choosescore();
};
_local16.set_label(get_txt("more_games"));
_local16.act = function () {
getURL ("http://badim.ru", "_blank");
};
but5_mc.set_label(get_txt("about"));
_local8.mish1_mc.make_me_but();
_local8.mish1_mc.addHint("\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u041F\u0440\u0430\u0432\u0438\u043B\u0430");
_local8.mish1_mc.act = function () {
getURL ("http://pravdd.ru", "_blank");
};
if (_global.options_multylang && (strs.length > 1)) {
_local7 = 90;
_local6 = 300;
_local13 = 0;
_local12 = 40;
for (var _local14 in strs) {
var _local5 = strs[_local14];
var _local4 = _local8.attachFontBut("butFontSmall", "but" + (_local11++), {_x:_local7, _y:_local6}, null);
_local4.set_label(_local5.lang_name);
_local4.txt = _local5.txt;
_local4.act = function () {
lang_xml = new XML(this.txt);
_global.xml_lang = lang_xml.firstChild.attributes;
show_main();
};
_local7 = _local7 + _local13;
_local6 = _local6 + _local12;
}
}
}
function show_choosedif_game() {
var _local5 = _root.attachMovie("main_menu_scr", "main", main_depth);
var _local4 = 350;
var _local3 = 40;
var _local8 = 0;
var _local7 = 50;
var _local6 = 0;
var _local13 = _local5.attachFontBut("butFont", "but" + (_local6++), {_x:_local4, _y:_local3}, null);
_local4 = _local4 + _local8;
_local3 = _local3 + _local7;
var _local10 = _local5.attachFontBut("butFont", "but" + (_local6++), {_x:_local4, _y:_local3}, null);
_local4 = _local4 + _local8;
_local3 = _local3 + _local7;
var _local9 = _local5.attachFontBut("butFont", "but" + (_local6++), {_x:_local4, _y:_local3}, null);
_local4 = _local4 + _local8;
_local3 = _local3 + _local7;
var _local11 = _local5.attachFontBut("butFont", "but" + (_local6++), {_x:_local4, _y:_local3}, null);
_local4 = _local4 + _local8;
_local3 = _local3 + _local7;
var _local12 = _local5.attachFontBut("butFont", "but" + (_local6++), {_x:_local4, _y:_local3}, null);
_local4 = _local4 + _local8;
_local3 = _local3 + _local7;
_local13.set_label(get_txt("sandbox"));
_local13.act = function () {
_global.game_dif = 0;
_global.start_game_time = getTimer();
_global.score_car_smashed = 0;
show_game(_find_xml("map", data_xml), 0);
};
_local10.set_label(get_txt("normal"));
_local10.act = function () {
_global.game_dif = 1;
_global.start_game_time = getTimer();
_global.score_car_smashed = 0;
show_game(_find_xml("map", data_xml), 0);
};
_local9.set_label(get_txt("hard"));
_local9.act = function () {
_global.game_dif = 2;
_global.start_game_time = getTimer();
_global.score_car_smashed = 0;
show_game(_find_xml("map", data_xml), 0);
};
_local11.set_label(get_txt("impossible"));
_local11.act = function () {
_global.game_dif = 3;
_global.start_game_time = getTimer();
_global.score_car_smashed = 0;
show_game(_find_xml("map", data_xml), 0);
};
_local12.set_label(get_txt("back"));
_local12.act = function () {
show_main();
};
_local5.mish1_mc.make_me_but();
_local5.mish1_mc.addHint("\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u041F\u0440\u0430\u0432\u0438\u043B\u0430");
_local5.mish1_mc.act = function () {
getURL ("http://pravdd.ru", "_blank");
};
}
function show_game(m_xml, start_scores) {
var _local12 = 700;
var _local10 = 400;
var _local3 = _root.createEmptyMovieClip("main", main_depth);
_local3._y = 40;
var _local19 = _local3.createEmptyMovieClip("game", _local3.getNextHighestDepth());
var _local13 = _local19.createEmptyMovieClip("game_bg_mc", _local19.getNextHighestDepth());
var _local14 = _local3.createEmptyMovieClip("lvl_editor", _local3.getNextHighestDepth());
var _local11 = _local3.attachMovie("game_face_scr", "face", _local3.getNextHighestDepth());
var _local7 = _local11.attachFontBut("butFontSmall", "exit", {_x:_local12 - 40, _y:-44}, null);
_local7.set_label(get_txt("exit"));
_local7.act = function () {
show_main();
};
var _local5 = 10;
var _local4 = 50;
var _local8 = 20;
if (_global.options_showgrid) {
drawGrid(_local3, [0, 0], _local12 / _local5, _local10 / _local5, _local5, _local5, {_t:1, _color:6710886, _alpha:30}, {_alpha:0});
drawGrid(_local3, [0, 0], _local12 / _local4, _local10 / _local4, _local4, _local4, {_t:3, _color:10066329, _alpha:30}, {_alpha:0});
}
var _local6 = new CGame({game_mc:_local19, face_mc:_local11, rw:_local12, rh:_local10, game_bg_mc:_local13});
_global.game = _local6;
_local6.setScores(start_scores);
_local6.load_xml(m_xml);
}
function show_end_game() {
var main_mc = _root.attachMovie("end_menu_scr", "main", main_depth);
var scores = _global.game.getScores();
main_mc.name_dtxt.text = get_txt("name");
main_mc.name_itxt.text = get_txt("dname");
if (_root.kongregate_username != undefined) {
main_mc.name_itxt.text = _root.kongregate_username;
main_mc.name_itxt.selectable = false;
main_mc.name_itxt.editable = false;
}
main_mc.txt_dtxt.text = (get_txt("scores") + ":") + scores;
var _local10 = ["sandbox", "normal", "hard", "impossible"];
main_mc.next_but.make_me_font_but(function () {
mochi.MochiScores.showLeaderboard({boardID:_global.mochiscore_id(), score:scores, name:main_mc.name_itxt.text, res:"700x440", onDisplay:function () {
trace("display:" + this);
}, onClose:function () {
trace("close:" + this);
_root.show_main();
}, onError:function () {
trace("err:" + this);
}});
main_mc.next_but.set_disable(true);
main_mc.next_but.set_label(get_txt("loading"));
});
main_mc.next_but.set_label(get_txt("next"));
delete _global.game;
}
function show_win_game() {
show_end_game();
}
function show_lose_game() {
show_end_game();
}
function show_loading_scr() {
var _local2 = _root.attachMovie("loading_scr", "main", main_depth);
_local2.dtxt.text = get_txt("loading");
}
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;
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);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
function find_data_xml(name) {
return(_find_xml(name, data_xml));
}
stop();
main_depth = 0;
leaderboard_depth = 10000;
var leaderboard_mc = _root.createEmptyMovieClip("lb_mc", leaderboard_depth);
mochi.MochiServices.connect(_global.mochiscore_game_main_id(), leaderboard_mc);
trace("ru.badim.drawind.2.1");
new Hint();
var red_filter = (new flash.filters.GlowFilter(16711680, 0.8, 6, 6, 3, 1, false, false));
var green_filter = (new flash.filters.GlowFilter(16711680, 0.8, 6, 6, 3, 1, false, false));
var shadow_filter = (new flash.filters.DropShadowFilter(5, 45, 0, 0.8, 5, 5, 3, 1, false, false, false));
MovieClip.prototype.add_splash = function () {
this.addESplash(16711680, false);
};
MovieClip.prototype.addLastSplash = function () {
var ttl = 10;
this.onEnterFrame = function () {
var _local2 = new flash.filters.GlowFilter(11162880, 0.8, ttl * 2, ttl * 2, 3, 1, false, true);
ttl--;
if (ttl < 1) {
this.unloadMovie();
return(false);
}
this.filters = [_local2];
};
};
_root.snd = {};
var fname = "";
var snd_path = CONST_PATH_SXF_DATA;
var ext = ".wav";
_root.snd.bear_step1 = new Sound();
_root.snd.bear_step2 = new Sound();
_root.snd.bear_step3 = new Sound();
_root.snd.begin = new Sound();
_root.snd.bonus_appear = new Sound();
_root.snd.bonus_disappear = new Sound();
_root.snd.bonus_level = new Sound();
_root.snd.click = new Sound();
_root.snd.death = new Sound();
_root.snd.death_first = new Sound();
_root.snd.home = new Sound();
_root.snd.life = new Sound();
_root.snd.nitro = new Sound();
_root.snd.star_pickup = new Sound();
_root.snd.menu_click = new Sound();
_root.snd.menu_toggle = new Sound();
load_sfx();
_root.snd.music = new Sound();
_root.snd.music.attachSound("music.mp3");
_root.step = [];
_root.step_paying = false;
_root.reqest_stop = false;
_root.step.push(_root.snd.bear_step1);
_root.step.push(_root.snd.bear_step2);
_root.step.push(_root.snd.bear_step3);
step_ini();
var keyListener = {};
_root.cheats = [];
keyListener.onKeyDown = function () {
if (_global.cheats_on) {
var _local4 = Key.getCode();
_root.cheats.push(_local4);
while (_root.cheats.length > 5) {
_root.cheats.shift();
}
var _local3 = _root.cheats.join("_");
switch (_local3) {
case "78_79_65_68_83" :
_global.options_showads = false;
break;
case "87_73_78_69_82" :
_global.game._CGame_win();
break;
case "76_79_83_69_82" :
_global.game._CGame_lose();
}
}
};
Key.addListener(keyListener);
show_choosescore = function () {
var _local5 = _root.attachMovie("main_menu_scr", "main", main_depth);
var _local4 = 350;
var _local3 = 40;
var _local8 = 0;
var _local7 = 50;
var _local6 = 0;
var _local13 = _local5.attachFontBut("butFont", "but" + (_local6++), {_x:_local4, _y:_local3}, null);
_local4 = _local4 + _local8;
_local3 = _local3 + _local7;
var _local10 = _local5.attachFontBut("butFont", "but" + (_local6++), {_x:_local4, _y:_local3}, null);
_local4 = _local4 + _local8;
_local3 = _local3 + _local7;
var _local9 = _local5.attachFontBut("butFont", "but" + (_local6++), {_x:_local4, _y:_local3}, null);
_local4 = _local4 + _local8;
_local3 = _local3 + _local7;
var _local11 = _local5.attachFontBut("butFont", "but" + (_local6++), {_x:_local4, _y:_local3}, null);
_local4 = _local4 + _local8;
_local3 = _local3 + _local7;
var _local12 = _local5.attachFontBut("butFont", "but" + (_local6++), {_x:_local4, _y:_local3}, null);
_local4 = _local4 + _local8;
_local3 = _local3 + _local7;
_local13.set_label(get_txt("sandbox"));
_local13.act = function () {
_global.game_dif = 0;
show_mochiscores();
};
_local10.set_label(get_txt("normal"));
_local10.act = function () {
_global.game_dif = 1;
show_mochiscores();
};
_local9.set_label(get_txt("hard"));
_local9.act = function () {
_global.game_dif = 2;
show_mochiscores();
};
_local11.set_label(get_txt("impossible"));
_local11.act = function () {
_global.game_dif = 3;
show_mochiscores();
};
_local12.set_label(get_txt("back"));
_local12.act = function () {
show_main();
};
_local5.mish1_mc.make_me_but();
_local5.mish1_mc.addHint("\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u041F\u0440\u0430\u0432\u0438\u043B\u0430");
_local5.mish1_mc.act = function () {
getURL ("http://pravdd.ru", "_blank");
};
};
show_mochiscores = function () {
var _local9 = _root.createEmptyMovieClip("main", main_depth);
trace("_show_mochiscores:" + _global.mochiscore_id());
mochi.MochiScores.showLeaderboard({boardID:_global.mochiscore_id(), res:"700x440", onDisplay:function () {
trace("display:" + this);
}, onClose:function () {
trace("close:" + this);
_root.show_main();
}, onError:function () {
trace("err:" + this);
}});
};
__com_mochibot__("0f91e92f", this, 10301, true);
show_main();
Symbol 19 MovieClip Frame 1
this.addHint(get_txt("Our_sponsor"));
this.onRelease = function () {
getURL ("http://www.amscom.ru/", "_blank");
};
Symbol 337 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("1.5");
}
static function showPreloaderAd(options) {
trace("showPreloaderAd.1.5");
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
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 _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.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 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_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 _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
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.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_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 showTimedAd(options) {
trace("<showTimedAd />1.5");
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();
}};
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_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.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
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) {
_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 _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 _loadCommunicator(options) {
var _local25 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local25);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local24 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local24);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb) {
cb = parseInt(cb);
var _local4 = this._callbacks[cb];
if (!_local4) {
return(undefined);
}
delete this._callbacks[cb];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
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 _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
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 _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_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);
}
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++;
}
}
return(_local4);
}
}
Symbol 338 MovieClip [__Packages.Hint] Frame 0
class Hint
{
static var hints, mc;
function Hint (fa, fc, lc, fmt, fsize) {
if (fsize == undefined) {
fsize = 10;
}
trace("#included:Hint");
if (hints) {
delete this;
return;
}
hints = [];
mc = _root.createEmptyMovieClip("hints_mc", 26000);
mc.createTextField("tf", 0, 0, 0, 0, 0);
mc.tf.autoSize = true;
mc.tf.selectable = false;
mc.lc = ((lc == undefined) ? 3355443 : (lc));
mc.fc = ((fc == undefined) ? 16777164 : (fc));
mc.fa = ((fa == undefined) ? 100 : (fa));
mc.fmt = new TextFormat("_sans", fsize, 3355443);
for (var i in fmt) {
mc.fmt[i] = fmt[i];
}
TextField.prototype.addHint = (Button.prototype.addHint = (MovieClip.prototype.addHint = function (t) {
var _local2 = Hint.hints.length;
do {
if (!(_local2--)) {
break;
}
} while (Hint.hints[_local2].o != this);
if (t != undefined) {
var _local3 = Hint.hints[_local2];
if (!_local3) {
_local3 = (Hint.hints[Hint.hints.length] = {o:this, txt:t});
}
} else if (Hint.hints[_local2]) {
Hint.hints.splice(_local2, 1);
}
Hint.mc.onMouseMove();
}));
var isParent = function (a, b) {
while (a = a._parent , a != _root) {
if (a == b) {
return(true);
}
}
return(false);
};
var getParentDepth = function (a, p) {
while (a._parent != p) {
a = a._parent;
}
return(a.getDepth());
};
var getGeneric = function (a, b) {
while ((!isParent(a, b)) && (b != _root)) {
b = b._parent;
}
return(b);
};
var order = function (a, b) {
if (isParent(a.o, b.o)) {
return(-1);
}
if (isParent(b.o, a.o)) {
return(1);
}
var _local3 = getGeneric(a.o, b.o);
return(getParentDepth(a.o, _local3) < getParentDepth(b.o, _local3));
};
mc.onMouseMove = function () {
this._visible = false;
if (!Hint.active) {
return(undefined);
}
if (!_root.hitTest(_xmouse, _ymouse, true)) {
return(undefined);
}
var dbl = [];
for (var i in Hint.hints) {
var o = Hint.hints[i].o;
if (o._x == undefined) {
Hint.hints.splice(Number(i), 1);
continue;
}
if (o._visible && (_root.hitTest.call(o, _xmouse, _ymouse, true))) {
dbl.push(Hint.hints[i]);
}
}
switch (dbl.length) {
case 0 :
return(undefined);
case 1 :
var up = dbl[0];
break;
default :
var up = dbl.sort(order)[0];
}
with (this) {
if (hint != up) {
bx = (by = null);
}
hint = up;
(_visible = true);
(_x = _root._xmouse);
(_y = _root._ymouse);
var x = ((_x + _width) < Stage.width);
var y = ((_y - _height) < 0);
if (bx != x) {
bx = x;
if (by == y) {
drawHint();
}
}
if (by != y) {
(by = y);
drawHint();
}
}
updateAfterEvent();
};
mc.drawHint = function () {
var dr = 8;
with (this) {
tf.text = hint.txt;
tf.setTextFormat(fmt);
var w = tf._width;
var h = tf._height;
var sx = ((tf._x = (bx ? (dr) : ((-w) - dr))));
var sy = ((tf._y = (by ? (dr) : ((-h) - dr))));
clear();
var i = 5;
var n = 8;
while (i--) {
beginFill(0, 3);
var ux = ((sx + n) - i);
var lx = ((sx + w) + i);
var uy = ((sy + n) - i);
var ly = ((sy + h) + i);
var r = (n - i);
var f = (0.707106781186548 /* Math.SQRT1_2 */ * r);
var a = (0.588186525863094 * r);
var b = (0.00579432557070009 * r);
var cx = (lx - r);
var cy = (uy + r);
moveTo(ux + r, uy);
lineTo(cx, uy);
curveTo(lx - a, uy + b, cx + f, cy - f);
curveTo(lx - b, uy + a, lx, uy + r);
(cy = ly - r);
lineTo(lx, cy);
curveTo(lx - b, ly - a, cx + f, cy + f);
curveTo(lx - a, ly - b, lx - r, ly);
(cx = ux + r);
lineTo(cx, ly);
curveTo(ux + a, ly - b, cx - f, cy + f);
curveTo(ux - b, ly - a, ux, ly - r);
(cy = uy + r);
lineTo(ux, cy);
curveTo(ux + b, uy + a, cx - f, cy - f);
curveTo(ux + a, uy + b, ux + r, uy);
endFill();
}
lineStyle(0, lc, 50);
beginFill(fc, fa);
moveTo(sx, sy);
lineTo(sx + w, sy);
lineTo(sx + w, sy + h);
lineTo(sx, sy + h);
lineTo(sx, sy);
endFill();
}
updateAfterEvent();
};
}
static var active = true;
}
Symbol 339 MovieClip [__Packages.CCondition] Frame 0
class CCondition
{
var _cond, char_mc;
function CCondition () {
trace("ru.badim.CCondition.1.0");
__CCondition_removeAll();
}
function __CCondition_removeAll() {
for (var _local3 in _cond) {
var _local2 = _cond[_local3];
__CConditions_after_remove(_local2);
}
_cond = [];
}
function __CCondition_refresh_mcs() {
}
function __CCondition_add(obj) {
var _local3 = obj.id;
obj.tts = getTimer();
obj.tl = 0;
if (obj.ttl == undefined) {
obj.ttl = 4;
}
switch (_local3) {
case CONST_CON_HoT :
break;
case CONST_CON_DoT :
break;
case CONST_CON_Speed :
_char_multy_speed(1.5);
break;
case CONST_CON_Armor :
break;
case CONST_CON_Inviciple :
char_mc._xscale = 160;
char_mc._r = char_mc._r * 1.5;
char_mc._yscale = char_mc._xscale;
char_mc._inviciple = true;
break;
case CONST_CON_Firepower :
}
_cond.push(obj);
__CCondition_refresh_mcs();
}
function __CConditions_after_remove(obj) {
var _local2 = obj.id;
switch (_local2) {
case CONST_CON_HoT :
break;
case CONST_CON_DoT :
break;
case CONST_CON_Speed :
_char_multy_speed(0.666666666666667);
break;
case CONST_CON_Armor :
break;
case CONST_CON_Inviciple :
char_mc._r = char_mc._r / 1.5;
char_mc._xscale = 100;
char_mc._yscale = char_mc._xscale;
char_mc._inviciple = false;
break;
case CONST_CON_Firepower :
}
}
function __CConditions_turn() {
for (var _local5 in _cond) {
var _local2 = _cond[_local5];
var _local4 = _local2.id;
var _local3 = getTimer() - _local2.tts;
_local2.tts = getTimer();
_local3 = _local3 / 1000;
_local2.tl = _local2.tl + _local3;
if (_local2.tl > _local2.ttl) {
__CConditions_after_remove(_local2);
_cond.splice(_local5 / 1, 1);
__CCondition_refresh_mcs();
continue;
}
switch (_local4) {
case CONST_CON_HoT :
_char_heal(_local2.var0 * _local3);
break;
case CONST_CON_DoT :
_char_take_dmg(_local2.var0 * _local3);
break;
case CONST_CON_Speed :
break;
case CONST_CON_Armor :
break;
case CONST_CON_Firepower :
}
}
}
function _char_multy_speed(val) {
}
function _char_heal() {
}
function _char_take_dmg() {
}
function _weap_add_bonus_dmg() {
}
function add_fx_txt() {
}
var CONST_CON_HoT = 1;
var CONST_CON_DoT = 2;
var CONST_CON_Speed = 3;
var CONST_CON_Armor = 4;
var CONST_CON_Inviciple = 5;
var CONST_CON_Firepower = 6;
var CONST_CON_Extrajump = 7;
}
Symbol 340 MovieClip [__Packages.CRoads] Frame 0
class CRoads extends CCondition
{
var _inverse, _roads, _road_points, roads_mc, _froads, _endRoads;
function CRoads () {
super();
_inverse = false;
trace("ru.badim.CRoads.1.1");
_roads = [];
_road_points = {};
}
function setInverse(val) {
if (_inverse != val) {
_inverse = val;
for (var _local4 in _roads) {
var _local3 = _roads[_local4].exy;
var _local2 = _roads[_local4].sxy;
_roads[_local4].exy = [_local2[0], _local2[1]];
_roads[_local4].sxy = [_local3[0], _local3[1]];
}
connectAll();
renderRoads();
calculateFRoads();
} else {
trace("ERR#setInverse_already_is:" + val);
}
}
function addPoint(id, xy) {
if (_global.options_show_points) {
var _local3 = roads_mc.attachMovie("point_mc", "p" + roads_mc.getNextHighestDepth(), roads_mc.getNextHighestDepth(), {_x:xy[0], _y:xy[1]});
_local3.txt_dtxt.text = id;
}
_road_points[id] = xy;
}
function connectAll() {
var _local4 = getTimer();
for (var _local3 in _roads) {
_roads[_local3].nextRoads = [];
for (var _local2 in _roads) {
if (_roads[_local3].exy.join("_") == _roads[_local2].sxy.join("_")) {
setNextRoad(_roads[_local3], _roads[_local2]);
}
}
}
}
function setNextRoad(road, roadNext) {
road.nextRoads.push(roadNext);
renderRoads();
}
function setPrevRoad(road, roadPrev) {
roadPrev.nextRoads.push(road);
renderRoads();
}
function addRoadByPoints(p1, p2) {
var _local2 = (p1 + "_") + p2;
if (!_inverse) {
addRoad({sxy:_road_points[p1], exy:_road_points[p2], id:_local2});
} else {
addRoad({sxy:_road_points[p2], exy:_road_points[p1], id:_local2});
}
connectAll();
calculateFRoads();
}
function addRoad(obj) {
obj.nextRoads = [];
obj.getNextRoad = function () {
if (this.nextRoads.length === 0) {
return(0);
}
return(this.nextRoads[random(this.nextRoads.length)]);
};
_roads.push(obj);
renderRoads();
return(obj);
}
function calculateFRoads() {
_froads = [];
_endRoads = [];
for (var _local5 in _roads) {
var _local2 = true;
for (var _local4 in _roads) {
for (var _local3 in _roads[_local4].nextRoads) {
if (_roads[_local4].nextRoads[_local3] == _roads[_local5]) {
_local2 = false;
break;
}
}
}
if (_roads[_local5].nextRoads.length == 0) {
_endRoads.push(_roads[_local5]);
}
if (_local2) {
_froads.push(_roads[_local5]);
}
}
}
function renderRoads() {
var _local5 = roads_mc.createEmptyMovieClip("con_mc", 0);
_local5.cacheAsBitmap = true;
for (var _local9 in _roads) {
var _local3 = _roads[_local9];
var _local4 = _local5.createEmptyMovieClip(_local9, _local5.getNextHighestDepth());
_root.drawPoly(_local4, [0, 0], [_local3.sxy, _local3.exy], {_t:road_d + 2, _color:2236962, _alpha:30}, {_alpha:0});
_root.drawPoly(_local4, [0, 0], [_local3.sxy, _local3.exy], {_t:road_d - 5, _color:8947848, _alpha:40}, {_alpha:0});
setRotRoad(_local3);
}
}
function setRotRoad(road) {
var _local3 = road.sxy[0] - road.exy[0];
var _local2 = road.sxy[1] - road.exy[1];
var _local4 = ((Math.atan2(_local2, _local3) * 180) / Math.PI) - 90;
road.rot = _local4;
}
function getRoad(road_id) {
for (var _local4 in _roads) {
var _local2 = _roads[_local4];
if (road_id == _local2.id) {
return(_local2);
}
}
trace("#ERR:road_not_found:" + road_id);
return(-1);
}
var road_d = 22;
}
Symbol 341 MovieClip [__Packages.CGame] Frame 0
class CGame extends CRoads
{
var Ms, time_started, _bonuses_max, _bonuses_colected, _cars_max, char_kiled, exit_mc, game_mc, face_mc, game_bg_mc, rw, rh, roads_mc, objs_ground_mc, chars_mc, cars_mc, objs_air_mc, stars_mc, _cars, _bonuses, _ebonuses, _trees, _objs, _blocks, _roads, _roads_i, _dificult, keys_mc, char_mc, char_bonus, _score_per_bonus, _lvl, map_xml, _froads, __CCondition_add, CONST_CON_Inviciple, CONST_CON_Speed, getRoad, __CConditions_turn, addPoint, addRoad, connectAll, calculateFRoads, _road_points;
function CGame (obj) {
super();
Ms = Math.sqrt;
time_started = getTimer();
_bonuses_max = 0;
_bonuses_colected = 0;
_cars_max = 4;
char_kiled = 0;
exit_mc = -1;
game_mc = obj.game_mc;
face_mc = obj.face_mc;
game_bg_mc = obj.game_bg_mc;
rw = obj.rw;
rh = obj.rh;
roads_mc = game_mc.createEmptyMovieClip("roads", game_mc.getNextHighestDepth());
objs_ground_mc = game_mc.createEmptyMovieClip("objs_ground", game_mc.getNextHighestDepth());
chars_mc = game_mc.createEmptyMovieClip("chars", game_mc.getNextHighestDepth());
cars_mc = game_mc.createEmptyMovieClip("cars", game_mc.getNextHighestDepth());
objs_air_mc = game_mc.createEmptyMovieClip("objs_air", game_mc.getNextHighestDepth());
stars_mc = game_mc.createEmptyMovieClip("stars_air", game_mc.getNextHighestDepth());
_cars = [];
_bonuses = [];
_ebonuses = [];
_trees = [];
_objs = [];
_blocks = [];
_roads = [];
_roads_i = 0;
_dificult = _global.game_dif;
if (_global.options_lvleditor) {
} else {
game_mc.onEnterFrame = function () {
_global.game.turn();
};
}
if (_dificult == 0) {
hideClock();
}
_root.anykey_count = 0;
keys_mc = game_mc.createEmptyMovieClip("keys", game_mc.getNextHighestDepth());
keys_mc.keys1 = {up:Key.isDown(38), down:Key.isDown(40), r:Key.isDown(39), l:Key.isDown(37)};
keys_mc.keys2 = {up:Key.isDown(38), down:Key.isDown(40), r:Key.isDown(39), l:Key.isDown(37)};
keys_mc.onEnterFrame = function () {
var _local4;
var _local5;
_local4 = this.keys2;
_local5 = {up:Key.isDown(38), down:Key.isDown(40), r:Key.isDown(39), l:Key.isDown(37)};
var _local6 = _local5;
if (_local4.down != _local5.down) {
_root.anykey_count = 0;
if (_local4.down) {
_global.game.setCharDirY(0);
} else {
_global.game.setCharDirY(1);
}
}
if (_local4.up != _local5.up) {
_root.anykey_count = 0;
if (_local4.up) {
_global.game.setCharDirY(0);
} else {
_global.game.setCharDirY(-1);
}
}
if (_local4.l != _local5.l) {
_root.anykey_count = 0;
if (_local4.l) {
_global.game.setCharDirX(0);
} else {
_global.game.setCharDirX(-1);
}
}
if (_local4.r != _local5.r) {
_root.anykey_count = 0;
if (_local4.r) {
_global.game.setCharDirX(0);
} else {
_global.game.setCharDirX(1);
}
}
this.keys2 = _local6;
_local4 = this.keys1;
_local5 = {up:Key.isDown(87), down:Key.isDown(83), r:Key.isDown(68), l:Key.isDown(65)};
var _local7 = _local5;
if (_local4.down != _local5.down) {
_root.anykey_count = 0;
if (_local4.down) {
_global.game.setCharDirY(0);
} else {
_global.game.setCharDirY(1);
}
}
if (_local4.up != _local5.up) {
_root.anykey_count = 0;
if (_local4.up) {
_global.game.setCharDirY(0);
} else {
_global.game.setCharDirY(-1);
}
}
if (_local4.l != _local5.l) {
_root.anykey_count = 0;
if (_local4.l) {
_global.game.setCharDirX(0);
} else {
_global.game.setCharDirX(-1);
}
}
if (_local4.r != _local5.r) {
_root.anykey_count = 0;
if (_local4.r) {
_global.game.setCharDirX(0);
} else {
_global.game.setCharDirX(1);
}
}
this.keys1 = _local7;
};
}
function get_txt(attr) {
return(_root.get_txt(attr));
}
function add_center_txt(txt) {
var _local9 = rw / 2;
var _local8 = rh / 2;
var _local7 = 15;
var _local5 = "z_exps" + _root.main.getNextHighestDepth();
var _local6 = {_x:_local9, _y:_local8};
var _local4 = "z_exps" + _local7;
var _local3 = _root.main.attachMovie(_local4, _local5, _root.main.getNextHighestDepth(), _local6);
_local3.dtxt.text = txt;
_local3.dtxt.autoSize = "center";
if (_local3.dtxt._width > rw) {
_local3.dtxt._xscale = (rw * 90) / _local3.dtxt._width;
}
trace(_local3.dtxt._width);
}
function add_fx_txt(x, y, txt) {
var _local7 = 14;
var _local5 = "z_exps" + _root.main.getNextHighestDepth();
var _local6 = {_x:x, _y:y};
var _local4 = "z_exps" + _local7;
var _local3 = _root.main.attachMovie(_local4, _local5, _root.main.getNextHighestDepth(), _local6);
_local3.dtxt.text = txt;
_local3.onEnterFrame = function () {
this._y--;
};
}
function getFreeXY(r) {
var _local7;
var _local6;
var _local8 = 70;
do {
_local7 = random(rw - _local8) + (_local8 / 2);
_local6 = random(rh - _local8) + (_local8 / 2);
var _local5 = false;
var _local2 = char_mc;
var _local4 = _local7 - _local2._x;
var _local3 = _local6 - _local2._y;
_local8 = Ms((_local4 * _local4) + (_local3 * _local3));
if (_local8 < ((r + _local2._r) * 5)) {
_local5 = true;
}
for (var _local10 in _blocks) {
_local2 = _blocks[_local10];
_local4 = _local7 - _local2._x;
_local3 = _local6 - _local2._y;
_local8 = Ms((_local4 * _local4) + (_local3 * _local3));
if (_local8 < ((r + _local2._r) * 1.5)) {
_local5 = true;
break;
}
}
for (var _local10 in _trees) {
_local2 = _trees[_local10];
_local4 = _local7 - _local2._x;
_local3 = _local6 - _local2._y;
_local8 = Ms((_local4 * _local4) + (_local3 * _local3));
if (_local8 < ((r + _local2._r) * 2)) {
_local5 = true;
break;
}
}
} while (_local5);
return([_local7, _local6]);
}
function setScores(val) {
_bonuses_colected = Math.round(val / 10);
}
function getScores() {
return(_bonuses_colected * 10);
}
function _CGame_lose() {
_root.show_lose_game();
}
function _CGame_win() {
_bonuses_max = 0;
if ((char_kiled <= 0) && (!char_bonus)) {
showClock();
_score_per_bonus = getScores();
_root.step_stop();
_root.snd.bonus_level.start();
add_center_txt(get_txt("bonus_go"));
srartChar();
var _local4 = 0;
while (_local4 < ((3 + ((_lvl * 2) / 1)) * 10)) {
addBonus();
_local4++;
}
time_started = getTimer();
char_bonus = true;
_cars_max = _cars_max * 2;
checkExit();
return(true);
}
if (map_xml.nextSibling == null) {
_root.show_win_game();
} else if (((_global.options_showads && (_global.options_mochiad_afterwin)) && (_lvl > 0)) && ((_lvl % 2) == 0)) {
_root.show_loading_scr();
_root.next_level_after_ad = map_xml.nextSibling;
_root.next_score_after_ad = getScores();
MochiAd.showTimedAd({id:_global.mochiads_id(), res:_global.mochiads_obj.res, ad_timeout:2000, fadeout_time:200, ad_finished:function () {
_root.show_game(_root.next_level_after_ad, _root.next_score_after_ad);
}});
} else {
_root.show_game(map_xml.nextSibling, getScores());
}
}
function showClock() {
face_mc.time_dtxt._visible = true;
face_mc.timer_mc._visible = true;
}
function hideClock() {
face_mc.time_dtxt._visible = false;
face_mc.timer_mc._visible = false;
}
function checkExit() {
if (_bonuses.length == 0) {
if (!exit_mc._visible) {
exit_mc.add_splash();
exit_mc._visible = true;
add_center_txt(get_txt("gotoExit"));
}
} else {
exit_mc._visible = false;
}
}
function addExit(obj) {
obj._x = char_mc._sxy[0];
obj._y = char_mc._sxy[1];
exit_mc = game_mc.attachMovie("exit_mc", "exit_mc", game_mc.getNextHighestDepth(), obj);
exit_mc._r = exit_r;
exit_mc.add_splash();
checkExit();
}
function addCar(obj) {
var _local7 = car_r;
var _local8 = random(_froads.length);
var _local6 = _froads[_local8];
var _local11 = _local6.id;
var _local5 = {s:6 + (random(3) * 2), road_id:_local11, cxy:[_local6.sxy[0], _local6.sxy[1]]};
var _local4 = cars_mc.attachMovie("car_mc", "car" + cars_mc.getNextHighestDepth(), cars_mc.getNextHighestDepth());
_local4._alpha = 0;
_local4.cacheAsBitmap = true;
_local4.gotoAndStop(random(_local4._totalframes) + 1);
if (_global.options_colision_rings) {
_root.drawExCircle(_local4, [0, 0], _local7, {_t:2, _color:255, _alpha:50}, {_alpha:0});
}
_local4._x = _local5.cxy[0];
_local4._y = _local5.cxy[1];
_local4._r = _local7;
_local5.mc = _local4;
_cars.push(_local5);
}
function addBlock(obj) {
_blocks.push(obj);
if (_global.options_colision_rings) {
_root.drawExCircle(game_mc, [obj._x, obj._y], obj._r, {_t:2, _color:261892, _alpha:50}, {_alpha:0});
}
}
function addObj(obj) {
if (obj._x == undefined) {
var _local7 = getFreeXY(30);
obj._x = _local7[0];
obj._y = _local7[0];
}
if (obj._type == undefined) {
obj._type = 1;
}
var _local6 = objs_ground_mc;
if (((obj._type == 1) || (obj._type == 4)) || (obj._type == 7)) {
_local6 = objs_air_mc;
}
if (obj._type == 5) {
obj._r = teleport_r;
}
var mc = _local6.attachMovie("objs", "obj" + _local6.getNextHighestDepth(), _local6.getNextHighestDepth(), obj);
if (_global.options_lvleditor) {
if (obj._type == 5) {
var _local5 = _local6.attachMovie("objs", "obj" + _local6.getNextHighestDepth(), _local6.getNextHighestDepth());
_local5._x = obj._ex;
_local5._y = obj._ey;
_local5.gotoAndStop(5);
_local5.mc = mc;
_local5.filters = [_root.green_filter];
_local5.addHint();
_local5.addHint((obj._x + ",") + obj._y);
_local5.onPress = function () {
this.startDrag();
};
_local5.onRelease = function () {
this.mc._ex = this._x;
this.mc._ey = this._y;
stopDrag();
};
if (_global.options_colision_rings) {
_local5._alpha = 50;
}
}
}
if (_global.options_lvleditor) {
mc.onPress = function () {
this.startDrag();
};
mc.onRelease = function () {
stopDrag();
};
}
if (obj._type == 1) {
addBlock({_x:obj._x, _y:obj._y, _r:30});
addBlock({_x:obj._x - 30, _y:obj._y, _r:30});
addBlock({_x:obj._x - 60, _y:obj._y, _r:30});
addBlock({_x:obj._x - 60, _y:obj._y + 30, _r:30});
addBlock({_x:obj._x - 60, _y:obj._y + 60, _r:30});
}
if (obj._type == 4) {
addBlock({_x:obj._x, _y:obj._y + 50, _r:30});
addBlock({_x:obj._x, _y:obj._y + 60, _r:30});
}
if (obj._type == 7) {
}
if (_global.options_colision_rings) {
mc._alpha = 50;
}
mc.gotoAndStop(obj._type);
_objs.push(mc);
}
function addTree(obj) {
switch (obj._type) {
case 30 :
addTree30(obj);
break;
case 50 :
addTree50(obj);
break;
case 70 :
addTree70(obj);
}
}
function addTree30(obj) {
obj._r = tree_r;
var _local2 = objs_air_mc.attachMovie("tree_mc", "car" + objs_air_mc.getNextHighestDepth(), objs_air_mc.getNextHighestDepth(), obj);
_addTree(_local2);
}
function addTree50(obj) {
obj._r = treebig_r;
var _local2 = objs_air_mc.attachMovie("treebig_mc", "car" + objs_air_mc.getNextHighestDepth(), objs_air_mc.getNextHighestDepth(), obj);
_addTree(_local2);
}
function addTree70(obj) {
obj._r = treehuge_r;
var _local2 = objs_air_mc.attachMovie("treehuge_mc", "car" + objs_air_mc.getNextHighestDepth(), objs_air_mc.getNextHighestDepth(), obj);
_addTree(_local2);
}
function _addTree(tree_mc) {
if (_global.options_colision_rings) {
_root.drawExCircle(tree_mc, [0, 0], tree_mc._r, {_t:2, _color:65280, _alpha:50}, {_alpha:0});
}
tree_mc._rotation = random(360);
tree_mc.gotoAndStop(random(tree_mc._totalframes) + 1);
tree_mc.filters = [_root.shadow_filter];
if (_global.options_lvleditor) {
tree_mc.onPress = function () {
if (Key.isDown(18)) {
} else if (Key.isDown(16)) {
_global.game.addTree(this);
} else {
this.startDrag();
}
};
tree_mc.onRelease = function () {
stopDrag();
};
}
_trees.push(tree_mc);
}
function chekWin() {
checkExit();
if (_bonuses.length == 0) {
var _local3 = exit_mc._x - char_mc._x;
var _local2 = exit_mc._y - char_mc._y;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if (_local4 < (char_mc._r + exit_mc._r)) {
_CGame_win();
}
return(true);
}
return(false);
}
function refreshBonusDtxt() {
var _local2 = (((_bonuses_max - _bonuses.length) + "/") + _bonuses_max) + " ";
if (_local2 != face_mc.bonuses_dtxt.text) {
face_mc.star_mc.add_splash();
}
face_mc.bonuses_dtxt.text = _local2;
}
function removeBonus(mc) {
for (var _local4 in _bonuses) {
if (mc == _bonuses[_local4]) {
_bonuses.splice(_local4, 1);
if (_bonuses.length == 0) {
_root.snd.home.start();
}
}
}
for (var _local4 in _ebonuses) {
if (mc == _ebonuses[_local4]) {
_ebonuses.splice(_local4, 1);
}
}
mc.addLastSplash();
refreshBonusDtxt();
}
function takeBonus(mc) {
switch (mc.type) {
case 4 :
_root.snd.nitro.start();
add_fx_txt(char_mc._x, char_mc._y, get_txt("time"));
time_started = time_started + 1000;
break;
case 3 :
_root.snd.nitro.start();
__CCondition_add({id:CONST_CON_Inviciple});
add_fx_txt(char_mc._x, char_mc._y, get_txt("inviciple"));
break;
case 2 :
_root.snd.nitro.start();
__CCondition_add({id:CONST_CON_Speed});
add_fx_txt(char_mc._x, char_mc._y, get_txt("speed_bonus_add"));
break;
case 1 :
_root.snd.life.start();
char_mc._lives++;
add_fx_txt(mc._x, mc._y, "+1 " + get_txt("live"));
refreshCharLives();
break;
case 0 :
_bonuses_colected++;
_root.snd.star_pickup.start();
add_fx_txt(mc._x, mc._y, getScores().toString());
if ((_bonuses_colected % 3) != 0) {
break;
}
addEBonus({});
}
removeBonus(mc);
}
function addEBonus(obj) {
if (_lvl <= 0) {
return(false);
}
var _local6 = bonus_r;
var _local7 = getFreeXY(_local6);
obj.ttl = 60 + random(60);
obj.type = 1 + random(_lvl);
var _local8 = 4;
if (obj.type > _local8) {
obj.type = 1 + random(_local8);
}
obj._x = _local7[0];
obj._y = _local7[1];
obj._r = _local6;
obj.xy = _local7;
var _local5 = game_mc.attachMovie("ebonus_mc", "b" + game_mc.getNextHighestDepth(), game_mc.getNextHighestDepth(), obj);
_root.snd.bonus_appear.start();
_local5.gotoAndStop(obj.type);
_local5.onEnterFrame = function () {
this.ttl--;
if (this.ttl < 0) {
_root.snd.bonus_disappear.start();
_global.game.removeBonus(this);
}
};
if (_global.options_colision_rings) {
_root.drawExCircle(_local5, [0, 0], _local6, {_t:2, _color:0, _alpha:50}, {_alpha:0});
}
_ebonuses.push(_local5);
}
function addBonus() {
var _local5 = bonus_r;
var _local7 = getFreeXY(_local5);
var _local8 = _local7[0];
var _local6 = _local7[1];
var _local4 = stars_mc.attachMovie("bonus_mc", "b" + stars_mc.getNextHighestDepth(), stars_mc.getNextHighestDepth());
_local4._rotation = random(360);
if (_global.options_colision_rings) {
_root.drawExCircle(_local4, [0, 0], _local5, {_t:2, _color:0, _alpha:50}, {_alpha:0});
}
_local4.type = 0;
_local4._x = _local8;
_local4._y = _local6;
_local4._r = _local5;
_local4.xy = [_local8, _local6];
_bonuses.push(_local4);
_bonuses_max++;
refreshBonusDtxt();
}
function showBonuses() {
}
function setCharDirX(val) {
char_mc._tx = char_mc._x + (rw * val);
if (char_mc._tx < 0) {
}
if (char_mc._tx > rw) {
}
if (val == 0) {
if ((char_mc._tx == char_mc._x) && (char_mc._ty == char_mc._y)) {
setCharStop();
} else {
char_mc.setRot();
}
} else {
char_mc.setRot();
if (char_mc.onEnterFrame == undefined) {
char_mc.setEnterFrame();
}
}
}
function setCharDirY(val) {
char_mc._ty = char_mc._y + (rh * val);
if (char_mc._ty < 0) {
}
if (char_mc._ty > rh) {
}
if (val == 0) {
if ((char_mc._tx == char_mc._x) && (char_mc._ty == char_mc._y)) {
setCharStop();
} else {
char_mc.setRot();
}
} else {
char_mc.setRot();
if (char_mc.onEnterFrame == undefined) {
char_mc.setEnterFrame();
}
}
}
function setCharStop() {
char_mc._charStop();
}
function refreshCharLives() {
if (char_mc._lives < 0) {
_CGame_lose();
return(false);
}
face_mc.lives_dtxt.text = char_mc._lives;
}
function charAddSplash() {
var _local2 = game_mc.attachMovie("char_mc", "att" + game_mc.getNextHighestDepth(), game_mc.getNextHighestDepth());
_local2.th_mc._visible = false;
_local2._x = char_mc._x;
_local2._y = char_mc._y;
_local2._rotation = char_mc._rotation;
_local2.gotoAndStop(1);
_local2.addLastSplash();
}
function srartChar() {
refreshCharLives();
char_mc._x = char_mc._sxy[0];
char_mc._y = char_mc._sxy[1];
char_mc._tx = char_mc._x;
char_mc._ty = char_mc._y;
char_mc.gotoAndStop(1);
var _local2 = face_mc.attachMovie("show_cir", "show_cir" + face_mc.getNextHighestDepth(), face_mc.getNextHighestDepth());
_local2._alpha = 50;
_local2._x = char_mc._x;
_local2._y = char_mc._y;
delete char_mc.onEnterFrame;
}
function charDie() {
if (char_bonus) {
_CGame_win();
return(true);
}
if (char_kiled <= 0) {
_root.snd.death_first.start();
add_fx_txt(char_mc._x, char_mc._y, _root.get_txt("bonus_lost"));
} else {
_root.snd.death.start();
}
char_kiled++;
char_mc._lives--;
refreshCharLives();
srartChar();
}
function addChar(obj) {
_root.step_stop();
char_mc = chars_mc.attachMovie("char_mc", "char" + chars_mc.getNextHighestDepth(), chars_mc.getNextHighestDepth(), obj);
char_mc.th_mc.dtxt_txt.text = get_txt("go");
char_mc._speed = 5;
char_mc._r = char_r;
char_mc._inviciple = false;
if (char_mc._lives == undefined) {
char_mc._lives = 2;
}
if (_global.options_colision_rings) {
_root.drawExCircle(char_mc, [0, 0], char_mc._r, {_t:2, _color:16711680, _alpha:50}, {_alpha:0});
}
if (_global.options_lvleditor) {
char_mc.onPress = function () {
_global.game.get_xml();
};
}
char_mc._charStop = function () {
this.charStop();
};
char_mc.take_all = function () {
var _local8 = Math.sqrt;
var _local10 = this._x;
var _local9 = this._y;
var _local7 = false;
for (var _local11 in _global.game._bonuses) {
var _local3 = _global.game._bonuses[_local11];
var _local5 = _local3._x - _local10;
var _local4 = _local3._y - _local9;
var _local6 = _local8((_local5 * _local5) + (_local4 * _local4));
if (_local6 < (this._r + _local3._r)) {
_global.game.takeBonus(_local3);
_local7 = true;
}
}
for (var _local11 in _global.game._ebonuses) {
var _local3 = _global.game._ebonuses[_local11];
var _local5 = _local3._x - _local10;
var _local4 = _local3._y - _local9;
var _local6 = _local8((_local5 * _local5) + (_local4 * _local4));
if (_local6 < (this._r + _local3._r)) {
_global.game.takeBonus(_local3);
_local7 = true;
}
}
_global.game.chekWin();
return(_local7);
};
char_mc.charStop = function () {
_root.step_stop();
this.gotoAndStop(1);
delete this.onEnterFrame;
};
char_mc.goGo = function () {
this._tx = this._parent._xmouse;
this._ty = this._parent._ymouse;
if (this._tx < 0) {
this._tx = 0;
}
if (this._tx > _global.game.rw) {
this._tx = _global.game.rw;
}
if (this._ty < 0) {
this._ty = 0;
}
if (this._ty > _global.game.rh) {
this._ty = _global.game.rh;
}
this.setRot();
this.setEnterFrame();
};
char_mc.onMouseDown = function () {
_root.snd.click.start();
this.goGo();
this.drag = true;
};
char_mc.onMouseMove = function () {
if (this.drag) {
this.goGo();
}
};
char_mc.onMouseUp = function () {
this.drag = false;
};
char_mc.setRot = function () {
var _local3 = this._tx - this._x;
var _local2 = this._ty - this._y;
var _local4 = ((Math.atan2(_local2, _local3) * 180) / Math.PI) + 90;
this._rotation = _local4;
};
char_mc.setEnterFrame = function () {
if (this.th_mc._visible) {
_global.game.showBonuses();
this.th_mc._visible = false;
}
this.gotoAndStop(2);
this.onEnterFrame = function () {
var _local9 = Math.sqrt;
var _local12 = this._speed;
var _local8 = this._tx - this._x;
var _local7 = this._ty - this._y;
var _local10 = _local9((_local8 * _local8) + (_local7 * _local7));
var _local6;
var _local5;
var _local13 = false;
if (_local10 < _local12) {
_local6 = this._tx;
_local5 = this._ty;
this.charStop();
} else {
_root.step_start();
_local6 = this._x + ((_local8 * _local12) / _local10);
_local5 = this._y + ((_local7 * _local12) / _local10);
}
if (_local6 > _global.game.rw) {
_local6 = _global.game.rw;
this._tx = _local6;
}
if (_local6 < 0) {
_local6 = 0;
this._tx = _local6;
}
if (_local5 > _global.game.rh) {
_local5 = _global.game.rh;
this._ty = _local5;
}
if (_local5 < 0) {
_local5 = 0;
this._ty = _local5;
}
for (var _local11 in _global.game._objs) {
var _local4 = _global.game._objs[_local11];
if (_local4._type == 5) {
_local8 = _local6 - _local4._x;
_local7 = _local5 - _local4._y;
_local10 = _local9((_local8 * _local8) + (_local7 * _local7));
if (_local10 < 10) {
this._x = _local4._ex;
this._y = _local4._ey;
_global.game.charAddSplash();
this.take_all();
return(false);
}
}
}
for (var _local11 in _global.game._blocks) {
var _local4 = _global.game._blocks[_local11];
_local8 = _local6 - _local4._x;
_local7 = _local5 - _local4._y;
_local10 = _local9((_local8 * _local8) + (_local7 * _local7));
if (_local10 < (this._r + _local4._r)) {
this._tx = this._x;
this._ty = this._y;
this.charStop();
return(false);
}
}
for (var _local11 in _global.game._trees) {
var _local4 = _global.game._trees[_local11];
_local8 = _local6 - _local4._x;
_local7 = _local5 - _local4._y;
_local10 = _local9((_local8 * _local8) + (_local7 * _local7));
if (_local10 < (this._r + _local4._r)) {
this._tx = this._x;
this._ty = this._y;
this.charStop();
return(false);
}
}
this._x = _local6;
this._y = _local5;
this.take_all();
};
};
srartChar();
return(char_mc);
}
function turn() {
if (Math.random() > 0.93) {
if (_cars.length < _cars_max) {
addCar();
}
}
for (var _local15 in _cars) {
var _local4 = _cars[_local15];
var _local3 = _local4.mc;
var _local8 = getRoad(_local4.road_id);
var _local5 = _local4.cxy;
var _local12 = _local8.exy;
var _local7 = _local4.s;
var _local11 = _local12[0] - _local5[0];
var _local10 = _local12[1] - _local5[1];
var _local13 = Ms((_local11 * _local11) + (_local10 * _local10));
var _local14 = _local8.rot;
if (_local3._alpha < 100) {
_local3._rotation = _local14;
_local3._alpha = _local3._alpha + (2 + (_local3._alpha / 11));
continue;
}
if (_local13 > _local7) {
_local5[0] = _local5[0] + ((_local11 * _local7) / _local13);
_local5[1] = _local5[1] + ((_local10 * _local7) / _local13);
} else {
var _local9 = _local8.nextRoads;
if (_local9.length > 0) {
var _local6 = _local9[random(_local9.length)];
_local4.road_id = _local6.id;
_local5 = [_local6.sxy[0], _local6.sxy[1]];
_local14 = _local6.rot;
} else {
_local3.unloadMovie();
_cars.splice(_local15, 1);
continue;
}
}
_local4.cxy = _local5;
_local3._x = _local4.cxy[0];
_local3._y = _local4.cxy[1];
_local3._rotation = _local14;
_local11 = char_mc._x - _local3._x;
_local10 = char_mc._y - _local3._y;
_local13 = Ms((_local11 * _local11) + (_local10 * _local10));
if (_local13 < (char_mc._r + _local3._r)) {
if (char_mc._inviciple) {
_local3.addLastSplash();
_global.score_car_smashed++;
_cars.splice(_local15, 1);
} else {
charDie();
}
}
}
__CConditions_turn();
refresh_time();
}
function get_time() {
var _local2 = Math.round((getTimer() - time_started) / 1000);
if (char_bonus) {
_local2 = Math.round(((time_started + 10000) - getTimer()) / 1000);
if (_local2 < 0) {
_CGame_win();
return(false);
}
return(_local2);
}
if (_dificult > 0) {
_local2 = Math.round(((time_started + ((60 - (15 * _dificult)) * 1000)) - getTimer()) / 1000);
if (_local2 < 0) {
_CGame_lose();
return(false);
}
}
return(_local2);
}
function refresh_time() {
var _local2 = get_time();
var _local3 = _local2;
face_mc.time_dtxt.text = _local3;
}
function load_xml(m_xml) {
_lvl = 0;
var _local11 = m_xml.parentNode.childNodes;
var _local7 = 0;
while (_local7 < _local11.length) {
if (_local11[_local7] == m_xml) {
_lvl = _local7;
break;
}
_local7++;
}
trace("__lvl:" + _lvl);
map_xml = m_xml;
var _local18 = addChar({_sxy:[m_xml.attributes.char_start_x / 1, m_xml.attributes.char_start_y / 1]});
if (m_xml.previousSibling == null) {
add_center_txt(get_txt("gather_all_stars"));
}
addExit({});
var _local13 = _root._find_xml("points", m_xml);
for (_local7 in _local13.childNodes) {
var _local3 = _local13.childNodes[_local7];
var _local8 = [_local3.attributes.x / 1, _local3.attributes.y / 1];
addPoint(String(_local3.attributes.id), _local8);
}
char_bonus = false;
var _local14 = _root._find_xml("roads", m_xml);
for (_local7 in _local14.childNodes) {
var _local3 = _local14.childNodes[_local7];
var _local4 = {};
_local4.id = _local3.attributes.id;
var _local5 = _local3.attributes.sxy.split("|");
_local4.sxy = [_local5[0] / 1, _local5[1] / 1];
var _local6 = _local3.attributes.exy.split("|");
_local4.exy = [_local6[0] / 1, _local6[1] / 1];
addRoad(_local4);
}
connectAll();
calculateFRoads();
var _local10 = _root._find_xml("trees", m_xml);
for (_local7 in _local10.childNodes) {
var _local3 = _local10.childNodes[_local7];
var _local4 = {};
for (var _local15 in _local3.attributes) {
_local4[_local15] = _local3.attributes[_local15] / 1;
}
addTree(_local4);
}
var _local12 = _root._find_xml("objs", m_xml);
for (_local7 in _local12.childNodes) {
var _local3 = _local12.childNodes[_local7];
var _local4 = {};
for (var _local15 in _local3.attributes) {
_local4[_local15] = _local3.attributes[_local15] / 1;
}
addObj(_local4);
}
_cars_max = (3 + _lvl) + (_dificult * 2);
_local7 = 0;
while (_local7 < Number((3 + ((_lvl * 2) / 1)) + _dificult)) {
addBonus();
_local7++;
}
var _local16 = face_mc.attachMovie("show_cir", "show_cir" + face_mc.getNextHighestDepth(), face_mc.getNextHighestDepth());
_root.snd.begin.start();
_local16._x = char_mc._x;
_local16._y = char_mc._y;
checkExit();
}
function get_xml() {
var _local7 = new XML("<map />").firstChild;
_local7.attributes.char_start_x = char_mc._x;
_local7.attributes.char_start_y = char_mc._y;
_local7.attributes.stars = 5;
_local7.attributes.bg_id = 2;
var _local11 = new XML("<roads />").firstChild;
_local7.appendChild(_local11);
for (var _local12 in _roads) {
var _local3 = _roads[_local12];
var _local4 = new XML("<road />").firstChild;
_local4.attributes.id = _local3.id;
_local4.attributes.sxy = _local3.sxy.join("|");
_local4.attributes.exy = _local3.exy.join("|");
var _local6 = [];
for (var _local12 in _local3.nextRoads) {
var _local5 = _local3.nextRoads[_local12];
_local6.push(_local5.id);
}
_local4.attributes.nextRoads = _local6.join("|");
_local11.appendChild(_local4);
}
var _local10 = new XML("<points />").firstChild;
_local7.appendChild(_local10);
for (var _local13 in _road_points) {
var _local4 = new XML("<point />").firstChild;
_local4.attributes.id = _local13;
_local4.attributes.x = _road_points[_local13][0];
_local4.attributes.y = _road_points[_local13][1];
_local10.appendChild(_local4);
}
var _local8 = new XML("<trees />").firstChild;
_local7.appendChild(_local8);
for (var _local12 in _trees) {
var _local2 = _trees[_local12];
var _local4 = new XML("<tree />").firstChild;
if ((_local2._x < 0) && (_local2._y < 0)) {
trace("fa1");
continue;
}
_local4.attributes._x = _local2._x;
_local4.attributes._y = _local2._y;
_local4.attributes._type = _local2._type;
_local8.appendChild(_local4);
}
var _local9 = new XML("<objs />").firstChild;
_local7.appendChild(_local9);
for (var _local12 in _objs) {
var _local2 = _objs[_local12];
var _local4 = new XML("<obj />").firstChild;
if ((_local2._x < 0) && (_local2._y < 0)) {
trace("fa2");
continue;
}
_local4.attributes._x = _local2._x;
_local4.attributes._y = _local2._y;
if (_local2._ex != undefined) {
_local4.attributes._ex = _local2._ex;
_local4.attributes._ey = _local2._ey;
}
_local4.attributes._type = _local2._type;
_local9.appendChild(_local4);
}
trace("_m_xml:" + _local7);
System.setClipboard(_local7.toString());
}
function _char_multy_speed(val) {
char_mc._speed = char_mc._speed * val;
}
function _char_heal() {
}
function _char_take_dmg() {
}
function _weap_add_bonus_dmg() {
}
var car_r = 12;
var char_r = 10;
var bonus_r = 5;
var tree_r = 10;
var treebig_r = 20;
var treehuge_r = 30;
var exit_r = 10;
var teleport_r = 1;
}
Symbol 342 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var onClose;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
if (mochi.MochiServices.__get__clip() == _root.__mochiservicesMC) {
mochi.MochiServices.__get__clip()._parent.play();
} else {
mochi.MochiServices.__get__clip().play();
}
};
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, onClose);
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
}
Symbol 343 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _sendChannelName, _rcvChannelName, __get__comChannelName, _loader, _loaderListener, _sendChannel, _rcvChannel, _listenChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function getVersion() {
return("0.1");
}
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 get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip) {
trace("MochiServices Connecting...");
init(id, clip);
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root.createEmptyMovieClip("__mochiservicesMC", _root.getNextHighestDepth());
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
if (!isNetworkAvailable) {
return(undefined);
}
if (_gatewayURL.indexOf("http://") === 0) {
allowDomains(_gatewayURL);
}
_loader = new MovieClipLoader();
_loaderListener = {};
_loaderListener.onLoadError = function () {
trace("MochiServices could not load.");
};
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connected = false;
}
Symbol 40 MovieClip Frame 1
function check_sound() {
this.addHint();
if (_global.options_playsounds) {
this.gotoAndStop(1);
this.addHint(_root.get_txt("sound_on"));
_root.snd.music.stop();
_root.snd.music.start(0, 9999);
_root.snd.music.setVolume(100);
} else {
this.gotoAndStop(2);
this.addHint(_root.get_txt("sound_off"));
_root.snd.music.stop();
_root.snd.music.setVolume(0);
}
}
this.onRollOver = function () {
this.add_splash();
};
this.onRelease = function () {
_global.options_playsounds = !_global.options_playsounds;
check_sound();
};
check_sound();
Symbol 74 MovieClip Frame 1
stop();
Symbol 74 MovieClip Frame 6
stop();
Symbol 88 MovieClip Frame 1
stop();
this.is_open = false;
Symbol 88 MovieClip Frame 5
stop();
this.is_open = true;
Symbol 89 Button
on (press) {
show_help_pane();
}
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 2
play();
Symbol 92 MovieClip Frame 6
stop();
Symbol 93 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 2
star1_mc.gotoAndPlay("grow");
Symbol 93 MovieClip Frame 3
star2_mc.gotoAndPlay("grow");
Symbol 93 MovieClip Frame 4
star3_mc.gotoAndPlay("grow");
Symbol 93 MovieClip Frame 5
star4_mc.gotoAndPlay("grow");
Symbol 93 MovieClip Frame 6
star5_mc.gotoAndPlay("grow");
Symbol 96 MovieClip Frame 1
var base_mc = this;
var i = 1;
while (i <= 5) {
base_mc["b" + i].num = i;
base_mc["b" + i].onRollOver = function () {
stars_mc.gotoAndStop(this.num + 1);
};
base_mc["b" + i].onRollOut = function () {
stars_mc.gotoAndStop(1);
};
base_mc["b" + i].onPress = function () {
submit_vote(this.num);
};
i++;
}
Symbol 104 MovieClip Frame 15
stop();
Symbol 104 MovieClip Frame 23
stop();
Symbol 104 MovieClip Frame 66
var flr = Math.floor(this.score);
var flr_w = (flr * 20);
var dc = (this.score - Math.floor(this.score));
var dc_w = (dc * 17.1);
var w = (flr_w + dc_w);
star_mask_mc._width = w;
Symbol 104 MovieClip Frame 72
stop();
Symbol 112 MovieClip Frame 1
stop();
Symbol 116 MovieClip Frame 1
stop();
Symbol 120 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 1
stop();
Symbol 124 MovieClip Frame 1
stop();
Symbol 127 MovieClip Frame 1
stop();
Symbol 127 MovieClip Frame 4
stop();
Symbol 135 MovieClip Frame 1
stop();
Symbol 135 MovieClip Frame 6
stop();
Symbol 144 Button
on (press) {
_parent.show_help_pane();
}
Symbol 149 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 4
stop();
Symbol 151 Button
on (release) {
getURL ("http://www.mochibot.com?cpe=dT0yJmNwPUluZm8gUGFuZWwgTGluayZzPUZlZWRiYWNrIEJhciB2MQ%3D%3D", "_blank");
}
on (rollOver) {
logo_mc.gotoAndPlay("in");
}
on (rollOut) {
logo_mc.gotoAndPlay("out");
}
Symbol 152 MovieClip Frame 1
function valid() {
var _local1 = true;
if (comment_txt.text == "") {
_local1 = false;
comment_header_mc.gotoAndStop(2);
} else {
comment_header_mc.gotoAndStop(1);
}
return(_local1);
}
function set_tabs() {
name_txt.tabIndex = 1;
email_txt.tabIndex = 2;
comment_txt.tabIndex = 3;
submit_btn.tabIndex = false;
}
stop();
set_tabs();
get_user_info();
submit_btn.onRollOver = function () {
submit_mc.gotoAndPlay("on");
};
submit_btn.onRollOut = function () {
submit_mc.gotoAndPlay("off");
};
submit_btn.onPress = function () {
if (_root.sending_comment != true) {
if (valid()) {
submit_comment(name_txt.text, email_txt.text, comment_txt.text);
_root.sending_comment = true;
}
}
};
view_comments_btn.onRollOver = function () {
view_comments_mc.gotoAndStop("on");
};
view_comments_btn.onRollOut = function () {
view_comments_mc.gotoAndStop("off");
};
view_comments_btn.onPress = function () {
getURL (_parent.mochi_public_comments_url, "_blank");
};
x_btn.onPress = function () {
_parent.show_comment_pane();
};
name_txt.onSetFocus = function () {
box1_mc.gotoAndStop(2);
};
name_txt.onKillFocus = function () {
box1_mc.gotoAndStop(1);
};
email_txt.onSetFocus = function () {
box2_mc.gotoAndStop(2);
};
email_txt.onKillFocus = function () {
box2_mc.gotoAndStop(1);
};
website_txt.onSetFocus = function () {
box3_mc.gotoAndStop(2);
};
website_txt.onKillFocus = function () {
box3_mc.gotoAndStop(1);
};
comment_txt.onSetFocus = function () {
box4_mc.gotoAndStop(2);
};
comment_txt.onKillFocus = function () {
box4_mc.gotoAndStop(1);
};
Symbol 152 MovieClip Frame 19
stop();
close_btn.onPress = function () {
_parent.show_comment_pane();
};
Symbol 152 MovieClip Frame 23
stop();
close_btn.onPress = function () {
_parent.show_comment_pane();
};
Symbol 152 MovieClip Frame 29
play();
Symbol 152 MovieClip Frame 42
stop();
Symbol 155 MovieClip Frame 1
function init_rate_me() {
cookie = SharedObject.getLocal("rate_me_limit");
var _local1 = cookie.data.year;
var _local4 = cookie.data.month;
var _local3 = cookie.data.date;
var _local5 = cookie.data.hour;
var _local6 = cookie.data.min;
var _local9 = cookie.data.sec;
cookieDate = new Date(_local1, _local4, _local3, _local5, _local6, _local9);
cookieMillisecs = cookieDate.getTime();
currentDate = new Date();
currentMillisecs = currentDate.getTime();
var _local8 = currentMillisecs - cookieMillisecs;
var _local7 = Math.floor(_local8 / 1000);
var _local2 = Math.floor(_local7 / 60);
var _local10 = Math.floor(_local2 / 60);
if ((_local2 < mochi_rate_me_time) && (_local1 != undefined)) {
get_rating();
}
}
function set_rate_me_cookie() {
cookie = SharedObject.getLocal("rate_me_limit");
var _local1 = new Date();
var _local4 = _local1.getFullYear();
var _local3 = _local1.getMonth();
var _local5 = _local1.getDate();
var _local7 = _local1.getHours();
var _local6 = _local1.getMinutes();
var _local2 = _local1.getSeconds();
cookie.data.year = _local4;
cookie.data.month = _local3;
cookie.data.date = _local5;
cookie.data.hour = _local7;
cookie.data.min = _local6;
cookie.data.sec = _local2;
cookie.flush();
}
function show_comment_pane() {
if (!comment_on) {
comment_on = true;
if (!help_on) {
gotoAndPlay ("comment_on");
} else {
help_on = false;
next_frame = "comment_on";
gotoAndPlay ("comment_off");
}
comment_btn_mc.gotoAndPlay("off");
} else {
comment_on = false;
next_frame = null;
gotoAndPlay ("comment_off");
comment_btn_mc.gotoAndPlay("off");
}
}
function show_help_pane() {
if (!help_on) {
help_on = true;
if (!comment_on) {
gotoAndPlay ("comment_on");
} else {
comment_on = false;
next_frame = "comment_on";
gotoAndPlay ("comment_off");
}
} else {
help_on = false;
next_frame = null;
gotoAndPlay ("comment_off");
}
}
function show_component(comment_on) {
if (!is_on) {
is_on = true;
gotoAndPlay ("component_on");
} else if (comment_on) {
next_frame = "component_off";
comment_on = false;
gotoAndPlay ("comment_off");
} else {
next_frame = null;
is_on = false;
gotoAndPlay ("component_off");
}
}
function clear_cookie() {
cookie = SharedObject.getLocal("rate_me_limit");
cookie.clear();
}
stop();
_global.mochi_opened = false;
var mochibot_id = "0f91e92f";
if ((this._url.indexOf("badim.ru") == -1) && (this._url.indexOf("file:") == -1)) {
this._visible = false;
}
guide_mc._visible = false;
var mochi_rate_me_time = 720;
var mochi_vote_url = "http://www.mochibot.com/api/api-feedback.html";
var mochi_comment_url = "http://www.mochibot.com/api/api-feedback.html";
var mochi_public_comments_url = ("http://www.mochibot.com/shared/shared_feedback.html?swfid=" + mochibot_id);
var mochi_comments_public = false;
var comment_on = false;
var help_on = false;
var is_on = false;
var next_frame = null;
_global.submit_vote = function (vote) {
rate_me_mc.gotoAndPlay("out");
var _local3 = new LoadVars();
var _local4 = new LoadVars();
_local3.mochibot_id = mochibot_id;
_local3.vote = vote;
_local3.swfurl = _root._url;
_local4.onLoad = function () {
rate_me_mc.score = this.score;
rate_me_mc.gotoAndPlay("thanks");
};
_local3.sendAndLoad(mochi_vote_url, _local4, "POST");
set_rate_me_cookie();
};
_global.submit_comment = function (name_str, email_str, comment_str) {
var _local3 = new LoadVars();
var _local4 = new LoadVars();
_local3.name = name_str;
_local3.email = email_str;
_local3.comment = comment_str;
_local3.mochibot_id = mochibot_id;
_local3.swfurl = _root._url;
_local4.onLoad = function () {
if (this.invalidSwf == "true") {
form_mc.gotoAndStop("error");
} else {
form_mc.gotoAndPlay("success");
}
};
_local3.sendAndLoad(mochi_comment_url, _local4, "POST");
};
_global.get_rating = function () {
rate_me_mc.gotoAndStop("score");
var _local2 = new LoadVars();
var _local3 = new LoadVars();
_local2.mochibot_id = mochibot_id;
_local3.onLoad = function () {
rate_me_mc.score = this.score;
rate_me_mc.gotoAndPlay("score");
mochi_comments_public = this.commentsPublic;
};
_local2.sendAndLoad(mochi_vote_url, _local3, "GET");
};
toggle_btn.onRelease = function () {
show_component();
};
toggle_btn.onRollOver = function () {
head_mc._alpha = 100;
bubble_mc.gotoAndPlay(2);
};
toggle_btn.onRollOut = function () {
head_mc._alpha = 50;
bubble_mc.gotoAndStop(1);
};
Symbol 155 MovieClip Frame 2
play();
_global.mochi_opened = true;
Symbol 155 MovieClip Frame 22
init_rate_me();
Symbol 155 MovieClip Frame 29
stop();
comment_btn_mc.hit_btn.onPress = show_comment_pane;
comment_btn_mc.hit_btn.onRollOver = function () {
comment_btn_mc.gotoAndPlay("on");
};
comment_btn_mc.hit_btn.onRollOut = function () {
if (comment_btn_mc.is_open) {
comment_btn_mc.gotoAndPlay("off");
}
};
toggle_btn.onRelease = function () {
show_component();
};
toggle_btn.onRollOver = function () {
head_mc._alpha = 100;
bubble_mc.gotoAndPlay(2);
};
Symbol 155 MovieClip Frame 39
if (help_on) {
form_mc.gotoAndPlay("help");
} else {
form_mc.gotoAndStop(1);
}
Symbol 155 MovieClip Frame 45
stop();
toggle_btn.onRelease = function () {
show_component(true);
};
Symbol 155 MovieClip Frame 51
if (next_frame != null) {
gotoAndPlay(next_frame);
} else {
gotoAndStop ("hold");
}
Instance of Symbol 19 MovieClip in Symbol 156 MovieClip [main_menu_scr] Frame 1
on (release) {
getURL ("http://www.amscom.ru", "_self");
}
Symbol 178 MovieClip [char_mc] Frame 1
stop();
Symbol 223 MovieClip Frame 1
this.gotoAndStop(1 + random(this._totalframes));
Symbol 261 MovieClip Frame 1
this._visible = false;
Symbol 263 MovieClip [z_exps14] Frame 20
this.unloadMovie();
Symbol 276 MovieClip [show_cir] Frame 32
this.unloadMovie();
Symbol 278 MovieClip [z_exps15] Frame 47
this.unloadMovie();
Symbol 318 MovieClip [_sfx.wav] Frame 1
stop();
Symbol 321 MovieClip [_mfx] Frame 1
stop();