Frame 1
background_sound = new Sound();
background_sound.attachSound("introloop");
background_sound.start(0, 9999);
Frame 67
percentLoaded = Math.round(100 * (getBytesLoaded() / getBytesTotal()));
Frame 68
if (percentLoaded == 100) {
gotoAndStop ("play");
} else {
gotoAndPlay ("loading");
}
Frame 69
stop();
Frame 70
positive_array = new Array();
negative_array = new Array();
positiveforce_array = new Array();
negativeforce_array = new Array();
positivedirection_array = new Array();
negativedirection_array = new Array();
forcey_array = new Array();
forcex_array = new Array();
trace_array = new Array();
forceytotal = 0;
forcextotal = 0;
p = 1;
n = 1;
t = 1;
track = false;
music = true;
score = 0;
nomusic_mc._visible = false;
game_sound = new Sound();
game_sound.attachSound("gamemusic");
game_sound.start(0, 9999);
i = 1;
while (i < 31) {
_root["barrier_mc" + i]._visible = false;
i++;
}
Instance of Symbol 96 MovieClip "positive_mc" in Frame 70
on (press) {
if ((_root.shooter_mc._x == 60) and (_root.shooter_mc._y == 200)) {
this.startDrag();
}
}
on (release) {
stopDrag();
if (this.hitTest(_root.positive_btn) == true) {
i = 1;
while (i < (p - 1)) {
positive_array[i] = positive_array[i + 1];
i++;
}
p--;
unloadMovie (this);
}
}
on (releaseOutside) {
stopDrag();
}
Instance of Symbol 98 MovieClip "negative_mc" in Frame 70
on (press) {
if ((_root.shooter_mc._x == 60) and (_root.shooter_mc._y == 200)) {
startDrag (this);
}
}
on (release) {
stopDrag();
if (this.hitTest(_root.negative_btn) == true) {
i = 1;
while (i < (n - 1)) {
negative_array[i] = negative_array[i + 1];
i++;
}
n--;
unloadMovie (this);
}
}
on (releaseOutside) {
stopDrag();
}
Frame 71
tries = 0;
tries_txt.text = "Tries: " + tries;
lvl_txt.text = "Level " + l;
if (l == 1) {
level_txt.text = "Straight Shot";
} else if (l == 2) {
level_txt.text = "Around the Barrier";
} else if (l == 3) {
level_txt.text = "Pick Either Side";
} else if (l == 4) {
level_txt.text = "Low Overhang";
} else if (l == 5) {
level_txt.text = "Through the Gap";
} else if (l == 6) {
level_txt.text = "Linear Accelerator";
} else if (l == 7) {
level_txt.text = "Mini Maze";
} else if (l == 8) {
level_txt.text = "Pyramids";
} else if (l == 9) {
level_txt.text = "Skill Shot";
} else if (l == 10) {
level_txt.text = "Invisibarrier";
} else if (l == 11) {
level_txt.text = "Now They Move";
} else if (l == 12) {
level_txt.text = "The Gate";
} else if (l == 13) {
level_txt.text = "Around the Goal";
} else if (l == 14) {
level_txt.text = "The Crusher";
} else if (l == 15) {
level_txt.text = "Moving Goals";
} else if (l == 16) {
level_txt.text = "The Spinner";
} else if (l == 17) {
level_txt.text = "Falling Objects";
} else if (l == 18) {
level_txt.text = "Transporter";
} else if (l == 19) {
level_txt.text = "Sliced";
} else if (l == 20) {
level_txt.text = "Off the Screen";
} else if (l == 21) {
level_txt.text = "The Impossible";
}
if (track == false) {
trace_txt.text = "off";
} else {
trace_txt.text = "on";
}
if (music == true) {
nomusic_mc._visible = false;
} else {
nomusic_mc._visible = true;
}
_root["barrier_mc" + l]._visible = true;
_root["barrier_mc" + (l - 1)]._visible = false;
Frame 108
shooter_mc._y = 200;
shooter_mc._x = 60;
forceytotal = 0;
forcextotal = 0;
if (track == false) {
trace_txt.text = "off";
} else {
trace_txt.text = "on";
}
if (music == true) {
nomusic_mc._visible = false;
} else {
nomusic_mc._visible = true;
}
Frame 109
gotoAndPlay ("setup");
Frame 110
tries_txt.text = "Tries: " + tries;
i = 1;
while (i < p) {
positiveforce_array[i] = 1 / (Math.pow(positive_array[i]._y - shooter_mc._y, 2) + Math.pow(positive_array[i]._x - shooter_mc._x, 2));
positivedirection_array[i] = Math.atan((positive_array[i]._y - shooter_mc._y) / (positive_array[i]._x - shooter_mc._x));
forcey_array[i] = positiveforce_array[i] * Math.sin(positivedirection_array[i]);
if (shooter_mc._x < positive_array[i]._x) {
forcey_array[i] = -1 * forcey_array[i];
}
forcex_array[i] = positiveforce_array[i] * Math.cos(positivedirection_array[i]);
if (shooter_mc._x < positive_array[i]._x) {
forcex_array[i] = -1 * forcex_array[i];
}
forceytotal = forceytotal + forcey_array[i];
forcextotal = forcextotal + forcex_array[i];
i++;
}
i = 1;
while (i < n) {
negativeforce_array[i] = -1 / (Math.pow(negative_array[i]._y - shooter_mc._y, 2) + Math.pow(negative_array[i]._x - shooter_mc._x, 2));
if (negativeforce_array[i] > 50) {
negativeforce_array[i] = negativeforce_array[i] * 0.9;
}
if (negativeforce_array[i] > 10) {
negativeforce_array[i] = negativeforce_array[i] * 0.9;
}
negativedirection_array[i] = Math.atan((negative_array[i]._y - shooter_mc._y) / (negative_array[i]._x - shooter_mc._x));
forcey_array[i] = negativeforce_array[i] * Math.sin(negativedirection_array[i]);
if (shooter_mc._x < negative_array[i]._x) {
forcey_array[i] = -1 * forcey_array[i];
}
forcex_array[i] = negativeforce_array[i] * Math.cos(negativedirection_array[i]);
if (shooter_mc._x < negative_array[i]._x) {
forcex_array[i] = -1 * forcex_array[i];
}
forceytotal = forceytotal + forcey_array[i];
forcextotal = forcextotal + forcex_array[i];
i++;
}
shooter_mc._y = shooter_mc._y + (forceytotal * 1000);
shooter_mc._x = shooter_mc._x + (forcextotal * 1000);
forceytotal = forceytotal * 0.95;
forcextotal = forcextotal * 0.95;
if (track == true) {
duplicateMovieClip (trace_mc, "trace_mc" + t, 3 * t);
_root["trace_mc" + t]._y = _root.shooter_mc._y;
_root["trace_mc" + t]._x = _root.shooter_mc._x;
trace_array[t] = _root["trace_mc" + t];
t++;
}
if (goal_mc.hitTest(shooter_mc) == true) {
gotoAndPlay ("goal");
}
if ((((goalbarrier_mc.hitTest(shooter_mc._x + 8, shooter_mc._y + 8, true) == true) or (goalbarrier_mc.hitTest(shooter_mc._x + 8, shooter_mc._y - 8, true) == true)) or (goalbarrier_mc.hitTest(shooter_mc._x - 8, shooter_mc._y + 8, true) == true)) or (goalbarrier_mc.hitTest(shooter_mc._x - 8, shooter_mc._y - 8, true) == true)) {
gotoAndPlay ("bam");
}
if ((((_root["barrier_mc" + l].hitTest(shooter_mc._x + 8, shooter_mc._y + 8, true) == true) or (_root["barrier_mc" + l].hitTest(shooter_mc._x - 8, shooter_mc._y + 8, true) == true)) or (_root["barrier_mc" + l].hitTest(shooter_mc._x + 8, shooter_mc._y - 8, true) == true)) or (_root["barrier_mc" + l].hitTest(shooter_mc._x - 8, shooter_mc._y - 8, true) == true)) {
gotoAndPlay ("bam");
}
if ((((shooter_mc._y > 450) or (shooter_mc._y < -50)) or (shooter_mc._x < -50)) or (shooter_mc._x > 600)) {
gotoAndPlay ("setup");
}
Frame 111
gotoAndPlay ("shooting");
Frame 171
if (l >= 20) {
i = 1;
while (i < p) {
unloadMovie (positive_array[i]);
i++;
}
p = 1;
i = 1;
while (i < n) {
unloadMovie (negative_array[i]);
i++;
}
n = 1;
i = 1;
while (i < t) {
unloadMovie (trace_array[i]);
i++;
}
t = 1;
score = score + tries;
gotoAndPlay (187);
} else {
stop();
}
Frame 172
bam_mc._y = shooter_mc._y;
bam_mc._x = shooter_mc._x;
bam_mc.play();
Frame 186
stop();
Frame 187
background_sound = new Sound();
background_sound.attachSound("introloop");
background_sound.start(0, 9999);
Frame 296
score_txt.text = "Shots: " + score;
Frame 316
stop();
Symbol 27 Button
on (release) {
if (levelselect_txt.text == "Straight Shot") {
l = 1;
} else if (levelselect_txt.text == "Around the Barrier") {
l = 2;
} else if (levelselect_txt.text == "Pick Either Side") {
l = 3;
} else if (levelselect_txt.text == "Low Overhang") {
l = 4;
} else if (levelselect_txt.text == "Through the Gap") {
l = 5;
} else if (levelselect_txt.text == "Linear Accelerator") {
l = 6;
} else if (levelselect_txt.text == "Mini Maze") {
l = 7;
} else if (levelselect_txt.text == "Pyramids") {
l = 8;
} else if (levelselect_txt.text == "Skill Shot") {
l = 9;
} else if (levelselect_txt.text == "Invisibarrier") {
l = 10;
} else if (levelselect_txt.text == "Now They Move") {
l = 11;
} else if (levelselect_txt.text == "The Gate") {
l = 12;
} else if (levelselect_txt.text == "Around the Goal") {
l = 13;
} else if (levelselect_txt.text == "The Crusher") {
l = 14;
} else if (levelselect_txt.text == "Moving Goals") {
l = 15;
} else if (levelselect_txt.text == "The Spinner") {
l = 16;
} else if (levelselect_txt.text == "Falling Objects") {
l = 17;
} else if (levelselect_txt.text == "Transporter") {
l = 18;
} else if (levelselect_txt.text == "Sliced") {
l = 19;
} else if (levelselect_txt.text == "Off the Screen") {
l = 20;
} else if (levelselect_txt.text == "The Impossible") {
l = 21;
} else {
l = 1;
}
background_sound.stop();
gotoAndPlay (70);
}
Symbol 90 Button
on (press) {
duplicateMovieClip (positive_mc, "positive_mc" + p, (3 * p) - 2);
_root["positive_mc" + p]._y = _root._ymouse;
_root["positive_mc" + p]._x = _root._xmouse;
startDrag ("positive_mc" + p);
positive_array[p] = _root["positive_mc" + p];
p++;
}
on (releaseOutside) {
stopDrag();
}
Symbol 92 Button
on (press) {
duplicateMovieClip (negative_mc, "negative_mc" + n, (3 * n) - 1);
_root["negative_mc" + n]._y = _root._ymouse;
_root["negative_mc" + n]._x = _root._xmouse;
startDrag ("negative_mc" + n);
negative_array[n] = _root["negative_mc" + n];
n++;
}
on (releaseOutside) {
stopDrag();
}
Symbol 103 Button
on (release) {
i = 1;
while (i < t) {
unloadMovie (trace_array[i]);
i++;
}
t = 1;
tries++;
gotoAndPlay ("shooting");
}
Symbol 108 Button
on (release) {
i = 1;
while (i < p) {
unloadMovie (positive_array[i]);
i++;
}
p = 1;
i = 1;
while (i < n) {
unloadMovie (negative_array[i]);
i++;
}
n = 1;
}
Symbol 114 Button
on (release) {
if (track == false) {
trace_txt.text = "on";
track = true;
} else {
trace_txt.text = "off";
track = false;
}
}
Symbol 121 Button
on (release) {
if (music == true) {
nomusic_mc._visible = true;
game_sound.setVolume(0);
music = false;
} else {
nomusic_mc._visible = false;
game_sound.setVolume(100);
music = true;
}
}
Symbol 134 Button
on (release) {
gotoAndPlay ("setup");
}
Symbol 141 Button
on (release) {
l++;
score = score + tries;
tries = 0;
i = 1;
while (i < p) {
unloadMovie (positive_array[i]);
i++;
}
p = 1;
i = 1;
while (i < n) {
unloadMovie (negative_array[i]);
i++;
}
n = 1;
gotoAndPlay ("levelchange");
i = 1;
while (i < t) {
unloadMovie (trace_array[i]);
i++;
}
t = 1;
}
Symbol 143 MovieClip Frame 16
stop();
Symbol 149 Button
on (release) {
gotoAndPlay ("setup");
i = 1;
while (i < t) {
unloadMovie (trace_array[i]);
i++;
}
t = 1;
}
Symbol 159 Button
on (release) {
background_sound.stop();
gotoAndPlay (1);
}