Frame 1
stop();
Frame 9
Frame 10
_root.objDart1._visible = false;
_root.objDart2._visible = false;
_root.objDart3._visible = false;
stop();
Frame 21
var RemainingScore1;
var Darts1;
var Games1;
var s1801;
var s1401;
var s1001;
var Gameover;
RemainingScore1 = 501;
Darts1 = 0;
Games1 = 0;
s1801 = 0;
s1401 = 0;
s1001 = 0;
GameOver = false;
Frame 22
function CalculateScore(x, y) {
var radius;
var angle;
var score;
var multiplier;
x = _root.movBoard._x - x;
y = _root.movBoard._y - y;
angle = 57.2957795130823 * Math.atan(Math.abs(x) / Math.abs(y));
radius = Math.sqrt((Math.abs(x) * Math.abs(x)) + (Math.abs(y) * Math.abs(y)));
if (0 < y) {
if (x < 0) {
if ((0 < angle) and (9 >= angle)) {
score = 20;
}
if ((9 < angle) and (27 >= angle)) {
score = 1;
}
if ((27 < angle) and (45 >= angle)) {
score = 18;
}
if ((45 < angle) and (63 >= angle)) {
score = 4;
}
if ((63 < angle) and (81 >= angle)) {
score = 13;
}
if ((81 < angle) and (90 >= angle)) {
score = 6;
}
} else if (0 < x) {
if ((0 < angle) and (9 >= angle)) {
score = 20;
}
if ((9 < angle) and (27 >= angle)) {
score = 5;
}
if ((27 < angle) and (45 >= angle)) {
score = 12;
}
if ((45 < angle) and (63 >= angle)) {
score = 9;
}
if ((63 < angle) and (81 >= angle)) {
score = 14;
}
if ((81 < angle) and (90 >= angle)) {
score = 11;
}
}
} else if (y < 0) {
if (x < 0) {
if ((0 < angle) and (8 >= angle)) {
score = 3;
}
if ((8 < angle) and (27 >= angle)) {
score = 17;
}
if ((27 < angle) and (45 >= angle)) {
score = 2;
}
if ((45 < angle) and (63 >= angle)) {
score = 15;
}
if ((63 < angle) and (81 >= angle)) {
score = 10;
}
if ((81 < angle) and (90 >= angle)) {
score = 6;
}
} else if (0 < x) {
if ((0 < angle) and (8 >= angle)) {
score = 3;
}
if ((8 < angle) and (27 >= angle)) {
score = 19;
}
if ((27 < angle) and (45 >= angle)) {
score = 7;
}
if ((45 < angle) and (63 >= angle)) {
score = 16;
}
if ((63 < angle) and (81 >= angle)) {
score = 8;
}
if ((81 < angle) and (90 >= angle)) {
score = 11;
}
}
}
multiplier = 1;
if ((radius >= 68) and (74 >= radius)) {
multiplier = 3;
} else if ((radius >= 110) and (118 >= radius)) {
multiplier = 2;
} else if (118 < radius) {
multiplier = 0;
} else if ((radius >= 0) and (5 >= radius)) {
multiplier = 1;
score = 50;
} else if ((5 < radius) and (11 >= radius)) {
multiplier = 1;
score = 25;
}
LastRadius = radius;
score = score * multiplier;
return(score);
}
var runningTotal;
_root.objDarta.stop();
removeMovieClip(objDart1);
removeMovieClip(objDart2);
removeMovieClip(objDart3);
_root.objSliders.objSliderTop.slide = 1;
_root.objSliders.objSliderRight.slide = 0;
runningTotal = 0;
txtStatus = "";
stop();
Instance of Symbol 100 MovieClip "objDarta" in Frame 22
onClipEvent (load) {
counter = 23;
dscale = 300;
}
onClipEvent (enterFrame) {
counter--;
if (counter >= 0) {
dscale = dscale * 0.92;
_xscale = dscale;
_yscale = dscale;
}
}
Frame 23
stop();
Instance of Symbol 101 MovieClip "objDartb" in Frame 23
onClipEvent (load) {
counter = 23;
dscale = 300;
}
onClipEvent (enterFrame) {
counter--;
if (counter >= 0) {
dscale = dscale * 0.92;
_xscale = dscale;
_yscale = dscale;
}
if (counter == 3) {
if (_y < _root.objdart1._y) {
this.swapdepths(_root.objdart1);
}
}
}
Frame 24
stop();
Instance of Symbol 103 MovieClip "objDartc" in Frame 24
onClipEvent (load) {
counter = 23;
dscale = 300;
}
onClipEvent (enterFrame) {
counter--;
if (counter >= 0) {
dscale = dscale * 0.92;
_xscale = dscale;
_yscale = dscale;
}
if (counter == 3) {
if (_y < _root.objdart1._y) {
this.swapdepths(_root.objdart1);
}
if (_y < _root.objdart2._y) {
this.swapdepths(_root.objdart2);
}
}
}
Frame 25
myArray = new Array("Nice Arrows!!!", "Good Shot!!!", "Nice Darts!!!", "Good Darts!!!", "Good Arrows!!!", "Good Shot!!!", "Nice Shot!!!");
if (((remainingScore1 - runningTotal) == 0) and (_root.Lastradius < 110)) {
if (_root.LastRadius < 10) {
movScoreFlow.counter = 0;
movScoreFlow.scale = 0;
movScoreFlow.txtScoreFlow = "Shot!";
regDarts1 = Darts1;
Darts1 = 0;
remainingScore1 = 501;
txtRemaining1 = remainingScore1;
Gameover = true;
txtPrevScores1 = "";
txtPrevScores2 = "";
txtAverage = "0";
_root.objSliders.objSliderTop.slide = 0;
_root.objSliders.objSliderRight.slide = 0;
if (39 < Darts1) {
txtPrevScores2 = txtPrevScores2 + (newline + remainingScore1);
} else {
txtPrevScores1 = txtPrevScores1 + (newline + remainingScore1);
}
_root.objSliders.objSliderTop.slide = 0;
_root.objSliders.objSliderRight.slide = 0;
} else {
movScoreFlow.counter = 0;
movScoreFlow.scale = 0;
movScoreFlow.txtScoreFlow = "Bust!";
_root.objSliders.objSliderTop.slide = 0;
_root.objSliders.objSliderRight.slide = 0;
}
} else if (((remainingScore1 - runningTotal) == 0) and (118 < _root.Lastradius)) {
txtStatus = "You have Bust, You must finish on a double!";
_root.objSliders.objSliderTop.slide = 0;
_root.objSliders.objSliderRight.slide = 0;
} else if (1 >= (RemainingScore1 - runningTotal)) {
if ((_root.lastradius >= 110) and ((RemainingScore1 - runningTotal) == 0)) {
if (118 >= _root.Lastradius) {
movScoreFlow.counter = 0;
movScoreFlow.scale = 0;
movScoreFlow.txtScoreFlow = "Shot!";
regDarts1 = Darts1;
Darts1 = 0;
remainingScore1 = 501;
GameOver = true;
txtRemaining1 = remainingScore1;
txtPrevScores1 = "";
txtPrevScores2 = "";
txtAverage = 0;
txtPrevScores = txtPrevScores + (newline + remainingScore1);
_root.objSliders.objSliderTop.slide = 0;
_root.objSliders.objSliderRight.slide = 0;
}
} else if (1 >= (remainingScore1 - runningTotal)) {
movScoreFlow.counter = 0;
movScoreFlow.scale = 0;
movScoreFlow.txtScoreFlow = "Bust!";
_root.objSliders.objSliderTop.slide = 0;
_root.objSliders.objSliderRight.slide = 0;
}
} else {
RemainingScore1 = RemainingScore1 - runningTotal;
movScoreFlow.counter = 0;
movScoreFlow.scale = 0;
movScoreFlow.txtScoreFlow = runningTotal;
}
if (99 < runningTotal) {
myInt = Math.round(Math.random() * 6);
if (1 < (RemainingTotal - runningTotal)) {
txtStatus = myArray[myInt];
}
}
txt100s1 = s1001;
txt140s1 = s1401;
txt180s1 = s1801;
txtRemaining1 = remainingScore1;
if (39 < Darts1) {
txtPrevScores2 = txtPrevScores2 + (newline + remainingScore1);
} else {
txtPrevScores1 = txtPrevScores1 + (newline + remainingScore1);
}
txtPrevScores.scroll = txtPrevScores.maxscroll + 2;
stop();
Instance of Symbol 114 MovieClip "Timer1" in Frame 25
onClipEvent (load) {
counter = 0;
}
onClipEvent (enterFrame) {
counter++;
if (counter == 26) {
_root.txtStatusDisplay = _root.txtStatus;
}
if (60 < counter) {
_root.txtStatusDisplay = "";
if (_root.GameOver == false) {
_root.gotoAndStop("P1");
} else {
_root.gotoAndStop("Instructions");
}
}
}
Instance of Symbol 116 MovieClip "movScoreFlow" in Frame 25
onClipEvent (load) {
counter = 0;
scale = 0;
alpha = 0;
_alpha = 0;
}
onClipEvent (enterFrame) {
counter++;
_width = ((_width + scale) + 20);
_height = (_height + scale);
_alpha = (_alpha + alpha);
if (counter == 20) {
alpha = 6;
scale = 15;
}
if (counter == 40) {
scale = 5;
alpha = alpha * -1;
}
if (counter == 60) {
_width = 198;
_height = 35;
alpha = 0;
_alpha = 0;
counter = -200;
scale = 0;
}
}
Frame 27
objSliders.objSliderRight.Slide = 0;
objSliders.objSliderTop.Slide = 0;
Instance of Symbol 131 MovieClip "cdeCheckScore" in Frame 27
onClipEvent (load) {
this.loadvariables("./checkscore.asp");
}
onClipEvent (data) {
tempScore = this.lowestScore;
if (_root.regDarts1 < tempScore) {
_root.gotoandPlay("EnterScore");
} else {
_root.gotoandPlay("PlayAgain");
}
}
Frame 28
stop();
Frame 36
objSliders.objSliderRight.Slide = 0;
objSliders.objSliderTop.Slide = 0;
stop();
Frame 46
objSliders.objSliderRight.Slide = 0;
objSliders.objSliderTop.Slide = 0;
stop();
Instance of Symbol 10 MovieClip "objProgress" in Symbol 15 MovieClip Frame 1
onClipEvent (load) {
_root.stop();
_parent.txtSize = "[";
_parent.txtSize = _parent.txtSize + Math.round(_root.getBytesTotal() / 1024);
_parent.txtSize = _parent.txtSize + "k]";
}
onClipEvent (enterFrame) {
loaded = _root.getBytesLoaded();
remaining = _root.getBytesTotal();
_xscale = (((loaded / remaining) * 100) * 2);
_x = -38.3;
if (loaded == remaining) {
_root.GotoAndPlay(2);
}
}
Instance of Symbol 33 MovieClip "objSliderRight" in Symbol 37 MovieClip Frame 1
onClipEvent (load) {
dy = 4;
slide = 0;
}
onClipEvent (enterFrame) {
if (slide == 1) {
_y = (_y + dy);
if (-37 >= _y) {
dy = dy * -1;
}
if (_y >= 34) {
dy = dy * -1;
}
}
}
Instance of Symbol 35 MovieClip "objSliderTop" in Symbol 37 MovieClip Frame 1
onClipEvent (load) {
dx = 4;
slide = 0;
}
onClipEvent (enterFrame) {
if (slide == 1) {
_x = (_x + dx);
if (-37 >= _x) {
dx = dx * -1;
}
if (_x >= 34) {
dx = dx * -1;
}
}
}
Symbol 39 Button
on (release, keyPress "<Space>") {
gotoAndPlay (21);
}
Symbol 43 Button
on (release) {
getURL ("http://www.johntear.com");
}
Symbol 61 Button
on (press, keyPress "<Space>") {
if (_root.objSliders.objSliderTop.slide == 1) {
_root.objSliders.objSliderTop.slide = 0;
_root.objSliders.objSliderRight.slide = 1;
} else if (_root.objSliders.objSliderRight.slide == 1) {
_root.objSliders.objSliderTop.slide = 1;
_root.objSliders.objSliderRight.slide = 0;
duplicateMovieClip (_root.objDarta, "objDart1", 101);
_root.objDart1._x = (_root.movBoard._x + ((Math.random() * 10) - 5)) + (_root.objSliders.objSliderTop._x * 4);
_root.objDart1._y = (_root.movBoard._y + ((Math.random() * 10) - 5)) + (_root.objSliders.objSliderRight._y * 4);
_root.runningTotal = _root.runningTotal + _root.CalculateScore(_root.objDart1._x, _root.objDart1._y);
txtScore1 = runningTotal;
txtRemaining1 = RemainingScore1 - runningTotal;
Darts1++;
txtDarts1 = Darts1;
if (1 >= (RemainingScore1 - runningTotal)) {
txtDarts1 = Darts1;
gotoAndStop (25);
} else {
gotoAndStop (23);
}
}
}
Instance of Symbol 33 MovieClip "objSliderRight" in Symbol 63 MovieClip Frame 1
onClipEvent (load) {
dy = 4;
slide = 0;
}
onClipEvent (enterFrame) {
if (slide == 1) {
_y = (_y + dy);
if (-37 >= _y) {
dy = dy * -1;
}
if (_y >= 34) {
dy = dy * -1;
}
}
}
Instance of Symbol 62 MovieClip "objSliderTop" in Symbol 63 MovieClip Frame 1
onClipEvent (load) {
dx = 4;
slide = 1;
}
onClipEvent (enterFrame) {
if (slide == 1) {
_x = (_x + dx);
if (-37 >= _x) {
dx = dx * -1;
}
if (_x >= 34) {
dx = dx * -1;
}
}
}
Symbol 100 MovieClip Frame 24
stop();
Symbol 101 MovieClip Frame 24
stop();
Symbol 102 Button
on (press, keyPress "<Space>") {
if (_root.objSliders.objSliderTop.slide == 1) {
_root.objSliders.objSliderTop.slide = 0;
_root.objSliders.objSliderRight.slide = 1;
} else if (_root.objSliders.objSliderRight.slide == 1) {
_root.objSliders.objSliderTop.slide = 1;
_root.objSliders.objSliderRight.slide = 0;
duplicateMovieClip (_root.objDartb, "objDart2", 102);
_root.objDart2._x = (_root.movBoard._x + ((Math.random() * 10) - 5)) + (_root.objSliders.objSliderTop._x * 4);
_root.objDart2._y = (_root.movBoard._y + ((Math.random() * 10) - 5)) + (_root.objSliders.objSliderRight._y * 4);
_root.runningTotal = _root.runningTotal + _root.CalculateScore(_root.objDart2._x, _root.objDart2._y);
txtScore1 = runningTotal;
if (1 >= (_root.RemainingScore1 - _root.runningTotal)) {
_root.gotoAndStop(5);
}
txtRemaining1 = RemainingScore1 - runningTotal;
Darts1++;
txtDarts1 = Darts1;
if (1 >= (RemainingScore1 - runningTotal)) {
txtDarts1 = Darts1;
gotoAndStop (25);
} else {
gotoAndStop (24);
}
}
}
Symbol 103 MovieClip Frame 24
stop();
Symbol 104 Button
on (press, keyPress "<Space>") {
if (_root.objSliders.objSliderTop.slide == 1) {
_root.objSliders.objSliderTop.slide = 0;
_root.objSliders.objSliderRight.slide = 1;
} else if (_root.objSliders.objSliderRight.slide == 1) {
_root.objSliders.objSliderTop.slide = 0;
_root.objSliders.objSliderRight.slide = 0;
duplicateMovieClip (_root.objDartc, "objDart3", 103);
_root.objDart3._x = (_root.movBoard._x + ((Math.random() * 10) - 5)) + (_root.objSliders.objSliderTop._x * 4);
_root.objDart3._y = (_root.movBoard._y + ((Math.random() * 10) - 5)) + (_root.objSliders.objSliderRight._y * 4);
_root.runningTotal = _root.runningTotal + _root.CalculateScore(_root.objDart3._x, _root.objDart3._y);
txtScore1 = runningTotal;
if (1 >= (_root.RemainingScore1 - _root.runningTotal)) {
_root.gotoAndStop(5);
}
txtRemaining1 = RemainingScore1 - runningTotal;
Darts1++;
txtDarts1 = Darts1;
gotoAndStop (25);
}
}
Symbol 145 Button
on (release, keyPress "<Enter>") {
var Name = _root.txtName;
var Score = _root.regDarts1;
loadVariables ("./addscore.asp", _root, "POST");
_root.gotoAndPlay("Instructions");
}
Symbol 146 MovieClip Frame 1
var Score = _root.regDarts1;
var Name = "No-one";
Symbol 160 Button
on (release) {
_root.gotoAndPlay("Instructions");
}
Symbol 165 Button
on (release) {
gotoAndPlay (21);
}