Frame 1
_root.setScore = function (ascore) {
score = ascore;
lb_score_text = ascore;
};
_root.attachInsect = function (atype, alocation) {
var _local1 = Insects.length;
switch (atype) {
case 0 :
Insects[_local1] = field.attachMovie("fly", "fly" + _local1, _local1);
Insects[_local1].prize = 5;
break;
case 1 :
Insects[_local1] = field.attachMovie("tarakan", "tarakan" + _local1, _local1);
Insects[_local1].prize = 10;
break;
case 2 :
Insects[_local1] = field.attachMovie("tarakan", "tarakan" + _local1, _local1);
Insects[_local1].bruho.gotoAndStop(1);
Insects[_local1].prize = 15;
}
Insects[_local1].dead = false;
Insects[_local1]._x = Locations[alocation].x;
Insects[_local1]._y = Locations[alocation].y;
Insects[_local1]._rotation = Math.random() * 360;
};
rootMouseMove = function () {
hand_mc._x = _root._xmouse;
hand_mc._y = ((_root._ymouse > MINY) ? (_root._ymouse) : (MINY));
hand_mc._rotation = ((hand_mc._x - 275) / 275) * 10;
if (_root._ymouse > MINY) {
Mouse.hide();
} else {
Mouse.show();
}
};
_root.onMouseDown = function () {
hand_mc.gotoAndPlay(2);
};
_root.onPush = function () {
banka_mc.gotoAndPlay(2);
botl_mc.gotoAndPlay(2);
stakan_mc.gotoAndPlay(2);
buter_mc.gotoAndPlay(2);
onion_mc.gotoAndPlay(2);
if (playsound) {
push.start();
}
var _local2 = 0;
var _local3 = 0;
var _local1 = 0;
while (Insects.length > _local1) {
if (!Insects[_local1].dead) {
if (60 > Ag.distance(new Point(Insects[_local1]), new Point(hand_mc))) {
_local2++;
Insects[_local1].gotoAndStop(2);
Insects[_local1].dead = true;
_local3 = _local3 + Insects[_local1].prize;
}
}
_local1++;
}
if (0 != _local2) {
var _local4 = ((_local3 * level) * bonus) * _local2;
if (1 == _local2) {
score_mc.sc.score_id = (((((_local3 + "*") + level) + "*") + bonus) + " = ") + _local4;
} else {
score_mc.sc.score_id = (((((((_local3 + "*") + level) + "*") + bonus) + "*") + _local2) + "combo! = ") + _local4;
}
bonus++;
score_mc._x = hand_mc._x;
score_mc._y = hand_mc._y;
score_mc.gotoAndPlay(2);
setScore(score + _local4);
TotalKills = TotalKills + _local2;
lb_morekills_text = (TotalKills + "/") + INSECTSTOKILL;
InsectsAlive = InsectsAlive - _local2;
if (0 >= InsectsAlive) {
initInsects(1);
}
if (INSECTSTOKILL <= TotalKills) {
gotoAndStop (2);
}
} else {
bonus = 1;
}
};
doMove = function () {
var _local5 = true;
var _local1;
var _local2 = 0;
while (Insects.length > _local2) {
if (!Insects[_local2].dead) {
_local5 = false;
_local1 = Insects[_local2];
var _local3 = (_local1._rotation / 180) * Math.PI;
_local1._x = _local1._x - (3 * Math.cos(_local3));
_local1._y = _local1._y - (3 * Math.sin(_local3));
_local1._rotation = _local1._rotation + ((Math.random() * 20) - 10);
if ((((_local1._x < -20) || (_local1._x > 550)) || (_local1._y < -20)) || (_local1._y > 400)) {
var _local4 = Math.floor(Math.random() * 4);
_local1._x = Locations[_local4].x;
_local1._y = Locations[_local4].y;
InsectsLost++;
lb_lost_text = (InsectsLost + "/") + MAX_LEFT;
if (MAX_LEFT <= InsectsLost) {
gotoAndStop (3);
}
}
}
_local2++;
}
};
_root.onEnterFrame = function () {
if (Math.random() < 0.01) {
initInsects(1);
}
doMove();
hand_mc._x = hand_mc._x + ((((Math.random() * (level - 1)) * 5) * 2) - ((level - 1) * 5));
var _local1 = (hand_mc._y + (((Math.random() * (level - 1)) * 5) * 2)) - ((level - 1) * 5);
hand_mc._y = ((MINY > _local1) ? (MINY) : (_local1));
};
_root.initInsects = function (num) {
var _local1 = 0;
while (num > _local1) {
var _local3 = Math.floor(Math.random() * 4);
var _local2 = Math.floor(Math.random() * 3);
attachInsect(_local2, _local3);
_local1++;
}
InsectsAlive = InsectsAlive + num;
};
globalInit = function () {
so = SharedObject.getLocal("insects");
Locations = new Array(4);
Locations[0] = new Point(70, 240);
Locations[1] = new Point(250, 170);
Locations[2] = new Point(410, 130);
Locations[3] = new Point(500, 260);
music = new Sound();
music.attachSound("nas_sound");
push = new Sound();
push.attachSound("Push");
music.onSoundComplete = function () {
_root.music.start();
};
if ((undefined == so.data.sound) || (true == so.data.sound)) {
playsound = true;
music.start();
} else {
playsound = false;
}
if ((undefined == so.data.quality) || ("LOW" == so.data.quality)) {
_quality = "LOW";
} else {
_quality = "HIGH";
}
if (so.data.hs != undefined) {
highscore = so.data.hs;
} else {
highscore = new Array(5);
var _local2 = 0;
while (5 > _local2) {
highscore[_local2] = new Object();
highscore[_local2].score = 10000 - (_local2 * 2000);
_local2++;
}
highscore[0].player = "\u0421\u043F\u0438\u0440\u0442";
highscore[1].player = "\u0412\u043E\u0434\u043A\u0430";
highscore[2].player = "\u0421\u0430\u043C\u043E\u0433\u043E\u043D";
highscore[3].player = "\u041F\u0438\u0432\u043E";
highscore[4].player = "\u041A\u0432\u0430\u0441";
}
MINY = 100;
MAX_LEFT = 20;
INSECTSTOKILL = 20;
};
startGame = function () {
Insects = new Array();
setScore(0);
level = 1;
};
startLevel = function () {
var _local2 = 0;
while (Insects.length > _local2) {
removeMovieClip(Insects[_local2]);
_local2++;
}
Insects.length = 0;
InsectsAlive = 0;
_root.onMouseMove = rootMouseMove;
bonus = 1;
Mouse.hide();
initInsects(level);
TotalKills = 0;
lb_morekills_text = (TotalKills + "/") + INSECTSTOKILL;
InsectsLost = 0;
lb_lost_text = (InsectsLost + "/") + MAX_LEFT;
lb_level_text = level;
setScore(score);
};
if (!secondenter) {
globalInit();
secondenter = true;
gotoAndStop (3);
}
if (!gameon) {
if (_root.playsound) {
_root.soundbt_mc.gotoAndStop(1);
} else {
_root.soundbt_mc.gotoAndStop(2);
}
startGame();
}
startLevel();
stop();
Instance of Symbol 67 MovieClip "soundbt_mc" in Frame 1
on (release) {
if (_root.playsound) {
_root.soundbt_mc.gotoAndStop(2);
_root.playsound = false;
stopAllSounds();
_root.so.data.sound = false;
} else {
_root.soundbt_mc.gotoAndStop(1);
_root.playsound = true;
_root.music.start();
_root.so.data.sound = true;
}
}
Frame 2
_root.onMouseMove = function () {
};
main_label = ("\u0423\u0440\u043E\u0432\u0435\u043D\u044C " + level) + " \u043F\u0440\u043E\u0439\u0434\u0435\u043D!";
bonus_label = "\u0411\u043E\u043D\u0443\u0441 \u043C\u0435\u0442\u043A\u043E\u0441\u0442\u0438 " + ((MAX_LEFT - InsectsLost) * 100);
score = score + ((MAX_LEFT - InsectsLost) * 100);
Mouse.show();
level++;
Frame 3
_root.onMouseMove = function () {
};
Mouse.show();
if ("HIGH" == _quality) {
cbhq_mc.gotoAndStop(2);
} else {
cbhq_mc.gotoAndStop(1);
}
if (playsound) {
cbsnd_mc.sound_ch.gotoAndStop(1);
} else {
cbsnd_mc.sound_ch.gotoAndStop(2);
}
_root.scoreEntered = function (aplayer) {
entername.removeMovieClip();
var _local4;
var _local2 = 0;
while ((highscore[_local2].score >= score) && (5 > _local2)) {
_local2++;
}
var _local1 = 4;
while (_local1 > _local2) {
highscore[_local1].player = highscore[_local1 - 1].player;
highscore[_local1].score = highscore[_local1 - 1].score;
_local1--;
}
highscore[_local2].score = score;
highscore[_local2].player = aplayer;
so.data.hs = highscore;
hs_text = "";
_local2 = 0;
while (5 > _local2) {
hs_text = hs_text + ((((((_local2 + 1) + ". ") + highscore[_local2].player) + " - ") + highscore[_local2].score) + "\r");
_local2++;
}
};
t2.bruho.gotoAndStop(1);
if (highscore[4].score < score) {
entername = attachMovie("hs_enter", "hse", 100);
entername._x = (entername._y = -10);
}
hs_text = "";
var i = 0;
while (5 > i) {
hs_text = hs_text + ((((((i + 1) + ". ") + highscore[i].player) + " - ") + highscore[i].score) + "\r");
i++;
}
Instance of Symbol 108 MovieClip "cbhq_mc" in Frame 3
on (release) {
if ("LOW" == _quality) {
_quality = "HIGH";
gotoAndStop (2);
_root.so.data.quality = "HIGH";
} else {
_quality = "LOW";
gotoAndStop (1);
_root.so.data.quality = "LOW";
}
}
Instance of Symbol 114 MovieClip "cbsnd_mc" in Frame 3
on (release) {
if (_root.playsound) {
sound_ch.gotoAndStop(2);
_root.playsound = false;
stopAllSounds();
_root.so.data.sound = false;
} else {
sound_ch.gotoAndStop(1);
_root.playsound = true;
_root.music.start();
_root.so.data.sound = true;
}
}
Symbol 10 Button
on (release) {
if ((undefined != _root.entername.aplayer) && ("" != _root.entername.aplayer)) {
_root.scoreEntered(_root.entername.aplayer);
}
}
Symbol 14 MovieClip Frame 2
stop();
Symbol 23 MovieClip [tarakan] Frame 1
f1.gotoAndPlay(1);
f2.gotoAndPlay(3);
f3.gotoAndPlay(5);
f4.gotoAndPlay(3);
f5.gotoAndPlay(5);
f6.gotoAndPlay(2);
stop();
Symbol 31 MovieClip [fly] Frame 1
stop();
Symbol 46 MovieClip Frame 1
stop();
Symbol 49 MovieClip Frame 1
stop();
Symbol 52 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 1
stop();
Symbol 67 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 10
_root.onPush();
Symbol 78 MovieClip Frame 1
_root.score_mc._y = -100;
stop();
Symbol 122 MovieClip [__Packages.Point] Frame 0
class Point extends Object
{
var x, y;
function Point (a, b) {
super();
if ("object" == typeof(a)) {
if ((a.x == undefined) || (a.y == undefined)) {
x = a._x;
y = a._y;
} else {
x = a.x;
y = a.y;
}
} else if ("movieclip" == typeof(a)) {
x = a._x;
y = a._y;
} else if ("number" == typeof(a)) {
x = a;
y = b;
} else {
x = (y = 0);
}
}
function get className() {
return(FClassName);
}
function assign(src, src2) {
if ("object" == typeof(src)) {
if ((src.x == undefined) || (src.y == undefined)) {
x = src._x;
y = src._y;
} else {
x = src.x;
y = src.y;
}
} else if ("movieclip" == typeof(src)) {
x = src._x;
y = src._y;
} else if (("number" == typeof(src)) && ("number" == typeof(src2))) {
x = src;
y = src2;
}
}
function toString() {
return(String((x + ":") + y));
}
function plus(p) {
x = x + p.x;
y = y + p.y;
}
function minus(p) {
x = x - p.x;
y = y - p.y;
}
function getProection(l) {
var _local3 = l.getPerpendicular(this);
if (l.__get__vertical()) {
var _local5 = l.__get__b();
var _local4 = y;
} else if (_local3.vertical) {
var _local5 = x;
var _local4 = l.__get__b();
} else {
var _local4 = ((_local3.k * l.__get__b()) - (l.__get__k() * _local3.b)) / (_local3.k - l.__get__k());
var _local5 = (l.__get__b() - _local3.b) / (_local3.k - l.__get__k());
}
return(new Point(_local5, _local4));
}
function reflect(l) {
var _local2 = getProection(l);
x = (2 * _local2.x) - x;
y = (2 * _local2.y) - y;
}
function rotate(p, angle) {
minus(p);
var _local2 = Math.atan(y / x);
if (0 > x) {
_local2 = _local2 + Math.PI;
}
var _local3 = Math.sqrt((x * x) + (y * y));
x = _local3 * Math.cos(angle + _local2);
y = _local3 * Math.sin(angle + _local2);
plus(p);
}
function proection(l) {
assign(getProection(l));
}
var FClassName = "Point";
}
Symbol 123 MovieClip [__Packages.Line] Frame 0
class Line
{
var FClassName, _vertical, _k, _b;
function Line (v1, v2) {
FClassName = "Line";
_vertical = false;
switch (arguments.length) {
case 0 :
_k = 0;
_b = 0;
break;
case 1 :
if ((undefined != v1.x) && (undefined != v1.y)) {
_k = v1.x;
_b = v1.y;
_vertical = v1.x == Number.POSITIVE_INFINITY;
} else if ("Line" == v1.className) {
_k = v1.k;
_b = v1.b;
_vertical = v1.vertical();
} else {
_k = v1.k;
_b = v1.b;
_vertical = ((k == Number.POSITIVE_INFINITY) || (k == Number.NEGATIVE_INFINITY)) || (Math.abs(_k) == Number.MAX_VALUE);
}
break;
case 2 :
if (("number" == typeof(v1)) && ("number" == typeof(v1))) {
_k = v1;
_b = v2;
_vertical = ((k == Number.POSITIVE_INFINITY) || (k == Number.NEGATIVE_INFINITY)) || (Math.abs(_k) == Number.MAX_VALUE);
} else {
var _local4 = getKB(v1, v2);
if (null != _local4) {
_k = _local4.x;
_b = _local4.y;
} else {
_k = Number.POSITIVE_INFINITY;
_b = v1.x;
_vertical = true;
}
}
}
}
function getKB(a, b) {
if ((a.x == b.x) || (Number.MIN_VALUE == Math.abs(b.x - a.x))) {
return(null);
}
var _local4 = (b.y - a.y) / (b.x - a.x);
var _local3 = ((a.y * b.x) - (b.y * a.x)) / (b.x - a.x);
return(new Point(_local4, _local3));
}
function get className() {
return(FClassName);
}
function toString() {
if (!_vertical) {
return(String((("y=" + _k) + "*x+") + _b));
}
return(String("vertical, x=" + _b));
}
function assign(src) {
_k = src.k;
_b = src.b;
_vertical = src.__get__vertical()();
}
function assign2p(a, b) {
var _local2 = getKB(a, b);
if (null != _local2) {
_k = _local2.x;
_b = _local2.y;
_vertical = false;
} else {
_k = Number.POSITIVE_INFINITY;
_b = a.x;
_vertical = true;
}
}
function set k(value) {
_k = value;
if (((Number.POSITIVE_INFINITY == _k) || (Number.MAX_VALUE == Math.abs(_k))) || (Number.NEGATIVE_INFINITY == _k)) {
_vertical = true;
} else {
_vertical = false;
}
//return(k);
}
function get k() {
return(_k);
}
function set b(value) {
_b = value;
//return(b);
}
function get b() {
return(_b);
}
function get vertical() {
return(_vertical);
}
function rotate(ang, p) {
if (undefined == p) {
p = new Point();
}
var _local3 = (_vertical ? (Math.PI/2) : (Math.atan(_k)));
_k = Math.tan(_local3 + ang);
if (((Math.abs(_k) == Number.MAX_VALUE) || (Number.NEGATIVE_INFINITY == _k)) || (Number.POSITIVE_INFINITY == _k)) {
_vertical = true;
_k = Number.POSITIVE_INFINITY;
_b = p.x;
} else {
_vertical = false;
_b = p.y - (_k * p.x);
}
}
function perpendicular(p) {
if (_vertical) {
_k = 0;
_vertical = false;
_b = p.y;
}
if ((0 == _k) || (Math.abs(_k) == Number.MIN_VALUE)) {
_k = Number.POSITIVE_INFINITY;
_vertical = true;
_b = p.x;
} else {
_k = 1 / (-_k);
_b = p.y - (_k * p.x);
}
}
function moveUpDown(d) {
if (!_vertical) {
_b = _b + d;
}
}
function moveLeftRifht(d) {
_b = (_vertical ? (_b + d) : (_b - (d * _k)));
}
function ovnsPoint(p) {
if (_vertical) {
return((Math.abs(p.x - b) == Number.MIN_VALUE) || (p.x == b));
}
return((p.y == ((p.x * _k) + _b)) || (Math.abs((p.y - (p.x * _k)) + _b) == Number.MIN_VALUE));
}
function getPerpendicular(p) {
if (_vertical) {
return(new Line(0, p.y));
}
if ((0 == _k) || (Math.abs(_k) == Number.MIN_VALUE)) {
return(new Line(Number.POSITIVE_INFINITY, p.x));
}
var _local2 = 1 / (-_k);
return(new Line(_local2, p.y - (_local2 * p.x)));
}
function isParallel(l) {
return(_k == l.__get__k());
}
}
Symbol 124 MovieClip [__Packages.Ag] Frame 0
class Ag
{
function Ag () {
}
static function sign(x) {
return(((x > 0) ? 1 : (((x == 0) ? 0 : -1))));
}
static function deg2rad(x) {
return((x / 180) * Math.PI);
}
static function rad2deg(x) {
return((x * 180) / Math.PI);
}
static function pointOnPiece(piece, p) {
if ((((p.x >= (piece.startpt.x - zapas)) && (p.x <= (piece.endpt.x + zapas))) || ((p.x <= (piece.startpt.x + zapas)) && (p.x >= (piece.endpt.x - zapas)))) && (((p.y >= (piece.startpt.y - zapas)) && (p.y <= (piece.endpt.y + zapas))) || ((p.y <= (piece.startpt.y + zapas)) && (p.y >= (piece.endpt.y - zapas))))) {
return(true);
}
return(false);
}
static function linesCross(line1, line2) {
if ((line1.__get__k() == line2.__get__k()) || (Math.abs(line1.__get__k() - line2.__get__k()) == Number.MIN_VALUE)) {
return(null);
}
if (line1.__get__vertical()) {
return(new Point(line1.__get__b(), (line2.__get__k() * line1.__get__b()) + line2.__get__b()));
}
if (line2.__get__vertical()) {
return(new Point(line2.__get__b(), (line1.__get__k() * line2.__get__b()) + line1.__get__b()));
}
return(new Point((line1.__get__b() - line2.__get__b()) / (line2.__get__k() - line1.__get__k()), ((line2.__get__k() * line1.__get__b()) - (line1.__get__k() * line2.__get__b())) / (line2.__get__k() - line1.__get__k())));
}
static function piecesCross(piece1, piece2) {
var _local1 = linesCross(new Line(piece1), new Line(piece2));
if (null == _local1) {
return(null);
}
if (pointOnPiece(piece1, _local1) && (pointOnPiece(piece2, _local1))) {
return(_local1);
}
return(null);
}
static function distance(a, b) {
var _local2 = a.x - b.x;
var _local1 = a.y - b.y;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
static function lineCrossCircle(line, c) {
var _local3 = new Array();
if (0 > c.__get__radius()) {
return(_local3);
}
if (!line.__get__vertical()) {
var _local5 = (line.__get__k() * line.__get__k()) + 1;
var _local4 = 2 * (((line.__get__k() * line.__get__b()) - (line.__get__k() * c.__get__y())) - c.__get__x());
var _local12 = ((((line.__get__b() * line.__get__b()) - ((2 * line.__get__b()) * c.__get__y())) + (c.__get__y() * c.__get__y())) - (c.__get__radius() * c.__get__radius())) + (c.__get__x() * c.__get__x());
var _local6 = (_local4 * _local4) - ((4 * _local5) * _local12);
if (0 > _local6) {
return(_local3);
}
if (0 == _local6) {
var _local8 = (-_local4) / (2 * _local5);
var _local11 = (_local8 * line.__get__k()) + line.__get__b();
_local3[0] = new Point(_local8, _local11);
} else {
var _local9 = Math.sqrt(_local6);
var _local8 = ((-_local4) + _local9) / (2 * _local5);
var _local11 = (_local8 * line.__get__k()) + line.__get__b();
var _local7 = ((-_local4) - _local9) / (2 * _local5);
var _local10 = (_local7 * line.__get__k()) + line.__get__b();
_local3[0] = new Point(_local8, _local11);
_local3[1] = new Point(_local7, _local10);
}
} else {
if (((c.__get__x() - c.__get__radius()) > line.__get__b()) || ((c.__get__x() + c.__get__radius()) < line.__get__b())) {
return(_local3);
}
if (((c.__get__x() - c.__get__radius()) == line.__get__b()) || ((c.__get__x() + c.__get__radius()) == line.__get__b())) {
_local3[0] = new Point(line.__get__b(), c.__get__y());
} else {
_local3[0] = new Point(line.__get__b(), Math.sqrt((c.__get__radius() * c.__get__radius()) - ((line.__get__b() - c.__get__x()) * (line.__get__b() - c.__get__x()))) + c.__get__y());
_local3[1] = new Point(line.__get__b(), (-Math.sqrt((c.__get__radius() * c.__get__radius()) - ((line.__get__b() - c.__get__x()) * (line.__get__b() - c.__get__x())))) + c.__get__y());
}
}
return(_local3);
}
static function pieceCrossCircle(p, c) {
var _local2 = lineCrossCircle(new Line(p), c);
var _local1 = new Array();
if ((_local2.length > 0) && (pointOnPiece(p, _local2[0]))) {
_local1[_local1.length] = _local2[0];
}
if ((_local2.length > 1) && (pointOnPiece(p, _local2[1]))) {
_local1[_local1.length] = _local2[1];
}
if (0 == _local1.length) {
return(null);
}
if (2 == _local1.length) {
if (distance(p.__get__startpt(), _local1[0]) < distance(p.__get__startpt(), _local1[1])) {
return(_local1[0]);
}
return(_local1[1]);
}
return(_local1[0]);
}
static function tangent(circle, point) {
var _local3 = new Array();
if ((circle.__get__y() == point.y) || (Math.abs(circle.__get__y() - point.y) == Number.MIN_VALUE)) {
if (Math.abs(circle.__get__x() - point.x) < circle.__get__radius()) {
return(_local3);
}
if ((Math.abs(circle.__get__x() - point.x) == circle.__get__radius()) || (Math.abs(Math.abs(circle.__get__x() - point.x) - circle.__get__radius()) == Number.MIN_VALUE)) {
_local3[0] = new Point(point.x, point.y);
} else {
var _local22 = circle.__get__radius() / Math.abs(point.x - circle.__get__x());
var _local21 = Math.sqrt(((point.x - circle.__get__x()) * (point.x - circle.__get__x())) - (circle.__get__radius() * circle.__get__radius()));
var _local6 = _local21 * _local22;
var _local9 = Math.sqrt((_local21 * _local21) - (_local6 * _local6));
if (point.x > circle.__get__x()) {
_local3[0] = new Point(point.x - _local9, point.y + _local6);
_local3[1] = new Point(point.x - _local9, point.y - _local6);
} else {
_local3[0] = new Point(point.x + _local9, point.y + _local6);
_local3[1] = new Point(point.x + _local9, point.y - _local6);
}
}
} else {
var _local13 = ((circle.__get__x() * circle.__get__x()) - (circle.__get__x() * point.x)) - (circle.__get__radius() * circle.__get__radius());
var _local12 = point.x - circle.__get__x();
var _local14 = (circle.__get__y() - point.y) * (circle.__get__y() - point.y);
var _local11 = ((_local12 * _local12) / _local14) + 1;
var _local8 = (((2 * _local13) * _local12) / _local14) - (2 * circle.__get__x());
var _local21 = (((_local13 * _local13) / _local14) - (circle.__get__radius() * circle.__get__radius())) + (circle.__get__x() * circle.__get__x());
var _local10 = (_local8 * _local8) - ((4 * _local11) * _local21);
if (0 == _local10) {
_local3[0] = new Point(point.x, point.y);
} else {
if (0 > _local10) {
return(_local3);
}
var _local5 = ((-_local8) + Math.sqrt(_local10)) / (2 * _local11);
var _local4 = ((-_local8) - Math.sqrt(_local10)) / (2 * _local11);
var _local18 = Math.sqrt((circle.__get__radius() * circle.__get__radius()) - ((_local5 - circle.__get__x()) * (_local5 - circle.__get__x()))) + circle.__get__y();
var _local16 = (-Math.sqrt((circle.__get__radius() * circle.__get__radius()) - ((_local5 - circle.__get__x()) * (_local5 - circle.__get__x())))) + circle.__get__y();
var _local17 = Math.sqrt((circle.__get__radius() * circle.__get__radius()) - ((_local4 - circle.__get__x()) * (_local4 - circle.__get__x()))) + circle.__get__y();
var _local15 = (-Math.sqrt((circle.__get__radius() * circle.__get__radius()) - ((_local4 - circle.__get__x()) * (_local4 - circle.__get__x())))) + circle.__get__y();
var _local7 = distance(circle.__get__center(), point);
var _local26 = Math.abs(Math.sqrt(Math.pow(distance(point, new Point(_local5, _local18)), 2) + (circle.__get__radius() * circle.__get__radius())) - _local7);
var _local24 = Math.abs(Math.sqrt(Math.pow(distance(point, new Point(_local5, _local16)), 2) + (circle.__get__radius() * circle.__get__radius())) - _local7);
var _local25 = Math.abs(Math.sqrt(Math.pow(distance(point, new Point(_local4, _local17)), 2) + (circle.__get__radius() * circle.__get__radius())) - _local7);
var _local23 = Math.abs(Math.sqrt(Math.pow(distance(point, new Point(_local4, _local15)), 2) + (circle.__get__radius() * circle.__get__radius())) - _local7);
var _local20 = ((_local26 < _local24) ? (_local18) : (_local16));
var _local19 = ((_local25 < _local23) ? (_local17) : (_local15));
_local3[0] = new Point(_local5, _local20);
_local3[1] = new Point(_local4, _local19);
}
}
return(_local3);
}
static var zapas = 1E-5;
}
Symbol 125 MovieClip [__Packages.Piece] Frame 0
class Piece
{
var FClassName, _startpt, _endpt;
function Piece (a, b) {
FClassName = "Piece";
switch (arguments.length) {
case 0 :
_startpt = new Point();
_endpt = new Point();
break;
case 1 :
if ("Piece" == a.className) {
_startpt = new Point(a.startpt);
_endpt = new Point(a.endpt);
}
break;
default :
if ("Point" != a.className) {
break;
}
_startpt = new Point(a);
_endpt = new Point(b);
}
}
function get className() {
return(FClassName);
}
function toString() {
return(String((_startpt + " - ") + _endpt));
}
function set startpt(p) {
_startpt.assign(p);
//return(startpt);
}
function get startpt() {
return(new Point(_startpt));
}
function set endpt(p) {
_endpt.assign(p);
//return(endpt);
}
function get endpt() {
return(new Point(_endpt));
}
function assign(src) {
_startpt.assign(src.__get__startpt());
}
function assign2p(p1, p2) {
_startpt.assign(p1);
_endpt.assign(p2);
}
function get ends() {
var _local2 = new Array(2);
_local2[0] = new Point(_startpt);
_local2[1] = new Point(_endpt);
return(_local2);
}
function get length() {
return(Math.sqrt(Math.pow(_startpt.x - _endpt.x, 2) + Math.pow(_startpt.y - _endpt.y, 2)));
}
function get k() {
if ((_startpt.x == _endpt.x) || (Number.MIN_VALUE == Math.abs(_startpt.x - _endpt.x))) {
return(Number.POSITIVE_INFINITY);
}
return((_endpt.y - _startpt.y) / (_endpt.x - _startpt.x));
}
function get b() {
if (Number.POSITIVE_INFINITY == k) {
return(_startpt.x);
}
return(((_startpt.y * _endpt.x) - (_endpt.y * _startpt.x)) / (_endpt.x - _startpt.x));
}
function rotate(p, angle) {
_startpt.rotate(p, angle);
_endpt.rotate(p, angle);
}
function plus(value) {
_startpt.plus(value);
_endpt.plus(value);
}
function minus(value) {
_startpt.minus(value);
_endpt.minus(value);
}
function reflect(l) {
_startpt.reflect(l);
_endpt.reflect(l);
}
function proection(l) {
_startpt.proection(l);
_endpt.proection(l);
}
function display(mc) {
mc.moveTo(_startpt.x, _startpt.y);
mc.lineTo(_endpt.x, _endpt.y);
}
}
Symbol 126 MovieClip [__Packages.Circle] Frame 0
class Circle
{
var FClassName, _center, _radius;
function Circle (a, b, c) {
FClassName = "Circle";
switch (arguments.length) {
case 0 :
_center = new Point(0, 0);
_radius = 0;
break;
case 1 :
_center = new Point(a.center);
_radius = a.radius;
break;
case 2 :
_center = new Point(a);
_radius = ((0 <= b) ? (b) : 0);
break;
default :
_center = new Point(a, b);
_radius = ((0 <= c) ? (c) : 0);
}
}
function get className() {
return(FClassName);
}
function assign(c) {
_center = c.center;
_radius = c.radius;
}
function allocate(p) {
_center.assign(p);
}
function move(p) {
_center.plus(p);
}
function toString() {
return(String((_center + ", r=") + _radius));
}
function get center() {
return(new Point(_center));
}
function set center(p) {
_center.assign(p);
//return(center);
}
function get radius() {
return(_radius);
}
function set radius(r) {
_radius = ((0 <= r) ? (r) : 0);
//return(radius);
}
function display(a_mc) {
var _local4 = new Point(_center.x + (_radius * 0.414213562373095), _center.y - _radius);
var _local3 = new Point(_center.x, _center.y - _radius);
a_mc.moveTo(_local3.x, _local3.y);
var _local2 = 0;
while (8 > _local2) {
_local4.rotate(_center, -0.785398163397448);
_local3.rotate(_center, -0.785398163397448);
a_mc.curveTo(_local4.x, _local4.y, _local3.x, _local3.y);
_local2++;
}
}
function get x() {
return(_center.x);
}
function get y() {
return(_center.y);
}
function set x(value) {
_center.x = value;
//return(x);
}
function set y(value) {
_center.y = value;
//return(y);
}
function get circleLength() {
return((Math.PI*2) * _radius);
}
function get area() {
return((Math.PI * _radius) * _radius);
}
}
Symbol 83 MovieClip Frame 39
gotoAndPlay (1);
Symbol 88 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 20
stop();
_root.gotoAndPlay(1);
Symbol 102 Button
on (release) {
gameon = true;
level_done.man.hand.gotoAndPlay(2);
level_done.man.head.gotoAndPlay(2);
}
Symbol 108 MovieClip Frame 1
stop();
Symbol 111 Button
on (release) {
gameon = false;
gotoAndPlay (1);
}
Symbol 121 Button
on (release) {
getURL ("http://www.dimayasher.narod.ru/", "_blank");
}