Frame 35
gotoAndPlay (36);
Frame 37
gotoAndPlay (36);
Frame 38
setProperty("/distance", _y , "491.9");
tellTarget ("/gifts") {
gotoAndStop ("three");
};
timer = "0";
Set("/c2:counter", "0");
Frame 39
pi = "3.1416";
deltax = getProperty("c2", _x) - getProperty("c1", _x);
deltay = getProperty("c2", _y) - getProperty("c1", _y);
input = (deltax * deltax) + (deltay * deltay);
call("sqrt");
distance = output;
ratio = deltay / deltax;
if ("0" < deltax) {
if ("1" < ratio) {
input = "1" / ratio;
call("arctan");
angle = "90" - ((output * "180") / pi);
} else if (("0" < ratio) and (ratio < "1")) {
input = ratio;
call("arctan");
angle = (output * "180") / "3.14";
} else if ((ratio < "0") and ((-"1") < ratio)) {
input = ratio;
call("arctan");
angle = "360" + ((output * "180") / "3.14");
} else if (ratio < (-"1")) {
input = "1" / ratio;
call("arctan");
angle = "270" - ((output * "180") / pi);
}
} else if (deltax < "0") {
if ("1" < ratio) {
input = "1" / ratio;
call("arctan");
angle = "270" - ((output * "180") / pi);
} else if (("0" < ratio) and (ratio < "1")) {
input = ratio;
call("arctan");
angle = "180" + ((output * "180") / "3.14");
} else if ((ratio < "0") and ((-"1") < ratio)) {
input = ratio;
call("arctan");
angle = "180" + ((output * "180") / "3.14");
} else if (ratio < (-"1")) {
input = "1" / ratio;
call("arctan");
angle = "90" - ((output * "180") / pi);
}
} else if (deltax == "0") {
if ("0" < deltay) {
angle = "90";
} else if (deltay < "0") {
angle = -"90";
} else if (deltay == "0") {
angle = "null";
}
}
setProperty("dline", _xscale , distance * "10");
setProperty("dline", _yscale , distance * "10");
setProperty("dline", _x , getProperty("c1", _x));
setProperty("dline", _y , getProperty("c1", _y));
setProperty("dline", _rotation , angle);
startDrag ("/c2", true, "100", "275", "400", "275");
timer = timer + "1";
setProperty("/distance", _y , getProperty("/distance", _y) - "0.5");
trace(timer);
if ("472" >= timer) {
if (/c2:counter == "0") {
if ("150" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("left2");
};
} else if ("225" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("left1");
};
} else if ("275" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("bigBags");
};
} else if ("350" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("right1");
};
} else {
tellTarget ("/c2") {
gotoAndPlay ("right2");
};
}
} else if (/c2:counter == "1") {
tellTarget ("/gifts") {
gotoAndStop ("two");
};
if ("150" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("left2m");
};
} else if ("225" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("left1m");
};
} else if ("275" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("medBags");
};
} else if ("350" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("right1m");
};
} else {
tellTarget ("/c2") {
gotoAndPlay ("right2m");
};
}
} else if (/c2:counter == "2") {
tellTarget ("/gifts") {
gotoAndStop ("one");
};
if ("150" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("left2m");
};
} else if ("225" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("left1m");
};
} else if ("275" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("medBags");
};
} else if ("350" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("right1m");
};
} else {
tellTarget ("/c2") {
gotoAndPlay ("right2m");
};
}
} else if (/c2:counter == "3") {
tellTarget ("/gifts") {
gotoAndStop ("zero");
};
if ("150" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("left2s");
};
} else if ("225" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("left1s");
};
} else if ("275" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("smallBags");
};
} else if ("350" >= getProperty("/c2", _x)) {
tellTarget ("/c2") {
gotoAndPlay ("right1s");
};
} else {
tellTarget ("/c2") {
gotoAndPlay ("right2s");
};
}
} else {
gotoAndPlay (143);
}
} else {
gotoAndPlay (93);
}
Frame 40
if (/detect:hit == "0") {
gotoAndPlay (39);
} else {
gotoAndPlay (52);
}
Frame 41
x = "1";
iterations = "20";
i = "0";
while (i < iterations) {
x = x - (((x * x) - input) / ("2" * x));
i = i + "1";
}
output = x;
Frame 48
x = input;
arctan = ((((((((((x - (((x * x) * x) / "3")) + (((((x * x) * x) * x) * x) / "5")) - (((((((x * x) * x) * x) * x) * x) * x) / "7")) + (((((((((x * x) * x) * x) * x) * x) * x) * x) * x) / "9")) - (((((((((((x * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) / "11")) + (((((((((((((x * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) / "13")) - (((((((((((((((x * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) / "15")) + (((((((((((((((((x * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) / "17")) - (((((((((((((((((((x * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) / "19")) + (((((((((((((((((((((x * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) / "21")) - (((((((((((((((((((((((x * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) * x) / "23");
output = arctan;
Frame 52
stopDrag();
tellTarget ("/c2") {
gotoAndPlay ("tumbling");
};
trace(/detect:hit);
Frame 53
if (/detect:hit == "0") {
gotoAndPlay (39);
}
Frame 87
gotoAndPlay (39);
Frame 93
stopAllSounds();
Frame 142
gotoAndPlay (193);
Frame 143
stopAllSounds();
Frame 192
gotoAndPlay (193);
Frame 247
stop();
Symbol 8 MovieClip Frame 25
gotoAndPlay (1);
Symbol 18 MovieClip Frame 14
gotoAndPlay (1);
Symbol 30 MovieClip Frame 1
stop();
Symbol 30 MovieClip Frame 9
stop();
Symbol 30 MovieClip Frame 18
stop();
Symbol 30 MovieClip Frame 27
stop();
Symbol 38 MovieClip Frame 1
hit = "0";
ob1_y = getProperty("/obstacle1/ob", _y);
ob1_x = getProperty("/obstacle1", _x);
ob1_h = getProperty("/obstacle1/ob", _height) / "2";
ob1_v = getProperty("/obstacle1/ob", _width) / "2";
ob2_y = getProperty("/obstacle2/ob", _y);
ob2_x = getProperty("/obstacle2", _x);
ob2_h = getProperty("/obstacle2/ob", _height) / "2";
ob2_v = getProperty("/obstacle2/ob", _width) / "2";
ob3_y = getProperty("/obstacle3/ob", _y);
ob3_x = getProperty("/obstacle3", _x);
ob3_h = getProperty("/obstacle3/ob", _height) / "2";
ob3_v = getProperty("/obstacle3/ob", _width) / "2";
ob4_y = getProperty("/obstacle4/ob", _y);
ob4_x = getProperty("/obstacle4", _x);
ob4_h = getProperty("/obstacle4/ob", _height) / "2";
ob4_v = getProperty("/obstacle4/ob", _width) / "2";
ob5_y = getProperty("/obstacle5/ob", _y);
ob5_x = getProperty("/obstacle5", _x);
ob5_h = getProperty("/obstacle5/ob", _height) / "2";
ob5_v = getProperty("/obstacle5/ob", _width) / "2";
santa_y = getProperty("/c2", _y);
santa_x = getProperty("/c2", _x);
santa_h = getProperty("/c2", _height) / "4";
santa_w = getProperty("/c2", _width) / "4";
distance_x1 = ob1_x - santa_x;
distance_y1 = ob1_y - santa_y;
area1 = (ob1_h + ob1_w) * (santa_h + santa_w);
distance_x2 = ob2_x - santa_x;
distance_y2 = ob2_y - santa_y;
area2 = (ob2_h + ob2_w) * (santa_h + santa_w);
distance_x3 = ob3_x - santa_x;
distance_y3 = ob3_y - santa_y;
area3 = (ob3_h + ob3_w) * (santa_h + santa_w);
distance_x4 = ob4_x - santa_x;
distance_y4 = ob4_y - santa_y;
area4 = (ob4_h + ob4_w) * (santa_h + santa_w);
distance_x5 = ob5_x - santa_x;
distance_y5 = ob5_y - santa_y;
area5 = (ob5_h + ob5_w) * (santa_h + santa_w);
if (area1 >= ((distance_x1 * distance_x1) + (distance_y1 * distance_y1))) {
gotoAndPlay (3);
} else if (area2 >= ((distance_x2 * distance_x2) + (distance_y2 * distance_y2))) {
gotoAndPlay (3);
} else if (area3 >= ((distance_x3 * distance_x3) + (distance_y3 * distance_y3))) {
gotoAndPlay (3);
} else if (area4 >= ((distance_x4 * distance_x4) + (distance_y4 * distance_y4))) {
gotoAndPlay (3);
} else if (area5 >= ((distance_x5 * distance_x5) + (distance_y5 * distance_y5))) {
gotoAndPlay (3);
} else {
trace("safe");
}
Symbol 38 MovieClip Frame 2
gotoAndPlay (1);
Symbol 38 MovieClip Frame 3
trace("boom");
hit = "1";
Symbol 38 MovieClip Frame 40
gotoAndPlay (1);
hit = "0";
Symbol 40 MovieClip Frame 2
gotoAndPlay (1);
Symbol 45 MovieClip Frame 1
stop();
Symbol 45 MovieClip Frame 2
gotoAndPlay (1);
Symbol 45 MovieClip Frame 3
stop();
Symbol 45 MovieClip Frame 4
gotoAndPlay (3);
Symbol 45 MovieClip Frame 5
stop();
Symbol 45 MovieClip Frame 6
gotoAndPlay (5);
Symbol 45 MovieClip Frame 7
stop();
Symbol 45 MovieClip Frame 8
stop();
Symbol 45 MovieClip Frame 9
stop();
Symbol 45 MovieClip Frame 10
stop();
Symbol 45 MovieClip Frame 11
stop();
Symbol 45 MovieClip Frame 12
stop();
Symbol 46 MovieClip Frame 1
setProperty("ob", _y , -("75" + random("75")));
tellTarget ("ob") {
gotoAndPlay(random("10") + "1");
}
Symbol 46 MovieClip Frame 2
if ("425" >= getProperty("ob", _y)) {
setProperty("ob", _y , getProperty("ob", _y) + ("5" + random("10")));
} else {
gotoAndPlay (4);
}
Symbol 46 MovieClip Frame 3
gotoAndPlay (2);
Symbol 46 MovieClip Frame 4
gotoAndPlay (1);
Symbol 50 MovieClip Frame 12
gotoAndPlay (1);
Symbol 55 MovieClip Frame 12
gotoAndPlay (1);
Symbol 58 MovieClip Frame 1
Set("/:step", random("9") + "3");
Symbol 58 MovieClip Frame 2
gotoAndPlay (1);
Symbol 61 MovieClip Frame 1
step = "15";
_x = getProperty("/c2", _x);
_y = (getProperty("/c2", _y) + "106");
Symbol 61 MovieClip Frame 3
_y = (_y + step);
gotoAndPlay (2);
if (_y >= "550") {
gotoAndPlay (1);
}
Symbol 77 MovieClip Frame 30
gotoAndPlay (1);
Symbol 79 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 8
stop();
Symbol 79 MovieClip Frame 13
stop();
Symbol 79 MovieClip Frame 18
stop();
Symbol 79 MovieClip Frame 24
stop();
Symbol 79 MovieClip Frame 30
stop();
Symbol 79 MovieClip Frame 37
stop();
Symbol 79 MovieClip Frame 42
stop();
Symbol 79 MovieClip Frame 47
stop();
Symbol 79 MovieClip Frame 53
stop();
Symbol 79 MovieClip Frame 59
stop();
Symbol 79 MovieClip Frame 67
stop();
Symbol 79 MovieClip Frame 72
stop();
Symbol 79 MovieClip Frame 77
stop();
Symbol 79 MovieClip Frame 83
stop();
Symbol 79 MovieClip Frame 89
play();
counter = counter + "1";
Symbol 79 MovieClip Frame 124
stop();
Symbol 85 MovieClip Frame 1
stop();
Symbol 91 Button
on (release) {
gotoAndPlay (38);
}