Frame 2
if (_framesloaded >= "6") {
gotoAndStop (4);
}
Frame 3
gotoAndPlay (2);
Frame 4
i = "1";
while (i < "91") {
setProperty("line", _rotation , i);
Set("/:angle" add i, getProperty("/line", _height) / getProperty("/line", _width));
i = i + "3";
}
base = "0.2";
stop();
c1 = "3";
c2 = "1";
Set("/:gGameID", "protect_the_fire");
Frame 8
loadVariablesNum ((/:gDB_domain add "/web/load_variables/games/game_data.jsp?game_id=") add /:gGameID, 0);
gScore = "0";
gLevel = "1";
aiAcc = "150";
team1 = "3";
team2 = "1";
rafts = team1 + team2;
first = "1";
freeforall = "0";
whosturn = "1";
tellTarget ("turn") {
gotoAndStop (1);
};
Frame 10
aiAcc = "100";
team1 = "3";
team2 = "2";
rafts = team1 + team2;
first = "1";
freeforall = "0";
whosturn = "1";
tellTarget ("turn") {
gotoAndStop (1);
};
Frame 12
aiAcc = "100";
team1 = "3";
team2 = "3";
rafts = team1 + team2;
first = "1";
freeforall = "0";
whosturn = "1";
tellTarget ("turn") {
gotoAndStop (1);
};
Frame 14
aiAcc = "100";
team1 = "4";
team2 = "4";
rafts = team1 + team2;
first = "1";
freeforall = "0";
whosturn = "1";
tellTarget ("turn") {
gotoAndStop (1);
};
Frame 16
aiAcc = "100";
team1 = "3";
team2 = "3";
rafts = team1 + team2;
first = "1";
freeforall = "1";
tellTarget ("/ai") {
play();
};
whosturn = "1";
tellTarget ("turn") {
gotoAndStop (1);
};
Frame 18
aiAcc = "95";
team1 = "5";
team2 = "5";
rafts = team1 + team2;
first = "1";
freeforall = "0";
whosturn = "1";
tellTarget ("turn") {
gotoAndStop (1);
};
Frame 20
aiAcc = "95";
team1 = "2";
team2 = "3";
rafts = team1 + team2;
first = "1";
freeforall = "0";
whosturn = "1";
tellTarget ("turn") {
gotoAndStop (1);
};
Frame 22
aiAcc = "95";
team1 = "3";
team2 = "3";
rafts = team1 + team2;
first = "1";
freeforall = "1";
tellTarget ("/ai") {
play();
};
whosturn = "1";
tellTarget ("turn") {
gotoAndStop (1);
};
Frame 24
aiAcc = "95";
team1 = "3";
team2 = "3";
rafts = team1 + team2;
first = "1";
freeforall = "0";
whosturn = "1";
tellTarget ("turn") {
gotoAndStop (1);
};
Frame 26
aiAcc = "90";
team1 = "3";
team2 = "3";
rafts = team1 + team2;
first = "1";
freeforall = "0";
whosturn = "1";
tellTarget ("turn") {
gotoAndStop (1);
};
Frame 28
aiAcc = "120" - (/:gLevel * "2");
if (aiAcc < "10") {
aiAcc = "10";
}
team1 = "1";
team2 = "2";
rafts = team1 + team2;
first = "1";
freeforall = "1";
tellTarget ("/ai") {
play();
};
whosturn = "1";
tellTarget ("turn") {
gotoAndStop (1);
};
Frame 30
aiAcc = "100" - (/:gLevel * "2");
if (aiAcc < "10") {
aiAcc = "10";
}
team1 = "3";
team2 = "3";
rafts = team1 + team2;
first = "1";
freeforall = "0";
whosturn = "1";
tellTarget ("turn") {
gotoAndStop (1);
};
Frame 32
gotoAndStop (28);
Symbol 12 Button
on (release) {
Set("/:tries", "4");
tellTarget ("/") {
nextFrame();
};
}
Symbol 13 MovieClip Frame 1
if (getProperty("/", _framesloaded) == getProperty("/", _totalframes)) {
gotoAndStop (3);
}
Symbol 13 MovieClip Frame 2
gotoAndPlay (1);
Symbol 15 Button
on (release) {
gotoAndStop (7);
}
Symbol 42 Button
on (release) {
Set("/:c1", "4");
Set("/:c2", random("3") + "1");
gotoAndStop (8);
}
Symbol 43 Button
on (release) {
Set("/:c1", "3");
Set("/:c2", random("4") + "1");
while (/:c2 == /:c1) {
Set("/:c2", random("4") + "1");
}
gotoAndStop (8);
}
Symbol 44 Button
on (release) {
Set("/:c1", "2");
Set("/:c2", random("4") + "1");
while (/:c2 == /:c1) {
Set("/:c2", random("4") + "1");
}
gotoAndStop (8);
}
Symbol 45 Button
on (release) {
Set("/:c1", "1");
Set("/:c2", random("3") + "2");
gotoAndStop (8);
}
Symbol 56 Button
on (release) {
gotoAndStop (4);
}
Symbol 66 MovieClip Frame 1
_visible = "0";
Symbol 66 MovieClip Frame 4
if (/:min_score ne "na") {
_visible = "1";
}
Symbol 66 MovieClip Frame 5
gotoAndPlay(_currentframe - "1");
Symbol 75 MovieClip Frame 1
_visible = "0";
Symbol 75 MovieClip Frame 5
stop();
Symbol 76 Button
on (keyPress "q") {
Set("/:team1", "0");
Set("/:tries", "0");
if (getProperty("/winner", _currentframe) == "1") {
Set("/winner/:win", "2");
tellTarget ("/winner") {
gotoAndPlay (2);
};
}
}
on (keyPress "l") {
Set("/:gLC", "1");
}
on (keyPress "c") {
if (/:gLC == "1") {
setProperty("/pline", _visible , "1");
}
Set("/:gLC", "0");
}
Symbol 79 MovieClip Frame 1
stop();
Symbol 81 MovieClip Frame 1
gotoAndStop(/:c2);
Symbol 83 MovieClip Frame 1
gotoAndStop(/:c1);
Symbol 103 Button
on (release) {
tellTarget ("/") {
gotoAndStop ("menu");
};
}
Symbol 105 MovieClip Frame 1
level_bonus = "1000" * /:gLevel;
if (/:team2 < /:team1) {
level_bonus = level_bonus + ((/:gLevel * "100") * (/:team1 - /:team2));
trace("LevelBonus: " add level_bonus);
}
Set("/:gScore", /:gScore + level_bonus);
Set("/:gLevel", /:gLevel + "1");
if (../:win == "2") {
Set("/:tries", /:tries - "1");
if ("0" >= /:tries) {
gotoAndStop (3);
} else {
gotoAndStop (2);
}
} else {
stop();
}
Symbol 105 MovieClip Frame 3
if ((/:min_score ne "na") && (/:gScore >= /:min_score)) {
loadMovie ("/games/med/HSDialog.swf", "/hs_placeholder");
}
Symbol 107 MovieClip Frame 1
stop();
setProperty("/nut", _x , "-100");
setProperty("/nut2", _x , "-100");
setProperty("/nut", _y , "-100");
setProperty("/nut2", _y , "-100");
setProperty("/nut", _visible , "1");
setProperty("/nut2", _visible , "1");
Symbol 107 MovieClip Frame 2
setProperty("/nut", _visible , "0");
setProperty("/nut2", _visible , "0");
Symbol 107 MovieClip Frame 20
tellTarget ("/") {
nextFrame();
};
Symbol 107 MovieClip Frame 100
if ("0" < /:tries) {
if (win == "2") {
tellTarget ("/") {
prevFrame();
};
} else {
tellTarget ("/") {
nextFrame();
};
}
} else {
stop();
}
Symbol 107 MovieClip Frame 101
gotoAndStop (1);
Symbol 112 MovieClip Frame 1
if (/:freeforall == "1") {
gotoAndStop (3);
} else {
stop();
}
Symbol 115 Button
on (press) {
tellTarget ("steer") {
gotoAndPlay ("CCW");
};
tellTarget ("char1/body") {
gotoAndPlay (14);
};
}
on (release, releaseOutside) {
tellTarget ("steer") {
gotoAndStop (1);
};
tellTarget ("char1/body") {
stop();
};
}
Symbol 116 Button
on (press) {
tellTarget ("steer") {
gotoAndPlay ("CW");
};
tellTarget ("char1/body") {
gotoAndPlay (2);
};
}
on (release, releaseOutside) {
tellTarget ("steer") {
gotoAndStop (1);
};
tellTarget ("char1/body") {
stop();
};
}
Symbol 117 Button
on (press) {
startDrag ("", true, "1", _y, getProperty("../line", _width), _y);
tellTarget ("../../pline") {
call("mResize");
};
}
on (release, releaseOutside) {
stopDrag();
tellTarget ("../../pline") {
call("mResize");
};
}
Symbol 133 Button
on (release) {
if (((first == "1") && ((/:whosturn == "1") || (/:freeforall == "1"))) && (getProperty("/winner", _currentframe) == "1")) {
setProperty("cline", _xscale , "100");
setProperty("cline", _yscale , "100");
setProperty("cline", _rotation , getProperty("player", _rotation));
first = "0";
tellTarget ("player") {
gotoAndPlay (2);
};
tellTarget ("/pline") {
call("mResize");
};
} else {
tellTarget ("error") {
gotoAndPlay (2);
};
}
}
Symbol 185 MovieClip Frame 1
stop();
_visible = "0";
Symbol 185 MovieClip Frame 50
stop();
Symbol 185 MovieClip Frame 51
thisSlider = "../slider";
part = getProperty(thisSlider add "/handle", _x);
whole = getProperty(thisSlider add "/line", _width);
frame = int((part / whole) * "50");
if (frame < "1") {
frame = "1";
}
gotoAndStop(frame);
Symbol 187 MovieClip Frame 1
_visible = "0";
Symbol 197 MovieClip Frame 25
gotoAndPlay (1);
Symbol 204 MovieClip Frame 1
stop();
Symbol 204 MovieClip Frame 13
gotoAndPlay (2);
Symbol 204 MovieClip Frame 26
gotoAndPlay (14);
Symbol 204 MovieClip Frame 44
gotoAndPlay (32);
Symbol 208 MovieClip Frame 1
stop();
Symbol 208 MovieClip Frame 13
gotoAndPlay (2);
Symbol 208 MovieClip Frame 26
gotoAndPlay (14);
Symbol 216 MovieClip Frame 1
stop();
Symbol 216 MovieClip Frame 12
gotoAndPlay (2);
Symbol 216 MovieClip Frame 24
gotoAndPlay (14);
Symbol 222 MovieClip Frame 1
stop();
Symbol 222 MovieClip Frame 12
gotoAndPlay (2);
Symbol 222 MovieClip Frame 25
gotoAndPlay (14);
Symbol 223 MovieClip Frame 1
if (_name eq "char1") {
gotoAndStop(/:c1);
} else {
gotoAndStop(/:c2);
}
Symbol 230 MovieClip Frame 1
stop();
range = "1";
Symbol 230 MovieClip Frame 16
range = "0";
Symbol 230 MovieClip Frame 19
if (_name eq "player") {
setProperty("../nut", _rotation , _rotation);
ratio = getProperty("../pline", _currentframe) / getProperty("../pline", _totalframes);
setProperty("../nut", _x , _x - getProperty("../cline", _width));
if ("0" < _rotation) {
setProperty("../nut", _y , _y - getProperty("../cline", _height));
} else {
setProperty("../nut", _y , _y + getProperty("../cline", _height));
}
tellTarget ("../nutcentral") {
gotoAndPlay (2);
};
} else {
setProperty("../../nut2", _rotation , getProperty("../", _rotation) + "180");
setProperty("../../cline", _rotation , getProperty("../", _rotation));
setProperty("../../nut2", _x , getProperty("../", _x) + (getProperty("../../cline", _width) * "1"));
if (getProperty("../", _rotation) < "0") {
setProperty("../../nut2", _y , getProperty("../", _y) - (getProperty("../../cline", _height) * "1"));
} else {
setProperty("../../nut2", _y , getProperty("../", _y) + (getProperty("../../cline", _height) * "1"));
}
tellTarget ("../../compnutcentral") {
gotoAndPlay (2);
};
}
Symbol 230 MovieClip Frame 23
stop();
Symbol 236 MovieClip Frame 1
stop();
Symbol 236 MovieClip Frame 2
if ((getProperty("../player", _rotation) < "60") && (../:first == "1")) {
setProperty("../player", _rotation , getProperty("../player", _rotation) + "3");
setProperty("../shadow", _rotation , getProperty("../player", _rotation));
setProperty("../pline", _rotation , getProperty("../player", _rotation));
setProperty("../shadow", _xscale , "71");
setProperty("../shadow", _yscale , "71");
setProperty("../player", _xscale , "71");
setProperty("../player", _yscale , "71");
setProperty("../pline", _xscale , "100");
setProperty("../pline", _yscale , "100");
} else {
tellTarget ("../char1/body") {
stop();
};
}
Symbol 236 MovieClip Frame 3
gotoAndPlay(_currentframe - "1");
Symbol 236 MovieClip Frame 4
if (("-60" < getProperty("../player", _rotation)) && (../:first == "1")) {
setProperty("../player", _rotation , getProperty("../player", _rotation) - "3");
setProperty("../shadow", _rotation , getProperty("../player", _rotation));
setProperty("../pline", _rotation , getProperty("../player", _rotation));
setProperty("../shadow", _xscale , "71");
setProperty("../shadow", _yscale , "71");
setProperty("../player", _xscale , "71");
setProperty("../player", _yscale , "71");
setProperty("../pline", _xscale , "100");
setProperty("../pline", _yscale , "100");
} else {
tellTarget ("../char1/body") {
stop();
};
}
Symbol 236 MovieClip Frame 5
gotoAndPlay(_currentframe - "1");
Symbol 248 MovieClip Frame 1
stop();
Symbol 248 MovieClip Frame 2
if (((_x < "341") && (_y < "40")) || ((_x >= "341") && (_y < "85"))) {
gotoAndPlay (15);
} else {
gotoAndPlay (4);
}
Symbol 248 MovieClip Frame 14
gotoAndStop (1);
Symbol 248 MovieClip Frame 16
gotoAndStop (1);
Symbol 268 MovieClip Frame 3
raft_points = ../:raft_points;
raft_bonus = ../:raft_bonus;
Symbol 268 MovieClip Frame 20
stop();
Symbol 269 MovieClip Frame 1
_rotation = random("60");
xval = /:base + (random("5") * "0.01");
yval = /:base + (random("5") * "0.01");
trace(yval);
if (random("2")) {
yval = yval * "-1";
}
if (random("2")) {
xval = xval * "-1";
}
tellTarget ("fire") {
gotoAndPlay(random("8") + "1");
};
setProperty("fire", _rotation , random("20") - "10");
destroyed = "0";
team = "1";
Symbol 269 MovieClip Frame 2
if (_x < "140") {
_x = "140";
xval = xval * "-1";
} else if ("458" < _x) {
_x = "458";
xval = xval * "-1";
}
if (_y < "113") {
_y = "113";
yval = yval * "-1";
} else if ("370" < _y) {
_y = "370";
yval = yval * "-1";
}
_x = (_x + xval);
_y = (_y + yval);
Symbol 269 MovieClip Frame 3
gotoAndPlay (2);
Symbol 269 MovieClip Frame 4
tellTarget ("fire") {
gotoAndStop (1);
};
Symbol 269 MovieClip Frame 5
destroyed = "1";
Set("/:team1", /:team1 - "1");
if (/:team1 == "0") {
if (getProperty("/winner", _currentframe) == "1") {
Set("/winner/:win", "2");
tellTarget ("/winner") {
gotoAndPlay (2);
};
}
} else if (/:team2 == "0") {
if (getProperty("/winner", _currentframe) == "1") {
Set("/winner/:win", "1");
tellTarget ("/winner") {
gotoAndPlay (2);
};
}
}
stop();
Symbol 272 MovieClip Frame 1
_rotation = random("60");
xval = /:base + (random("5") * "0.01");
yval = /:base + (random("5") * "0.01");
trace(yval);
if (random("2")) {
yval = yval * "-1";
}
if (random("2")) {
xval = xval * "-1";
}
tellTarget ("fire") {
gotoAndPlay(random("8") + "1");
};
setProperty("fire", _rotation , random("20") - "10");
destroyed = "0";
Symbol 272 MovieClip Frame 2
if (_x < "140") {
_x = "140";
xval = xval * "-1";
} else if ("458" < _x) {
_x = "458";
xval = xval * "-1";
}
if (_y < "113") {
_y = "113";
yval = yval * "-1";
} else if ("370" < _y) {
_y = "370";
yval = yval * "-1";
}
_x = (_x + xval);
_y = (_y + yval);
Symbol 272 MovieClip Frame 3
gotoAndPlay (2);
Symbol 272 MovieClip Frame 4
tellTarget ("fire") {
gotoAndStop (1);
};
Symbol 272 MovieClip Frame 5
_rotation = "0";
destroyed = "1";
Set("/:team2", /:team2 - "1");
raft_points = /:gLevel * "100";
Set("/:gScore", /:gScore + raft_points);
if (/:team2 < /:team1) {
raft_bonus = (/:gLevel * "10") * (/:team1 - /:team2);
Set("/:gScore", /:gScore + raft_bonus);
trace("Bonus: " add ((/:gLevel * "10") * (/:team1 - /:team2)));
}
if (/:team2 == "0") {
if (getProperty("/winner", _currentframe) == "1") {
Set("/winner/:win", "1");
tellTarget ("/winner") {
gotoAndPlay (2);
};
}
} else if (/:team1 == "0") {
if (getProperty("/winner", _currentframe) == "1") {
Set("/winner/:win", "2");
tellTarget ("/winner") {
gotoAndPlay (2);
};
}
}
stop();
Symbol 274 MovieClip Frame 1
if (/:freeforall == "0") {
stop();
}
Symbol 274 MovieClip Frame 17
trace("AI: on");
if ((/:team1 == "0") || (/:team2 == "0")) {
gotoAndStop (2);
}
Symbol 274 MovieClip Frame 18
trace("AI: loop");
angle = "0";
rot = getProperty("../computer", _rotation);
anchorx = getProperty("../computer", _x);
anchory = getProperty("../computer", _y);
trace("AI: tar: " add tar);
tar = "1";
while ((tar < (../:rafts + "1")) && ((eval (("../raft" add tar) add "/:destroyed") == "1") || (eval (("../raft" add tar) add "/:team") <> "1"))) {
tar = tar + "1";
}
call("mSetTarget");
call("mSetAngle");
if (deltay < "0") {
angle = angle * "-1";
}
deltar = angle - deltar;
if (deltar < "0") {
down = "1";
tellTarget ("../char2/body") {
gotoAndPlay (2);
};
} else {
down = "0";
tellTarget ("../char2/body") {
gotoAndPlay (14);
};
}
Symbol 274 MovieClip Frame 19
rot = getProperty("../computer", _rotation);
setProperty("/compshad", _rotation , rot);
setProperty("/compshad", _xscale , "100");
setProperty("/compshad", _yscale , "100");
if (angle < (rot - "3")) {
setProperty("../computer", _rotation , rot - "3");
} else if ((rot + "3") < angle) {
setProperty("../computer", _rotation , rot + "3");
} else {
setProperty("../computer", _rotation , angle);
tellTarget ("../char2/body") {
stop();
};
tellTarget ("../computer/computer") {
gotoAndPlay (2);
};
gotoAndStop (5);
}
setProperty("../computer", _xscale , "100");
setProperty("../computer", _yscale , "100");
Symbol 274 MovieClip Frame 20
gotoAndPlay(_currentframe - "1");
Symbol 274 MovieClip Frame 22
trace("AI: set target");
Set("/:tarx", (getProperty("../raft" add tar, _x) + random(/:aiAcc)) - (/:aiAcc / "2"));
Set("/:tary", (getProperty("../raft" add tar, _y) + random(/:aiAcc)) - (/:aiAcc / "2"));
if (/:tarx < "140") {
Set("/:tarx", "140");
} else if ("460" < /:tarx) {
Set("/:tarx", "460");
}
setProperty("../tar", _x , /:tarx);
setProperty("../tar", _y , /:tary);
deltax = /:tarx - anchorx;
deltay = /:tary - anchory;
Symbol 274 MovieClip Frame 30
trace("AI: set angle");
slope = deltay / deltax;
if (slope < "0") {
slope = slope * "-1";
}
i = "1";
while ((i < "91") and (angle == "0")) {
if (slope < eval ("/:angle" add i)) {
angle = i;
}
i = i + "3";
}
Symbol 276 MovieClip Frame 1
stop();
Symbol 276 MovieClip Frame 2
nutx = getProperty("../nut2", _x);
nuty = getProperty("../nut2", _y);
tarx = /:tarx;
tary = /:tary;
setProperty("../nut2", _xscale , "120");
setProperty("../nut2", _yscale , "120");
deltaxprime = tarx - nutx;
deltayprime = tary - nuty;
fcount = int(("49" * (((deltaxprime * deltaxprime) + (deltayprime * deltayprime)) - "6048")) / "621846") + "3";
trace("fcount: " add fcount);
deltax = deltaxprime / fcount;
deltay = deltayprime / fcount;
fhalf = int(fcount / "2");
inc = fhalf * "5";
gotoAndPlay (3);
Symbol 276 MovieClip Frame 3
if ("0" < fcount) {
if ((fhalf + "1") < fcount) {
setProperty("../nut2", _xscale , getProperty("../nut2", _xscale) + inc);
setProperty("../nut2", _yscale , getProperty("../nut2", _yscale) + inc);
inc = inc - "5";
inc2 = "0";
} else {
setProperty("../nut2", _xscale , getProperty("../nut2", _xscale) - inc);
setProperty("../nut2", _yscale , getProperty("../nut2", _yscale) - inc);
inc = inc + "4.5";
}
i = i + "1";
fcount = fcount - "1";
setProperty("../nut2", _x , getProperty("../nut2", _x) + deltax);
setProperty("../nut2", _y , getProperty("../nut2", _y) + deltay);
} else {
radius = "25";
r2 = radius * radius;
k = "1";
hit = "0";
nutx = getProperty("../nut2", _x);
nuty = getProperty("../nut2", _y);
while (/:rafts >= k) {
if (!eval (("../raft" add k) add "/:destroyed")) {
deltax = nutx - getProperty("../raft" add k, _x);
deltay = nuty - getProperty("../raft" add k, _y);
dist = (deltax * deltax) + (deltay * deltay);
if (r2 >= dist) {
tellTarget ("../raft" add k) {
gotoAndStop ("sank");
};
hit = "1";
}
}
k = k + "1";
}
setProperty("../splash", _x , nutx);
setProperty("../splash", _y , nuty);
tellTarget ("../splash") {
gotoAndPlay (2);
};
Set("../:first", "1");
setProperty("../nut2", _x , "-100");
setProperty("../nut2", _y , "-100");
if (/:freeforAll == "1") {
tellTarget ("/ai") {
gotoAndPlay (2);
};
} else {
Set("/:whosTurn", "1");
tellTarget ("/turn") {
gotoAndStop (1);
};
tellTarget ("/ai") {
gotoAndStop (2);
};
}
gotoAndStop (1);
}
Symbol 276 MovieClip Frame 4
gotoAndPlay(_currentframe - "1");
Symbol 278 MovieClip Frame 1
i = "1";
radius = "38";
r2 = radius * radius;
while (i < /:rafts) {
k = i + "1";
if (eval (("../raft" add i) add "/:destroyed") == "0") {
while (/:rafts >= k) {
if (eval (("../raft" add k) add "/:destroyed") == "0") {
deltax = getProperty("../raft" add i, _x) - getProperty("../raft" add k, _x);
deltay = getProperty("../raft" add i, _y) - getProperty("../raft" add k, _y);
dist = (deltax * deltax) + (deltay * deltay);
if (r2 >= dist) {
tempx = eval (("../raft" add i) add "/:xval");
tempy = eval (("../raft" add i) add "/:yval");
Set(("../raft" add i) add "/:xval", eval (("../raft" add k) add "/:xval"));
Set(("../raft" add i) add "/:yval", eval (("../raft" add k) add "/:yval"));
Set(("../raft" add k) add "/:xval", tempx);
Set(("../raft" add k) add "/:yval", tempy);
ix = eval (("../raft" add i) add "/:xval");
iy = eval (("../raft" add i) add "/:yval");
kx = tempx;
ky = tempy;
if ((kx * ix) < "0") {
setProperty("../raft" add k, _x , getProperty("../raft" add k, _x) + tempx);
setProperty("../raft" add i, _x , getProperty("../raft" add i, _x) + eval (("../raft" add i) add "/:xval"));
}
if ((ky * iy) < "0") {
setProperty("../raft" add k, _y , getProperty("../raft" add k, _y) + tempy);
setProperty("../raft" add i, _y , getProperty("../raft" add i, _y) + eval (("../raft" add i) add "/:yval"));
}
}
}
k = k + "1";
}
}
i = i + "1";
}
Symbol 278 MovieClip Frame 2
gotoAndPlay (1);
Symbol 279 MovieClip Frame 1
stop();
Symbol 279 MovieClip Frame 2
nutx = getProperty("../nut", _x);
nuty = getProperty("../nut", _y);
tarx = getProperty("../pline", _x) - getProperty("../pline", _width);
if (getProperty("../pline", _rotation) < "0") {
tary = getProperty("../pline", _y) + getProperty("../pline", _height);
} else {
tary = getProperty("../pline", _y) - getProperty("../pline", _height);
}
setProperty("../nut", _xscale , "120");
setProperty("../nut", _yscale , "120");
fcount = int(getProperty("../pline", _currentframe) / "5") + "2";
trace(fcount);
deltax = (tarx - nutx) / fcount;
deltay = (tary - nuty) / fcount;
fhalf = int(fcount / "2");
inc = fhalf * "5";
gotoAndPlay (3);
Symbol 279 MovieClip Frame 3
if ("0" < fcount) {
if ((fhalf + "1") < fcount) {
setProperty("../nut", _xscale , getProperty("../nut", _xscale) + inc);
setProperty("../nut", _yscale , getProperty("../nut", _yscale) + inc);
inc = inc - "5";
inc2 = "0";
} else {
setProperty("../nut", _xscale , getProperty("../nut", _xscale) - inc);
setProperty("../nut", _yscale , getProperty("../nut", _yscale) - inc);
inc = inc + "4.5";
}
i = i + "1";
fcount = fcount - "1";
setProperty("../nut", _x , getProperty("../nut", _x) + deltax);
setProperty("../nut", _y , getProperty("../nut", _y) + deltay);
} else {
radius = "25";
r2 = radius * radius;
k = "1";
hit = "0";
nutx = getProperty("../nut", _x);
nuty = getProperty("../nut", _y);
while (/:rafts >= k) {
if (eval (("../raft" add k) add "/:destroyed") == "0") {
deltax = nutx - getProperty("../raft" add k, _x);
deltay = nuty - getProperty("../raft" add k, _y);
dist = (deltax * deltax) + (deltay * deltay);
if (r2 >= dist) {
tellTarget ("../raft" add k) {
gotoAndStop ("sank");
};
hit = "1";
}
}
k = k + "1";
}
setProperty("../splash", _x , nutx);
setProperty("../splash", _y , nuty);
tellTarget ("../splash") {
gotoAndPlay (2);
};
if (/:freeforall == "0") {
Set("/:whosTurn", "2");
tellTarget ("/turn") {
gotoAndStop (2);
};
tellTarget ("/ai") {
gotoAndPlay (2);
};
}
Set("../:first", "1");
setProperty("../nut", _x , "-100");
setProperty("../nut", _y , "-100");
gotoAndStop (1);
}
Symbol 279 MovieClip Frame 4
gotoAndPlay(_currentframe - "1");
Symbol 281 MovieClip Frame 1
_visible = "0";
Symbol 294 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 1
stop();