Frame 1
var CPMStarContentSpotID = "305Q0C6B47FC";
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie("http://server.cpmstar.com/adviewas2.swf?contentspotid=" + CPMStarContentSpotID);
Frame 3
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
stop();
levelnumber2 = 0;
getwebsite = true;
getwebsite2 = true;
menuVolumeMoved = false;
Stage.showMenu = false;
if (you_understand != true) {
you_understand = false;
}
var savefile = SharedObject.getLocal("tworooms");
if (savefile.data.score > 30) {
savefile.data.score = 1;
savefile.flush();
}
if (savefile.data.score == undefined) {
_root.score = 1;
} else {
_root.score = savefile.data.score;
}
if (savefile.data.level1_best_time == undefined) {
_root.level1_best_time = 0;
} else {
_root.level1_best_time = savefile.data.level1_best_time;
}
if (savefile.data.level2_best_time == undefined) {
_root.level2_best_time = 0;
} else {
_root.level2_best_time = savefile.data.level2_best_time;
}
if (savefile.data.level3_best_time == undefined) {
_root.level3_best_time = 0;
} else {
_root.level3_best_time = savefile.data.level3_best_time;
}
if (savefile.data.level4_best_time == undefined) {
_root.level4_best_time = 0;
} else {
_root.level4_best_time = savefile.data.level4_best_time;
}
if (savefile.data.level5_best_time == undefined) {
_root.level5_best_time = 0;
} else {
_root.level5_best_time = savefile.data.level5_best_time;
}
if (savefile.data.level6_best_time == undefined) {
_root.level6_best_time = 0;
} else {
_root.level6_best_time = savefile.data.level6_best_time;
}
if (savefile.data.level7_best_time == undefined) {
_root.level7_best_time = 0;
} else {
_root.level7_best_time = savefile.data.level7_best_time;
}
if (savefile.data.level8_best_time == undefined) {
_root.level8_best_time = 0;
} else {
_root.level8_best_time = savefile.data.level8_best_time;
}
if (savefile.data.level9_best_time == undefined) {
_root.level9_best_time = 0;
} else {
_root.level9_best_time = savefile.data.level9_best_time;
}
if (savefile.data.level10_best_time == undefined) {
_root.level10_best_time = 0;
} else {
_root.level10_best_time = savefile.data.level10_best_time;
}
if (savefile.data.level11_best_time == undefined) {
_root.level11_best_time = 0;
} else {
_root.level11_best_time = savefile.data.level11_best_time;
}
if (savefile.data.level12_best_time == undefined) {
_root.level12_best_time = 0;
} else {
_root.level12_best_time = savefile.data.level12_best_time;
}
if (savefile.data.level13_best_time == undefined) {
_root.level13_best_time = 0;
} else {
_root.level13_best_time = savefile.data.level13_best_time;
}
if (savefile.data.level14_best_time == undefined) {
_root.level14_best_time = 0;
} else {
_root.level14_best_time = savefile.data.level14_best_time;
}
if (savefile.data.level15_best_time == undefined) {
_root.level15_best_time = 0;
} else {
_root.level15_best_time = savefile.data.level15_best_time;
}
if (savefile.data.level16_best_time == undefined) {
_root.level16_best_time = 0;
} else {
_root.level16_best_time = savefile.data.level16_best_time;
}
if (savefile.data.level17_best_time == undefined) {
_root.level17_best_time = 0;
} else {
_root.level17_best_time = savefile.data.level17_best_time;
}
if (savefile.data.level18_best_time == undefined) {
_root.level18_best_time = 0;
} else {
_root.level18_best_time = savefile.data.level18_best_time;
}
if (savefile.data.level19_best_time == undefined) {
_root.level19_best_time = 0;
} else {
_root.level19_best_time = savefile.data.level19_best_time;
}
if (savefile.data.level20_best_time == undefined) {
_root.level20_best_time = 0;
} else {
_root.level20_best_time = savefile.data.level20_best_time;
}
if (savefile.data.level21_best_time == undefined) {
_root.level21_best_time = 0;
} else {
_root.level21_best_time = savefile.data.level21_best_time;
}
if (savefile.data.level22_best_time == undefined) {
_root.level22_best_time = 0;
} else {
_root.level22_best_time = savefile.data.level22_best_time;
}
if (savefile.data.level23_best_time == undefined) {
_root.level23_best_time = 0;
} else {
_root.level23_best_time = savefile.data.level23_best_time;
}
if (savefile.data.level24_best_time == undefined) {
_root.level24_best_time = 0;
} else {
_root.level24_best_time = savefile.data.level24_best_time;
}
if (savefile.data.level25_best_time == undefined) {
_root.level25_best_time = 0;
} else {
_root.level25_best_time = savefile.data.level25_best_time;
}
if (savefile.data.level26_best_time == undefined) {
_root.level26_best_time = 0;
} else {
_root.level26_best_time = savefile.data.level26_best_time;
}
if (savefile.data.level27_best_time == undefined) {
_root.level27_best_time = 0;
} else {
_root.level27_best_time = savefile.data.level27_best_time;
}
if (savefile.data.level28_best_time == undefined) {
_root.level28_best_time = 0;
} else {
_root.level28_best_time = savefile.data.level28_best_time;
}
if (savefile.data.level29_best_time == undefined) {
_root.level29_best_time = 0;
} else {
_root.level29_best_time = savefile.data.level29_best_time;
}
if (savefile.data.level30_best_time == undefined) {
_root.level30_best_time = 0;
} else {
_root.level30_best_time = savefile.data.level30_best_time;
}
if (savefile.data.scoresubmit1 == undefined) {
_root.scoresubmit1 = true;
} else {
_root.scoresubmit1 = savefile.data.scoresubmit1;
}
if (savefile.data.scoresubmit2 == undefined) {
_root.scoresubmit2 = true;
} else {
_root.scoresubmit2 = savefile.data.scoresubmit2;
}
if (savefile.data.scoresubmit3 == undefined) {
_root.scoresubmit3 = true;
} else {
_root.scoresubmit3 = savefile.data.scoresubmit3;
}
if (savefile.data.scoresubmit4 == undefined) {
_root.scoresubmit4 = true;
} else {
_root.scoresubmit4 = savefile.data.scoresubmit4;
}
if (savefile.data.scoresubmit5 == undefined) {
_root.scoresubmit5 = true;
} else {
_root.scoresubmit5 = savefile.data.scoresubmit5;
}
if (savefile.data.scoresubmit6 == undefined) {
_root.scoresubmit6 = true;
} else {
_root.scoresubmit6 = savefile.data.scoresubmit6;
}
if (savefile.data.scoresubmit7 == undefined) {
_root.scoresubmit7 = true;
} else {
_root.scoresubmit7 = savefile.data.scoresubmit7;
}
if (savefile.data.scoresubmit8 == undefined) {
_root.scoresubmit8 = true;
} else {
_root.scoresubmit8 = savefile.data.scoresubmit8;
}
if (savefile.data.scoresubmit9 == undefined) {
_root.scoresubmit9 = true;
} else {
_root.scoresubmit9 = savefile.data.scoresubmit9;
}
if (savefile.data.scoresubmit10 == undefined) {
_root.scoresubmit10 = true;
} else {
_root.scoresubmit10 = savefile.data.scoresubmit10;
}
if (savefile.data.scoresubmit11 == undefined) {
_root.scoresubmit11 = true;
} else {
_root.scoresubmit11 = savefile.data.scoresubmit11;
}
if (savefile.data.scoresubmit12 == undefined) {
_root.scoresubmit12 = true;
} else {
_root.scoresubmit12 = savefile.data.scoresubmit12;
}
if (savefile.data.scoresubmit13 == undefined) {
_root.scoresubmit13 = true;
} else {
_root.scoresubmit13 = savefile.data.scoresubmit13;
}
if (savefile.data.scoresubmit14 == undefined) {
_root.scoresubmit14 = true;
} else {
_root.scoresubmit14 = savefile.data.scoresubmit14;
}
if (savefile.data.scoresubmit15 == undefined) {
_root.scoresubmit15 = true;
} else {
_root.scoresubmit15 = savefile.data.scoresubmit15;
}
if (savefile.data.scoresubmit16 == undefined) {
_root.scoresubmit16 = true;
} else {
_root.scoresubmit16 = savefile.data.scoresubmit16;
}
if (savefile.data.scoresubmit17 == undefined) {
_root.scoresubmit17 = true;
} else {
_root.scoresubmit17 = savefile.data.scoresubmit17;
}
if (savefile.data.scoresubmit18 == undefined) {
_root.scoresubmit18 = true;
} else {
_root.scoresubmit18 = savefile.data.scoresubmit18;
}
if (savefile.data.scoresubmit19 == undefined) {
_root.scoresubmit19 = true;
} else {
_root.scoresubmit19 = savefile.data.scoresubmit19;
}
if (savefile.data.scoresubmit20 == undefined) {
_root.scoresubmit20 = true;
} else {
_root.scoresubmit20 = savefile.data.scoresubmit20;
}
if (savefile.data.scoresubmit21 == undefined) {
_root.scoresubmit21 = true;
} else {
_root.scoresubmit21 = savefile.data.scoresubmit21;
}
if (savefile.data.scoresubmit22 == undefined) {
_root.scoresubmit22 = true;
} else {
_root.scoresubmit22 = savefile.data.scoresubmit22;
}
if (savefile.data.scoresubmit23 == undefined) {
_root.scoresubmit23 = true;
} else {
_root.scoresubmit23 = savefile.data.scoresubmit23;
}
if (savefile.data.scoresubmit24 == undefined) {
_root.scoresubmit24 = true;
} else {
_root.scoresubmit24 = savefile.data.scoresubmit24;
}
if (savefile.data.scoresubmit25 == undefined) {
_root.scoresubmit25 = true;
} else {
_root.scoresubmit25 = savefile.data.scoresubmit25;
}
if (savefile.data.scoresubmit26 == undefined) {
_root.scoresubmit26 = true;
} else {
_root.scoresubmit26 = savefile.data.scoresubmit26;
}
if (savefile.data.scoresubmit27 == undefined) {
_root.scoresubmit27 = true;
} else {
_root.scoresubmit27 = savefile.data.scoresubmit27;
}
if (savefile.data.scoresubmit28 == undefined) {
_root.scoresubmit28 = true;
} else {
_root.scoresubmit28 = savefile.data.scoresubmit28;
}
if (savefile.data.scoresubmit29 == undefined) {
_root.scoresubmit29 = true;
} else {
_root.scoresubmit29 = savefile.data.scoresubmit29;
}
if (savefile.data.scoresubmit30 == undefined) {
_root.scoresubmit30 = true;
} else {
_root.scoresubmit30 = savefile.data.scoresubmit30;
}
radius = ball1._height / 2;
SPACE_possible = true;
greenwall_movement = false;
redwall_movement = false;
orangewall_movement = false;
bluewall_movement = false;
ball_movement = true;
finisher = false;
gotonextframe = false;
gotonextframe2 = false;
gotonextframe = false;
gotonextframe3 = false;
gotonextframe4 = false;
gotonextframe5 = false;
gotonextframe6 = false;
gotonextframe7 = false;
gotonextframe8 = false;
gotonextframe9 = false;
gotonextframe10 = false;
gotonextframe11 = false;
gotonextframe12 = false;
gotonextframe13 = false;
gotonextframe14 = false;
gotonextframe15 = false;
gotonextframe16 = false;
gotonextframe17 = false;
gotonextframe18 = false;
gotonextframe19 = false;
gotonextframe20 = false;
gotonextframe21 = false;
gotonextframe22 = false;
gotonextframe23 = false;
gotonextframe24 = false;
gotonextframe25 = false;
gotonextframe26 = false;
gotonextframe27 = false;
gotonextframe28 = false;
gotonextframe29 = false;
gotonextframe30 = false;
gotonextframe31 = false;
option._x = 100000 /* 0x0186A0 */;
win._x = 10000;
options._x = -5000;
restartbutton._x = -5000;
QW._x = -5000;
P._x = -5000;
BN._x = -5000;
if (timeactivator2 != true) {
_root.timeactivator2 = false;
}
_root.timeactivater.gotoAndStop(2);
options.gotoAndStop(1);
redkey._x = 421.2;
redkey._y = 182.1;
redwall._x = 200;
redwall._y = 138.1;
orangekey._x = 421.2;
orangekey._y = 367.1;
orangewall._x = 500;
orangewall._y = 138.1;
greenwall._x = 500;
greenwall._y = 412.4;
greenkey._x = 576;
greenkey._y = 367.1;
bluewall._x = 200;
bluewall._y = 412.4;
bluekey._x = 579;
bluekey._y = 182.1;
ball1._x = 200;
ball1._y = 275;
ball2._x = 500;
ball2._y = 275;
finish1._x = 500;
finish1._y = 80.8;
finish2._x = 200;
finish2._y = 80.8;
finish3._x = 200;
finish3._y = 468.8;
finish4._x = 500;
finish4._y = 468.8;
if (_root.level30_best_time > 0) {
score = 30;
}
_root.option9.submitScore.onRelease = function () {
if (submitPossible) {
trace("Score Submitted");
scoresubmit = true;
scoresubmit1 = false;
scoresubmit2 = false;
scoresubmit3 = false;
scoresubmit4 = false;
scoresubmit5 = false;
scoresubmit6 = false;
scoresubmit7 = false;
scoresubmit8 = false;
scoresubmit9 = false;
scoresubmit10 = false;
scoresubmit11 = false;
scoresubmit12 = false;
scoresubmit13 = false;
scoresubmit14 = false;
scoresubmit15 = false;
scoresubmit16 = false;
scoresubmit17 = false;
scoresubmit18 = false;
scoresubmit19 = false;
scoresubmit20 = false;
scoresubmit21 = false;
scoresubmit22 = false;
scoresubmit23 = false;
scoresubmit24 = false;
scoresubmit25 = false;
scoresubmit26 = false;
scoresubmit27 = false;
scoresubmit28 = false;
scoresubmit29 = false;
scoresubmit30 = false;
_root.level1_best_time = 0;
_root.level2_best_time = 0;
_root.level3_best_time = 0;
_root.level4_best_time = 0;
_root.level5_best_time = 0;
_root.level6_best_time = 0;
_root.level7_best_time = 0;
_root.level8_best_time = 0;
_root.level9_best_time = 0;
_root.level10_best_time = 0;
_root.level11_best_time = 0;
_root.level12_best_time = 0;
_root.level13_best_time = 0;
_root.level14_best_time = 0;
_root.level15_best_time = 0;
_root.level16_best_time = 0;
_root.level17_best_time = 0;
_root.level18_best_time = 0;
_root.level19_best_time = 0;
_root.level20_best_time = 0;
_root.level21_best_time = 0;
_root.level22_best_time = 0;
_root.level23_best_time = 0;
_root.level24_best_time = 0;
_root.level25_best_time = 0;
_root.level26_best_time = 0;
_root.level27_best_time = 0;
_root.level28_best_time = 0;
_root.level29_best_time = 0;
_root.level30_best_time = 0;
savefile.data.level1_best_time = _root.level1_best_time;
savefile.data.level2_best_time = _root.level2_best_time;
savefile.data.level3_best_time = _root.level3_best_time;
savefile.data.level4_best_time = _root.level4_best_time;
savefile.data.level5_best_time = _root.level5_best_time;
savefile.data.level6_best_time = _root.level6_best_time;
savefile.data.level7_best_time = _root.level7_best_time;
savefile.data.level8_best_time = _root.level8_best_time;
savefile.data.level9_best_time = _root.level9_best_time;
savefile.data.level10_best_time = _root.level10_best_time;
savefile.data.level11_best_time = _root.level11_best_time;
savefile.data.level12_best_time = _root.level12_best_time;
savefile.data.level13_best_time = _root.level13_best_time;
savefile.data.level14_best_time = _root.level14_best_time;
savefile.data.level15_best_time = _root.level15_best_time;
savefile.data.level16_best_time = _root.level16_best_time;
savefile.data.level17_best_time = _root.level17_best_time;
savefile.data.level18_best_time = _root.level18_best_time;
savefile.data.level19_best_time = _root.level19_best_time;
savefile.data.level20_best_time = _root.level20_best_time;
savefile.data.level21_best_time = _root.level21_best_time;
savefile.data.level22_best_time = _root.level22_best_time;
savefile.data.level23_best_time = _root.level23_best_time;
savefile.data.level24_best_time = _root.level24_best_time;
savefile.data.level25_best_time = _root.level25_best_time;
savefile.data.level26_best_time = _root.level26_best_time;
savefile.data.level27_best_time = _root.level27_best_time;
savefile.data.level28_best_time = _root.level28_best_time;
savefile.data.level29_best_time = _root.level29_best_time;
savefile.data.level30_best_time = _root.level30_best_time;
savefile.data.level30_best_time = _root.level30_best_time;
savefile.data.scoresubmit1 = _root.scoresubmit1;
savefile.data.scoresubmit2 = _root.scoresubmit2;
savefile.data.scoresubmit3 = _root.scoresubmit3;
savefile.data.scoresubmit4 = _root.scoresubmit4;
savefile.data.scoresubmit5 = _root.scoresubmit5;
savefile.data.scoresubmit6 = _root.scoresubmit6;
savefile.data.scoresubmit7 = _root.scoresubmit7;
savefile.data.scoresubmit8 = _root.scoresubmit8;
savefile.data.scoresubmit9 = _root.scoresubmit9;
savefile.data.scoresubmit10 = _root.scoresubmit10;
savefile.data.scoresubmit11 = _root.scoresubmit11;
savefile.data.scoresubmit12 = _root.scoresubmit12;
savefile.data.scoresubmit13 = _root.scoresubmit13;
savefile.data.scoresubmit14 = _root.scoresubmit14;
savefile.data.scoresubmit15 = _root.scoresubmit15;
savefile.data.scoresubmit16 = _root.scoresubmit16;
savefile.data.scoresubmit17 = _root.scoresubmit17;
savefile.data.scoresubmit18 = _root.scoresubmit18;
savefile.data.scoresubmit19 = _root.scoresubmit19;
savefile.data.scoresubmit20 = _root.scoresubmit20;
savefile.data.scoresubmit21 = _root.scoresubmit21;
savefile.data.scoresubmit22 = _root.scoresubmit22;
savefile.data.scoresubmit23 = _root.scoresubmit23;
savefile.data.scoresubmit24 = _root.scoresubmit24;
savefile.data.scoresubmit25 = _root.scoresubmit25;
savefile.data.scoresubmit26 = _root.scoresubmit26;
savefile.data.scoresubmit27 = _root.scoresubmit27;
savefile.data.scoresubmit28 = _root.scoresubmit28;
savefile.data.scoresubmit29 = _root.scoresubmit29;
savefile.data.scoresubmit30 = _root.scoresubmit30;
savefile.flush();
gotoAndStop (37);
_root.option9._x = 5000;
_root.option9._y = 5000;
_root.option2._x = 5000;
_root.option2._y = 5000;
_root.inputbox._x = -500;
_root.go._x = -500;
if (_root.green_move) {
_root.greenwall_movement = true;
}
if (_root.red_move) {
_root.redwall_movement = true;
}
if (_root.blue_move) {
_root.bluewall_movement = true;
}
if (_root.orange_move) {
_root.orangewall_movement = true;
}
_root.option2._x = 10000;
_root.ball_movement = true;
} else {
trace("Score cant be submitted");
}
};
_root.option2.submitScore.onRelease = function () {
_root.option9._x = Stage.width / 2;
_root.option9._y = Stage.height / 2;
_root.option2._x = 5000;
_root.option2._y = 5000;
};
_root.option9.exit.onRelease = function () {
_root.option9._x = 5000;
_root.option9._y = 5000;
_root.option2._x = Stage.width / 2;
_root.option2._y = Stage.height / 2;
};
go.onRelease = function () {
if (inputPass == "dog") {
gotonextframe = true;
} else if (inputPass == "cat") {
gotonextframe3 = true;
} else if (inputPass == "mouse") {
gotonextframe4 = true;
} else if (inputPass == "horse") {
gotonextframe5 = true;
} else if (inputPass == "fish") {
gotonextframe6 = true;
} else if (inputPass == "monkey") {
gotonextframe7 = true;
} else if (inputPass == "bird") {
gotonextframe8 = true;
} else if (inputPass == "snake") {
gotonextframe9 = true;
} else if (inputPass == "hamster") {
gotonextframe10 = true;
} else if (inputPass == "ferret") {
gotonextframe11 = true;
} else if (inputPass == "goose") {
gotonextframe12 = true;
} else if (inputPass == "bat") {
gotonextframe13 = true;
} else if (inputPass == "sloth") {
gotonextframe14 = true;
} else if (inputPass == "duck") {
gotonextframe15 = true;
} else if (inputPass == "toad") {
gotonextframe16 = true;
} else if (inputPass == "eel") {
gotonextframe17 = true;
} else if (inputPass == "donkey") {
gotonextframe18 = true;
} else if (inputPass == "ant") {
gotonextframe19 = true;
} else if (inputPass == "lizard") {
gotonextframe20 = true;
} else if (inputPass == "lion") {
gotonextframe21 = true;
} else if (inputPass == "zebra") {
gotonextframe22 = true;
} else if (inputPass == "fly") {
gotonextframe23 = true;
} else if (inputPass == "rat") {
gotonextframe24 = true;
} else if (inputPass == "parrot") {
gotonextframe25 = true;
} else if (inputPass == "whale") {
gotonextframe26 = true;
} else if (inputPass == "beetle") {
gotonextframe27 = true;
} else if (inputPass == "rabbit") {
gotonextframe28 = true;
} else if (inputPass == "wolf") {
gotonextframe29 = true;
} else if (inputPass == "llama") {
gotonextframe30 = true;
} else if (inputPass == "human") {
gotonextframe31 = true;
} else {
display = "Wrong";
}
};
ball1.onEnterFrame = function () {
if (alpha_true and you_understand) {
you_understand_obj._alpha = you_understand_obj._alpha - 2;
if (you_understand_obj._alpha == 0) {
you_understand_obj._x = 5005;
}
}
button28.onPress = function () {
gotoAndStop (23);
};
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 10000;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (this.hitTest(redkey)) {
keystart = true;
redkey._x = 10000;
redwall_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if (this.hitTest(orangekey)) {
keystart = true;
orangekey._x = 10000;
orangewall_movement = true;
_root.ball1.scan.gotoAndStop(6);
}
if (this.hitTest(bluekey)) {
keystart = true;
bluekey._x = 100000 /* 0x0186A0 */;
bluewall_movement = true;
_root.ball1.scan.gotoAndStop(4);
}
if (this.hitTest(playkey)) {
if (_root.score == 0) {
gotoAndStop (4);
}
if (_root.score == 1) {
gotoAndStop (4);
}
if (_root.score == 2) {
gotoAndStop (5);
}
if (_root.score == 3) {
gotoAndStop (27);
}
if (_root.score == 4) {
gotoAndStop (8);
}
if (_root.score == 5) {
gotoAndStop (9);
}
if (_root.score == 6) {
gotoAndStop (7);
}
if (_root.score == 7) {
gotoAndStop (6);
}
if (_root.score == 8) {
gotoAndStop (12);
}
if (_root.score == 9) {
gotoAndStop (26);
}
if (_root.score == 10) {
gotoAndStop (10);
}
if (_root.score == 11) {
gotoAndStop (20);
}
if (_root.score == 12) {
gotoAndStop (15);
}
if (_root.score == 13) {
gotoAndStop (28);
}
if (_root.score == 14) {
gotoAndStop (23);
}
if (_root.score == 15) {
gotoAndStop (18);
}
if (_root.score == 16) {
gotoAndStop (16);
}
if (_root.score == 17) {
gotoAndStop (21);
}
if (_root.score == 18) {
gotoAndStop (25);
}
if (_root.score == 19) {
gotoAndStop (14);
}
if (_root.score == 20) {
gotoAndStop (22);
}
if (_root.score == 21) {
gotoAndStop (24);
}
if (_root.score == 22) {
gotoAndStop (13);
}
if (_root.score == 23) {
gotoAndStop (19);
}
if (_root.score == 24) {
gotoAndStop (32);
}
if (_root.score == 25) {
gotoAndStop (35);
}
if (_root.score == 26) {
gotoAndStop (34);
}
if (_root.score == 27) {
gotoAndStop (36);
}
if (_root.score == 28) {
gotoAndStop (30);
}
if (_root.score == 29) {
gotoAndStop (33);
}
if (_root.score == 30) {
gotoAndStop (29);
}
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
}
if (this.hitTest(optionkey)) {
inputbox._x = 293;
go._x = 350;
if (greenwall_movement) {
green_move = true;
} else {
green_move = false;
}
if (redwall_movement) {
red_move = true;
} else {
red_move = false;
}
if (bluewall_movement) {
blue_move = true;
} else {
blue_move = false;
}
if (orangewall_movement) {
orange_move = true;
} else {
orange_move = false;
}
greenwall_movement = false;
redwall_movement = false;
orangewall_movement = false;
bluewall_movement = false;
option2._x = Stage.width / 2;
option2._y = Stage.height / 2;
ball_movement = false;
ball1._x = 490;
ball1._y = 200;
}
if (this.hitTest(finish7)) {
if (getwebsite) {
getURL ("http://armorgames.com/", "_blank");
getwebsite = false;
}
} else {
getwebsite = true;
}
if (this.hitTest(finish8)) {
if (getwebsite2) {
getURL ("http://armorblog.com/", "_blank");
getwebsite2 = false;
}
} else {
getwebsite2 = true;
}
if (this.hitTest(finish4)) {
if (greenwall_movement) {
green_move = true;
} else {
green_move = false;
}
if (redwall_movement) {
red_move = true;
} else {
red_move = false;
}
if (bluewall_movement) {
blue_move = true;
} else {
blue_move = false;
}
if (orangewall_movement) {
orange_move = true;
} else {
orange_move = false;
}
greenwall_movement = false;
redwall_movement = false;
orangewall_movement = false;
bluewall_movement = false;
option3._x = Stage.width / 2;
option3._y = Stage.height / 2;
ball_movement = false;
ball1._x = 490;
ball1._y = 350;
}
};
_root.onEnterFrame = function () {
activateframe = _root.timeactivater._currentframe;
if (timeactivator2 == false) {
_root.expander.gotoAndStop(2);
ball_movement = false;
timeactivator2 = true;
}
var _local2 = "type here";
if (ball_movement) {
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
you_understand = true;
}
}
}
}
if (greenwall_movement) {
greenwall._x = greenwall._x + 0.5;
greenkey._x = greenkey._x + 0.5;
}
if (bluewall_movement) {
bluewall._x = bluewall._x - 0.5;
bluekey._x = bluekey._x - 0.5;
}
if (redwall_movement) {
redwall._x = redwall._x - 0.5;
redkey._x = redkey._x - 0.5;
}
if (orangewall_movement) {
orangewall._x = orangewall._x + 0.5;
orangekey._x = orangekey._x + 0.5;
}
if ((((((((((((((((((((((((((((((_root.level1_best_time > 0) and (_root.level2_best_time > 0)) and (_root.level3_best_time > 0)) and (_root.level4_best_time > 0)) and (_root.level5_best_time > 0)) and (_root.level6_best_time > 0)) and (_root.level7_best_time > 0)) and (_root.level8_best_time > 0)) and (_root.level9_best_time > 0)) and (_root.level10_best_time > 0)) and (_root.level11_best_time > 0)) and (_root.level12_best_time > 0)) and (_root.level13_best_time > 0)) and (_root.level14_best_time > 0)) and (_root.level15_best_time > 0)) and (_root.level16_best_time > 0)) and (_root.level17_best_time > 0)) and (_root.level18_best_time > 0)) and (_root.level19_best_time > 0)) and (_root.level20_best_time > 0)) and (_root.level21_best_time > 0)) and (_root.level22_best_time > 0)) and (_root.level23_best_time > 0)) and (_root.level24_best_time > 0)) and (_root.level25_best_time > 0)) and (_root.level26_best_time > 0)) and (_root.level27_best_time > 0)) and (_root.level28_best_time > 0)) and (_root.level29_best_time > 0)) and (_root.level30_best_time > 0)) {
submitPossible = true;
} else {
submitPossible = false;
}
totaltime = ((((((((((((((((((((((((((((_root.level1_best_time + _root.level2_best_time) + _root.level3_best_time) + _root.level4_best_time) + _root.level5_best_time) + _root.level6_best_time) + _root.level7_best_time) + _root.level8_best_time) + _root.level9_best_time) + _root.level10_best_time) + _root.level11_best_time) + _root.level12_best_time) + _root.level13_best_time) + _root.level14_best_time) + _root.level15_best_time) + _root.level16_best_time) + _root.level17_best_time) + _root.level18_best_time) + _root.level19_best_time) + _root.level20_best_time) + _root.level21_best_time) + _root.level22_best_time) + _root.level23_best_time) + _root.level24_best_time) + _root.level25_best_time) + _root.level26_best_time) + _root.level27_best_time) + _root.level28_best_time) + _root.level29_best_time) + _root.level30_best_time;
if (!submitPossible) {
_root.option9.warning._alpha = 100;
_root.option9.submitScore._alpha = 100;
} else {
_root.option9.warning._alpha = 0;
_root.option9.submitScore._alpha = 100;
}
};
Instance of Symbol 65 MovieClip "you_understand_obj" in Frame 3
onClipEvent (enterFrame) {
if ((_root.you_understand_var == true) and (_root.you_understand == false)) {
this.gotoAndStop(2);
}
}
Instance of Symbol 687 MovieClip "finish7" in Frame 3
on (release) {
getURL ("http://armorgames.com/", "_blank");
}
Instance of Symbol 687 MovieClip "finish8" in Frame 3
on (release) {
getURL ("http://armorblog.com/", "_blank");
}
Instance of Symbol 676 MovieClip "ball1" in Frame 3
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.divider)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.divider.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.divider.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.divider.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.divider.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement) {
if (Key.isDown(37)) {
move(-5, 0);
_root.you_understand = true;
}
if (Key.isDown(39)) {
move(5, 0);
_root.you_understand = true;
}
if (Key.isDown(38)) {
move(0, -5);
_root.you_understand = true;
}
if (Key.isDown(40)) {
move(0, 5);
_root.you_understand = true;
}
}
}
Instance of Symbol 888 MovieClip "option2" in Frame 3
onClipEvent (load) {
_root.option2.mySlider.dragger._x = _root.sliderx2;
exit.onPress = function () {
_root.inputbox._x = -500;
_root.go._x = -500;
if (_root.green_move) {
_root.greenwall_movement = true;
}
if (_root.red_move) {
_root.redwall_movement = true;
}
if (_root.blue_move) {
_root.bluewall_movement = true;
}
if (_root.orange_move) {
_root.orangewall_movement = true;
}
_root.option2._x = 10000;
_root.ball_movement = true;
};
highquality.onPress = function () {
_quality = "HIGH";
};
mediumquality.onPress = function () {
_quality = "MEDIUM";
};
lowquality.onPress = function () {
_quality = "LOW";
};
fx.onRelease = function () {
_root.soundfx_on = false;
_root.option2.fx2.gotoAndStop(2);
_root.option2.fx.gotoAndStop(2);
_root.option.fx2.gotoAndStop(2);
_root.option.fx.gotoAndStop(2);
};
fx2.onRelease = function () {
_root.soundfx_on = true;
_root.keystart = true;
_root.option2.fx.gotoAndStop(1);
_root.option2.fx2.gotoAndStop(1);
_root.option.fx.gotoAndStop(1);
_root.option.fx2.gotoAndStop(1);
};
}
onClipEvent (enterFrame) {
_root.sliderx = _root.option2.mySlider.dragger._x;
_root.mySlider.dragger._x = _root.sliderx;
}
Instance of Symbol 959 MovieClip "option3" in Frame 3
onClipEvent (load) {
exit.onPress = function () {
if (_root.green_move) {
_root.greenwall_movement = true;
}
if (_root.red_move) {
_root.redwall_movement = true;
}
if (_root.blue_move) {
_root.bluewall_movement = true;
}
if (_root.orange_move) {
_root.orangewall_movement = true;
}
_root.option3._x = 10000;
_root.ball_movement = true;
};
}
Instance of Symbol 1152 MovieClip "win" in Frame 3
onClipEvent (load) {
mainmenu.onRelease = function () {
_root.gotoAndStop(3);
};
instructionbutton.onRelease = function () {
};
sponsorbutton.onRelease = function () {
};
returnBack.onRelease = function () {
_root.finisher = true;
};
}
onClipEvent (enterFrame) {
if (_root.win.instructions._currentframe == 30) {
_root.win.space_nextlevel._x = -100000;
_root.win.returnBack._x = -100000;
_root.win.nextlevelinfo._x = -100000;
_root.win.meter._x = -100000;
_root.win.mainmenu._x = -69.7;
_root.win.sponsorbutton._x = -69.7;
} else {
_root.win.space_nextlevel._x = -70.2;
_root.win.nextlevelinfo._x = 74.8;
_root.win.meter._x = 68.5;
_root.win.mainmenu._x = -71.7;
_root.win.sponsorbutton._x = -71.7;
_root.win.returnBack._x = -69.7;
}
if (_root._currentframe == 4) {
_root.bestScore = _root.level1_best_time;
} else if (_root._currentframe == 5) {
_root.bestScore = _root.level2_best_time;
} else if (_root._currentframe == 6) {
_root.bestScore = _root.level7_best_time;
} else if (_root._currentframe == 7) {
_root.bestScore = _root.level6_best_time;
} else if (_root._currentframe == 8) {
_root.bestScore = _root.level4_best_time;
} else if (_root._currentframe == 9) {
_root.bestScore = _root.level5_best_time;
} else if (_root._currentframe == 10) {
_root.bestScore = _root.level10_best_time;
} else if (_root._currentframe == 12) {
_root.bestScore = _root.level8_best_time;
} else if (_root._currentframe == 13) {
_root.bestScore = _root.level22_best_time;
} else if (_root._currentframe == 14) {
_root.bestScore = _root.level19_best_time;
} else if (_root._currentframe == 15) {
_root.bestScore = _root.level12_best_time;
} else if (_root._currentframe == 16) {
_root.bestScore = _root.level16_best_time;
} else if (_root._currentframe == 18) {
_root.bestScore = _root.level15_best_time;
} else if (_root._currentframe == 19) {
_root.bestScore = _root.level23_best_time;
} else if (_root._currentframe == 20) {
_root.bestScore = _root.level11_best_time;
} else if (_root._currentframe == 21) {
_root.bestScore = _root.level17_best_time;
} else if (_root._currentframe == 22) {
_root.bestScore = _root.level20_best_time;
} else if (_root._currentframe == 23) {
_root.bestScore = _root.level14_best_time;
} else if (_root._currentframe == 24) {
_root.bestScore = _root.level21_best_time;
} else if (_root._currentframe == 25) {
_root.bestScore = _root.level18_best_time;
} else if (_root._currentframe == 26) {
_root.bestScore = _root.level9_best_time;
} else if (_root._currentframe == 27) {
_root.bestScore = _root.level3_best_time;
} else if (_root._currentframe == 28) {
_root.bestScore = _root.level13_best_time;
} else if (_root._currentframe == 29) {
_root.bestScore = _root.level30_best_time;
} else if (_root._currentframe == 30) {
_root.bestScore = _root.level28_best_time;
} else if (_root._currentframe == 32) {
_root.bestScore = _root.level24_best_time;
} else if (_root._currentframe == 33) {
_root.bestScore = _root.level29_best_time;
} else if (_root._currentframe == 34) {
_root.bestScore = _root.level26_best_time;
} else if (_root._currentframe == 35) {
_root.bestScore = _root.level25_best_time;
} else if (_root._currentframe == 36) {
_root.bestScore = _root.level27_best_time;
}
}
Instance of Symbol 1183 MovieClip "instruction" in Frame 3
onClipEvent (load) {
theFrame = 1;
_root.instruction.rightkey.onRelease = function () {
theFrame = theFrame + 1;
if (theFrame > 14) {
theFrame = 1;
}
_root.instruction.instructions.gotoAndStop(theFrame);
};
_root.instruction.leftkey.onRelease = function () {
theFrame = theFrame - 1;
if (theFrame < 1) {
theFrame = 14;
}
_root.instruction.instructions.gotoAndStop(theFrame);
};
}
Instance of Symbol 1252 MovieClip "option" in Frame 3
onClipEvent (load) {
_root.soundfx_on = true;
my_sound8 = new Sound();
my_sound8.attachSound("wallhit");
my_sound5 = new Sound();
my_sound5.attachSound("smallkey");
my_sound6 = new Sound();
my_sound6.attachSound("transport");
my_sound7 = new Sound();
my_sound7.attachSound("reverse");
my_sound9 = new Sound();
my_sound9.attachSound("key");
my_sound10 = new Sound();
my_sound10.attachSound("switch");
my_sound11 = new Sound();
my_sound11.attachSound("stop");
_root.explosionsound2 = true;
p_is_DOWN = false;
hintbox.gotoAndStop(1);
keysound3 = true;
my_sound = new Sound();
my_sound.attachSound("EXPLOSION");
instructionscreenopen = false;
switch_options = false;
_root.options.onRelease = function () {
if ((win._x != (Stage.width / 2)) and (instructionscreenopen == false)) {
switch_options = true;
}
};
highquality.onRelease = function () {
_quality = "HIGH";
};
mediumquality.onRelease = function () {
_quality = "MEDIUM";
};
lowquality.onRelease = function () {
_quality = "LOW";
};
revealbox.onRelease = function () {
hintbox.gotoAndStop(_root._currentframe);
};
mainmenu.onRelease = function () {
switch_options = false;
_root.gotoAndStop(3);
};
instructionbutton.onRelease = function () {
_x = 10000;
_root.instruction._x = Stage.width / 2;
_root.instruction._y = Stage.height / 2;
instructionscreenopen = true;
};
_root.instruction.backoptions.onRelease = function () {
_x = (Stage.width / 2);
_y = (Stage.height / 2);
_root.instruction._x = 100000 /* 0x0186A0 */;
instructionscreenopen = false;
};
sponsorbutton.onRelease = function () {
};
returnbutton.onRelease = function () {
};
rotatesongs = true;
playagainsong = false;
_root.option.cycle.gotoAndStop(1);
_root.option.repeat.gotoAndStop(1);
_root.option.fx.gotoAndStop(1);
songnumber = 1;
Song = new Sound();
Song.loadSound("http://audio.ngfiles.com/112000/112527_Vain_Star.mp3", true);
Song.start();
stop_activated = false;
Song.onSoundComplete = function () {
if (songnumber >= 5) {
songnumber = 0;
}
if (rotatesongs == true) {
songnumber = songnumber + 1;
}
if (playagainsong == true) {
}
switch (songnumber) {
case 1 :
Song.loadSound("http://audio.ngfiles.com/112000/112527_Vain_Star.mp3", true);
Song.start();
return;
case 2 :
Song.loadSound("http://audio.ngfiles.com/174000/174962_Chill_Factor_wav.mp3", true);
Song.start();
return;
case 3 :
Song.loadSound("http://audio.ngfiles.com/68000/68241_newgrounds_deep_s.mp3", true);
Song.start();
return;
case 4 :
Song.loadSound("http://audio.ngfiles.com/123000/123607_Landfall.mp3", true);
Song.start();
return;
case 5 :
Song.loadSound("http://audio.ngfiles.com/123000/123365_Classical_melody.mp3", true);
Song.start();
}
};
cycle.onRelease = function () {
rotatesongs = true;
playagainsong = false;
_root.option.cycle.gotoAndStop(1);
_root.option.repeat.gotoAndStop(1);
};
repeat.onRelease = function () {
playagainsong = true;
rotatesongs = false;
_root.option.cycle.gotoAndStop(2);
_root.option.repeat.gotoAndStop(2);
};
fx.onRelease = function () {
_root.soundfx_on = false;
_root.option.fx2.gotoAndStop(2);
_root.option.fx.gotoAndStop(2);
};
fx2.onRelease = function () {
_root.soundfx_on = true;
_root.keystart = true;
_root.option.fx.gotoAndStop(1);
_root.option.fx2.gotoAndStop(1);
};
stopsong.onRelease = function () {
stopAllSounds();
stop_activated = true;
};
playsong.onRelease = function () {
if (stop_activated == true) {
Song.start();
stop_activated = false;
}
};
forward.onRelease = function () {
if (songnumber >= 5) {
songnumber = 0;
}
songnumber = songnumber + 1;
stopAllSounds();
switch (songnumber) {
case 1 :
Song.loadSound("http://audio.ngfiles.com/112000/112527_Vain_Star.mp3", true);
Song.start();
return;
case 2 :
Song.loadSound("http://audio.ngfiles.com/174000/174962_Chill_Factor_wav.mp3", true);
Song.start();
return;
case 3 :
Song.loadSound("http://audio.ngfiles.com/68000/68241_newgrounds_deep_s.mp3", true);
Song.start();
return;
case 4 :
Song.loadSound("http://audio.ngfiles.com/123000/123607_Landfall.mp3", true);
Song.start();
return;
case 5 :
Song.loadSound("http://audio.ngfiles.com/123000/123365_Classical_melody.mp3", true);
Song.start();
}
};
backward.onRelease = function () {
if (songnumber <= 1) {
songnumber = 6;
}
songnumber = songnumber - 1;
stopAllSounds();
switch (songnumber) {
case 1 :
Song.loadSound("http://audio.ngfiles.com/112000/112527_Vain_Star.mp3", true);
Song.start();
return;
case 2 :
Song.loadSound("http://audio.ngfiles.com/174000/174962_Chill_Factor_wav.mp3", true);
Song.start();
return;
case 3 :
Song.loadSound("http://audio.ngfiles.com/68000/68241_newgrounds_deep_s.mp3", true);
Song.start();
return;
case 4 :
Song.loadSound("http://audio.ngfiles.com/123000/123607_Landfall.mp3", true);
Song.start();
return;
case 5 :
Song.loadSound("http://audio.ngfiles.com/123000/123365_Classical_melody.mp3", true);
Song.start();
}
};
}
onClipEvent (enterFrame) {
if (((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((_root.seconds == 1) or (_root.seconds == 2)) or (_root.seconds == 3)) or (_root.seconds == 4)) or (_root.seconds == 5)) or (_root.seconds == 6)) or (_root.seconds == 7)) or (_root.seconds == 8)) or (_root.seconds == 9)) or (_root.seconds == 10)) or (_root.seconds == 11)) or (_root.seconds == 12)) or (_root.seconds == 13)) or (_root.seconds == 14)) or (_root.seconds == 15)) or (_root.seconds == 16)) or (_root.seconds == 17)) or (_root.seconds == 18)) or (_root.seconds == 19)) or (_root.seconds == 20)) or (_root.seconds == 21)) or (_root.seconds == 22)) or (_root.seconds == 23)) or (_root.seconds == 24)) or (_root.seconds == 25)) or (_root.seconds == 26)) or (_root.seconds == 27)) or (_root.seconds == 28)) or (_root.seconds == 29)) or (_root.seconds == 30)) or (_root.seconds == 31)) or (_root.seconds == 32)) or (_root.seconds == 33)) or (_root.seconds == 34)) or (_root.seconds == 35)) or (_root.seconds == 36)) or (_root.seconds == 37)) or (_root.seconds == 38)) or (_root.seconds == 39)) or (_root.seconds == 40)) or (_root.seconds == 41)) or (_root.seconds == 42)) or (_root.seconds == 43)) or (_root.seconds == 44)) or (_root.seconds == 45)) or (_root.seconds == 46)) or (_root.seconds == 47)) or (_root.seconds == 48)) or (_root.seconds == 49)) or (_root.seconds == 50)) or (_root.seconds == 51)) or (_root.seconds == 52)) or (_root.seconds == 53)) or (_root.seconds == 54)) or (_root.seconds == 55)) or (_root.seconds == 56)) or (_root.seconds == 57)) or (_root.seconds == 58)) or (_root.seconds == 59)) or (_root.seconds == 60)) or (_root.seconds == 61)) or (_root.seconds == 62)) or (_root.seconds == 63)) or (_root.seconds == 64)) or (_root.seconds == 65)) or (_root.seconds == 66)) or (_root.seconds == 67)) or (_root.seconds == 68)) or (_root.seconds == 69)) or (_root.seconds == 70)) or (_root.seconds == 71)) or (_root.seconds == 72)) or (_root.seconds == 73)) or (_root.seconds == 74)) or (_root.seconds == 75)) or (_root.seconds == 76)) or (_root.seconds == 77)) or (_root.seconds == 78)) or (_root.seconds == 79)) or (_root.seconds == 80)) or (_root.seconds == 81)) or (_root.seconds == 82)) or (_root.seconds == 83)) or (_root.seconds == 84)) or (_root.seconds == 85)) or (_root.seconds == 86)) or (_root.seconds == 87)) or (_root.seconds == 88)) or (_root.seconds == 89)) or (_root.seconds == 90)) or (_root.seconds == 91)) or (_root.seconds == 92)) or (_root.seconds == 93)) or (_root.seconds == 94)) or (_root.seconds == 95)) or (_root.seconds == 96)) or (_root.seconds == 97)) or (_root.seconds == 98)) or (_root.seconds == 99)) {
_root.timedisplay2 = ("" + _root.seconds) + ".0";
} else {
_root.timedisplay2 = _root.seconds;
}
if (_root.explosionsound and _root.explosionsound2) {
my_sound.start();
_root.explosionsound = false;
_root.explosionsound2 = false;
}
_root.TotalRestartsText.text = _root.totalRestarts;
if (cycle._currentframe == 1) {
rotatesongs = true;
playagainsong = false;
}
if (cycle._currentframe == 2) {
playagainsong = true;
rotatesongs = false;
}
Song.setVolume(_root.volume);
if (switch_options == true) {
if (_root.options._currentframe == 1) {
if (_root.ball_movement) {
if (_root.greenwall_movement == true) {
green_move = true;
_root.greenwall_movement = false;
} else {
green_move = false;
}
if (_root.greenwallright_movement == true) {
greenright_move = true;
_root.greenwallright_movement = false;
} else {
greenright_move = false;
}
if (_root.greenwallleft_movement == true) {
greenleft_move = true;
_root.greenwallleft_movement = false;
} else {
greenleft_move = false;
}
if (_root.greentransparent_movement == true) {
greentransparent_move = true;
_root.greentransparent_movement = false;
} else {
greentransparent_move = false;
}
if (_root.redwall_movement == true) {
red_move = true;
_root.redwall_movement = false;
} else {
red_move = false;
}
if (_root.redwall1_movement == true) {
red1_move = true;
_root.redwall1_movement = false;
} else {
red1_move = false;
}
if (_root.redwall2_movement == true) {
red2_move = true;
_root.redwall2_movement = false;
} else {
red2_move = false;
}
if (_root.redwall3_movement == true) {
red3_move = true;
_root.redwall3_movement = false;
} else {
red3_move = false;
}
if (_root.yellowwall_movement == true) {
yellow_move = true;
_root.yellowwall_movement = false;
} else {
yellow_move = false;
}
if (_root.orangewall_movement == true) {
orange_move = true;
_root.orangewall_movement = false;
} else {
orange_move = false;
}
if (_root.orangewall1_movement == true) {
orange1_move = true;
_root.orangewall1_movement = false;
} else {
orange1_move = false;
}
if (_root.orangewall2_movement == true) {
orange2_move = true;
_root.orangewall2_movement = false;
} else {
orange2_move = false;
}
if (_root.orangewall3_movement == true) {
orange3_move = true;
_root.orangewall3_movement = false;
} else {
orange3_move = false;
}
if (_root.pinkwall_movement == true) {
pink_move = true;
_root.pinkwall_movement = false;
} else {
pink_move = false;
}
if (_root.pinkwall1_movement == true) {
pink1_move = true;
_root.pinkwall1_movement = false;
} else {
pink1_move = false;
}
if (_root.pinkwall2_movement == true) {
pink2_move = true;
_root.pinkwall2_movement = false;
} else {
pink2_move = false;
}
if (_root.pinkwall3_movement == true) {
pink3_move = true;
_root.pinkwall3_movement = false;
} else {
pink3_move = false;
}
if (_root.pinkwall4_movement == true) {
pink4_move = true;
_root.pinkwall4_movement = false;
} else {
pink4_move = false;
}
if (_root.lredwall_movement == true) {
lred_move = true;
_root.lredwall_movement = false;
} else {
lred_move = false;
}
if (_root.lgreenwall_movement == true) {
lgreen_move = true;
_root.lgreenwall_movement = false;
} else {
lgreen_move = false;
}
if (_root.aquawall_movement == true) {
aqua_move = true;
_root.aquawall_movement = false;
} else {
aqua_move = false;
}
if (_root.aquawall1_movement == true) {
aqua1_move = true;
_root.aquawall1_movement = false;
} else {
aqua1_move = false;
}
if (_root.aquawall2_movement == true) {
aqua2_move = true;
_root.aquawall2_movement = false;
} else {
aqua2_move = false;
}
if (_root.aquatransparent_movement == true) {
aquatransparent_move = true;
_root.aquatransparent_movement = false;
} else {
aquatransparent_move = false;
}
if (_root.bluewall_movement == true) {
blue_move = true;
_root.bluewall_movement = false;
} else {
blue_move = false;
}
if (_root.bluewall1_movement == true) {
blue1_move = true;
_root.bluewall1_movement = false;
} else {
blue1_move = false;
}
if (_root.bluewall2_movement == true) {
blue2_move = true;
_root.bluewall2_movement = false;
} else {
blue2_move = false;
}
if (_root.bluetransparent_movement == true) {
bluetransparent_move = true;
_root.bluewalltransparent_movement = false;
} else {
bluetransparent_move = false;
}
_root.ball_movement = false;
this._x = Stage.width / 2;
this._y = Stage.height / 2;
_root.w_is_DOWN = false;
_root.q_is_DOWN = false;
_root.n_is_DOWN = false;
_root.b_is_DOWN = false;
_root.options.gotoAndStop(2);
}
} else if (_root.options._currentframe == 2) {
this._x = 1300;
this._y = 275;
if (green_move) {
_root.greenwall_movement = true;
} else {
_root.greenwall_movement = false;
}
if (greenleft_move) {
_root.greenwallleft_movement = true;
} else {
_root.greenwallleft_movement = false;
}
if (greenright_move) {
_root.greenwallright_movement = true;
} else {
_root.greenwallright_movement = false;
}
if (greentransparent_move) {
_root.greentransparent_movement = true;
} else {
_root.greentransparent_movement = false;
}
if (red_move) {
_root.redwall_movement = true;
} else {
_root.redwall_movement = false;
}
if (red1_move) {
_root.redwall1_movement = true;
} else {
_root.redwall1_movement = false;
}
if (red2_move) {
_root.redwall2_movement = true;
} else {
_root.redwall2_movement = false;
}
if (red3_move) {
_root.redwall3_movement = true;
} else {
_root.redwall3_movement = false;
}
if (lgreen_move) {
_root.lgreenwall_movement = true;
} else {
_root.lgreenwall_movement = false;
}
if (lred_move) {
_root.lredwall_movement = true;
} else {
_root.lredwall_movement = false;
}
if (yellow_move) {
_root.yellowwall_movement = true;
} else {
_root.yellowwall_movement = false;
}
if (orange_move) {
_root.orangewall_movement = true;
} else {
_root.orangewall_movement = false;
}
if (orange1_move) {
_root.orangewall1_movement = true;
} else {
_root.orangewall1_movement = false;
}
if (orange2_move) {
_root.orangewall2_movement = true;
} else {
_root.orangewall2_movement = false;
}
if (orange3_move) {
_root.orangewall3_movement = true;
} else {
_root.orangewall3_movement = false;
}
if (blue_move) {
_root.bluewall_movement = true;
} else {
_root.bluewall_movement = false;
}
if (blue1_move) {
_root.bluewall1_movement = true;
} else {
_root.bluewall1_movement = false;
}
if (blue2_move) {
_root.bluewall2_movement = true;
} else {
_root.bluewall2_movement = false;
}
if (bluetransparent_move) {
_root.bluetransparent_movement = true;
} else {
_root.bluetransparent_movement = false;
}
if (aqua_move) {
_root.aquawall_movement = true;
} else {
_root.aquawall_movement = false;
}
if (aqua1_move) {
_root.aquawall1_movement = true;
} else {
_root.aquawall1_movement = false;
}
if (aqua2_move) {
_root.aquawall2_movement = true;
} else {
_root.aquawall2_movement = false;
}
if (aquatransparent_move) {
_root.aquatransparent_movement = true;
} else {
_root.aquatransparent_movement = false;
}
if (pink_move) {
_root.pinkwall_movement = true;
} else {
_root.pinkwall_movement = false;
}
if (pink1_move) {
_root.pinkwall1_movement = true;
} else {
_root.pinkwall1_movement = false;
}
if (pink2_move) {
_root.pinkwall2_movement = true;
} else {
_root.pinkwall2_movement = false;
}
if (pink3_move) {
_root.pinkwall3_movement = true;
} else {
_root.pinkwall3_movement = false;
}
if (pink4_move) {
_root.pinkwall4_movement = true;
} else {
_root.pinkwall4_movement = false;
}
_root.ball_movement = true;
_root.options.gotoAndStop(1);
}
switch_options = false;
}
returnBack.onRelease = function () {
switch_options = true;
};
if (Key.isDown(80)) {
p_is_DOWN = true;
}
if (p_is_DOWN) {
if (!Key.isDown(80)) {
if (_root._currentframe != 3) {
switch_options = true;
}
p_is_DOWN = false;
}
}
if ((_root._currentframe != 3) && (_root.menuVolumeMoved == false)) {
_root.option.mySlider.dragger._x = _root.sliderx;
_root.menuVolumeMoved = true;
}
_root.sliderx2 = _root.option.mySlider.dragger._x;
if (_root.soundfx_on) {
if (_root.soundstart == true) {
my_sound8.start();
_root.soundstart = false;
}
if (_root.smallstart == true) {
my_sound5.start();
_root.smallstart = false;
}
if (_root.transstart == true) {
my_sound6.start();
_root.transstart = false;
}
if (_root.reversestart == true) {
my_sound7.start();
_root.reversestart = false;
}
if (_root.keystart == true) {
my_sound9.start();
_root.keystart = false;
}
if (_root.switchstart == true) {
my_sound10.start();
_root.switchstart = false;
}
if (_root.stopstart == true) {
my_sound11.start();
_root.stopstart = false;
}
}
}
Frame 4
function restartLevel() {
_root.scoresubmit1 = savefile.data.scoresubmit1;
savefile.flush();
soundstart = false;
small = false;
if (((((((((((((((((((((((((((((var2 != true) and (var3 != true)) and (var4 != true)) and (var5 != true)) and (var6 != true)) and (var7 != true)) and (var8 != true)) and (var9 != true)) and (var10 != true)) and (var11 != true)) and (var12 != true)) and (var13 != true)) and (var14 != true)) and (var15 != true)) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var1 = true;
}
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = true;
radius = ball1._height / 2;
greenwall_movement = false;
ball_movement = true;
finisher = false;
my_sound2 = new Sound();
my_sound2.attachSound("keysound2");
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
greenkey._x = 200;
greenkey._y = 135;
greenwall._x = 500;
greenwall._y = 384.6;
ball1._x = 200;
ball1._y = 460;
ball2._x = 500;
ball2._y = 460;
finish._x = 500;
finish._y = 95.8;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
restartLevel();
_root.option.meter.gotoAndStop(1);
nextFRAME.onPress = function () {
};
ball1.onEnterFrame = function () {
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 1000;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (scoresubmit1) {
scoresubmit = false;
} else if (scoresubmit1 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 1) or scoresubmit) {
level1_best_time = seconds;
scoresubmit1 = true;
savefile.data.scoresubmit1 = _root.scoresubmit1;
savefile.flush();
}
if (seconds < level1_best_time) {
level1_best_time = seconds;
}
savefile.data.level1_best_time = _root.level1_best_time;
savefile.flush();
if (_root.score <= 2) {
_root.score = 2;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(1);
_root.win.meter.gotoAndStop(2);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
SPACE_possible = true;
gotoAndStop ("l3");
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var1) {
q_works = false;
w_works = false;
} else {
w_works = true;
q_works = false;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
if (score == 30) {
gotoAndStop ("l27");
}
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l3");
}
w_is_DOWN = false;
}
}
_root.TotalRestartsText.text = totalRestarts;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (greenwall_movement) {
greenwall._x = greenwall._x + 2;
}
if (greenwall._x > (Stage.width + (greenwall._width / 2))) {
greenwall._x = 1000;
greenwall_movement = false;
}
};
Instance of Symbol 1257 MovieClip "ball1" in Frame 4
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 5
function restartLevel() {
radius = ball1._height / 2;
SPACE_possible = true;
greenwall_movement = false;
pinkwall_movement = false;
orangewall_movement = false;
ball_movement = true;
finisher = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
pinkkey._x = 200;
pinkkey._y = 460;
pinkwall._x = 500;
pinkwall._y = 168;
orangekey._x = 500;
orangekey._y = 286.1;
orangewall._x = 200;
orangewall._y = 384.6;
greenwall._x = 500;
greenwall._y = 384.6;
greenkey._x = 200;
greenkey._y = 95.8;
ball1._x = 200;
ball1._y = 286.1;
ball2._x = 500;
ball2._y = 460;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 500;
finish._y = 95.8;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(2);
restartLevel();
_root.scoresubmit2 = savefile.data.scoresubmit2;
savefile.flush();
soundstart = false;
small = false;
if ((((((((((((((((((((((((((((var3 != true) and (var4 != true)) and (var5 != true)) and (var6 != true)) and (var7 != true)) and (var8 != true)) and (var9 != true)) and (var10 != true)) and (var11 != true)) and (var12 != true)) and (var13 != true)) and (var14 != true)) and (var15 != true)) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var2 = true;
}
var1 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
youwin.onPress = function () {
gotoAndStop ("l25");
};
ball1.onEnterFrame = function () {
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 1000;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (this.hitTest(pinkkey)) {
keystart = true;
pinkkey._x = 1000;
pinkwall_movement = true;
_root.ball1.scan.gotoAndStop(5);
}
if (this.hitTest(orangekey)) {
keystart = true;
orangekey._x = 1000;
orangewall_movement = true;
_root.ball1.scan.gotoAndStop(6);
}
if (scoresubmit2) {
scoresubmit = false;
} else if (scoresubmit2 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 2) or scoresubmit) {
level2_best_time = seconds;
scoresubmit2 = true;
savefile.data.scoresubmit2 = _root.scoresubmit2;
savefile.flush();
}
if (seconds < level2_best_time) {
level2_best_time = seconds;
}
savefile.data.level2_best_time = _root.level2_best_time;
savefile.flush();
if (_root.score <= 3) {
_root.score = 3;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(2);
_root.win.meter.gotoAndStop(3);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l25");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var2) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l2");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l25");
}
w_is_DOWN = false;
}
}
_root.TotalRestartsText.text = totalRestarts;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
restartLevel();
totalRestarts = totalRestarts + 1;
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
restartLevel();
totalRestarts = totalRestarts + 1;
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (greenwall_movement) {
greenwall._x = greenwall._x + 2;
}
if (greenwall._x > (Stage.width + (greenwall._width / 2))) {
greenwall._x = 1000;
greenwall_movement = false;
}
if (pinkwall_movement) {
pinkwall._x = pinkwall._x + 2;
}
if (pinkwall._x > (Stage.width + (pinkwall._width / 2))) {
pinkwall._x = 1000;
pinkwall_movement = false;
}
if (orangewall_movement) {
orangewall._x = orangewall._x - 2;
}
if (orangewall._x < (-(orangewall._width / 2))) {
orangewall._x = 1000;
orangewall_movement = false;
}
};
Instance of Symbol 1277 MovieClip "ball1" in Frame 5
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 6
function restartLevel() {
numeral = 0;
_root.scoresubmit7 = savefile.data.scoresubmit7;
savefile.flush();
soundstart = false;
small = false;
explosionsound2 = false;
if (((((((((((((((((((((((var8 != true) and (var9 != true)) and (var10 != true)) and (var11 != true)) and (var12 != true)) and (var13 != true)) and (var14 != true)) and (var15 != true)) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var7 = true;
}
var6 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var7) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
playedSound = true;
radius = ball1._height / 2;
SPACE_possible = true;
greenwall_movement = false;
orangewall_movement = false;
ball_location = true;
gray_is_hit_green = false;
smoosh = false;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
ball_movement = true;
finisher = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
greenkey._x = 269;
greenkey._y = 479.2;
ball1._x = 124.2;
ball1._y = 479.2;
ball2._x = 576.3;
ball2._y = 480.2;
orangekey._x = 271.1;
orangekey._y = 285.9;
blackwall._x = 163;
blackwall._y = 429.1;
greenwall._x = 637.6;
greenwall._y = 429.1;
orangewall._x = 500;
orangewall._y = 361.4;
youwin._x = 10000;
winningscreen._x = 1000;
finsih._x = 500;
finish._y = 95.8;
decoy._x = 10000;
decoy._y = 10000;
decoy2._x = 10000;
decoy2._y = 10000;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function adding() {
numeral = numeral + 1;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_green == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(3);
_root.decoy2.gotoAndStop(2);
}
if (gray_is_hit_green == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(7);
restartLevel();
my_sound2 = new Sound();
my_sound2.attachSound("EXPLOSION");
youwin.onPress = function () {
gotoAndStop ("l10");
};
ball1.onEnterFrame = function () {
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 100000 /* 0x0186A0 */;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (this.hitTest(orangekey)) {
keystart = true;
orangekey._x = 100000 /* 0x0186A0 */;
orangewall_movement = true;
_root.ball1.scan.gotoAndStop(6);
}
if (greenwall.hitTest(middlewall)) {
greenwall_movement = false;
soundstart = true;
greenwall._x = ((middlewall._x + (middlewall._width / 2)) + (greenwall._width / 2)) + 0.1;
}
if (scoresubmit7) {
scoresubmit = false;
} else if (scoresubmit7 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 7) or scoresubmit) {
level7_best_time = seconds;
scoresubmit7 = true;
savefile.data.scoresubmit7 = _root.scoresubmit7;
savefile.flush();
}
if (seconds < level7_best_time) {
level7_best_time = seconds;
}
savefile.data.level7_best_time = _root.level7_best_time;
savefile.flush();
if (_root.score <= 8) {
_root.score = 8;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(7);
_root.win.meter.gotoAndStop(8);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l10");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var7) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l5");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l10");
}
w_is_DOWN = false;
}
}
currentf = _root.ball1.scan._currentframe;
_root.TotalRestartsText.text = totalRestarts;
ball2x = ball2._x;
ballx = ball1._x;
decoyframe = decoy._currentframe;
decoy2frame = decoy2._currentframe;
decoyx = decoy._x;
decoyinside2 = _root.decoy.inside2._currentframe;
decoyinside3 = _root.decoy.inside3._currentframe;
decoyalpha = decoy._alpha;
if (ball_location == false) {
adding();
}
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
restartLevel();
totalRestarts = totalRestarts + 1;
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
restartLevel();
totalRestarts = totalRestarts + 1;
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (greenwall_movement) {
greenwall._x = greenwall._x - 1;
}
if (orangewall_movement) {
orangewall._x = orangewall._x + 2;
}
if (orangewall._x > (Stage.width + (orangewall._width / 2))) {
orangewall._x = 1000;
orangewall_movement = false;
}
differencegreen = ((greenwall._x - (greenwall._width / 2)) - (ball1._width / 2)) - ball1._x;
differencegreen2 = ((greenwall._x - (greenwall._width / 2)) - (ball2._width / 2)) - ball2._x;
distance_between_middlewall_and_ball = Math.abs(((ball1._x - middlewall._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_middlewall_and_ball2 = Math.abs(((ball2._x - middlewall._x) - (middlewall._width / 2)) - (ball2._width / 2));
distance_y_between_greenwall_and_ball = Math.abs(greenwall._y - ball1._y);
distance_y_between_greenwall_and_ball2 = Math.abs(greenwall._y - ball2._y);
if ((((greenwall_movement == true) and (differencegreen <= 0.2)) and (differencegreen >= -8)) and (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) {
ball1._x = ((greenwall._x - (greenwall._width / 2)) - (ball1._width / 2)) - 0.2;
ball1_is_pushed_by_green_wall = true;
} else {
ball1_is_pushed_by_green_wall = false;
}
if ((((greenwall_movement == true) and (differencegreen2 <= 0.2)) and (differencegreen2 >= -8)) and (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2)))) {
ball2._x = ((greenwall._x - (greenwall._width / 2)) - (ball2._width / 2)) - 0.2;
ball2_is_pushed_by_green_wall = true;
} else {
ball2_is_pushed_by_green_wall = false;
}
if (((((differencegreen <= 0.5) && (differencegreen >= -1)) && (distance_between_middlewall_and_ball <= 1)) && (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) or ((((differencegreen2 <= 0.5) && (differencegreen2 >= -1)) && (distance_between_middlewall_and_ball2 <= 0.5)) && (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2))))) {
green_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
my_sound2.start();
if (ball1_xlocation < (Stage.width / 2)) {
black_is_hit_green = true;
} else if (ball1_xlocation > (Stage.width / 2)) {
gray_is_hit_green = true;
}
ball_locator();
}
};
Instance of Symbol 1297 MovieClip "ball1" in Frame 6
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blackwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blackwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blackwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blackwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blackwall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 7
function restartLevel() {
_root.scoresubmit6 = savefile.data.scoresubmit6;
savefile.flush();
soundstart = false;
small = false;
savefile.data.score = _root.score;
savefile.flush();
if ((((((((((((((((((((((((var7 != true) and (var8 != true)) and (var9 != true)) and (var10 != true)) and (var11 != true)) and (var12 != true)) and (var13 != true)) and (var14 != true)) and (var15 != true)) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var6 = true;
}
var5 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
greenwall_movement = false;
pinkwall_movement = false;
ball_location = true;
gray_is_hit = false;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
ball_movement = true;
finisher = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
greenkey._x = 570.5;
greenkey._y = 74.6;
pinkkey._x = 200;
pinkkey._y = 86.9;
pinkstop._x = 570.5;
pinkstop._y = 202.9;
pinkwall._x = 509.4;
pinkwall._y = 356.6;
ball1._x = 140.1;
ball1._y = 473.8;
ball2._x = 434.8;
ball2._y = 473.8;
greenwall._x = 259;
greenwall._y = 151;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 261.2;
finish._y = 463.4;
blackwallleftsidemiddle._x = 200;
blackwallleftsidemiddle._y = 315.6;
blackwallrightsidetop._x = 542.7;
blackwallrightsidetop._y = 253.2;
blackwallrightsidemiddle._x = 435.7;
blackwallrightsidemiddle._y = 355.3;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(6);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l4");
};
ball1.onEnterFrame = function () {
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 100000 /* 0x0186A0 */;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (this.hitTest(blackwallleftsidemiddle)) {
ball1._x = 1000;
ball2._x = 1000;
}
if (ball2.hitTest(blackwallleftsidemiddle)) {
ball1._x = 1000;
ball2._x = 1000;
}
if (this.hitTest(pinkkey)) {
keystart = true;
pinkkey._x = 100000 /* 0x0186A0 */;
pinkwall_movement = true;
_root.ball1.scan.gotoAndStop(5);
}
if (this.hitTest(pinkstop)) {
stopstart = true;
pinkstop._x = 1000;
pinkwall_movement = false;
_root.ball1.scan.gotoAndStop(11);
}
if (scoresubmit6) {
scoresubmit = false;
} else if (scoresubmit6 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 6) or scoresubmit) {
level6_best_time = seconds;
scoresubmit6 = true;
savefile.data.scoresubmit6 = _root.scoresubmit6;
savefile.flush();
}
if (seconds < level6_best_time) {
level6_best_time = seconds;
}
savefile.data.level6_best_time = _root.level6_best_time;
savefile.flush();
if (_root.score <= 7) {
_root.score = 7;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(6);
_root.win.meter.gotoAndStop(7);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l4");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var6) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l7");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l4");
}
w_is_DOWN = false;
}
}
_root.TotalRestartsText.text = totalRestarts;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
restartLevel();
totalRestarts = totalRestarts + 1;
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
restartLevel();
totalRestarts = totalRestarts + 1;
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (greenwall_movement) {
greenwall._x = greenwall._x + 0.3;
}
if (greenwall._x > 342.9) {
greenwall_movement = false;
}
if (pinkwall_movement) {
pinkwall._x = pinkwall._x - 0.6;
}
if (pinkwall._x < 309.4) {
pinkwall_movement = false;
soundstart = true;
pinkwall._x = 309.4;
}
};
Instance of Symbol 1311 MovieClip "ball1" in Frame 7
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blackwallrightsidemiddle)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blackwallrightsidemiddle.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blackwallrightsidemiddle.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blackwallrightsidemiddle.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blackwallrightsidemiddle.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blackwallleftsidemiddle)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blackwallleftsidemiddle.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blackwallleftsidemiddle.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blackwallleftsidemiddle.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blackwallleftsidemiddle.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blackwallrightsidetop)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blackwallrightsidetop.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blackwallrightsidetop.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blackwallrightsidetop.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blackwallrightsidetop.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 8
function restartLevel() {
_root.scoresubmit4 = savefile.data.scoresubmit4;
savefile.flush();
soundstart = false;
small = false;
if ((((((((((((((((((((((((((var5 != true) and (var6 != true)) and (var7 != true)) and (var8 != true)) and (var9 != true)) and (var10 != true)) and (var11 != true)) and (var12 != true)) and (var13 != true)) and (var14 != true)) and (var15 != true)) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var4 = true;
}
var3 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
orangewall_movement = false;
ball_movement = true;
finisher = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
orangekey._x = 180.1;
orangekey._y = 80;
orangewall._x = 69.4;
orangewall._y = 350;
orangestop._x = 500;
orangestop._y = 90;
ball1._x = 132.1;
ball1._y = 80;
ball2._x = 500;
ball2._y = 465.8;
youwin._x = 10000;
winningscreen._x = 1000;
if (_root.orangewall.thingy._x == -71) {
_root.orangewall.thingy._x = -72;
}
finish._x = 200;
finish._y = 454.2;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
pressp._x = 500;
pressp._y = 332;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(4);
restartLevel();
youwin.onPress = function () {
nextFrame();
gotoAndStop;
};
ball1.onEnterFrame = function () {
if (this.hitTest(orangekey)) {
keystart = true;
orangekey._x = 1000;
orangewall_movement = true;
_root.ball1.scan.gotoAndStop(6);
}
if (this.hitTest(orangestop)) {
stopstart = true;
orangewall_movement = false;
orangestop._x = 1000;
_root.ball1.scan.gotoAndStop(11);
}
if (scoresubmit4) {
scoresubmit = false;
} else if (scoresubmit4 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 4) or scoresubmit) {
level4_best_time = seconds;
scoresubmit4 = true;
savefile.data.scoresubmit4 = _root.scoresubmit4;
savefile.flush();
}
if (seconds < level4_best_time) {
level4_best_time = seconds;
}
savefile.data.level4_best_time = _root.level4_best_time;
savefile.flush();
if (_root.score <= 5) {
_root.score = 5;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(4);
_root.win.meter.gotoAndStop(5);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l7");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
thingyx = _root.orangewall.thingy._x;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var4) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l25");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l7");
}
w_is_DOWN = false;
}
}
_root.TotalRestartsText.text = totalRestarts;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
restartLevel();
totalRestarts = totalRestarts + 1;
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
restartLevel();
totalRestarts = totalRestarts + 1;
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (orangewall_movement) {
orangewall._x = orangewall._x + 1.7;
}
if (orangewall._x >= 200) {
orangewall_movement = false;
soundstart = true;
orangewall._x = ((middlewall._x - (middlewall._width / 2)) - (orangewall._width / 2)) - 0.1;
_root.orangewall.thingy._x = _root.orangewall.thingy._x + 1;
}
};
Instance of Symbol 1375 MovieClip "ball1" in Frame 8
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blackwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blackwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blackwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blackwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blackwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 9
function restartLevel() {
_root.scoresubmit5 = savefile.data.scoresubmit5;
savefile.flush();
soundstart = false;
small = false;
if (((((((((((((((((((((((((var6 != true) and (var7 != true)) and (var8 != true)) and (var9 != true)) and (var10 != true)) and (var11 != true)) and (var12 != true)) and (var13 != true)) and (var14 != true)) and (var15 != true)) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var5 = true;
}
var4 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
orangewall_movement = false;
greenwall_movement = false;
pinkwall_movement = false;
ball_movement = true;
finisher = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
orangekey._x = 138.4;
orangekey._y = 88.7;
orangewall._x = 496.9;
orangewall._y = 87.3;
greenkey._x = 438.8;
greenkey._y = 354.1;
greenwall._x = 69.3;
greenwall._y = 149.7;
greenstop._x = 125.8;
greenstop._y = 354.1;
pinkkey._x = 438.8;
pinkkey._y = 243.4;
pinkwall._x = 169.3;
pinkwall._y = 461.6;
rightsidewall._x = 537.9;
rightsidewall._y = 276;
leftsidewall._x = 230.3;
leftsidewall._y = 407.7;
ball1._x = 265.8;
ball1._y = 466;
ball2._x = 567;
ball2._y = 466;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 561.2;
finish._y = 86.7;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(5);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l5");
};
ball1.onEnterFrame = function () {
if (this.hitTest(orangekey)) {
keystart = true;
orangekey._x = 1000;
orangewall_movement = true;
_root.ball1.scan.gotoAndStop(6);
}
if (this.hitTest(pinkkey)) {
keystart = true;
pinkkey._x = 1000;
pinkwall_movement = true;
_root.ball1.scan.gotoAndStop(5);
}
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 1000;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (this.hitTest(greenstop)) {
stopstart = true;
greenwall_movement = false;
greenstop._x = 1000;
_root.ball1.scan.gotoAndStop(11);
}
if (scoresubmit5) {
scoresubmit = false;
} else if (scoresubmit5 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 5) or scoresubmit) {
level5_best_time = seconds;
scoresubmit5 = true;
savefile.data.scoresubmit5 = _root.scoresubmit5;
savefile.flush();
}
if (seconds < level5_best_time) {
level5_best_time = seconds;
}
savefile.data.level5_best_time = _root.level5_best_time;
savefile.flush();
if (_root.score <= 6) {
_root.score = 6;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(5);
_root.win.meter.gotoAndStop(6);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l5");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var5) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l6");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l5");
}
w_is_DOWN = false;
}
}
_root.TotalRestartsText.text = totalRestarts;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
restartLevel();
totalRestarts = totalRestarts + 1;
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
restartLevel();
totalRestarts = totalRestarts + 1;
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (greenwall_movement) {
greenwall._x = greenwall._x + 0.4;
}
if (greenwall._x > 200) {
greenwall_movement = false;
greenwall._x = 200;
soundstart = true;
}
if (orangewall_movement) {
orangewall._y = orangewall._y - 1;
}
if (orangewall._y < 0) {
orangewall_movement = false;
}
if (pinkwall_movement) {
pinkwall._y = pinkwall._y + 1;
}
if (pinkwall._y > 610.1) {
pinkwall_movement = false;
}
};
Instance of Symbol 1257 MovieClip "ball1" in Frame 9
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightsidewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightsidewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightsidewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightsidewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightsidewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftsidewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftsidewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftsidewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftsidewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftsidewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 10
function restartLevel() {
_root.scoresubmit10 = savefile.data.scoresubmit10;
savefile.flush();
soundstart = false;
small = false;
if ((((((((((((((((((((var11 != true) and (var12 != true)) and (var13 != true)) and (var14 != true)) and (var15 != true)) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var10 = true;
}
var9 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
greenwall_movement = false;
pinkwall_movement = false;
orangewall_movement = false;
bluewall1_movement = false;
bluewall2_movement = false;
fastkey_on = false;
slowkey_on = false;
_root.fastkey.gotoAndStop(1);
_root.slowkey.gotoAndStop(1);
orange_hit = false;
gray_is_hit_orange = false;
black_is_hit_orange = false;
ball_location = true;
ball_movement = true;
finisher = false;
SPACE_possible = true;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
pinkkey._x = 437.3;
pinkkey._y = 299.4;
pinkwall._x = 138.2;
pinkwall._y = 173.2;
orangekey._x = 134.9;
orangekey._y = 100;
orangewall._x = 659.9;
orangewall._y = 259.7;
greenwall._x = 500;
greenwall._y = 359.9;
greenkey._x = 134.9;
greenkey._y = 360.1;
ball1._x = 134.9;
ball1._y = 474.1;
ball2._x = 564.9;
ball2._y = 474.1;
bluekey._x = 208.2;
bluekey._y = 474.1;
bluewall1._x = 506.3;
bluewall1._y = 450.8;
bluewall2._x = 438.8;
bluewall2._y = 46.3;
fastkey._x = 437.3;
fastkey._y = 474.1;
slowkey._x = 263.3;
slowkey._y = 420.5;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 138.8;
finish._y = 236.4;
decoy._x = 10000;
decoy._y = 10000;
decoy2._x = 10000;
decoy2._y = 10000;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function blue_green_hit() {
green_moving_blue_not_touching = true;
}
function blue_green_hit2() {
green_moving_blue_touching = true;
}
function blue_green_hit3() {
green_not_moving_blue_touching = true;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_orange == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
}
if (gray_is_hit_orange == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(10);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l18");
};
ball1.onEnterFrame = function () {
if (bluewall2.hitTest(greenwall)) {
if (greenwall_movement == true) {
bluewall2_movement = false;
greenwall_movement = false;
soundstart = true;
bluewall2._y = ((greenwall._y - (greenwall._height / 2)) - (bluewall2._height / 2)) - 0.1;
} else {
bluewall2_movement = false;
soundstart = true;
bluewall2._y = ((greenwall._y - (greenwall._height / 2)) - (bluewall2._height / 2)) - 0.1;
}
}
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 1000;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (this.hitTest(pinkkey)) {
keystart = true;
pinkkey._x = 1000;
pinkwall_movement = true;
_root.ball1.scan.gotoAndStop(5);
}
if (this.hitTest(orangekey)) {
keystart = true;
orangekey._x = 1000;
orangewall_movement = true;
_root.ball1.scan.gotoAndStop(6);
}
if (this.hitTest(bluekey)) {
keystart = true;
bluekey._x = 1000;
bluewall1_movement = true;
bluewall2_movement = true;
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndPlay(1);
}
if (this.hitTest(fastkey)) {
blockers._alpha = 50;
if (slowkey_on) {
fastkey_on = false;
} else {
fastkey._x = 1000;
fastkey_on = true;
_root.slowkey.gotoAndStop(2);
}
}
if (this.hitTest(_root.slowkey.reddot)) {
blockers._alpha = 50;
if (fastkey_on) {
slowkey_on = false;
} else {
slowkey._x = 1000;
slowkey_on = true;
_root.fastkey.gotoAndStop(2);
}
}
if (scoresubmit10) {
scoresubmit = false;
} else if (scoresubmit10 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 10) or scoresubmit) {
level10_best_time = seconds;
scoresubmit10 = true;
savefile.data.scoresubmit10 = _root.scoresubmit10;
savefile.flush();
}
if (seconds < level10_best_time) {
level10_best_time = seconds;
}
savefile.data.level10_best_time = _root.level10_best_time;
savefile.flush();
if (_root.score <= 11) {
_root.score = 11;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(10);
_root.win.meter.gotoAndStop(11);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l18");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var10) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l24");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l18");
}
w_is_DOWN = false;
}
}
_root.TotalRestartsText.text = totalRestarts;
currentframe = _root.decoy._currentframe;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (greenwall_movement) {
greenwall._x = greenwall._x + 0.15;
}
if (pinkwall_movement) {
pinkwall._x = pinkwall._x - 1;
}
if (orangewall_movement) {
orangewall._x = orangewall._x - 4;
}
if (bluewall1_movement) {
bluewall1._y = bluewall1._y + 0.8;
}
if (bluewall2_movement) {
bluewall2._y = bluewall2._y + 0.5;
}
if (orangewall._x < 607.4) {
orangewall_movement = false;
bluewall2_movement = false;
soundstart = true;
orangewall._x = 607.4;
}
differenceblue2 = ((ball1._y - bluewall2._y) - (bluewall2._height / 2)) - (ball1._height / 2);
differenceblue22 = ((ball2._y - bluewall2._y) - (bluewall2._height / 2)) - (ball2._height / 2);
distance_x_between_bluewall2_and_ball = Math.abs(bluewall2._x - ball1._x);
distance_x_between_bluewall2_and_ball2 = Math.abs(bluewall2._x - ball2._x);
if ((((bluewall2_movement == true) and (differenceblue2 <= 0.2)) and (differenceblue2 >= -8)) and (distance_x_between_bluewall2_and_ball < ((ball1._width / 2) + (bluewall2._width / 2)))) {
ball1._y = ((bluewall2._y + (bluewall2._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((bluewall2_movement == true) and (differenceblue22 <= 0.2)) and (differenceblue22 >= -8)) and (distance_x_between_bluewall2_and_ball2 < ((ball2._width / 2) + (bluewall2._width / 2)))) {
ball2._y = ((bluewall2._y + (bluewall2._height / 2)) + (ball2._height / 2)) + 0.2;
}
differenceorange = ((orangewall._x - ball1._x) - (orangewall._width / 2)) - (ball1._width / 2);
differenceorange2 = ((orangewall._x - ball2._x) - (orangewall._width / 2)) - (ball2._width / 2);
distance_between_bluewall_and_ball = Math.abs(((ball1._x - bluewall2._x) - (bluewall2._width / 2)) - (ball1._width / 2));
distance_between_bluewall_and_ball2 = Math.abs(((ball2._x - bluewall2._x) - (bluewall2._width / 2)) - (ball2._width / 2));
distance_y_between_orangewall_and_ball = Math.abs(orangewall._y - ball1._y);
distance_y_between_orangewall_and_ball2 = Math.abs(orangewall._y - ball2._y);
if ((((orangewall_movement == true) and (differenceorange <= 0.2)) and (differenceorange >= -8)) and (distance_y_between_orangewall_and_ball < ((ball1._height / 2) + (orangewall._height / 2)))) {
ball1._x = ((orangewall._x - (orangewall._width / 2)) - (ball1._width / 2)) - 1;
}
if ((((orangewall_movement == true) and (differenceorange2 <= 0.2)) and (differenceorange2 >= -8)) and (distance_y_between_orangewall_and_ball2 < ((ball2._height / 2) + (orangewall._height / 2)))) {
ball2._x = ((orangewall._x - (orangewall._width / 2)) - (ball2._width / 2)) - 1;
}
if (((((differenceorange <= 0.5) && (differenceorange >= -10)) && (distance_between_bluewall_and_ball <= 2)) && (distance_y_between_orangewall_and_ball < ((ball1._height / 2) + (orangewall._height / 2)))) or ((((differenceorange2 <= 0.5) && (differenceorange2 >= -10)) && (distance_between_bluewall_and_ball2 <= 2)) && (distance_y_between_orangewall_and_ball2 < ((ball2._height / 2) + (orangewall._height / 2))))) {
orange_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (orange_hit == true) {
gray_is_hit_orange = true;
black_is_hit_orange = false;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (orange_hit == true) {
black_is_hit_orange = true;
gray_is_hit_orange = false;
}
}
ball_locator();
}
};
Instance of Symbol 1257 MovieClip "ball1" in Frame 10
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r3.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
if (_root.fastkey_on) {
move(-10, 0);
} else if (_root.slowkey_on) {
move(-0.8, 0);
} else {
move(-5, 0);
}
}
if (Key.isDown(39)) {
if (_root.fastkey_on) {
move(10, 0);
} else if (_root.slowkey_on) {
move(0.8, 0);
} else {
move(5, 0);
}
}
if (Key.isDown(38)) {
if (_root.fastkey_on) {
move(0, -10);
} else if (_root.slowkey_on) {
move(0, -0.8);
} else {
move(0, -5);
}
}
if (Key.isDown(40)) {
if (_root.fastkey_on) {
move(0, 10);
} else if (_root.slowkey_on) {
move(0, 0.8);
} else {
move(0, 5);
}
}
}
}
Frame 11
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
stop();
radius = ball1._height / 2;
SPACE_possible = true;
bluestop_canhit = false;
greenstop1_canhit = false;
orangestop_canhit = false;
pinkwall_movement = false;
bottomactivate = false;
middleactivate = false;
topactivate = false;
_root.bottom1.gotoAndStop(1);
_root.middle1.gotoAndStop(1);
_root.top1.gotoAndStop(1);
pinkkey._x = 271;
pinkkey._y = 74.5;
orangekey._x = 271;
orangekey._y = 286.1;
orangestop._x = 271;
orangestop._y = 233.2;
greenkey._x = 271;
greenkey._y = 180.3;
greenstop1._x = 271;
greenstop1._y = 127.4;
bluekey._x = 271;
bluekey._y = 391.9;
bluestop._x = 271;
bluestop._y = 339;
orangewall._x = 500;
orangewall._y = 277.8;
bluewall._x = 500;
bluewall._y = 376.7;
greenwall._x = 500;
greenwall._y = 178.8;
pinkwall._x = 500;
pinkwall._y = 439.1;
ball1._x = 133.4;
ball1._y = 462;
ball2._x = 575.6;
ball2._y = 477.6;
top1._x = 526.7;
top1._y = 177;
middle1._x = 491.6;
middle1._y = 276.9;
bottom1._x = 325.4;
bottom1._y = 376.7;
leftside._x = 169;
leftside._y = 232.7;
rightside._x = 450.3;
rightside._y = 85;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 560;
finish._y = 84.5;
youwin.onPress = function () {
nextFrame();
gotoAndStop;
};
ball1.onEnterFrame = function () {
if (this.hitTest(bluekey)) {
bluekey._x = 1000;
_root.blue_transparent2.gotoAndStop(2);
_root.blueinvisible1.gotoAndStop(2);
_root.blueinvisible2.gotoAndStop(2);
_root.bluewall.gotoAndStop(2);
}
blueframe1 = _root.bluewall.inside._currentframe;
blueframe2 = _root.blue_transparent2.inside._currentframe;
blueframe3 = _root.blueinvisible1.inside._currentframe;
blueframe4 = _root.blueinvisible2.inside._currentframe;
if (this.hitTest(bluestop) && (bluestop_canhit == true)) {
_root.bluewall.inside.gotoAndStop(blueframe1);
_root.blue_transparent2.inside.gotoAndStop(blueframe2);
_root.blueinvisible1.inside.gotoAndStop(blueframe3);
_root.blueinvisible2.inside.gotoAndStop(blueframe4);
bluestop._x = 1000;
}
if (this.hitTest(greenkey)) {
greenkey._x = 1000;
_root.green_transparent.gotoAndStop(2);
_root.greenwall.gotoAndStop(2);
_root.greeninvisible1.gotoAndStop(2);
_root.greeninvisible2.gotoAndStop(2);
}
greenframe1 = _root.greenwall.inside._currentframe;
greenframe2 = _root.green_transparent.inside._currentframe;
greenframe3 = _root.greeninvisible1.inside._currentframe;
greenframe4 = _root.greeninvisible2.inside._currentframe;
if (this.hitTest(greenstop1) && (greenstop1_canhit == true)) {
_root.greenwall.inside.gotoAndStop(greenframe1);
_root.green_transparent.inside.gotoAndStop(greenframe2);
_root.greeninvisible1.inside.gotoAndStop(greenframe3);
_root.greeninvisible2.inside.gotoAndStop(greenframe4);
greenstop1._x = 1000;
}
if (this.hitTest(orangekey)) {
orangekey._x = 1000;
_root.orange_transparent.gotoAndStop(2);
_root.orangewall.gotoAndStop(2);
_root.orangeinvisible1.gotoAndStop(2);
_root.orangeinvisible2.gotoAndStop(2);
}
orangeframe1 = _root.orangewall.inside._currentframe;
orangeframe2 = _root.orange_transparent.inside._currentframe;
orangeframe3 = _root.orangeinvisible1.inside._currentframe;
orangeframe4 = _root.orangeinvisible2.inside._currentframe;
if (this.hitTest(orangestop) && (orangestop_canhit == true)) {
_root.orangewall.inside.gotoAndStop(orangeframe1);
_root.orange_transparent.inside.gotoAndStop(orangeframe2);
_root.orangeinvisible1.inside.gotoAndStop(orangeframe3);
_root.orangeinvisible2.inside.gotoAndStop(orangeframe4);
orangestop._x = 1000;
}
if (this.hitTest(pinkkey)) {
pinkkey._x = 1000;
pinkwall_movement = true;
}
if (this.hitTest(finish)) {
youwin._x = Stage.width / 2;
youwin._y = Stage.height / 2;
winningscreen._x = Stage.width / 2;
winningscreen._y = Stage.height / 2;
SPACE_possible = false;
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
nextFrame();
gotoAndStop;
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
nextFrame();
gotoAndStop;
n_is_DOWN = false;
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
prevFrame();
gotoAndStop;
b_is_DOWN = false;
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
if (_root.bluewall._currentframe == 2) {
bluestop_canhit = true;
}
if (_root.greenwall._currentframe == 2) {
greenstop1_canhit = true;
}
if (_root.orangewall._currentframe == 2) {
orangestop_canhit = true;
}
if (pinkwall_movement) {
pinkwall._x = pinkwall._x + 2;
}
if (pinkwall._x >= 724.7) {
pinkwall_movement = false;
}
if ((pinkwall._x > 505) && (ball1._x > (Stage.width / 2))) {
bottomactivate = true;
middleactivate = true;
topactivate = true;
}
};
Instance of Symbol 1257 MovieClip "ball1" in Frame 11
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (_root.bottomactivate == true) {
if (hitTest(_root.blueinvisible1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blueinvisible1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blueinvisible1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blueinvisible1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blueinvisible1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blueinvisible2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blueinvisible2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blueinvisible2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blueinvisible2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blueinvisible2.getBounds(_root).yMax) - 0.1));
}
}
}
if (hitTest(_root.rightside)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightside.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightside.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftside)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftside.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftside.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftside.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftside.getBounds(_root).yMax) - 0.1));
}
}
if (_root.topactivate == true) {
if (hitTest(_root.greeninvisible1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greeninvisible1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greeninvisible1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greeninvisible1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greeninvisible1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greeninvisible2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greeninvisible2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greeninvisible2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greeninvisible2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greeninvisible2.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.middleactivate == true) {
if (hitTest(_root.orangeinvisible1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangeinvisible1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangeinvisible1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangeinvisible1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangeinvisible1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangeinvisible2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangeinvisible2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangeinvisible2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangeinvisible2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangeinvisible2.getBounds(_root).yMax) - 0.1));
}
}
}
}
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
Frame 12
function restartLevel() {
_root.scoresubmit8 = savefile.data.scoresubmit8;
savefile.flush();
soundstart = false;
small = false;
if ((((((((((((((((((((((var9 != true) and (var10 != true)) and (var11 != true)) and (var12 != true)) and (var13 != true)) and (var14 != true)) and (var15 != true)) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var8 = true;
}
var7 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = true;
radius = ball1._height / 2;
ball1.gotoAndStop(1);
ball2.gotoAndStop(1);
warp_on = false;
ball_movement = true;
finisher = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
ball1._x = 271;
ball1._y = 443.6;
ball2._x = 500;
ball2._y = 223.9;
leftside1._x = 125.8;
leftside1._y = 262.1;
rightside1._x = 242.4;
rightside1._y = 262.1;
smallkey1._x = 425.9;
smallkey1._y = 481.1;
warpkey1._x = 576.2;
warpkey1._y = 481.1;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 200;
finish._y = 95.8;
finish2._x = 500;
finish2._y = 95.8;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(8);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l24");
};
ball1.onEnterFrame = function () {
if (this.hitTest(smallkey1) or ball2.hitTest(smallkey1)) {
smallstart = true;
smallkey1._x = 1000;
ball1.gotoAndStop(2);
ball2.gotoAndStop(2);
}
if (this.hitTest(warpkey1)) {
trace("assssdddd");
_root.reversestart = true;
warpkey1._x = 1000;
warp_on = true;
}
if (scoresubmit8) {
scoresubmit = false;
} else if (scoresubmit8 == false) {
scoresubmit = true;
}
if ((this.hitTest(finish) or this.hitTest(finish2)) and (ball2.hitTest(finish) or ball2.hitTest(finish2))) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 8) or scoresubmit) {
level8_best_time = seconds;
scoresubmit8 = true;
savefile.data.scoresubmit8 = _root.scoresubmit8;
savefile.flush();
}
if (seconds < level8_best_time) {
level8_best_time = seconds;
}
savefile.data.level8_best_time = _root.level8_best_time;
savefile.flush();
if (_root.score <= 9) {
_root.score = 9;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(8);
_root.win.meter.gotoAndStop(9);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l24");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var8) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l4");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l24");
}
w_is_DOWN = false;
}
}
_root.TotalRestartsText.text = totalRestarts;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
};
Instance of Symbol 1541 MovieClip "ball1" in Frame 12
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightside1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightside1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightside1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftsider)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftsider.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftsider.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftsider.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftsider.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftside1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftside1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftside1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftside1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftside1.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Instance of Symbol 1542 MovieClip "ball2" in Frame 12
onClipEvent (load) {
xmove2 = 0;
ymove2 = 0;
}
onClipEvent (enterFrame) {
function move2(xmove2, ymove2) {
_x = (_x + xmove2);
_y = (_y + ymove2);
if (hitTest(_root.leftwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.non)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.non.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.non.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.non.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.non.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightside1)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside1.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightside1.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightside1.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftside1)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftside1.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftside1.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftside1.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftside1.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.warp_on == true) {
if (_root.ball_movement) {
if (Key.isDown(37)) {
move2(5, 0);
}
if (Key.isDown(39)) {
move2(-5, 0);
}
if (Key.isDown(38)) {
move2(0, 5);
}
if (Key.isDown(40)) {
move2(0, -5);
}
}
}
}
Frame 13
function restartLevel() {
_root.scoresubmit22 = savefile.data.scoresubmit22;
savefile.flush();
soundstart = false;
small = false;
if ((((((((var23 != true) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var22 = true;
}
var21 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = true;
radius = ball1._height / 2;
ball1.gotoAndStop(1);
ball2.gotoAndStop(1);
warpkey1.gotoAndStop(1);
warpkey2.gotoAndStop(1);
warp_on = false;
ball_movement = true;
finisher = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
ball1._x = 137.9;
ball1._y = 466;
ball2._x = 436.1;
ball2._y = 77.9;
leftside._x = 170;
leftside._y = 396.1;
rightside._x = 230;
rightside._y = 206.5;
rightright._x = 500;
rightright._y = 232.4;
warpkey1._x = 183.9;
warpkey1._y = 466;
warpkey2._x = 436.1;
warpkey2._y = 126.1;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 263;
finish._y = 82;
finish2._x = 563;
finish2._y = 82;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(22);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l32");
};
ball1.onEnterFrame = function () {
if (this.hitTest(warpkey1)) {
_root.reversestart = true;
warpkey1._x = 1000;
warpkey2._x = 1000;
warp_on = true;
warpkey2.gotoAndStop(2);
}
if (this.hitTest(warpkey2)) {
_root.reversestart = true;
warpkey2._x = 1000;
warpkey1._x = 1000;
warp_on = true;
warpkey1.gotoAndStop(2);
}
if (scoresubmit22) {
scoresubmit = false;
} else if (scoresubmit22 == false) {
scoresubmit = true;
}
if ((this.hitTest(finish) or this.hitTest(finish2)) and (ball2.hitTest(finish) or ball2.hitTest(finish2))) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 22) or scoresubmit) {
level22_best_time = seconds;
scoresubmit22 = true;
savefile.data.scoresubmit22 = _root.scoresubmit22;
savefile.flush();
}
if (seconds < level22_best_time) {
level22_best_time = seconds;
}
savefile.data.level22_best_time = _root.level22_best_time;
savefile.flush();
if (_root.score <= 23) {
_root.score = 23;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(22);
_root.win.meter.gotoAndStop(23);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l17");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var22) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l22");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l17");
}
w_is_DOWN = false;
}
}
_root.TotalRestartsText.text = totalRestarts;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
};
Instance of Symbol 1550 MovieClip "ball2" in Frame 13
onClipEvent (load) {
xmove2 = 0;
ymove2 = 0;
}
onClipEvent (enterFrame) {
function move2(xmove2, ymove2) {
_x = (_x + xmove2);
_y = (_y + ymove2);
if (hitTest(_root.leftwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightside)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightside.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightside.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftside)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftside.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftside.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftside.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightright)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightright.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightright.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightright.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightright.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.warp_on == true) {
if (_root.ball_movement) {
if (Key.isDown(37)) {
move2(5, 0);
}
if (Key.isDown(39)) {
move2(-5, 0);
}
if (Key.isDown(38)) {
move2(0, 5);
}
if (Key.isDown(40)) {
move2(0, -5);
}
}
}
}
Instance of Symbol 1551 MovieClip "ball1" in Frame 13
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightside)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightside.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightside.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftside)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftside.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftside.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftside.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightright)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightright.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightright.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightright.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightright.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 14
function restartLevel() {
_root.scoresubmit19 = savefile.data.scoresubmit19;
savefile.flush();
soundstart = false;
small = false;
if (((((((((((var20 != true) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var19 = true;
}
var18 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
greenwall_movement = false;
pinkwall_movement = false;
bluewall_movement = false;
yellowwall_movement = false;
redwall_movement = false;
orangewall3_movement = false;
ball_location = true;
gray_is_hit = false;
black_is_hit = false;
left_hit = false;
right_hit = false;
warp_on = false;
small = false;
ball_movement = true;
finisher = false;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
decoy._width = 32;
decoy._height = 32;
decoy2._width = 32;
decoy2._height = 32;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
yellowkey._x = 128.2;
yellowkey._y = 73.9;
orangekey._x = 128.2;
orangekey._y = 174.9;
orangekey2._x = 573.1;
orangekey2._y = 479.2;
redkey._x = 484;
redkey._y = 214.9;
greenkey._x = 128.2;
greenkey._y = 376.4;
pinkkey._x = 541.5;
pinkkey._y = 163.7;
bluekey._x = 269.4;
bluekey._y = 431.1;
smallkey._x = 582;
smallkey._y = 112.2;
greenwall._x = 417.8;
greenwall._y = 378.8;
pinkwall._x = 210.3;
pinkwall._y = 79.7;
bluewall._x = 483.9;
bluewall._y = 395.8;
yellowwall._x = 450;
yellowwall._y = 446.2;
redwall._x = 199.9;
redwall._y = 284.2;
orangewall1._x = 520.8;
orangewall1._y = -89.1;
orangewall2._x = 540.8;
orangewall2._y = 148.1;
orangewall3._x = 550.8;
orangewall3._y = 182.2;
orangewall4._x = 582.6;
orangewall4._y = -89.2;
orange_transparent._x = 551;
orange_transparent._y = -40;
orange_transparent2._x = 551;
orange_transparent2._y = -41.5;
orange_piece._x = 551.7;
orange_piece._y = 82.7;
ball1._x = 128.2;
ball1._y = 478.1;
ball2._x = 529;
ball2._y = 441.3;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 433.1;
finish._y = 482.5;
lb._x = 166.3;
lb._y = 429.6;
lm._x = 235.2;
lm._y = 332.4;
ltop._x = 166;
ltop._y = 123.8;
rm._x = 429.3;
rm._y = 412.2;
rt._x = 450.3;
decoy._x = 10000;
decoy._y = 10000;
decoy2._x = 10000;
decoy2._y = 10000;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (gray_is_hit == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(19);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l20");
};
ball1.onEnterFrame = function () {
decoyx = decoy._x;
bluewally = bluewall._y;
if (yellowwall.hitTest(orange_transparent)) {
yellowwall_movement = false;
}
if (((redwall._x + (redwall._width / 2)) - 1) < (bluewall._x - (bluewall._width / 2))) {
working = true;
} else {
working = false;
}
if (redwall.hitTest(bluewall)) {
if (working == false) {
redwall_movement = false;
soundstart = true;
bluewall._y = 343.9;
bluewall_movement = false;
} else if (working) {
soundstart = true;
redwall._x = 367.4;
redwall_movement = false;
bluewall_movement = false;
}
}
if (((redwall._x + (redwall._width / 2)) - 1) < (orange_transparent._x - (orange_transparent._width / 2))) {
working2 = true;
} else {
working2 = false;
}
if ((redwall.hitTest(orangewall1) or redwall.hitTest(orangewall2)) or redwall.hitTest(orangewall3)) {
if (working2 == false) {
redwall_movement = false;
orangewall3_movement = false;
} else if (working2) {
redwall_movement = false;
orangewall3_movement = false;
redwall._x = 401;
}
}
if (orangewall3._y > 354.8) {
soundstart = true;
greenwall_movement = false;
orangewall3_movement = false;
orangewall3._y = 354.8;
_root.orange_transparent2.thingy._y = _root.orange_transparent2.thingy._y - 0.3;
}
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 100000 /* 0x0186A0 */;
_root.ball1.scan.gotoAndStop(2);
if (bluewall._y >= 340) {
greenwall_movement = false;
} else {
greenwall_movement = true;
}
}
if (this.hitTest(pinkkey)) {
keystart = true;
pinkkey._x = 100000 /* 0x0186A0 */;
pinkwall_movement = true;
_root.ball1.scan.gotoAndStop(5);
}
if (this.hitTest(bluekey)) {
keystart = true;
bluekey._x = 100000 /* 0x0186A0 */;
bluewall_movement = true;
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndPlay(1);
}
if (this.hitTest(yellowkey)) {
keystart = true;
yellowkey._x = 100000 /* 0x0186A0 */;
yellowwall_movement = true;
_root.ball1.scan.gotoAndStop(8);
}
if (this.hitTest(redkey)) {
keystart = true;
redkey._x = 100000 /* 0x0186A0 */;
redwall_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if (this.hitTest(orangekey) or this.hitTest(orangekey2)) {
keystart = true;
orangekey._x = 100000 /* 0x0186A0 */;
orangekey2._x = 100000 /* 0x0186A0 */;
orangewall3_movement = true;
_root.ball1.scan.gotoAndStop(6);
}
if (this.hitTest(smallkey)) {
smallstart = true;
small = true;
smallkey._x = 100000 /* 0x0186A0 */;
ball1.gotoAndStop(2);
ball2.gotoAndStop(2);
}
if (scoresubmit19) {
scoresubmit = false;
} else if (scoresubmit19 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 19) or scoresubmit) {
level19_best_time = seconds;
scoresubmit19 = true;
savefile.data.scoresubmit19 = _root.scoresubmit19;
savefile.flush();
}
if (seconds < level19_best_time) {
level19_best_time = seconds;
}
savefile.data.level19_best_time = _root.level19_best_time;
savefile.flush();
if (_root.score <= 20) {
_root.score = 20;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(19);
_root.win.meter.gotoAndStop(20);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l20");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var19) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l23");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l20");
}
w_is_DOWN = false;
}
}
_root.TotalRestartsText.text = totalRestarts;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (greenwall_movement) {
greenwall._x = greenwall._x + 2;
}
if (greenwall._x > 549.9) {
greenwall_movement = false;
soundstart = true;
greenwall._x = 549.9;
rm._x = rm._x - 0.5;
}
if (pinkwall_movement) {
pinkwall._y = pinkwall._y - 1;
}
if (pinkwall._y < -2.8) {
pinkwall_movement = false;
}
if (redwall_movement) {
redwall._x = redwall._x + 0.4;
}
if (redwall._x > 499.8) {
redwall_movement = false;
soundstart = true;
redwall._x = 499.8;
}
if (yellowwall_movement) {
yellowwall._x = yellowwall._x + 1;
}
if (yellowwall._x > 549.9) {
soundstart = true;
yellowwall._x = 549.8;
yellowwall_movement = false;
}
if (bluewall_movement) {
bluewall._y = bluewall._y - 2;
}
if (bluewall._y < 224.4) {
bluewall_movement = false;
soundstart = true;
bluewall._y = 224.4;
}
if (orangewall3_movement) {
orangewall3._y = orangewall3._y + 4;
}
if (orangewall3._y > 454.4) {
soundstart = true;
orangewall3_movement = false;
orangewall3._y = 454.4;
orangewall4._y = orangewall3._y - 266.7;
orangewall1._y = orangewall3._y - 267.5;
orange_transparent2._y = orangewall3._y - 220;
orange_transparent._y = orangewall3._y - 218;
orange_piece._y = orangewall3._y - 94.5;
} else {
orangewall1._y = orangewall3._y - 269.5;
orangewall2._y = orangewall3._y - 34.1;
orangewall4._y = orangewall3._y - 269.7;
orange_transparent._y = orangewall3._y - 220.2;
orange_transparent2._y = orangewall3._y - 222.5;
orange_piece._y = orangewall3._y - 96.5;
pinkkey._y = orangewall3._y - 17.5;
smallkey._y = orangewall3._y - 69;
}
differenceblue = ((bluewall._y - ball1._y) - (bluewall._height / 2)) - (ball1._height / 2);
differenceblue2 = ((bluewall._y - ball2._y) - (bluewall._height / 2)) - (ball2._height / 2);
distance_between_rt_and_ball = Math.abs(((ball1._y - rt._y) - (rt._height / 2)) - (ball1._height / 2));
distance_between_rt_and_ball2 = Math.abs(((ball2._y - rt._y) - (rt._height / 2)) - (ball2._height / 2));
distance_between_redwally_and_ball = Math.abs(((ball1._y - redwall._y) - (redwall._height / 2)) - (ball1._height / 2));
distance_between_redwally_and_ball2 = Math.abs(((ball2._y - redwall._y) - (redwall._height / 2)) - (ball2._height / 2));
distance_x_between_bluewall_and_ball = Math.abs(bluewall._x - ball1._x);
distance_x_between_bluewall_and_ball2 = Math.abs(bluewall._x - ball2._x);
if ((((bluewall_movement == true) and (differenceblue <= 0.2)) and (differenceblue >= -8)) and (distance_x_between_bluewall_and_ball < ((ball1._width / 2) + (bluewall._width / 2)))) {
ball1._y = ((bluewall._y - (bluewall._height / 2)) - (ball1._height / 2)) - 0.2;
}
if ((((bluewall_movement == true) and (differenceblue2 <= 0.2)) and (differenceblue2 >= -8)) and (distance_x_between_bluewall_and_ball2 < ((ball2._width / 2) + (bluewall._width / 2)))) {
ball2._y = ((bluewall._y - (bluewall._height / 2)) - (ball2._height / 2)) - 0.2;
}
if (((((differenceblue <= 0.5) && (differenceblue >= -2)) && (distance_between_rt_and_ball <= 1)) && (distance_x_between_bluewall_and_ball < ((ball1._width / 2) + (bluewall._width / 2)))) or ((((differenceblue2 <= 0.5) && (differenceblue2 >= -2)) && (distance_between_rt_and_ball2 <= 2)) && (distance_x_between_bluewall_and_ball2 < ((ball2._width / 2) + (bluewall._width / 2))))) {
right_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differenceblue <= 0.5) && (differenceblue >= -2)) && (distance_between_redwally_and_ball <= 1)) && (ball1._x < ((redwall._x + (redwall._width / 2)) + (ball1._width / 2)))) && (distance_x_between_bluewall_and_ball < ((ball1._width / 2) + (bluewall._width / 2)))) or (((((differenceblue2 <= 0.5) && (differenceblue2 >= -2)) && (distance_between_redwally_and_ball2 <= 1)) && (ball2._x < ((redwall._x + (redwall._width / 2)) + (ball2._width / 2)))) && (distance_x_between_bluewall_and_ball2 < ((ball2._width / 2) + (bluewall._width / 2))))) {
right_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differenceorange3 = ((ball1._y - orangewall3._y) - (orangewall3._height / 2)) - (ball1._height / 2);
differenceorange32 = ((ball2._y - orangewall3._y) - (orangewall3._height / 2)) - (ball2._height / 2);
distance_between_bottomwall_and_ball = Math.abs(((bottomwall._y - ball1._y) - (bottomwall._height / 2)) - (ball1._height / 2));
distance_between_bottomwall_and_ball2 = Math.abs(((bottomwall._y - ball2._y) - (bottomwall._height / 2)) - (ball2._height / 2));
distance_between_yellowwall_and_ball = Math.abs(((yellowwall._y - ball1._y) - (yellowwall._height / 2)) - (ball1._height / 2));
distance_between_yellowwall_and_ball2 = Math.abs(((yellowwall._y - ball2._y) - (yellowwall._height / 2)) - (ball2._height / 2));
distance_between_bluewall_and_ball = Math.abs(((bluewall._y - ball1._y) - (bluewall._height / 2)) - (ball1._height / 2));
distance_between_bluewall_and_ball2 = Math.abs(((bluewall._y - ball2._y) - (bluewall._height / 2)) - (ball2._height / 2));
distance_between_greenwall_and_ball = Math.abs(((greenwall._y - ball1._y) - (greenwall._height / 2)) - (ball1._height / 2));
distance_between_greenwall_and_ball2 = Math.abs(((greenwall._y - ball2._y) - (greenwall._height / 2)) - (ball2._height / 2));
distance_between_redwall_and_ball = Math.abs(((redwall._y - ball1._y) - (redwall._height / 2)) - (ball1._height / 2));
distance_between_redwall_and_ball2 = Math.abs(((redwall._y - ball2._y) - (redwall._height / 2)) - (ball2._height / 2));
distance_x_between_orangewall3_and_ball = Math.abs(orangewall3._x - ball1._x);
distance_x_between_orangewall3_and_ball2 = Math.abs(orangewall3._x - ball2._x);
if ((((orangewall3_movement == true) and (differenceorange3 <= 0.2)) and (differenceorange3 >= -8)) and (distance_x_between_orangewall3_and_ball < ((ball1._width / 2) + (orangewall3._width / 2)))) {
ball1._y = ((orangewall3._y + (orangewall3._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((orangewall3_movement == true) and (differenceorange32 <= 0.2)) and (differenceorange32 >= -8)) and (distance_x_between_orangewall3_and_ball2 < ((ball2._width / 2) + (orangewall3._width / 2)))) {
ball2._y = ((orangewall3._y + (orangewall3._height / 2)) + (ball2._height / 2)) + 0.2;
}
if (((((differenceorange3 <= 0.5) && (differenceorange3 >= -4)) && (distance_between_bottomwall_and_ball <= 1)) && (distance_x_between_orangewall3_and_ball < ((ball1._width / 2) + (orangewall3._width / 2)))) or ((((differenceorange32 <= 0.5) && (differenceorange32 >= -4)) && (distance_between_bottomwall_and_ball2 <= 1)) && (distance_x_between_orangewall3_and_ball2 < ((ball2._width / 2) + (orangewall3._width / 2))))) {
right_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differenceorange3 <= 2) && (differenceorange3 >= -4)) && (distance_between_bluewall_and_ball <= 3)) && (ball1._x < ((bluewall._x + (bluewall._width / 2)) + (ball1._width / 2)))) && (distance_x_between_orangewall3_and_ball < ((ball1._width / 2) + (orangewall3._width / 2)))) or (((((differenceorange32 <= 0.5) && (differenceorange32 >= -4)) && (distance_between_bluewall_and_ball2 <= 2)) && (ball2._x < ((bluewall._x + (bluewall._width / 2)) + (ball2._width / 2)))) && (distance_x_between_orangewall3_and_ball2 < ((ball2._width / 2) + (orangewall3._width / 2))))) {
right_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differenceorange3 <= 2) && (differenceorange3 >= -4)) && (distance_between_redwall_and_ball <= 3)) && (ball1._x < ((redwall._x + (redwall._width / 2)) + (ball1._width / 2)))) && (distance_x_between_orangewall3_and_ball < ((ball1._width / 2) + (orangewall3._width / 2)))) or (((((differenceorange32 <= 0.5) && (differenceorange32 >= -4)) && (distance_between_redwall_and_ball2 <= 2)) && (ball2._x < ((redwall._x + (redwall._width / 2)) + (ball2._width / 2)))) && (distance_x_between_orangewall3_and_ball2 < ((ball2._width / 2) + (orangewall3._width / 2))))) {
right_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differenceorange3 <= 2) && (differenceorange3 >= -4)) && (distance_between_greenwall_and_ball <= 3)) && (ball1._x < ((greenwall._x + (greenwall._width / 2)) + (ball1._width / 2)))) && (distance_x_between_orangewall3_and_ball < ((ball1._width / 2) + (orangewall3._width / 2)))) or (((((differenceorange32 <= 0.5) && (differenceorange32 >= -4)) && (distance_between_greenwall_and_ball2 <= 2)) && (ball2._x < ((greenwall._x + (greenwall._width / 2)) + (ball2._width / 2)))) && (distance_x_between_orangewall3_and_ball2 < ((ball2._width / 2) + (orangewall3._width / 2))))) {
right_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differenceorange1 = ((ball1._y - orangewall1._y) - (orangewall1._height / 2)) - (ball1._height / 2);
differenceorange12 = ((ball2._y - orangewall1._y) - (orangewall1._height / 2)) - (ball2._height / 2);
distance_x_between_orangewall1_and_ball = Math.abs(orangewall1._x - ball1._x);
distance_x_between_orangewall1_and_ball2 = Math.abs(orangewall1._x - ball2._x);
if ((((orangewall3_movement == true) and (differenceorange1 <= 0.2)) and (differenceorange1 >= -8)) and (distance_x_between_orangewall1_and_ball < ((ball1._width / 2) + (orangewall1._width / 2)))) {
ball1._y = ((orangewall1._y + (orangewall1._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((orangewall3_movement == true) and (differenceorange12 <= 0.2)) and (differenceorange12 >= -8)) and (distance_x_between_orangewall1_and_ball2 < ((ball2._width / 2) + (orangewall1._width / 2)))) {
ball2._y = ((orangewall1._y + (orangewall1._height / 2)) + (ball2._height / 2)) + 0.2;
}
if (((((((differenceorange1 <= 0.5) && (orangewall3_movement == true)) && (differenceorange1 >= -4)) && (distance_between_yellowwall_and_ball <= 2)) && (ball1._x < ((yellowwall._x + (yellowwall._width / 2)) + (ball1._width / 2)))) && (distance_x_between_orangewall1_and_ball < ((ball1._width / 2) + (orangewall1._width / 2)))) or ((((((differenceorange12 <= 0.5) && (orangewall3_movement == true)) && (differenceorange12 >= -4)) && (distance_between_yellowwall_and_ball2 <= 2)) && (ball2._x < ((yellowwall._x + (yellowwall._width / 2)) + (ball2._width / 2)))) && (distance_x_between_orangewall1_and_ball2 < ((ball2._width / 2) + (orangewall1._width / 2))))) {
right_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if (((((((differenceorange1 <= 0.5) && (orangewall3_movement == true)) && (differenceorange1 >= -4)) && (distance_between_bluewall_and_ball <= 2)) && (ball1._x < ((bluewall._x + (bluewall._width / 2)) + (ball1._width / 2)))) && (distance_x_between_orangewall1_and_ball < ((ball1._width / 2) + (orangewall1._width / 2)))) or ((((((differenceorange12 <= 0.5) && (orangewall3_movement == true)) && (differenceorange12 >= -4)) && (distance_between_bluewall_and_ball2 <= 2)) && (ball2._x < ((bluewall._x + (bluewall._width / 2)) + (ball2._width / 2)))) && (distance_x_between_orangewall1_and_ball2 < ((ball2._width / 2) + (orangewall1._width / 2))))) {
right_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differenceyellow = ((ball1._x - yellowwall._x) - (yellowwall._width / 2)) - (ball1._width / 2);
differenceyellow2 = ((ball2._x - yellowwall._x) - (yellowwall._width / 2)) - (ball2._width / 2);
distance_between_rightwall_and_ball = Math.abs(((rightwall._x - ball1._x) - (rightwall._width / 2)) - (ball1._width / 2));
distance_between_rightwall_and_ball2 = Math.abs(((rightwall._x - ball2._x) - (rightwall._width / 2)) - (ball2._width / 2));
distance_y_between_yellowwall_and_ball = Math.abs(yellowwall._y - ball1._y);
distance_y_between_yellowwall_and_ball2 = Math.abs(yellowwall._y - ball2._y);
if ((((yellowwall_movement == true) and (differenceyellow <= 0.2)) and (differenceyellow >= -8)) and (distance_y_between_yellowwall_and_ball < ((ball1._height / 2) + (yellowwall._height / 2)))) {
ball1._x = ((yellowwall._x + (yellowwall._width / 2)) + (ball1._width / 2)) + 0.2;
}
if ((((yellowwall_movement == true) and (differenceyellow2 <= 0.2)) and (differenceyellow2 >= -8)) and (distance_y_between_yellowwall_and_ball2 < ((ball2._height / 2) + (yellowwall._height / 2)))) {
ball2._x = ((yellowwall._x + (yellowwall._width / 2)) + (ball2._width / 2)) + 0.2;
}
if (((((differenceyellow <= 0.5) && (differenceyellow >= -2)) && (distance_between_rightwall_and_ball <= 1)) && (distance_y_between_yellowwall_and_ball < ((ball1._height / 2) + (yellowwall._height / 2)))) or ((((differenceyellow2 <= 0.5) && (differenceyellow2 >= -2)) && (distance_between_rightwall_and_ball2 <= 1)) && (distance_y_between_yellowwall_and_ball2 < ((ball2._height / 2) + (yellowwall._height / 2))))) {
right_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differencegreen = ((ball1._x - greenwall._x) - (greenwall._width / 2)) - (ball1._width / 2);
differencegreen2 = ((ball2._x - greenwall._x) - (greenwall._width / 2)) - (ball2._width / 2);
distance_between_orangewall1_and_ball = Math.abs(((orangewall1._x - ball1._x) - (orangewall1._width / 2)) - (ball1._width / 2));
distance_between_orangewall1_and_ball2 = Math.abs(((orangewall1._x - ball2._x) - (orangewall1._width / 2)) - (ball2._width / 2));
distance_y_between_greenwall_and_ball = Math.abs(greenwall._y - ball1._y);
distance_y_between_greenwall_and_ball2 = Math.abs(greenwall._y - ball2._y);
if ((((greenwall_movement == true) and (differencegreen <= 0.2)) and (differencegreen >= -8)) and (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) {
ball1._x = ((greenwall._x + (greenwall._width / 2)) + (ball1._width / 2)) + 0.2;
}
if ((((greenwall_movement == true) and (differencegreen2 <= 0.2)) and (differencegreen2 >= -8)) and (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2)))) {
ball2._x = ((greenwall._x + (greenwall._width / 2)) + (ball2._width / 2)) + 0.2;
}
if (((((differencegreen <= 0.5) && (differencegreen >= -2)) && (distance_between_rightwall_and_ball <= 0.2)) && (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) or ((((differencegreen2 <= 0.5) && (differencegreen2 >= -2)) && (distance_between_rightwall_and_ball2 <= 0.2)) && (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2))))) {
right_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (((((((differencegreen <= 0.5) && (greenwall_movement == true)) && (differencegreen >= -2)) && (distance_between_orangewall1_and_ball <= 1)) && (ball1._y < ((orangewall1._y + (orangewall1._height / 2)) + (ball1._height / 2)))) && (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) or ((((((differencegreen2 <= 0.5) && (differencegreen2 >= -2)) && (greenwall_movement == true)) && (distance_between_orangewall1_and_ball2 <= 1)) && (ball2._y < ((orangewall1._y + (orangewall1._height / 2)) + (ball2._height / 2)))) && (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2))))) {
right_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differencered = ((ball1._x - redwall._x) - (redwall._width / 2)) - (ball1._width / 2);
differencered2 = ((ball2._x - redwall._x) - (redwall._width / 2)) - (ball2._width / 2);
distance_between_orangewall2_and_ball = Math.abs(((orangewall2._x - ball1._x) - (orangewall2._width / 2)) - (ball1._width / 2));
distance_between_orangewall2_and_ball2 = Math.abs(((orangewall2._x - ball2._x) - (orangewall2._width / 2)) - (ball2._width / 2));
distance_between_orangewall4_and_ball = Math.abs(((orangewall4._x - ball1._x) - (orangewall4._width / 2)) - (ball1._width / 2));
distance_between_orangewall4_and_ball2 = Math.abs(((orangewall4._x - ball2._x) - (orangewall4._width / 2)) - (ball2._width / 2));
distance_between_bluewallx_and_ball = Math.abs(((bluewall._x - ball1._x) - (bluewall._width / 2)) - (ball1._width / 2));
distance_between_bluewallx_and_ball2 = Math.abs(((bluewall._x - ball2._x) - (bluewall._width / 2)) - (ball2._width / 2));
distance_y_between_redwall_and_ball = Math.abs(redwall._y - ball1._y);
distance_y_between_redwall_and_ball2 = Math.abs(redwall._y - ball2._y);
if ((((redwall_movement == true) and (differencered <= 0.2)) and (differencered >= -8)) and (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) {
ball1._x = ((redwall._x + (redwall._width / 2)) + (ball1._width / 2)) + 0.2;
}
if ((((redwall_movement == true) and (differencered2 <= 0.2)) and (differencered2 >= -8)) and (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2)))) {
ball2._x = ((redwall._x + (redwall._width / 2)) + (ball2._width / 2)) + 0.2;
}
if (((((differencered <= 0.5) && (differencered >= -2)) && (distance_between_rightwall_and_ball <= 1)) && (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) or ((((differencered2 <= 0.5) && (differencered2 >= -2)) && (distance_between_rightwall_and_ball2 <= 0.5)) && (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2))))) {
right_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if ((((((((differencered <= 0.2) && (differencered >= -2)) && (redwall_movement == true)) && (distance_between_orangewall2_and_ball <= 0.3)) && (ball1._y < ((orangewall2._y + (orangewall2._height / 2)) + (ball1._height / 2)))) && (ball1._y > ((orangewall2._y - (orangewall2._height / 2)) - (ball1._height / 2)))) && (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) or (((((((differencered2 <= 0.5) && (redwall_movement == true)) && (differencered2 >= -2)) && (distance_between_orangewall2_and_ball2 <= 1)) && (ball2._y < ((orangewall2._y + (orangewall2._height / 2)) + (ball2._height / 2)))) && (ball2._y > ((orangewall2._y - (orangewall2._height / 2)) - (ball2._height / 2)))) && (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2))))) {
right_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (((((((differencered <= 0.5) && (differencered >= -2)) && (distance_between_bluewallx_and_ball <= 1)) && (ball1._y < ((bluewall._y + (bluewall._height / 2)) + (ball1._height / 2)))) && (ball1._y > ((bluewall._y - (bluewall._height / 2)) - (ball1._height / 2)))) && (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) or ((((((differencered2 <= 0.5) && (differencered2 >= -2)) && (distance_between_bluewallx_and_ball2 <= 1)) && (ball2._y < ((bluewall._y + (bluewall._height / 2)) + (ball2._height / 2)))) && (ball2._y > ((bluewall._y - (bluewall._height / 2)) - (ball2._height / 2)))) && (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2))))) {
right_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
black_is_hit = true;
} else {
gray_is_hit = true;
}
ball_locator();
}
};
Instance of Symbol 1257 MovieClip "ball1" in Frame 14
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lb)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lb.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lb.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lb.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lb.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lm)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lm.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lm.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lm.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lm.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lmid2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lmid2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lmid2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lmid2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lmid2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.ltop)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.ltop.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.ltop.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.ltop.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.ltop.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rb)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rb.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rb.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rb.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rb.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rm)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rm.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rm.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rm.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rm.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rt)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rt.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rt.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rt.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rt.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.yellowwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.yellowwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.yellowwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.yellowwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.yellowwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall4)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall4.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall4.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall4.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall4.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 15
function restartLevel() {
_root.scoresubmit12 = savefile.data.scoresubmit12;
savefile.flush();
soundstart = false;
small = false;
if ((((((((((((((((((var13 != true) and (var14 != true)) and (var15 != true)) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var12 = true;
}
var11 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
redwall_movement = false;
aquawall_movement = false;
ball_location = true;
gray_is_hit_red_left = false;
gray_is_hit_red_right = false;
black_is_hit_red_right = false;
black_is_hit_red_left = false;
red_hit_left = false;
red_hit_right = false;
ball1_is_pushed_by_red_wall = false;
ball1_is_pushed_by_red_wall2 = false;
aqua_is_attached_to_crate1 = true;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.crate1.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
ball_movement = true;
finisher = false;
_root.hit_crate1 = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_right_against_red_wall = false;
_root.cant_move_crate1_left_against_red_wall = false;
_root.cant_move_crate1_up_against_red_wall = false;
_root.cant_move_crate1_down_against_red_wall = false;
_root.cant_move_crate1_right_against_middlewall_insidetop = false;
_root.cant_move_crate1_right_against_middlewall_insidebottom = false;
_root.cant_move_crate1_right_against_rightwall = false;
_root.cant_move_crate1_left_against_leftwall = false;
_root.cant_move_crate1_left_against_middlewall_insidetop = false;
_root.cant_move_crate1_left_against_middlewall_insidebottom = false;
_root.cant_move_crate1_down_against_bottomwall = false;
_root.cant_move_crate1_down_against_middlewall_insidebottom = false;
_root.cant_move_crate1_up_against_middlewall_insidetop = false;
_root.cant_move_crate1_up_against_aquawall = true;
_root.cant_move_crate1_up_against_topwall = true;
_root.red_wall_and_crate1_rightside_touching = false;
_root.crate1_against_red_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_red_wall = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
redwall._x = 778.1;
redwall._y = 295.9;
aquawall._x = 200.1;
aquawall._y = 169.8;
redkey._x = 200;
redkey._y = 297.3;
aquakey._x = 500;
aquakey._y = 157.7;
ball1._x = 200;
ball1._y = 407.1;
ball2._x = 500;
ball2._y = 407.1;
crate1._x = 500;
crate1._y = 171.4;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 200.1;
finish._y = 95.8;
decoy._x = 10000;
decoy._y = 10000;
decoy2._x = 10000;
decoy2._y = 10000;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_red_left == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_red_right == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_red_right == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
_root.decoy.inside2.gotoAndPlay(1);
_root.decoy2.inside3.gotoAndPlay(1);
}
if (gray_is_hit_red_left == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
_root.decoy.inside2.gotoAndPlay(1);
_root.decoy2.inside3.gotoAndPlay(1);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(12);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l26");
};
ball1.onEnterFrame = function () {
if (this.hitTest(aquakey)) {
keystart = true;
_root.ball1.scan.gotoAndStop(3);
if (_root.decoy_crate._currentframe == 2) {
aquakey._x = 100000 /* 0x0186A0 */;
aquawall_movement = true;
}
}
if (this.hitTest(redkey)) {
keystart = true;
_root.ball1.scan.gotoAndStop(8);
redkey._x = 100000 /* 0x0186A0 */;
redwall_movement = true;
}
if (scoresubmit12) {
scoresubmit = false;
} else if (scoresubmit12 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 12) or scoresubmit) {
level12_best_time = seconds;
scoresubmit12 = true;
savefile.data.scoresubmit12 = _root.scoresubmit12;
savefile.flush();
}
if (seconds < level12_best_time) {
level12_best_time = seconds;
}
savefile.data.level12_best_time = _root.level12_best_time;
savefile.flush();
if (_root.score <= 13) {
_root.score = 13;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(12);
_root.win.meter.gotoAndStop(13);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l26");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var12) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l18");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l26");
}
w_is_DOWN = false;
}
}
_root.TotalRestartsText.text = totalRestarts;
ballx = ball1._x;
bally = ball1._y;
if (_root.cant_move_crate1_down_against_red_wall == true) {
thingy = 1;
}
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (aqua_is_attached_to_crate1 == true) {
aquakey._x = crate1._x;
aquakey._y = crate1._y;
}
ballx = ball1._x;
bally = ball1._y;
if (aquawall_movement) {
aquawall._x = aquawall._x - 1;
}
if (aquawall._x < 0) {
aquawall_movement = false;
}
if (redwall_movement) {
redwall._x = redwall._x - 1;
}
if (redwall._x < 350.3) {
redwall_movement = false;
soundstart = true;
redwall._x = 350.3;
}
differencered = ((redwall._x - (redwall._width / 2)) - (ball1._width / 2)) - ball1._x;
differencered2 = ((redwall._x - (redwall._width / 2)) - (ball2._width / 2)) - ball2._x;
distance_between_rightmiddlewall_and_ball = Math.abs(((ball1._x - middlewall._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_rightmiddlewall_and_ball2 = Math.abs(((ball2._x - middlewall._x) - (middlewall._width / 2)) - (ball2._width / 2));
distance_between_leftwall_and_ball = Math.abs(((ball1._x - leftwall._x) - (leftwall._width / 2)) - (ball1._width / 2));
distance_between_leftwall_and_ball2 = Math.abs(((ball2._x - leftwall._x) - (leftwall._width / 2)) - (ball2._width / 2));
distance_y_between_redwall_and_ball = Math.abs(redwall._y - ball1._y);
distance_y_between_redwall_and_ball2 = Math.abs(redwall._y - ball2._y);
if ((((redwall_movement == true) and (differencered <= 0.2)) and (differencered >= -8)) and (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) {
ball1._x = ((redwall._x - (redwall._width / 2)) - (ball1._width / 2)) - 0.2;
ball1_is_pushed_by_red_wall = true;
} else {
ball1_is_pushed_by_red_wall = false;
}
if ((((redwall_movement == true) and (differencered2 <= 0.2)) and (differencered2 >= -8)) and (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2)))) {
ball2._x = ((redwall._x - (redwall._width / 2)) - (ball2._width / 2)) - 0.2;
ball2_is_pushed_by_red_wall = true;
} else {
ball2_is_pushed_by_red_wall = false;
}
if (((((differencered <= 0.5) && (differencered >= -1)) && (distance_between_leftwall_and_ball <= 1)) && (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) or ((((differencered2 <= 0.5) && (differencered2 >= -1)) && (distance_between_leftwall_and_ball2 <= 0.5)) && (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2))))) {
red_hit_left = true;
cant_move_crate1_up_against_red_wall = false;
cant_move_crate1_down_against_red_wall = false;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (((((differencered <= 0.5) && (differencered >= -1)) && (distance_between_rightmiddlewall_and_ball <= 1)) && (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) or ((((differencered2 <= 0.5) && (differencered2 >= -1)) && (distance_between_rightmiddlewall_and_ball2 <= 0.5)) && (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2))))) {
red_hit_right = true;
cant_move_crate1_up_against_red_wall = false;
cant_move_crate1_down_against_red_wall = false;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (red_hit_left == true) {
black_is_hit_red_left = true;
}
if (red_hit_right == true) {
gray_is_hit_red_right = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (red_hit_right == true) {
black_is_hit_red_right = true;
}
if (red_hit_left == true) {
gray_is_hit_red_left = true;
}
}
ball_locator();
}
};
Instance of Symbol 1071 MovieClip "crate1" in Frame 15
onClipEvent (load) {
_root.hit_crate1 = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_right_against_red_wall = false;
_root.cant_move_crate1_left_against_red_wall = false;
_root.cant_move_crate1_up_against_red_wall = false;
_root.cant_move_crate1_down_against_red_wall = false;
_root.cant_move_crate1_right_against_middlewall_insidetop = false;
_root.cant_move_crate1_right_against_middlewall_insidebottom = false;
_root.cant_move_crate1_right_against_rightwall = false;
_root.cant_move_crate1_left_against_leftwall = false;
_root.cant_move_crate1_left_against_middlewall_insidetop = false;
_root.cant_move_crate1_left_against_middlewall_insidebottom = false;
_root.cant_move_crate1_down_against_bottomwall = false;
_root.cant_move_crate1_down_against_middlewall_insidebottom = false;
_root.cant_move_crate1_up_against_middlewall_insidetop = false;
_root.cant_move_crate1_up_against_aquawall = true;
_root.cant_move_crate1_up_against_topwall = true;
_root.red_wall_and_crate1_rightside_touching = false;
_root.crate1_against_red_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_red_wall = false;
}
onClipEvent (enterFrame) {
_root.distance_y_between_ball1_and_crate1 = Math.abs(_root.ball1._y - _y);
_root.difference_x_ball1_with_crate1_rightside = ((_root.ball1._x - _x) - (_width / 2)) - (_root.ball1._width / 2);
_root.difference_x_ball1_with_crate1_leftside = ((_x - _root.ball1._x) - (_width / 2)) - (_root.ball1._width / 2);
_root.distance_y_between_ball2_and_crate1 = Math.abs(_root.ball2._y - _y);
_root.difference_x_ball2_with_crate1_rightside = ((_root.ball2._x - _x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_ball2_with_crate1_leftside = ((_x - _root.ball2._x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_red_with_crate1_left = ((_x - (_width / 2)) - _root.redwall._x) - (_root.redwall._width / 2);
_root.difference_x_red_with_crate1_right = ((_root.redwall._x - (_root.redwall._width / 2)) - _x) - (_width / 2);
_root.difference_y_red_with_crate1_up = ((_y - (_height / 2)) - _root.redwall._y) - (_root.redwall._height / 2);
_root.difference_y_red_with_crate1_down = ((_root.redwall._y - (_root.redwall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_redwall_and_crate1 = Math.abs(_root.redwall._x - _x);
_root.distance_y_between_redwall_and_crate1 = Math.abs(_root.redwall._y - _y);
_root.difference_x_crate1_leftside_with_leftwall = ((_x - (_width / 2)) - (_root.leftwall._width / 2)) - _root.leftwall._x;
_root.difference_x_crate1_leftside_with_middlewall = ((_x - (_width / 2)) - (_root.middlewall._width / 2)) - _root.middlewall._x;
if (hitTest(_root.leftwall)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate2_left_against_leftwall = true;
}
if ((((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate2_left_against_leftwall = true;
} else {
_root.cant_move_crate2_left_against_leftwall = false;
}
if (hitTest(_root.middlewall.insidetop) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.insidetop.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_middlewall_insidetop = true;
}
if (((Math.abs(((_x - 350.1) - (_root.middlewall.insidetop._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((137.1 + (_root.middlewall.insidetop._height / 2)) + (_height / 2)))) and (_y > ((137.1 - (_root.middlewall.insidetop._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_left_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate1_left_against_middlewall_insidetop = false;
}
if (hitTest(_root.middlewall.insidebottom) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.insidebottom.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_middlewall_insidebottom = true;
}
if (((Math.abs(((_x - 350.1) - (_root.middlewall.insidebottom._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((447.1 + (_root.middlewall.insidebottom._height / 2)) + (_height / 2)))) and (_y > ((447.1 - (_root.middlewall.insidebottom._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_left_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate1_left_against_middlewall_insidebottom = false;
}
if (hitTest(_root.middlewall.insidetop) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.insidetop.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_middlewall_insidetop = true;
}
if (((Math.abs(((350.1 - _x) - (_root.middlewall.insidetop._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((137.1 + (_root.middlewall.insidetop._height / 2)) + (_height / 2)))) and (_y > ((137.1 - (_root.middlewall.insidetop._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate1_right_against_middlewall_insidetop = false;
}
if (hitTest(_root.middlewall.insidebottom) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.insidebottom.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_middlewall_insidebottom = true;
}
if (((Math.abs(((350.1 - _x) - (_root.middlewall.insidebottom._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((447.1 + (_root.middlewall.insidebottom._height / 2)) + (_height / 2)))) and (_y > ((447.1 - (_root.middlewall.insidebottom._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate1_right_against_middlewall_insidebottom = false;
}
if (hitTest(_root.rightwall) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_rightwall = true;
}
if (((Math.abs(((_root.rightwall._x - _x) - (_root.rightwall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.rightwall._y + (_root.rightwall._height / 2)) + (_height / 2)))) and (_y > ((_root.rightwall._y - (_root.rightwall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_rightwall = true;
} else {
_root.cant_move_crate1_right_against_rightwall = false;
}
if (hitTest(_root.aquawall) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.aquawall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_aquawall = true;
}
if (((Math.abs(((_y - _root.aquawall._y) - (_root.aquawall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.aquawall._x + (_root.aquawall._width / 2)) + (_width / 2)))) and (_x > ((_root.aquawall._x - (_root.aquawall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_aquawall = true;
} else {
_root.cant_move_crate1_up_against_aquawall = false;
}
if (hitTest(_root.topwall) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_topwall = true;
}
if (((Math.abs(((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.topwall._x + (_root.topwall._width / 2)) + (_width / 2)))) and (_x > ((_root.topwall._x - (_root.topwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_topwall = true;
} else {
_root.cant_move_crate1_up_against_topwall = false;
}
if (hitTest(_root.middlewall.insidetop) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.insidetop.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_middlewall_insidetop = true;
}
if (((Math.abs(((_y - 137.1) - (_root.middlewall.insidetop._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((350.1 + (_root.middlewall.insidetop._width / 2)) + (_width / 2)))) and (_x > ((350.1 - (_root.middlewall.insidetop._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate1_up_against_middlewall_insidetop = false;
}
if (hitTest(_root.bottomwall)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_bottomwall = true;
}
if ((((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate1_down_against_bottomwall = true;
} else {
_root.cant_move_crate1_down_against_bottomwall = false;
}
if (hitTest(_root.middlewall.insidebottom) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.insidebottom.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_middlewall_insidebottom = true;
}
if (((Math.abs(((447.1 - _y) - (_root.middlewall.insidebottom._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((350.1 + (_root.middlewall.insidebottom._width / 2)) + (_width / 2)))) and (_x > ((350.1 - (_root.middlewall.insidebottom._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate1_down_against_middlewall_insidebottom = false;
}
if (hitTest(_root.redwall)) {
_root.redwall_crate1_hit = true;
if ((_root.hit_crate1 == true) and (_root.moveright == true)) {
if ((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_red_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.moveleft == true)) {
if ((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_red_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.movedown == true)) {
if ((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_red_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.moveup == true)) {
if ((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_red_wall = true;
}
}
} else {
_root.redwall_crate1_hit = false;
}
if (((_root.difference_x_red_with_crate1_right <= 0.3) && (_root.difference_x_red_with_crate1_right >= -8)) && (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) {
_root.cant_move_crate1_right_against_red_wall = true;
_root.red_wall_and_crate1_rightside_touching = true;
} else {
_root.cant_move_crate1_right_against_red_wall = false;
_root.red_wall_and_crate1_rightside_touching = false;
}
if ((((_root.redwall_movement == true) and (_root.red_wall_and_crate1_rightside_touching == true)) and (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.redwall._x - (_root.redwall._width / 2)) - (_width / 2)) - 0.7);
_root.crate1_is_pushed_by_red_wall = true;
}
if (((_root.difference_x_ball1_with_crate1_leftside <= 0.3) && (_root.difference_x_ball1_with_crate1_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate1_leftside_touching = true;
} else {
_root.ball1_and_crate1_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate1_leftside <= 0.3) && (_root.difference_x_ball2_with_crate1_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate1_leftside_touching = true;
} else {
_root.ball2_and_crate1_leftside_touching = false;
}
if (((_root.difference_x_ball1_with_crate1_rightside <= 1) && (_root.difference_x_ball1_with_crate1_rightside >= -8)) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate1_rightside_touching = true;
} else {
_root.ball1_and_crate1_rightside_touching = false;
}
if (((_root.difference_x_ball2_with_crate1_rightside <= 0.3) && (_root.difference_x_ball2_with_crate1_rightside >= -8)) && (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate1_rightside_touching = true;
} else {
_root.ball2_and_crate1_rightside_touching = false;
}
if (((((_root.ball1_and_crate1_leftside_touching == true) and (_root.crate1_is_pushed_by_red_wall == true)) and (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.redwall_movement == true)) {
_root.ball1._x = (((_root.redwall._x - (_root.redwall._width / 2)) - _width) - (_root.ball1._width / 2)) - 0.5;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = true;
} else {
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
}
if (((((_root.ball2_and_crate1_leftside_touching == true) and (_root.crate1_is_pushed_by_red_wall == true)) and (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.redwall_movement == true)) {
_root.ball2._x = (((_root.redwall._x - (_root.redwall._width / 2)) - _width) - (_root.ball2._width / 2)) - 0.5;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = true;
} else {
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
}
if (((((_root.ball1_and_crate1_rightside_touching == true) and (_root.ball1_is_pushed_by_red_wall == true)) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and ((_root.moveleft == false) or ((_root.moveleft == true) and ((_root.cant_move_crate1_left_against_middlewall_insidetop == true) or (_root.cant_move_crate1_left_against_middlewall_insidebottom == true))))) and (_currentframe == 1)) {
_root.cant_move_crate1_right_against_red_wall = false;
_x = (((_root.ball1._x - (_root.ball1._width / 2)) - (_width / 2)) - 0.5);
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = true;
} else {
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
}
if ((((_root.ball2_and_crate1_rightside_touching == true) and (_root.ball2_is_pushed_by_red_wall == true)) and (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveleft == false)) {
_x = (((_root.ball2._x - (_root.ball2._width / 2)) - (_width / 2)) - 0.5);
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = true;
} else {
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
}
if ((((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) and (_root.redwall_movement == true)) and (_root.difference_x_red_with_crate1_right < 1)) and (_root.difference_x_red_with_crate1_right > -3)) {
_root.crate1_against_red_wall_boundaries_prevention = true;
} else {
_root.crate1_against_red_wall_boundaries_prevention = false;
}
if (((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) and (_root.distance_y_between_redwall_and_ball <= ((_root.ball1._height / 2) + (_root.redwall._height / 2)))) and (_root.redwall_movement == true)) {
_root.crate1_against_red_wall_boundaries_prevention2 = true;
} else {
_root.crate1_against_red_wall_boundaries_prevention2 = false;
}
if (((_root.difference_x_red_with_crate1_left <= 0.3) && (_root.difference_x_red_with_crate1_left >= -8)) && (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) {
_root.cant_move_crate1_left_against_red_wall = true;
_root.cant_move_crate1_left_against_left_wall = true;
} else {
_root.cant_move_crate1_left_against_red_wall = false;
}
if (_root.crate1_against_red_wall_boundaries_prevention == false) {
if (((_root.difference_y_red_with_crate1_up <= 0.3) && (_root.difference_y_red_with_crate1_up >= -8)) && (_root.distance_x_between_redwall_and_crate1 < ((_width / 2) + (_root.redwall._width / 2)))) {
_root.cant_move_crate1_up_against_red_wall = true;
_root.cant_move_crate1_up_against_l3 = true;
_root.cant_move_crate1_up_against_pink_wall = true;
} else {
_root.cant_move_crate1_up_against_red_wall = false;
}
if (((_root.difference_y_red_with_crate1_down <= 0.3) && (_root.difference_y_red_with_crate1_down >= -8)) && (_root.distance_x_between_redwall_and_crate1 < ((_width / 2) + (_root.redwall._width / 2)))) {
_root.cant_move_crate1_down_against_l1 = true;
_root.cant_move_crate1_down_against_bottom_wall = true;
} else {
_root.cant_move_crate1_down_against_red_wall = false;
}
} else if ((((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate1_leftside <= 0.3)) && (_root.difference_x_ball1_with_crate1_leftside >= -8)) {
_root.cant_move_crate1_down_against_red_wall = true;
_root.cant_move_crate1_up_against_red_wall = true;
_root.cant_move_crate1_left_against_red_wall = true;
_root.cant_move_crate1_right_against_red_wall = true;
} else {
_root.cant_move_crate1_down_against_red_wall = false;
_root.cant_move_crate1_up_against_red_wall = false;
}
if (((_root.redwall_movement == true) and ((((_root.difference_x_ball1_with_crate1_leftside <= 0.7) && (_root.difference_x_ball1_with_crate1_leftside >= -6)) && (_root.distance_between_leftwall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate1 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate1_leftside <= 0.7) && (_root.difference_x_ball2_with_crate1_leftside >= -6)) && (_root.distance_between_leftwall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate1 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.red_hit_left = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate1_up_against_red_wall = false;
_root.cant_move_crate1_down_against_red_wall = false;
}
if (((_root.redwall_movement == true) and ((((_root.difference_x_ball1_with_crate1_leftside <= 0.7) && (_root.difference_x_ball1_with_crate1_leftside >= -6)) && (_root.distance_between_rightmiddlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate1 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate1_leftside <= 0.7) && (_root.difference_x_ball2_with_crate1_leftside >= -6)) && (_root.distance_between_rightmiddlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate1 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.red_hit_right = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate1_up_against_red_wall = false;
_root.cant_move_crate1_down_against_red_wall = false;
}
if (((((_root.difference_x_crate1_leftside_with_leftwall <= 1) && (_root.difference_x_crate1_leftside_with_leftwall >= -8)) && (_root.redwall_movement == true)) && ((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) or ((_root.distance_y_between_redwall_and_ball < ((_root.ball1._height / 2) + (_root.redwall._height / 2))) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))))) and (((_root.crate1_is_pushed_by_red_wall == true) or (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == true)) or (_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall == true))) {
_root.aqua_is_attached_to_crate1 = false;
gotoAndStop (2);
_root.redwall_movement = false;
_root.decoy_crate.inside.gotoAndPlay(1);
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 20002;
}
if ((((((_root.difference_x_crate1_leftside_with_middlewall <= 2) && (_root.difference_x_crate1_leftside_with_middlewall >= -8)) && (_root.redwall_movement == true)) && ((_y < 279.9) or (_y > 313.1))) && ((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) or ((_root.distance_y_between_redwall_and_ball < ((_root.ball1._height / 2) + (_root.redwall._height / 2))) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))))) and (((_root.crate1_is_pushed_by_red_wall == true) or (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == true)) or (_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall == true))) {
_root.aqua_is_attached_to_crate1 = false;
gotoAndStop (2);
_root.decoy_crate.inside.gotoAndPlay(1);
_root.redwall_movement = false;
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 20002;
}
}
Instance of Symbol 677 MovieClip "ball1" in Frame 15
onClipEvent (load) {
_root.hit_crate1 = false;
}
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l4)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l4.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l4.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l4.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l4.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lgreenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lgreenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lgreenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lgreenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lgreenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lredwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lredwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lredwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lredwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lredwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.aquawall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.aquawall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.aquawall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.aquawall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.aquawall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.yellowwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.yellowwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.yellowwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.yellowwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.yellowwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.crate1)) {
if (_root.crate1._currentframe == 1) {
_root.hit_crate1 = true;
if (xmove > 0) {
if ((_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate1.getBounds(_root).xMin) + 0.1));
if ((((_root.cant_move_crate1_right_against_red_wall == false) and (_root.cant_move_crate1_right_against_middlewall_insidetop == false)) and (_root.cant_move_crate1_right_against_middlewall_insidebottom == false)) and (_root.cant_move_crate1_right_against_rightwall == false)) {
_root.cratespeed_xright = 1;
_root.crate1._x = _root.crate1._x + _root.cratespeed_xright;
_root.moveright = true;
}
}
} else {
_root.moveright = false;
}
if (xmove < 0) {
if (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false) {
_x = (_x - ((getBounds(_root).xMin - _root.crate1.getBounds(_root).xMax) - 0.1));
if ((((_root.cant_move_crate1_left_against_red_wall == false) and (_root.cant_move_crate1_left_against_middlewall_insidebottom == false)) and (_root.cant_move_crate1_left_against_middlewall_insidetop == false)) and (_root.cant_move_crate1_left_against_leftwall == false)) {
_root.cratespeed_xleft = 1;
_root.crate1._x = _root.crate1._x - _root.cratespeed_xleft;
_root.moveleft = true;
}
}
} else {
_root.moveleft = false;
}
if (ymove > 0) {
if ((((_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false) && (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false)) and (_root.difference_x_ball1_with_crate1_leftside <= -1)) and (_root.difference_x_ball1_with_crate1_rightside <= -1)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate1.getBounds(_root).yMin) + 0.1));
if (((_root.cant_move_crate1_down_against_red_wall == false) and (_root.cant_move_crate1_down_against_bottomwall == false)) and (_root.cant_move_crate1_down_against_middlewall_insidebottom == false)) {
_root.cratespeed_ydown = 1;
_root.crate1._y = _root.crate1._y + _root.cratespeed_ydown;
_root.movedown = true;
}
}
} else {
_root.movedown = false;
}
if (ymove < 0) {
if ((((_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false) && (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false)) and (_root.difference_x_ball1_with_crate1_leftside <= -1)) and (_root.difference_x_ball1_with_crate1_rightside <= -1)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate1.getBounds(_root).yMax) - 0.1));
if (((_root.cant_move_crate1_up_against_red_wall == false) and (_root.cant_move_crate1_up_against_aquawall == false)) and (_root.cant_move_crate1_up_against_middlewall_insidetop == false)) {
_root.cratespeed_yup = 1;
_root.crate1._y = _root.crate1._y - _root.cratespeed_yup;
_root.moveup = true;
}
}
} else {
_root.moveup = false;
}
}
}
}
if ((((!Key.isDown(37)) and (!Key.isDown(39))) and (!Key.isDown(38))) and (!Key.isDown(40))) {
_root.moveup = false;
_root.movedown = false;
_root.moveright = false;
_root.moveleft = false;
move(0, 0);
_root.hit_crate1 = false;
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
if (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false) {
move(5, 0);
}
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 16
function restartLevel() {
_root.scoresubmit16 = savefile.data.scoresubmit16;
savefile.flush();
soundstart = false;
small = false;
if ((((((((((((((var17 != true) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var16 = true;
}
var15 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
greenwall_movement = false;
pinkwall_movement = false;
orangewall_movement = false;
bluewall2_movement = false;
ball_location = true;
black_is_hit_green_right = false;
black_is_hit_green_left = false;
gray_is_hit_green_right = false;
gray_is_hit_green_left = false;
green_hit_right = false;
green_hit_left = false;
ball1_is_pushed_by_green_wall = false;
ball2_is_pushed_by_green_wall = false;
blue_is_attached_to_crate2 = true;
orange_is_attached_to_crate1 = true;
small = false;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.crate1.gotoAndStop(1);
_root.crate2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
ball_movement = true;
finisher = false;
_root.cant_move_crate1_right_against_middle_wall = false;
_root.hit_crate1 = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_right_against_right_wall = false;
_root.cant_move_crate1_left_against_left_wall = false;
_root.cant_move_crate1_left_against_middle_wall = false;
_root.cant_move_crate1_right_against_green_wall = false;
_root.cant_move_crate1_left_against_green_wall = false;
_root.cant_move_crate1_down_against_green_wall = false;
_root.cant_move_crate1_up_against_green_wall = false;
_root.cant_move_crate1_up_against_bluewall2 = false;
_root.cant_move_crate1_up_against_orange_wall = false;
_root.cant_move_crate1_up_against_middlewall_insidetop = false;
_root.cant_move_crate1_down_against_middlewall_insidebottom = false;
_root.green_wall_and_crate1_rightside_touching = false;
_root.crate1_against_green_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_green_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_greenwall = false;
_root.crate1_is_pushed_by_green_wall = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
crate1._x = 505;
crate1._y = 431.1;
crate2._x = 132.6;
crate2._y = 107.8;
crate3._x = 566.5;
crate3._y = 118.6;
crate4._x = 525;
crate4._y = 145.6;
dotty._x = 525;
dotty._y = 145.6;
crate5._x = 534;
crate5._y = 77;
greenkey._x = 244.4;
greenkey._y = 431.4;
orangekey._x = 439.3;
orangekey._y = 435;
pinkkey._x = 582;
pinkkey._y = 78.3;
pinkwall._x = 256.9;
pinkwall._y = 107.8;
bluekey._y = 149.5;
bluekey._x = 102.7;
bluewall2._x = 274.9;
bluewall2._y = 309.3;
orangewall._x = 500;
orangewall._y = 324.7;
smallkey._x = 505;
smallkey._y = 375;
ball1._x = 128.1;
ball1._y = 478.9;
ball2._x = 574.3;
ball2._y = 478.9;
greenwall._x = 729.1;
greenwall._y = 431.4;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 134.5;
finish._y = 309.9;
decoy._width = 32;
decoy._height = 32;
decoy2._width = 32;
decoy2._height = 32;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_green_left == true) {
ball1._x = 2000;
ball2._x = 2000;
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
}
if (gray_is_hit_green_left == true) {
ball1._x = 2000;
ball2._x = 2000;
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_green_right == true) {
ball1._x = 2000;
ball2._x = 2000;
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
}
if (gray_is_hit_green_right == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(16);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l19");
};
ball1.onEnterFrame = function () {
if (this.hitTest(orangekey)) {
keystart = true;
_root.ball1.scan.gotoAndStop(6);
orangekey._x = 100000 /* 0x0186A0 */;
orangewall_movement = true;
}
if (this.hitTest(pinkkey)) {
keystart = true;
pinkkey._x = 100000 /* 0x0186A0 */;
pinkwall_movement = true;
_root.ball1.scan.gotoAndStop(5);
}
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 100000 /* 0x0186A0 */;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (_root.crate2._x == 20000) {
blue_is_attached_to_crate2 = false;
}
if (this.hitTest(bluekey)) {
keystart = true;
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndPlay(1);
bluekey._x = 100000 /* 0x0186A0 */;
bluewall2_movement = true;
}
if (this.hitTest(smallkey)) {
smallstart = true;
smallkey._x = 100000 /* 0x0186A0 */;
this.gotoAndStop(2);
ball2.gotoAndStop(2);
small = true;
}
if (scoresubmit16) {
scoresubmit = false;
} else if (scoresubmit16 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 16) or scoresubmit) {
level16_best_time = seconds;
scoresubmit16 = true;
savefile.data.scoresubmit16 = _root.scoresubmit16;
savefile.flush();
}
if (seconds < level16_best_time) {
level16_best_time = seconds;
}
savefile.data.level16_best_time = _root.level16_best_time;
savefile.flush();
if (_root.score <= 17) {
_root.score = 17;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(16);
_root.win.meter.gotoAndStop(17);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l19");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var16) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l16");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l19");
}
w_is_DOWN = false;
}
}
ballalpha = ball1._alpha;
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
decoyframe = decoy._currentframe;
orangekey._width = 23;
orangekey._height = 20;
bluekey._width = 23;
bluekey._height = 20;
orangekeyx = orangekey._x;
orangekeyy = orangekey._y;
decoy_cratex = decoy_crate._x;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
restartLevel();
totalRestarts = totalRestarts + 1;
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
restartLevel();
totalRestarts = totalRestarts + 1;
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (orange_is_attached_to_crate1 == true) {
orangekey._x = crate1._x;
orangekey._y = crate1._y;
}
if (blue_is_attached_to_crate2 == true) {
bluekey._x = crate2._x;
bluekey._y = crate2._y;
}
ballx = ball1._x;
bally = ball1._y;
if (greenwall_movement) {
greenwall._x = greenwall._x - 1;
}
if (greenwall._x < 420.9) {
soundstart = true;
greenwall_movement = false;
greenwall._x = 420.9;
}
if (pinkwall_movement) {
pinkwall._x = pinkwall._x - 0.5;
}
if (pinkwall._x < 201.6) {
pinkwall_movement = false;
}
if (orangewall_movement) {
orangewall._x = orangewall._x + 2;
}
if (orangewall._x > 700) {
orangewall_movement = false;
}
if (bluewall2_movement) {
bluewall2._x = bluewall2._x + 2;
blue_transparent._x = blue_transparent._x + 2;
bluewall1._x = bluewall1._x + 2;
bluewall._x = bluewall._x + 2;
}
if (bluewall2._x > 372.6) {
soundstart = true;
bluewall2_movement = false;
bluewall2._x = 372.6;
}
differencegreen = ((greenwall._x - (greenwall._width / 2)) - (ball1._width / 2)) - ball1._x;
differencegreen2 = ((greenwall._x - (greenwall._width / 2)) - (ball2._width / 2)) - ball2._x;
distance_between_rightmiddlewall_and_ball = Math.abs(((ball1._x - middlewall._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_rightmiddlewall_and_ball2 = Math.abs(((ball2._x - middlewall._x) - (middlewall._width / 2)) - (ball2._width / 2));
distance_between_lb_and_ball = Math.abs(((ball1._x - lb._x) - (lb._width / 2)) - (ball1._width / 2));
distance_between_lb_and_ball2 = Math.abs(((ball2._x - lb._x) - (lb._width / 2)) - (ball2._width / 2));
distance_y_between_greenwall_and_ball = Math.abs(greenwall._y - ball1._y);
distance_y_between_greenwall_and_ball2 = Math.abs(greenwall._y - ball2._y);
if ((((greenwall_movement == true) and (differencegreen <= 0.2)) and (differencegreen >= -8)) and (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) {
ball1._x = ((greenwall._x - (greenwall._width / 2)) - (ball1._width / 2)) - 0.2;
ball1_is_pushed_by_green_wall = true;
} else {
ball1_is_pushed_by_green_wall = false;
}
if ((((greenwall_movement == true) and (differencegreen2 <= 0.2)) and (differencegreen2 >= -8)) and (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2)))) {
ball2._x = ((greenwall._x - (greenwall._width / 2)) - (ball2._width / 2)) - 0.2;
ball2_is_pushed_by_green_wall = true;
} else {
ball2_is_pushed_by_green_wall = false;
}
if ((((differencegreen <= 0.5) && (distance_between_rightmiddlewall_and_ball <= 0.5)) && (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) or (((differencegreen2 <= 0.5) && (distance_between_rightmiddlewall_and_ball2 <= 0.5)) && (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2))))) {
green_hit_right = true;
cant_move_crate1_up_against_green_wall = false;
cant_move_crate1_down_against_green_wall = false;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if ((((differencegreen <= 0.5) && (distance_between_lb_and_ball <= 0.5)) && (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) or (((differencegreen2 <= 0.5) && (distance_between_lb_and_ball2 <= 0.5)) && (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2))))) {
green_hit_left = true;
cant_move_crate1_up_against_green_wall = false;
cant_move_crate1_down_against_green_wall = false;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if ((((((ball1._y > Stage.height) and (ball1._y < 1000)) or ((ball1._y < 0) and (ball1._y > -1000))) or ((ball1._x > Stage.width) and (ball1._x < 1000))) or ((ball1._x < 0) and (ball1._x > -1000))) and (greenwall._x >= ((Stage.width / 2) + (greenwall._width / 2)))) {
ball_location = false;
cant_move_crate1_up_against_green_wall = false;
cant_move_crate1_down_against_green_wall = false;
green_hit_right = true;
}
if ((((((ball1._y > Stage.height) and (ball1._y < 1000)) or ((ball1._y < 0) and (ball1._y > -1000))) or ((ball1._x > Stage.width) and (ball1._x < 1000))) or ((ball1._x < 0) and (ball1._x > -1000))) and (greenwall._x <= ((Stage.width / 2) + (greenwall._width / 2)))) {
ball_location = false;
green_hit_left = true;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (green_hit_left == true) {
black_is_hit_green_left = true;
}
if (green_hit_right == true) {
gray_is_hit_green_right = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (green_hit_right == true) {
black_is_hit_green_right = true;
}
if (green_hit_left == true) {
gray_is_hit_green_left = true;
}
}
ball_locator();
}
};
Instance of Symbol 1071 MovieClip "crate2" in Frame 16
onClipEvent (load) {
_root.crate_smoosh = false;
}
onClipEvent (enterFrame) {
if (_root.pinkwall._x <= 252.7) {
_x = (_x - 0.5);
}
if (_x <= 118.1) {
_root.blue_is_attached_to_crate2 = false;
_root.crate_smoosh = true;
_x = 20000;
_root.decoy_crate._x = 118.1;
_root.decoy_crate._y = 107.8;
_root.decoy_crate.inside.gotoAndPlay(1);
_root.pinkwall_movement = false;
}
}
Instance of Symbol 1071 MovieClip "crate1" in Frame 16
onClipEvent (load) {
_root.cant_move_crate1_right_against_middle_wall = false;
_root.hit_crate1 = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_right_against_right_wall = false;
_root.cant_move_crate1_left_against_left_wall = false;
_root.cant_move_crate1_left_against_middle_wall = false;
_root.cant_move_crate1_right_against_green_wall = false;
_root.cant_move_crate1_left_against_green_wall = false;
_root.cant_move_crate1_down_against_green_wall = false;
_root.cant_move_crate1_up_against_green_wall = false;
_root.cant_move_crate1_up_against_bluewall2 = false;
_root.cant_move_crate1_up_against_orange_wall = false;
_root.cant_move_crate1_up_against_middlewall_insidetop = false;
_root.cant_move_crate1_down_against_middlewall_insidebottom = false;
_root.green_wall_and_crate1_rightside_touching = false;
_root.crate1_against_green_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_green_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_greenwall = false;
_root.crate1_is_pushed_by_green_wall = false;
}
onClipEvent (enterFrame) {
_root.distance_y_between_ball1_and_crate1 = Math.abs(_root.ball1._y - _y);
_root.difference_x_ball1_with_crate1_rightside = ((_root.ball1._x - _x) - (_width / 2)) - (_root.ball1._width / 2);
_root.difference_x_ball1_with_crate1_leftside = ((_x - _root.ball1._x) - (_width / 2)) - (_root.ball1._width / 2);
_root.distance_y_between_ball2_and_crate1 = Math.abs(_root.ball2._y - _y);
_root.difference_x_ball2_with_crate1_rightside = ((_root.ball2._x - _x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_ball2_with_crate1_leftside = ((_x - _root.ball2._x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_green_with_crate1_left = ((_x - (_width / 2)) - _root.greenwall._x) - (_root.greenwall._width / 2);
_root.difference_x_green_with_crate1_right = ((_root.greenwall._x - (_root.greenwall._width / 2)) - _x) - (_width / 2);
_root.difference_y_green_with_crate1_up = ((_y - (_height / 2)) - _root.greenwall._y) - (_root.greenwall._height / 2);
_root.difference_y_green_with_crate1_down = ((_root.greenwall._y - (_root.greenwall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_greenwall_and_crate1 = Math.abs(_root.greenwall._x - _x);
_root.distance_y_between_greenwall_and_crate1 = Math.abs(_root.greenwall._y - _y);
_root.difference_x_crate1_leftside_with_lb = ((_x - (_width / 2)) - (_root.lb._width / 2)) - _root.lb._x;
_root.difference_x_crate1_leftside_with_bluewall2 = ((_x - (_width / 2)) - (_root.bluewall2._width / 2)) - _root.bluewall2._x;
_root.distance_x_between_middlewall_and_crate1 = Math.abs(_root.middlewall._x - _x);
_root.difference_y_middlewall_insidebottom_with_crate1_down = ((423.8 - (_root.middlewall.middlewall_insidebottom._height / 2)) - (_height / 2)) - _y;
_root.difference_y_middlewall_insidetop_with_crate1_up = ((_y - 125.8) - (_root.middlewall.middlewall_insidetop._height / 2)) - (_height / 2);
if (_x < (Stage.width / 2)) {
if (hitTest(_root.middlewall.middlewall_insidetop) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.middlewall_insidetop.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_middle_wall = true;
}
if (hitTest(_root.middlewall.middlewall_insidebottom) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.middlewall_insidebottom.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_middle_wall = true;
}
if (((((_root.middlewall._x - (_root.middlewall._width / 2)) - (_width / 2)) - _x) <= 0.3) and ((_y > (343.7 - (_height / 2))) or (_y < (205.9 + (_height / 2))))) {
_root.cant_move_crate1_right_against_middle_wall = true;
_root.cant_move_crate1_right_against_orange_wall = true;
_root.cant_move_crate1_right_against_green_wall = true;
_root.cant_move_crate1_right_against_right_wall = true;
} else {
_root.cant_move_crate1_right_against_middle_wall = false;
}
} else {
if (hitTest(_root.middlewall.middlewall_insidetop) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.middlewall_insidetop.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_middle_wall = true;
}
if (hitTest(_root.middlewall.middlewall_insidebottom) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.middlewall_insidebottom.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_middle_wall = true;
}
if (((((_x - _root.middlewall._x) - (_root.middlewall._width / 2)) - (_width / 2)) <= 0.3) and ((_y > (343.7 - (_height / 2))) or (_y < (205.9 + (_height / 2))))) {
_root.cant_move_crate1_left_against_middle_wall = true;
_root.cant_move_crate1_left_against_orange_wall = true;
_root.cant_move_crate1_left_against_green_wall = true;
_root.cant_move_crate1_left_against_left_wall = true;
} else {
_root.cant_move_crate1_left_against_middle_wall = false;
}
}
if (hitTest(_root.leftwall)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_left_wall = true;
}
if ((((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate1_left_against_left_wall = true;
_root.cant_move_crate1_left_against_orange_wall = true;
_root.cant_move_crate1_left_against_green_wall = true;
_root.cant_move_crate1_left_against_middle_wall = true;
} else {
_root.cant_move_crate1_left_against_left_wall = false;
}
if (hitTest(_root.rightwall)) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_right_wall = true;
}
if ((((_root.rightwall._x - _x) - (_root.rightwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate1_right_against_right_wall = true;
_root.cant_move_crate1_right_against_orange_wall = true;
_root.cant_move_crate1_right_against_green_wall = true;
_root.cant_move_crate1_right_against_middle_wall = true;
} else {
_root.cant_move_crate1_right_against_right_wall = false;
}
if (hitTest(_root.orangewall)) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_orange_wall = true;
}
if ((((_y - _root.orangewall._y) - (_root.orangewall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate1_up_against_orange_wall = true;
_root.cant_move_crate1_up_against_top_wall = true;
_root.cant_move_crate1_up_against_green_wall = true;
} else {
_root.cant_move_crate1_up_against_orange_wall = false;
}
if (hitTest(_root.bluewall2)) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_bluewall2 = true;
}
if ((((_y - _root.bluewall2._y) - (_root.bluewall2._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate1_up_against_bluewall2 = true;
_root.cant_move_crate1_up_against_green_wall = true;
} else {
_root.cant_move_crate1_up_against_bluewall2 = false;
}
if (hitTest(_root.bottomwall)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_bottom_wall = true;
}
if ((((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate1_down_against_bottom_wall = true;
_root.cant_move_crate1_down_against_orange_wall = true;
_root.cant_move_crate1_down_against_green_wall = true;
} else {
_root.cant_move_crate1_down_against_bottom_wall = false;
}
if (hitTest(_root.middlewall.middlewall_insidetop) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.middlewall_insidetop.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_middlewall_insidetop = true;
}
if (((_root.difference_y_middlewall_insidetop_with_crate1_up <= 0.3) && (_root.difference_y_middlewall_insidetop_with_crate1_up >= -8)) && (_root.distance_x_between_middlewall_and_crate1 < ((_width / 2) + (_root.middlewall._width / 2)))) {
_root.cant_move_crate1_up_against_middlewall_insidetop = true;
_root.cant_move_crate1_up_against_orange_wall = true;
_root.cant_move_crate1_up_against_green_wall = true;
_root.cant_move_crate1_up_against_top_wall = true;
} else {
_root.cant_move_crate1_up_against_middlewall_insidetop = false;
}
if (hitTest(_root.middlewall.middlewall_insidebottom) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.middlewall_insidebottom.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_middlewall_insidebottom = true;
}
if (((_root.difference_y_middlewall_insidebottom_with_crate1_down <= 0.3) && (_root.difference_y_middlewall_insidebottom_with_crate1_down >= -8)) && (_root.distance_x_between_middlewall_and_crate1 < ((_width / 2) + (_root.middlewall._width / 2)))) {
_root.pork = true;
_root.cant_move_crate1_down_against_middlewall_insidebottom = true;
_root.cant_move_crate1_down_against_orange_wall = true;
_root.cant_move_crate1_down_against_green_wall = true;
_root.cant_move_crate1_down_against_bottom_wall = true;
} else {
_root.cant_move_crate1_down_against_middlewall_insidebottom = false;
_root.pork = false;
}
if (hitTest(_root.greenwall)) {
_root.greenwall_crate1_hit = true;
if ((_root.hit_crate1 == true) and (_root.moveright == true)) {
if ((_root.crate1_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_green_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.moveleft == true)) {
if ((_root.crate1_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_green_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.movedown == true)) {
if (((_root.green_hit_right == false) and (_root.crate1_against_green_wall_boundaries_prevention == false)) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_green_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.moveup == true)) {
if (((_root.green_hit_right == false) and (_root.crate1_against_green_wall_boundaries_prevention == false)) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_green_wall = true;
}
}
} else {
_root.greenwall_crate1_hit = false;
}
if (((_root.difference_x_green_with_crate1_right <= 0.3) && (_root.difference_x_green_with_crate1_right >= -8)) && (_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate1_right_against_green_wall = true;
_root.cant_move_crate1_right_against_middle_wall = true;
_root.cant_move_crate1_right_against_orange_wall = true;
_root.cant_move_crate1_right_against_right_wall = true;
_root.green_wall_and_crate1_rightside_touching = true;
} else {
_root.cant_move_crate1_right_against_green_wall = false;
_root.green_wall_and_crate1_rightside_touching = false;
}
if ((((_root.greenwall_movement == true) and (_root.green_wall_and_crate1_rightside_touching == true)) and (_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - (_width / 2)) - 0.7);
_root.crate1_is_pushed_by_green_wall = true;
}
if (((_root.difference_x_ball1_with_crate1_leftside <= 0.3) && (_root.difference_x_ball1_with_crate1_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate1_leftside_touching = true;
} else {
_root.ball1_and_crate1_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate1_leftside <= 0.3) && (_root.difference_x_ball2_with_crate1_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate1_leftside_touching = true;
} else {
_root.ball2_and_crate1_leftside_touching = false;
}
if (((((_root.ball1_and_crate1_leftside_touching == true) and (_root.crate1_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.greenwall_movement == true)) {
_root.ball1._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball1._width / 2)) - 0.5;
_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall = true;
} else {
_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall = false;
}
if (((((_root.ball2_and_crate1_leftside_touching == true) and (_root.crate1_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.greenwall_movement == true)) {
_root.ball2._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball2._width / 2)) - 0.5;
_root.ball2_is_pushed_by_crate1_is_pushed_by_green_wall = true;
} else {
_root.ball2_is_pushed_by_crate1_is_pushed_by_green_wall = false;
}
if (((((_root.ball1_and_crate1_rightside_touching == true) and (_root.ball1_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveleft == false)) and (_currentframe == 1)) {
_root.cant_move_crate1_right_against_green_wall = false;
_x = (((_root.ball1._x - (_root.ball1._width / 2)) - (_width / 2)) - 0.5);
_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall = true;
} else {
_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall = false;
}
if ((((_root.ball2_and_crate1_rightside_touching == true) and (_root.ball2_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveleft == false)) {
_x = (((_root.ball2._x - (_root.ball2._width / 2)) - (_width / 2)) - 0.5);
_root.crate1_is_pushed_by_ball2_is_pushed_by_greenwall = true;
} else {
_root.crate1_is_pushed_by_ball2_is_pushed_by_greenwall = false;
}
if ((_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.greenwall_movement == true)) {
_root.crate1_against_green_wall_boundaries_prevention = true;
} else {
_root.crate1_against_green_wall_boundaries_prevention = false;
}
if (((_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.distance_y_between_greenwall_and_ball <= ((_root.ball1._height / 2) + (_root.greenwall._height / 2)))) and (_root.greenwall_movement == true)) {
_root.crate1_against_green_wall_boundaries_prevention2 = true;
} else {
_root.crate1_against_green_wall_boundaries_prevention2 = false;
}
if (((_root.difference_x_green_with_crate1_left <= 0.3) && (_root.difference_x_green_with_crate1_left >= -8)) && (_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate1_left_against_green_wall = true;
_root.cant_move_crate1_left_against_middlewall = true;
_root.cant_move_crate1_left_against_orange_wall = true;
_root.cant_move_crate1_left_against_left_wall = true;
} else {
_root.cant_move_crate1_left_against_green_wall = false;
}
if (_root.crate1_against_green_wall_boundaries_prevention == false) {
if (((_root.difference_y_green_with_crate1_up <= 0.3) && (_root.difference_y_green_with_crate1_up >= -8)) && (_root.distance_x_between_greenwall_and_crate1 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate1_up_against_green_wall = true;
_root.cant_move_crate1_up_against_top_wall = true;
_root.cant_move_crate1_up_against_orange_wall = true;
_root.cant_move_crate1_up_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate1_up_against_green_wall = false;
}
if (((_root.difference_y_green_with_crate1_down <= 0.3) && (_root.difference_y_green_with_crate1_down >= -8)) && (_root.distance_x_between_greenwall_and_crate1 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate1_down_against_green_wall = true;
_root.cant_move_crate1_down_against_bottom_wall = true;
_root.cant_move_crate1_down_against_orange_wall = true;
_root.cant_move_crate1_down_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate1_down_against_green_wall = false;
}
} else if ((((_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2))) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate1_leftside <= 0.3)) && (_root.difference_x_ball1_with_crate1_leftside >= -8)) {
_root.cant_move_crate1_down_against_green_wall = true;
_root.cant_move_crate1_up_against_green_wall = true;
_root.cant_move_crate1_left_against_green_wall = true;
_root.cant_move_crate1_right_against_green_wall = true;
} else {
_root.cant_move_crate1_down_against_green_wall = false;
_root.cant_move_crate1_up_against_green_wall = false;
}
if (((_root.greenwall_movement == true) and ((((_root.difference_x_ball1_with_crate1_leftside <= 0.7) && (_root.difference_x_ball1_with_crate1_leftside >= -6)) && (_root.distance_between_rightmiddlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate1 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate1_leftside <= 0.5) && (_root.difference_x_ball2_with_crate1_leftside >= -3)) && (_root.distance_between_rightmiddlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate1 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.green_hit_right = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate1_up_against_green_wall = false;
_root.cant_move_crate1_down_against_green_wall = false;
}
if (((_root.greenwall_movement == true) and ((((_root.difference_x_ball1_with_crate1_leftside <= 2) && (_root.difference_x_ball1_with_crate1_leftside >= -6)) && (_root.distance_between_lb_and_ball <= 1)) && (_root.distance_y_between_ball1_and_crate1 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate1_leftside <= 0.5) && (_root.difference_x_ball2_with_crate1_leftside >= -3)) && (_root.distance_between_lb_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate1 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.green_hit_left = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate1_up_against_green_wall = false;
_root.cant_move_crate1_down_against_green_wall = false;
}
if ((((_root.difference_x_crate1_leftside_with_lb <= 0.3) && (_root.difference_x_crate1_leftside_with_lb >= -8)) or (((_root.difference_x_crate1_leftside_with_bluewall2 <= 7) && (_root.difference_x_crate1_leftside_with_bluewall2 >= -8)) && (_y < 426.1))) && (((_root.crate1_is_pushed_by_green_wall == true) or (_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall == true)) or (_root.crate1_is_pushed_by_ball2_is_pushed_by_greenwall == true))) {
_root.orange_is_attached_to_crate1 = false;
_root.decoy_crate.inside.gotoAndPlay(1);
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_root.greenwall_movement = false;
_x = 2000;
}
}
Instance of Symbol 1071 MovieClip "crate5" in Frame 16
onClipEvent (load) {
_root.cant_move_crate5_right_against_middle_wall = false;
_root.cant_move_crate5_right_against_orange_wall = false;
_root.cant_move_crate5_left_against_orange_wall = false;
_root.cant_move_crate5_down_against_orange_wall = false;
_root.cant_move_crate5_up_against_orange_wall = false;
_root.hit_crate5 = false;
_root.orange_wall_and_crate5_leftside_touching = false;
_root.crate5_against_orange_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate5_is_pushed_by_orange_wall = false;
_root.ball1_and_crate5_rightside_touching = false;
_root.ball1_and_crate5_leftside_touching = false;
_root.ball2_is_pushed_by_crate5_is_pushed_by_orange_wall = false;
_root.ball2_and_crate5_rightside_touching = false;
_root.ball2_and_crate5_leftside_touching = false;
_root.cant_move_crate5_left_against_midwid = false;
_root.cant_move_crate5_up_against_midwid = false;
_root.cant_move_crate5_right_against_right_wall = false;
_root.cant_move_crate5_left_against_left_wall = false;
_root.cant_move_crate5_left_against_middle_wall = false;
_root.cant_move_crate5_right_against_green_wall = false;
_root.cant_move_crate5_left_against_green_wall = false;
_root.cant_move_crate5_down_against_green_wall = false;
_root.cant_move_crate5_up_against_green_wall = false;
_root.cant_move_crate5_up_against_bluewall2 = false;
_root.cant_move_crate5_up_against_middlewall_insidetop = false;
_root.cant_move_crate5_down_against_middlewall_insidebottom = false;
_root.green_wall_and_crate5_rightside_touching = false;
_root.crate5_against_green_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate5_is_pushed_by_green_wall = false;
_root.ball2_is_pushed_by_crate5_is_pushed_by_green_wall = false;
_root.crate5_is_pushed_by_ball1_is_pushed_by_greenwall = false;
_root.crate5_is_pushed_by_ball2_is_pushed_by_greenwall = false;
_root.crate5_is_pushed_by_green_wall = false;
}
onClipEvent (enterFrame) {
_root.difference_x_orange_with_crate5_left = ((_x - (_width / 2)) - _root.orangewall._x) - (_root.orangewall._width / 2);
_root.difference_x_orange_with_crate5_right = ((_root.orangewall._x - (_root.orangewall._width / 2)) - _x) - (_width / 2);
_root.difference_y_orange_with_crate5_up = ((_y - (_height / 2)) - _root.orangewall._y) - (_root.orangewall._height / 2);
_root.difference_y_orange_with_crate5_down = ((_root.orangewall._y - (_root.orangewall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_orangewall_and_crate5 = Math.abs(_root.orangewall._x - _x);
_root.distance_y_between_orangewall_and_crate5 = Math.abs(_root.orangewall._y - _y);
_root.distance_y_between_ball1_and_crate5 = Math.abs(_root.ball1._y - _y);
_root.difference_x_ball1_with_crate5_rightside = ((_root.ball1._x - _x) - (_width / 2)) - (_root.ball1._width / 2);
_root.difference_x_ball1_with_crate5_leftside = ((_x - _root.ball1._x) - (_width / 2)) - (_root.ball1._width / 2);
_root.distance_y_between_ball2_and_crate5 = Math.abs(_root.ball2._y - _y);
_root.difference_x_ball2_with_crate5_rightside = ((_root.ball2._x - _x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_ball2_with_crate5_leftside = ((_x - _root.ball2._x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_green_with_crate5_left = ((_x - (_width / 2)) - _root.greenwall._x) - (_root.greenwall._width / 2);
_root.difference_x_green_with_crate5_right = ((_root.greenwall._x - (_root.greenwall._width / 2)) - _x) - (_width / 2);
_root.difference_y_green_with_crate5_up = ((_y - (_height / 2)) - _root.greenwall._y) - (_root.greenwall._height / 2);
_root.difference_y_green_with_crate5_down = ((_root.greenwall._y - (_root.greenwall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_greenwall_and_crate5 = Math.abs(_root.greenwall._x - _x);
_root.distance_y_between_greenwall_and_crate5 = Math.abs(_root.greenwall._y - _y);
_root.difference_x_crate5_leftside_with_lb = ((_x - (_width / 2)) - (_root.lb._width / 2)) - _root.lb._x;
_root.difference_x_crate5_leftside_with_bluewall2 = ((_x - (_width / 2)) - (_root.bluewall2._width / 2)) - _root.bluewall2._x;
_root.distance_x_between_middlewall_and_crate5 = Math.abs(_root.middlewall._x - _x);
_root.difference_y_middlewall_insidebottom_with_crate5_down = ((423.8 - (_root.middlewall.middlewall_insidebottom._height / 2)) - (_height / 2)) - _y;
_root.difference_y_middlewall_insidetop_with_crate5_up = ((_y - 45.6) - (_root.middlewall.middlewall_insidetop._height / 2)) - (_height / 2);
if (hitTest(_root.orangewall)) {
_root.orangewall_crate5_hit = true;
if ((_root.hit_crate5 == true) and (_root.moveright == true)) {
if ((_root.crate5_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate5_is_pushed_by_orange_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate5_right_against_orange_wall = true;
}
}
if ((_root.hit_crate5 == true) and (_root.moveleft == true)) {
if ((_root.crate5_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate5_is_pushed_by_orange_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate5_left_against_orange_wall = true;
}
}
if ((_root.hit_crate5 == true) and (_root.movedown == true)) {
if ((_root.crate5_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate5_is_pushed_by_orange_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
_root.cant_move_crate5_down_against_orange_wall = true;
}
if ((_root.hit_crate5 == true) and (_root.moveup == true)) {
if ((_root.crate5_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate5_is_pushed_by_orange_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate5_up_against_orange_wall = true;
}
}
} else {
_root.orangewall_crate5_hit = false;
}
if (((_root.difference_x_orange_with_crate5_left <= 0.3) && (_root.difference_x_orange_with_crate5_left >= -8)) && (_root.distance_y_between_orangewall_and_crate5 < ((_height / 2) + (_root.orangewall._height / 2)))) {
_root.cant_move_crate5_left_against_orange_wall = true;
_root.cant_move_crate5_left_against_middle_wall = true;
_root.cant_move_crate5_left_against_green_wall = true;
_root.cant_move_crate5_left_against_left_wall = true;
_root.orange_wall_and_crate5_leftside_touching = true;
} else {
_root.cant_move_crate5_left_against_orange_wall = false;
_root.orange_wall_and_crate5_leftside_touching = false;
}
if ((((_root.orangewall_movement == true) and (_root.orange_wall_and_crate5_leftside_touching == true)) and (_root.distance_y_between_orangewall_and_crate5 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + (_width / 2)) + 0.7);
_root.crate5_is_pushed_by_orange_wall = true;
}
if (((_root.difference_x_ball1_with_crate5_rightside <= 1.5) && (_root.difference_x_ball1_with_crate5_rightside >= -8)) && (_root.distance_y_between_ball1_and_crate5 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate5_rightside_touching = true;
} else {
_root.ball1_and_crate5_rightside_touching = false;
}
if (((_root.difference_x_ball2_with_crate5_rightside <= 0.3) && (_root.difference_x_ball2_with_crate5_rightside >= -8)) && (_root.distance_y_between_ball2_and_crate5 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate5_rightside_touching = true;
} else {
_root.ball2_and_crate5_rightside_touching = false;
}
if ((((_root.ball1_and_crate5_rightside_touching == true) and (_root.crate5_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_orangewall_and_crate5 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_root.distance_y_between_ball1_and_crate5 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1._x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + _width) + (_root.ball1._width / 2)) + 0.5;
_root.ball1_is_pushed_by_crate5_is_pushed_by_orange_wall = true;
} else {
_root.ball1_is_pushed_by_crate5_is_pushed_by_orange_wall = false;
}
if ((((_root.ball2_and_crate5_rightside_touching == true) and (_root.crate5_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_orangewall_and_crate5 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_root.distance_y_between_ball2_and_crate5 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2._x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + _width) + (_root.ball2._width / 2)) + 0.5;
_root.ball2_is_pushed_by_crate5_is_pushed_by_orange_wall = true;
} else {
_root.ball2_is_pushed_by_crate5_is_pushed_by_orange_wall = false;
}
if (((_root.difference_x_ball1_with_crate5_leftside <= 0.3) && (_root.difference_x_ball1_with_crate5_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate5 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate5_leftside_touching = true;
} else {
_root.ball1_and_crate5_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate5_leftside <= 0.3) && (_root.difference_x_ball2_with_crate5_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate5 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate5_leftside_touching = true;
} else {
_root.ball2_and_crate5_leftside_touching = false;
}
if (((((_root.ball1_and_crate5_leftside_touching == true) and (_root.ball1_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_ball1_and_crate5 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveright == false)) and (_currentframe == 1)) {
_x = (((_root.ball1._x + (_root.ball1._width / 2)) + (_width / 2)) + 0.5);
}
if ((((_root.ball2_and_crate5_leftside_touching == true) and (_root.ball2_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_ball2_and_crate5 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveright == false)) {
_x = (((_root.ball2._x + (_root.ball2._width / 2)) + (_width / 2)) + 0.5);
}
if ((_root.distance_y_between_orangewall_and_crate5 < ((_height / 2) + (_root.orangewall._height / 2))) && (_root.orangewall_movement == true)) {
_root.crate5_against_orange_wall_boundaries_prevention = true;
} else {
_root.crate5_against_orange_wall_boundaries_prevention = false;
}
if (((_root.difference_x_orange_with_crate5_right <= 0.3) && (_root.difference_x_orange_with_crate5_right >= -8)) && (_root.distance_y_between_orangewall_and_crate5 < ((_height / 2) + (_root.orangewall._height / 2)))) {
_root.cant_move_crate5_right_against_orange_wall = true;
_root.cant_move_crate5_right_against_middlewall = true;
_root.cant_move_crate5_right_against_green_wall = true;
_root.cant_move_crate5_right_against_right_wall = true;
} else {
_root.cant_move_crate5_right_against_orange_wall = false;
}
if (_root.crate5_against_orange_wall_boundaries_prevention == false) {
if (((_root.difference_y_orange_with_crate5_up <= 0.3) && (_root.difference_y_orange_with_crate5_up >= -8)) && (_root.distance_x_between_orangewall_and_crate5 < ((_width / 2) + (_root.orangewall._width / 2)))) {
_root.cant_move_crate5_up_against_orange_wall = true;
_root.cant_move_crate5_up_against_top_wall = true;
_root.cant_move_crate5_up_against_green_wall = true;
_root.cant_move_crate5_up_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate5_up_against_orange_wall = false;
}
if (((_root.difference_y_orange_with_crate5_down <= 0.3) && (_root.difference_y_orange_with_crate5_down >= -8)) && (_root.distance_x_between_orangewall_and_crate5 < ((_width / 2) + (_root.orangewall._width / 2)))) {
_root.cant_move_crate5_down_against_orange_wall = true;
_root.cant_move_crate5_down_against_bottom_wall = true;
_root.cant_move_crate5_down_against_green_wall = true;
_root.cant_move_crate5_down_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate5_down_against_orange_wall = false;
}
} else if ((((_root.distance_y_between_orangewall_and_crate5 < ((_height / 2) + (_root.orangewall._height / 2))) && (_root.distance_y_between_ball1_and_crate5 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate5_rightside <= 0.3)) && (_root.difference_x_ball1_with_crate5_rightside >= -8)) {
_root.cant_move_crate5_down_against_orange_wall = true;
_root.cant_move_crate5_up_against_orange_wall = true;
_root.cant_move_crate5_left_against_orange_wall = true;
_root.cant_move_crate5_right_against_orange_wall = true;
} else {
_root.cant_move_crate5_down_against_orange_wall = false;
_root.cant_move_crate5_up_against_orange_wall = false;
}
if (((((_root.difference_x_ball1_with_crate5_rightside <= 0.5) && (_root.difference_x_ball1_with_crate5_rightside >= -3)) && (_root.distance_between_leftmiddlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate5 < ((_root.ball1._height / 2) + (_height / 2)))) or ((((_root.difference_x_ball2_with_crate5_rightside <= 0.5) && (_root.difference_x_ball2_with_crate5_rightside >= -3)) && (_root.distance_between_leftmiddlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate5 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.ball_location = false;
_root.ball_locator();
_root.orange_hit = true;
}
if (hitTest(_root.middlewall.middlewall_insidetop) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.middlewall_insidetop.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate5_left_against_middle_wall = true;
}
if (((((_x - _root.middlewall._x) - (_root.middlewall._width / 2)) - (_width / 2)) <= 0.3) and (_y < 227.3)) {
_root.cant_move_crate5_left_against_middle_wall = true;
_root.cant_move_crate5_left_against_orange_wall = true;
_root.cant_move_crate5_left_against_green_wall = true;
_root.cant_move_crate5_left_against_left_wall = true;
} else {
_root.cant_move_crate5_left_against_middle_wall = false;
}
if (hitTest(_root.leftwall)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate5_left_against_left_wall = true;
}
if ((((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate5_left_against_left_wall = true;
_root.cant_move_crate5_left_against_orange_wall = true;
_root.cant_move_crate5_left_against_green_wall = true;
_root.cant_move_crate5_left_against_middle_wall = true;
} else {
_root.cant_move_crate5_left_against_left_wall = false;
}
if (hitTest(_root.rightwall)) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate5_right_against_right_wall = true;
}
if ((((_root.rightwall._x - _x) - (_root.rightwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate5_right_against_right_wall = true;
_root.cant_move_crate5_right_against_orange_wall = true;
_root.cant_move_crate5_right_against_green_wall = true;
_root.cant_move_crate5_right_against_middle_wall = true;
} else {
_root.cant_move_crate5_right_against_right_wall = false;
}
if (hitTest(_root.midwid) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.midwid.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate5_left_against_midwid = true;
}
if (((Math.abs(((_x - _root.midwid._x) - (_root.midwid._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.midwid._y + (_root.midwid._height / 2)) + (_height / 2)))) and (_y > ((_root.midwid._y - (_root.midwid._height / 2)) - (_height / 2)))) {
_root.cant_move_crate5_left_against_midwid = true;
} else {
_root.cant_move_crate5_left_against_midwid = false;
}
if (hitTest(_root.midwid) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.midwid.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate5_up_against_midwid = true;
}
if (((Math.abs(((_y - _root.midwid._y) - (_root.midwid._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.midwid._x + (_root.midwid._width / 2)) + (_width / 2)))) and (_x > ((_root.midwid._x - (_root.midwid._width / 2)) - (_width / 2)))) {
_root.cant_move_crate5_up_against_midwid = true;
} else {
_root.cant_move_crate5_up_against_midwid = false;
}
if (hitTest(_root.topwall)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate5_up_against_top_wall = true;
}
if ((((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate5_up_against_top_wall = true;
_root.cant_move_crate5_up_against_orange_wall = true;
_root.cant_move_crate5_up_against_green_wall = true;
} else {
_root.cant_move_crate5_up_against_top_wall = false;
}
if (hitTest(_root.bluewall2)) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate5_up_against_bluewall2 = true;
}
if ((((_y - _root.bluewall2._y) - (_root.bluewall2._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate5_up_against_bluewall2 = true;
_root.cant_move_crate5_up_against_orange_wall = true;
_root.cant_move_crate5_up_against_green_wall = true;
} else {
_root.cant_move_crate5_up_against_bluewall2 = false;
}
if (hitTest(_root.bottomwall)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate5_down_against_bottom_wall = true;
}
if ((((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate5_down_against_bottom_wall = true;
_root.cant_move_crate5_down_against_orange_wall = true;
_root.cant_move_crate5_down_against_green_wall = true;
} else {
_root.cant_move_crate5_down_against_bottom_wall = false;
}
if (hitTest(_root.middlewall.middlewall_insidetop) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.middlewall_insidetop.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate5_up_against_middlewall_insidetop = true;
}
if (((_root.difference_y_middlewall_insidetop_with_crate5_up <= 0.3) && (_root.difference_y_middlewall_insidetop_with_crate5_up >= -8)) && (_root.distance_x_between_middlewall_and_crate5 < ((_width / 2) + (_root.middlewall._width / 2)))) {
_root.cant_move_crate5_up_against_middlewall_insidetop = true;
_root.cant_move_crate5_up_against_orange_wall = true;
_root.cant_move_crate5_up_against_green_wall = true;
_root.cant_move_crate5_up_against_top_wall = true;
} else {
_root.cant_move_crate5_up_against_middlewall_insidetop = false;
}
if (_root.hit_crate5_2) {
if (hitTest(_root.crate4) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate4.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate5_up_against_crate4 = true;
}
if ((((((_y - _root.crate4._y) - (_root.crate4._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate4._y) - (_root.crate4._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate4._x - _x) < ((_width / 2) + (_root.crate4._width / 2)))) {
_root.cant_move_crate5_up_against_crate4 = true;
_root.cant_move_crate5_up_against_top_wall = true;
_root.cant_move_crate5_up_against_orange_wall = true;
_root.cant_move_crate5_up_against_green_wall = true;
} else {
_root.cant_move_crate5_up_against_crate4 = false;
}
if (hitTest(_root.crate4) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate4.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate5_down_against_crate4 = true;
}
if ((((((_root.crate4._y - _y) - (_root.crate4._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate4._y - _y) - (_root.crate4._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate4._x - _x) < ((_width / 2) + (_root.crate4._width / 2)))) {
_root.cant_move_crate5_down_against_crate4 = true;
_root.cant_move_crate5_down_against_bottom_wall = true;
_root.cant_move_crate5_down_against_orange_wall = true;
_root.cant_move_crate5_down_against_green_wall = true;
} else {
_root.cant_move_crate5_down_against_crate4 = false;
}
if (hitTest(_root.crate4) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate4.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate5_left_against_crate4 = true;
}
if ((((((_x - _root.crate4._x) - (_root.crate4._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate4._x) - (_root.crate4._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate4._y - _y) < ((_height / 2) + (_root.crate4._height / 2)))) {
_root.cant_move_crate5_left_against_crate4 = true;
_root.cant_move_crate5_left_against_left_wall = true;
_root.cant_move_crate5_left_against_orange_wall = true;
_root.cant_move_crate5_left_against_green_wall = true;
_root.cant_move_crate5_left_against_middle_wall = true;
} else {
_root.cant_move_crate5_left_against_crate4 = false;
}
if (hitTest(_root.crate4) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate4.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate5_right_against_crate4 = true;
}
if ((((((_root.crate4._x - _x) - (_root.crate4._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate4._x - _x) - (_root.crate4._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate4._y - _y) < ((_height / 2) + (_root.crate4._height / 2)))) {
_root.cant_move_crate5_right_against_crate4 = true;
_root.cant_move_crate5_right_against_right_wall = true;
_root.cant_move_crate5_right_against_orange_wall = true;
_root.cant_move_crate5_right_against_green_wall = true;
_root.cant_move_crate5_right_against_middle_wall = true;
} else {
_root.cant_move_crate5_right_against_crate4 = false;
}
if (hitTest(_root.crate3) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate3.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate5_up_against_crate3 = true;
}
if ((((((_y - _root.crate3._y) - (_root.crate3._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate3._y) - (_root.crate3._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate3._x - _x) < ((_width / 2) + (_root.crate3._width / 2)))) {
_root.cant_move_crate5_up_against_crate3 = true;
_root.cant_move_crate5_up_against_top_wall = true;
_root.cant_move_crate5_up_against_orange_wall = true;
_root.cant_move_crate5_up_against_green_wall = true;
} else {
_root.cant_move_crate5_up_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate3.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate5_down_against_crate3 = true;
}
if ((((((_root.crate3._y - _y) - (_root.crate3._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate3._y - _y) - (_root.crate3._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate3._x - _x) < ((_width / 2) + (_root.crate3._width / 2)))) {
_root.cant_move_crate5_down_against_crate3 = true;
_root.cant_move_crate5_down_against_bottom_wall = true;
_root.cant_move_crate5_down_against_orange_wall = true;
_root.cant_move_crate5_down_against_green_wall = true;
} else {
_root.cant_move_crate5_down_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate3.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate5_left_against_crate3 = true;
}
if ((((((_x - _root.crate3._x) - (_root.crate3._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate3._x) - (_root.crate3._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate3._y - _y) < ((_height / 2) + (_root.crate3._height / 2)))) {
_root.cant_move_crate5_left_against_crate3 = true;
_root.cant_move_crate5_left_against_left_wall = true;
_root.cant_move_crate5_left_against_orange_wall = true;
_root.cant_move_crate5_left_against_green_wall = true;
_root.cant_move_crate5_left_against_middle_wall = true;
} else {
_root.cant_move_crate5_left_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate3.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate5_right_against_crate3 = true;
}
if ((((((_root.crate3._x - _x) - (_root.crate3._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate3._x - _x) - (_root.crate3._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate3._y - _y) < ((_height / 2) + (_root.crate3._height / 2)))) {
_root.cant_move_crate5_right_against_crate3 = true;
_root.cant_move_crate5_right_against_right_wall = true;
_root.cant_move_crate5_right_against_orange_wall = true;
_root.cant_move_crate5_right_against_green_wall = true;
_root.cant_move_crate5_right_against_middle_wall = true;
} else {
_root.cant_move_crate5_right_against_crate3 = false;
}
}
if (hitTest(_root.greenwall)) {
_root.greenwall_crate5_hit = true;
if ((_root.hit_crate5 == true) and (_root.moveright == true)) {
if ((_root.crate5_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate5_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate5_right_against_green_wall = true;
}
}
if ((_root.hit_crate5 == true) and (_root.moveleft == true)) {
if ((_root.crate5_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate5_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate5_left_against_green_wall = true;
}
}
if ((_root.hit_crate5 == true) and (_root.movedown == true)) {
if ((_root.crate5_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate5_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate5_down_against_green_wall = true;
}
}
if ((_root.hit_crate5 == true) and (_root.moveup == true)) {
if ((_root.crate5_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate5_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate5_up_against_green_wall = true;
}
}
} else {
_root.greenwall_crate5_hit = false;
}
if (((_root.difference_x_green_with_crate5_right <= 0.3) && (_root.difference_x_green_with_crate5_right >= -8)) && (_root.distance_y_between_greenwall_and_crate5 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate5_right_against_green_wall = true;
_root.cant_move_crate5_right_against_middle_wall = true;
_root.cant_move_crate5_right_against_orange_wall = true;
_root.cant_move_crate5_right_against_right_wall = true;
_root.green_wall_and_crate5_rightside_touching = true;
} else {
_root.cant_move_crate5_right_against_green_wall = false;
_root.green_wall_and_crate5_rightside_touching = false;
}
if ((((_root.greenwall_movement == true) and (_root.green_wall_and_crate5_rightside_touching == true)) and (_root.distance_y_between_greenwall_and_crate5 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - (_width / 2)) - 0.7);
_root.crate5_is_pushed_by_green_wall = true;
}
if (((_root.difference_x_ball1_with_crate5_leftside <= 0.3) && (_root.difference_x_ball1_with_crate5_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate5 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate5_leftside_touching = true;
} else {
_root.ball1_and_crate5_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate5_leftside <= 0.3) && (_root.difference_x_ball2_with_crate5_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate5 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate5_leftside_touching = true;
} else {
_root.ball2_and_crate5_leftside_touching = false;
}
if ((((_root.ball1_and_crate5_leftside_touching == true) and (_root.crate5_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate5 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball1_and_crate5 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball1._width / 2)) - 0.5;
_root.ball1_is_pushed_by_crate5_is_pushed_by_green_wall = true;
} else {
_root.ball1_is_pushed_by_crate5_is_pushed_by_green_wall = false;
}
if ((((_root.ball2_and_crate5_leftside_touching == true) and (_root.crate5_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate5 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball2_and_crate5 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball2._width / 2)) - 0.5;
_root.ball2_is_pushed_by_crate5_is_pushed_by_green_wall = true;
} else {
_root.ball2_is_pushed_by_crate5_is_pushed_by_green_wall = false;
}
if (((((_root.ball1_and_crate5_rightside_touching == true) and (_root.ball1_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball1_and_crate5 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveleft == false)) and (_currentframe == 1)) {
_root.cant_move_crate5_right_against_green_wall = false;
_x = (((_root.ball1._x - (_root.ball1._width / 2)) - (_width / 2)) - 0.5);
_root.crate5_is_pushed_by_ball1_is_pushed_by_greenwall = true;
} else {
_root.crate5_is_pushed_by_ball1_is_pushed_by_greenwall = false;
}
if ((((_root.ball2_and_crate5_rightside_touching == true) and (_root.ball2_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball2_and_crate5 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveleft == false)) {
_x = (((_root.ball2._x - (_root.ball2._width / 2)) - (_width / 2)) - 0.5);
_root.crate5_is_pushed_by_ball2_is_pushed_by_greenwall = true;
} else {
_root.crate5_is_pushed_by_ball2_is_pushed_by_greenwall = false;
}
if ((_root.distance_y_between_greenwall_and_crate5 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.greenwall_movement == true)) {
_root.crate5_against_green_wall_boundaries_prevention = true;
} else {
_root.crate5_against_green_wall_boundaries_prevention = false;
}
if (((_root.distance_y_between_greenwall_and_crate5 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.distance_y_between_greenwall_and_ball <= ((_root.ball1._height / 2) + (_root.greenwall._height / 2)))) and (_root.greenwall_movement == true)) {
_root.crate5_against_green_wall_boundaries_prevention2 = true;
} else {
_root.crate5_against_green_wall_boundaries_prevention2 = false;
}
if (((_root.difference_x_green_with_crate5_left <= 0.3) && (_root.difference_x_green_with_crate5_left >= -8)) && (_root.distance_y_between_greenwall_and_crate5 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate5_left_against_green_wall = true;
_root.cant_move_crate5_left_against_middlewall = true;
_root.cant_move_crate5_left_against_orange_wall = true;
_root.cant_move_crate5_left_against_left_wall = true;
} else {
_root.cant_move_crate5_left_against_green_wall = false;
}
if (_root.crate5_against_green_wall_boundaries_prevention == false) {
if (((_root.difference_y_green_with_crate5_up <= 0.3) && (_root.difference_y_green_with_crate5_up >= -8)) && (_root.distance_x_between_greenwall_and_crate5 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate5_up_against_green_wall = true;
_root.cant_move_crate5_up_against_top_wall = true;
_root.cant_move_crate5_up_against_orange_wall = true;
_root.cant_move_crate5_up_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate5_up_against_green_wall = false;
}
if (((_root.difference_y_green_with_crate5_down <= 0.3) && (_root.difference_y_green_with_crate5_down >= -8)) && (_root.distance_x_between_greenwall_and_crate5 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate5_down_against_green_wall = true;
_root.cant_move_crate5_down_against_bottom_wall = true;
_root.cant_move_crate5_down_against_orange_wall = true;
_root.cant_move_crate5_down_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate5_down_against_green_wall = false;
}
} else if ((((_root.distance_y_between_greenwall_and_crate5 < ((_height / 2) + (_root.greenwall._height / 2))) && (_root.distance_y_between_ball1_and_crate5 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate5_leftside <= 0.3)) && (_root.difference_x_ball1_with_crate5_leftside >= -8)) {
_root.cant_move_crate5_down_against_green_wall = true;
_root.cant_move_crate5_up_against_green_wall = true;
_root.cant_move_crate5_left_against_green_wall = true;
_root.cant_move_crate5_right_against_green_wall = true;
} else {
_root.cant_move_crate5_down_against_green_wall = false;
_root.cant_move_crate5_up_against_green_wall = false;
}
if (((((_root.difference_x_ball1_with_crate5_leftside <= 0.7) && (_root.difference_x_ball1_with_crate5_leftside >= -6)) && (_root.distance_between_rightmiddlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate5 < ((_root.ball1._height / 2) + (_height / 2)))) or ((((_root.difference_x_ball2_with_crate5_leftside <= 0.5) && (_root.difference_x_ball2_with_crate5_leftside >= -3)) && (_root.distance_between_rightmiddlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate5 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.green_hit_right = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate5_up_against_green_wall = false;
_root.cant_move_crate5_down_against_green_wall = false;
trace("pooppp");
}
if (((((_root.difference_x_ball1_with_crate5_leftside <= 0.7) && (_root.difference_x_ball1_with_crate5_leftside >= -6)) && (_root.distance_between_lb_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate5 < ((_root.ball1._height / 2) + (_height / 2)))) or ((((_root.difference_x_ball2_with_crate5_leftside <= 0.5) && (_root.difference_x_ball2_with_crate5_leftside >= -3)) && (_root.distance_between_lb_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate5 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.green_hit_left = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate5_up_against_green_wall = false;
_root.cant_move_crate5_down_against_green_wall = false;
trace("pooppp");
}
if ((((_root.difference_x_crate5_leftside_with_lb <= 0.3) && (_root.difference_x_crate5_leftside_with_lb >= -8)) or (((_root.difference_x_crate5_leftside_with_bluewall2 <= 1) && (_root.difference_x_crate5_leftside_with_bluewall2 >= -8)) && (_y < 426.1))) && (((_root.crate5_is_pushed_by_green_wall == true) or (_root.crate5_is_pushed_by_ball1_is_pushed_by_greenwall == true)) or (_root.crate5_is_pushed_by_ball2_is_pushed_by_greenwall == true))) {
gotoAndStop (2);
_root.greenwall_movement = false;
}
}
Instance of Symbol 1071 MovieClip "crate3" in Frame 16
onClipEvent (load) {
_root.cant_move_crate3_right_against_middle_wall = false;
_root.cant_move_crate3_right_against_orange_wall = false;
_root.cant_move_crate3_left_against_orange_wall = false;
_root.cant_move_crate3_down_against_orange_wall = false;
_root.cant_move_crate3_up_against_orange_wall = false;
_root.hit_crate3 = false;
_root.orange_wall_and_crate3_leftside_touching = false;
_root.crate3_against_orange_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate3_is_pushed_by_orange_wall = false;
_root.ball1_and_crate3_rightside_touching = false;
_root.ball1_and_crate3_leftside_touching = false;
_root.ball2_is_pushed_by_crate3_is_pushed_by_orange_wall = false;
_root.ball2_and_crate3_rightside_touching = false;
_root.ball2_and_crate3_leftside_touching = false;
_root.cant_move_crate3_left_against_midwid = false;
_root.cant_move_crate3_up_against_midwid = false;
_root.cant_move_crate3_right_against_right_wall = false;
_root.cant_move_crate3_left_against_left_wall = false;
_root.cant_move_crate3_left_against_middle_wall = false;
_root.cant_move_crate3_right_against_green_wall = false;
_root.cant_move_crate3_left_against_green_wall = false;
_root.cant_move_crate3_down_against_green_wall = false;
_root.cant_move_crate3_up_against_green_wall = false;
_root.cant_move_crate3_up_against_bluewall2 = false;
_root.cant_move_crate3_up_against_middlewall_insidetop = false;
_root.cant_move_crate3_down_against_middlewall_insidebottom = false;
_root.cant_move_crate3_up_against_crate4 = false;
_root.cant_move_crate3_left_against_crate4 = false;
_root.cant_move_crate3_down_against_crate4 = false;
_root.cant_move_crate3_right_against_crate4 = false;
_root.cant_move_crate3_up_against_crate5 = false;
_root.cant_move_crate3_left_against_crate5 = false;
_root.cant_move_crate3_down_against_crate5 = false;
_root.cant_move_crate3_right_against_crate5 = false;
_root.green_wall_and_crate3_rightside_touching = false;
_root.crate3_against_green_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate3_is_pushed_by_green_wall = false;
_root.ball2_is_pushed_by_crate3_is_pushed_by_green_wall = false;
_root.crate3_is_pushed_by_ball1_is_pushed_by_greenwall = false;
_root.crate3_is_pushed_by_ball2_is_pushed_by_greenwall = false;
_root.crate3_is_pushed_by_green_wall = false;
}
onClipEvent (enterFrame) {
_root.difference_x_orange_with_crate3_left = ((_x - (_width / 2)) - _root.orangewall._x) - (_root.orangewall._width / 2);
_root.difference_x_orange_with_crate3_right = ((_root.orangewall._x - (_root.orangewall._width / 2)) - _x) - (_width / 2);
_root.difference_y_orange_with_crate3_up = ((_y - (_height / 2)) - _root.orangewall._y) - (_root.orangewall._height / 2);
_root.difference_y_orange_with_crate3_down = ((_root.orangewall._y - (_root.orangewall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_orangewall_and_crate3 = Math.abs(_root.orangewall._x - _x);
_root.distance_y_between_orangewall_and_crate3 = Math.abs(_root.orangewall._y - _y);
_root.distance_y_between_ball1_and_crate3 = Math.abs(_root.ball1._y - _y);
_root.difference_x_ball1_with_crate3_rightside = ((_root.ball1._x - _x) - (_width / 2)) - (_root.ball1._width / 2);
_root.difference_x_ball1_with_crate3_leftside = ((_x - _root.ball1._x) - (_width / 2)) - (_root.ball1._width / 2);
_root.distance_y_between_ball2_and_crate3 = Math.abs(_root.ball2._y - _y);
_root.difference_x_ball2_with_crate3_rightside = ((_root.ball2._x - _x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_ball2_with_crate3_leftside = ((_x - _root.ball2._x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_green_with_crate3_left = ((_x - (_width / 2)) - _root.greenwall._x) - (_root.greenwall._width / 2);
_root.difference_x_green_with_crate3_right = ((_root.greenwall._x - (_root.greenwall._width / 2)) - _x) - (_width / 2);
_root.difference_y_green_with_crate3_up = ((_y - (_height / 2)) - _root.greenwall._y) - (_root.greenwall._height / 2);
_root.difference_y_green_with_crate3_down = ((_root.greenwall._y - (_root.greenwall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_greenwall_and_crate3 = Math.abs(_root.greenwall._x - _x);
_root.distance_y_between_greenwall_and_crate3 = Math.abs(_root.greenwall._y - _y);
_root.difference_x_crate3_leftside_with_lb = ((_x - (_width / 2)) - (_root.lb._width / 2)) - _root.lb._x;
_root.difference_x_crate3_leftside_with_bluewall2 = ((_x - (_width / 2)) - (_root.bluewall2._width / 2)) - _root.bluewall2._x;
_root.distance_x_between_middlewall_and_crate3 = Math.abs(_root.middlewall._x - _x);
_root.difference_y_middlewall_insidebottom_with_crate3_down = ((423.8 - (_root.middlewall.middlewall_insidebottom._height / 2)) - (_height / 2)) - _y;
_root.difference_y_middlewall_insidetop_with_crate3_up = (_y - 193.1) - (_height / 2);
if (hitTest(_root.orangewall)) {
_root.orangewall_crate3_hit = true;
if ((_root.hit_crate3 == true) and (_root.moveright == true)) {
if ((_root.crate3_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate3_is_pushed_by_orange_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate3_right_against_orange_wall = true;
}
}
if ((_root.hit_crate3 == true) and (_root.moveleft == true)) {
if ((_root.crate3_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate3_is_pushed_by_orange_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate3_left_against_orange_wall = true;
}
}
if ((_root.hit_crate3 == true) and (_root.movedown == true)) {
if ((_root.crate3_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate3_is_pushed_by_orange_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
_root.cant_move_crate3_down_against_orange_wall = true;
}
if ((_root.hit_crate3 == true) and (_root.moveup == true)) {
if ((_root.crate3_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate3_is_pushed_by_orange_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate3_up_against_orange_wall = true;
}
}
} else {
_root.orangewall_crate3_hit = false;
}
if (((_root.difference_x_orange_with_crate3_left <= 0.3) && (_root.difference_x_orange_with_crate3_left >= -8)) && (_root.distance_y_between_orangewall_and_crate3 < ((_height / 2) + (_root.orangewall._height / 2)))) {
_root.cant_move_crate3_left_against_orange_wall = true;
_root.cant_move_crate3_left_against_middle_wall = true;
_root.cant_move_crate3_left_against_green_wall = true;
_root.cant_move_crate3_left_against_left_wall = true;
_root.orange_wall_and_crate3_leftside_touching = true;
} else {
_root.cant_move_crate3_left_against_orange_wall = false;
_root.orange_wall_and_crate3_leftside_touching = false;
}
if ((((_root.orangewall_movement == true) and (_root.orange_wall_and_crate3_leftside_touching == true)) and (_root.distance_y_between_orangewall_and_crate3 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + (_width / 2)) + 0.7);
_root.crate3_is_pushed_by_orange_wall = true;
}
if (((_root.difference_x_ball1_with_crate3_rightside <= 1.5) && (_root.difference_x_ball1_with_crate3_rightside >= -8)) && (_root.distance_y_between_ball1_and_crate3 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate3_rightside_touching = true;
} else {
_root.ball1_and_crate3_rightside_touching = false;
}
if (((_root.difference_x_ball2_with_crate3_rightside <= 0.3) && (_root.difference_x_ball2_with_crate3_rightside >= -8)) && (_root.distance_y_between_ball2_and_crate3 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate3_rightside_touching = true;
} else {
_root.ball2_and_crate3_rightside_touching = false;
}
if ((((_root.ball1_and_crate3_rightside_touching == true) and (_root.crate3_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_orangewall_and_crate3 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_root.distance_y_between_ball1_and_crate3 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1._x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + _width) + (_root.ball1._width / 2)) + 0.5;
_root.ball1_is_pushed_by_crate3_is_pushed_by_orange_wall = true;
} else {
_root.ball1_is_pushed_by_crate3_is_pushed_by_orange_wall = false;
}
if ((((_root.ball2_and_crate3_rightside_touching == true) and (_root.crate3_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_orangewall_and_crate3 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_root.distance_y_between_ball2_and_crate3 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2._x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + _width) + (_root.ball2._width / 2)) + 0.5;
_root.ball2_is_pushed_by_crate3_is_pushed_by_orange_wall = true;
} else {
_root.ball2_is_pushed_by_crate3_is_pushed_by_orange_wall = false;
}
if (((_root.difference_x_ball1_with_crate3_leftside <= 0.3) && (_root.difference_x_ball1_with_crate3_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate3 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate3_leftside_touching = true;
} else {
_root.ball1_and_crate3_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate3_leftside <= 0.3) && (_root.difference_x_ball2_with_crate3_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate3 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate3_leftside_touching = true;
} else {
_root.ball2_and_crate3_leftside_touching = false;
}
if (((((_root.ball1_and_crate3_leftside_touching == true) and (_root.ball1_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_ball1_and_crate3 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveright == false)) and (_currentframe == 1)) {
_x = (((_root.ball1._x + (_root.ball1._width / 2)) + (_width / 2)) + 0.5);
}
if ((((_root.ball2_and_crate3_leftside_touching == true) and (_root.ball2_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_ball2_and_crate3 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveright == false)) {
_x = (((_root.ball2._x + (_root.ball2._width / 2)) + (_width / 2)) + 0.5);
}
if ((_root.distance_y_between_orangewall_and_crate3 < ((_height / 2) + (_root.orangewall._height / 2))) && (_root.orangewall_movement == true)) {
_root.crate3_against_orange_wall_boundaries_prevention = true;
} else {
_root.crate3_against_orange_wall_boundaries_prevention = false;
}
if (((_root.difference_x_orange_with_crate3_right <= 0.3) && (_root.difference_x_orange_with_crate3_right >= -8)) && (_root.distance_y_between_orangewall_and_crate3 < ((_height / 2) + (_root.orangewall._height / 2)))) {
_root.cant_move_crate3_right_against_orange_wall = true;
_root.cant_move_crate3_right_against_middlewall = true;
_root.cant_move_crate3_right_against_green_wall = true;
_root.cant_move_crate3_right_against_right_wall = true;
} else {
_root.cant_move_crate3_right_against_orange_wall = false;
}
if (_root.crate3_against_orange_wall_boundaries_prevention == false) {
if (((_root.difference_y_orange_with_crate3_up <= 0.3) && (_root.difference_y_orange_with_crate3_up >= -8)) && (_root.distance_x_between_orangewall_and_crate3 < ((_width / 2) + (_root.orangewall._width / 2)))) {
_root.cant_move_crate3_up_against_orange_wall = true;
_root.cant_move_crate3_up_against_top_wall = true;
_root.cant_move_crate3_up_against_green_wall = true;
_root.cant_move_crate3_up_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate3_up_against_orange_wall = false;
}
if (((_root.difference_y_orange_with_crate3_down <= 0.3) && (_root.difference_y_orange_with_crate3_down >= -8)) && (_root.distance_x_between_orangewall_and_crate3 < ((_width / 2) + (_root.orangewall._width / 2)))) {
_root.cant_move_crate3_down_against_orange_wall = true;
_root.cant_move_crate3_down_against_bottom_wall = true;
_root.cant_move_crate3_down_against_green_wall = true;
_root.cant_move_crate3_down_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate3_down_against_orange_wall = false;
}
} else if ((((_root.distance_y_between_orangewall_and_crate3 < ((_height / 2) + (_root.orangewall._height / 2))) && (_root.distance_y_between_ball1_and_crate3 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate3_rightside <= 0.3)) && (_root.difference_x_ball1_with_crate3_rightside >= -8)) {
_root.cant_move_crate3_down_against_orange_wall = true;
_root.cant_move_crate3_up_against_orange_wall = true;
_root.cant_move_crate3_left_against_orange_wall = true;
_root.cant_move_crate3_right_against_orange_wall = true;
} else {
_root.cant_move_crate3_down_against_orange_wall = false;
_root.cant_move_crate3_up_against_orange_wall = false;
}
if (((((_root.difference_x_ball1_with_crate3_rightside <= 0.5) && (_root.difference_x_ball1_with_crate3_rightside >= -3)) && (_root.distance_between_leftmiddlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate3 < ((_root.ball1._height / 2) + (_height / 2)))) or ((((_root.difference_x_ball2_with_crate3_rightside <= 0.5) && (_root.difference_x_ball2_with_crate3_rightside >= -3)) && (_root.distance_between_leftmiddlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate3 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.ball_location = false;
_root.ball_locator();
_root.orange_hit = true;
}
if (hitTest(_root.middlewall.middlewall_insidetop) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.middlewall_insidetop.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate3_left_against_middle_wall = true;
}
if (((((_x - _root.middlewall._x) - (_root.middlewall._width / 2)) - (_width / 2)) <= 0.3) and (_y < 209.9)) {
_root.cant_move_crate3_left_against_middle_wall = true;
_root.cant_move_crate3_left_against_orange_wall = true;
_root.cant_move_crate3_left_against_green_wall = true;
_root.cant_move_crate3_left_against_left_wall = true;
} else {
_root.cant_move_crate3_left_against_middle_wall = false;
}
if (hitTest(_root.midwid) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.midwid.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate3_left_against_midwid = true;
}
if (((Math.abs(((_x - _root.midwid._x) - (_root.midwid._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.midwid._y + (_root.midwid._height / 2)) + (_height / 2)))) and (_y > ((_root.midwid._y - (_root.midwid._height / 2)) - (_height / 2)))) {
_root.cant_move_crate3_left_against_midwid = true;
} else {
_root.cant_move_crate3_left_against_midwid = false;
}
if (hitTest(_root.midwid) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.midwid.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate3_up_against_midwid = true;
}
if (((Math.abs(((_y - _root.midwid._y) - (_root.midwid._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.midwid._x + (_root.midwid._width / 2)) + (_width / 2)))) and (_x > ((_root.midwid._x - (_root.midwid._width / 2)) - (_width / 2)))) {
_root.cant_move_crate3_up_against_midwid = true;
} else {
_root.cant_move_crate3_up_against_midwid = false;
}
if (hitTest(_root.leftwall)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate3_left_against_left_wall = true;
}
if ((((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate3_left_against_left_wall = true;
_root.cant_move_crate3_left_against_orange_wall = true;
_root.cant_move_crate3_left_against_green_wall = true;
_root.cant_move_crate3_left_against_middle_wall = true;
} else {
_root.cant_move_crate3_left_against_left_wall = false;
}
if (hitTest(_root.rightwall)) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate3_right_against_right_wall = true;
}
if ((((_root.rightwall._x - _x) - (_root.rightwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate3_right_against_right_wall = true;
_root.cant_move_crate3_right_against_orange_wall = true;
_root.cant_move_crate3_right_against_green_wall = true;
_root.cant_move_crate3_right_against_middle_wall = true;
} else {
_root.cant_move_crate3_right_against_right_wall = false;
}
if (hitTest(_root.topwall)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate3_up_against_top_wall = true;
}
if ((((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate3_up_against_top_wall = true;
_root.cant_move_crate3_up_against_orange_wall = true;
_root.cant_move_crate3_up_against_green_wall = true;
} else {
_root.cant_move_crate3_up_against_top_wall = false;
}
if (hitTest(_root.bluewall2)) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate3_up_against_bluewall2 = true;
}
if ((((_y - _root.bluewall2._y) - (_root.bluewall2._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate3_up_against_bluewall2 = true;
_root.cant_move_crate3_up_against_orange_wall = true;
_root.cant_move_crate3_up_against_green_wall = true;
} else {
_root.cant_move_crate3_up_against_bluewall2 = false;
}
if (hitTest(_root.bottomwall)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate3_down_against_bottom_wall = true;
}
if ((((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate3_down_against_bottom_wall = true;
_root.cant_move_crate3_down_against_orange_wall = true;
_root.cant_move_crate3_down_against_green_wall = true;
} else {
_root.cant_move_crate3_down_against_bottom_wall = false;
}
if (hitTest(_root.middlewall.middlewall_insidetop) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.middlewall_insidetop.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate3_up_against_middlewall_insidetop = true;
}
if (((_root.difference_y_middlewall_insidetop_with_crate3_up <= 0.3) && (_root.difference_y_middlewall_insidetop_with_crate3_up >= -8)) && (_root.distance_x_between_middlewall_and_crate3 < ((_width / 2) + (_root.middlewall._width / 2)))) {
_root.cant_move_crate3_up_against_middlewall_insidetop = true;
_root.cant_move_crate3_up_against_orange_wall = true;
_root.cant_move_crate3_up_against_green_wall = true;
_root.cant_move_crate3_up_against_top_wall = true;
} else {
_root.cant_move_crate3_up_against_middlewall_insidetop = false;
}
if (_root.hit_crate3_2 == true) {
if (hitTest(_root.crate4) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate4.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate3_up_against_crate4 = true;
}
if ((((((_y - _root.crate4._y) - (_root.crate4._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate4._y) - (_root.crate4._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate4._x - _x) < ((_width / 2) + (_root.crate4._width / 2)))) {
_root.cant_move_crate3_up_against_crate4 = true;
_root.cant_move_crate3_up_against_top_wall = true;
_root.cant_move_crate3_up_against_orange_wall = true;
_root.cant_move_crate3_up_against_green_wall = true;
} else {
_root.cant_move_crate3_up_against_crate4 = false;
}
if (hitTest(_root.crate4) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate4.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate3_down_against_crate4 = true;
}
if ((((((_root.crate4._y - _y) - (_root.crate4._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate4._y - _y) - (_root.crate4._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate4._x - _x) < ((_width / 2) + (_root.crate4._width / 2)))) {
_root.cant_move_crate3_down_against_crate4 = true;
_root.cant_move_crate3_down_against_bottom_wall = true;
_root.cant_move_crate3_down_against_orange_wall = true;
_root.cant_move_crate3_down_against_green_wall = true;
} else {
_root.cant_move_crate3_down_against_crate4 = false;
}
if (hitTest(_root.crate4) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate4.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate3_left_against_crate4 = true;
}
if ((((((_x - _root.crate4._x) - (_root.crate4._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate4._x) - (_root.crate4._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate4._y - _y) < ((_height / 2) + (_root.crate4._height / 2)))) {
_root.cant_move_crate3_left_against_crate4 = true;
_root.cant_move_crate3_left_against_left_wall = true;
_root.cant_move_crate3_left_against_orange_wall = true;
_root.cant_move_crate3_left_against_green_wall = true;
_root.cant_move_crate3_left_against_middle_wall = true;
} else {
_root.cant_move_crate3_left_against_crate4 = false;
}
if (hitTest(_root.crate4) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate4.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate3_right_against_crate4 = true;
}
if ((((((_root.crate4._x - _x) - (_root.crate4._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate4._x - _x) - (_root.crate4._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate4._y - _y) < ((_height / 2) + (_root.crate4._height / 2)))) {
_root.cant_move_crate3_right_against_crate4 = true;
_root.cant_move_crate3_right_against_right_wall = true;
_root.cant_move_crate3_right_against_orange_wall = true;
_root.cant_move_crate3_right_against_green_wall = true;
_root.cant_move_crate3_right_against_middle_wall = true;
} else {
_root.cant_move_crate3_right_against_crate4 = false;
}
if (hitTest(_root.crate5) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate5.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate3_up_against_crate5 = true;
}
if ((((((_y - _root.crate5._y) - (_root.crate5._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate5._y) - (_root.crate5._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate5._x - _x) < ((_width / 2) + (_root.crate5._width / 2)))) {
_root.cant_move_crate3_up_against_crate5 = true;
_root.cant_move_crate3_up_against_top_wall = true;
_root.cant_move_crate3_up_against_orange_wall = true;
_root.cant_move_crate3_up_against_green_wall = true;
} else {
_root.cant_move_crate3_up_against_crate5 = false;
}
if (hitTest(_root.crate5) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate5.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate3_down_against_crate5 = true;
}
if ((((((_root.crate5._y - _y) - (_root.crate5._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate5._y - _y) - (_root.crate5._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate5._x - _x) < ((_width / 2) + (_root.crate5._width / 2)))) {
_root.cant_move_crate3_down_against_crate5 = true;
_root.cant_move_crate3_down_against_bottom_wall = true;
_root.cant_move_crate3_down_against_orange_wall = true;
_root.cant_move_crate3_down_against_green_wall = true;
} else {
_root.cant_move_crate3_down_against_crate5 = false;
}
if (hitTest(_root.crate5) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate5.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate3_left_against_crate5 = true;
}
if ((((((_x - _root.crate5._x) - (_root.crate5._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate5._x) - (_root.crate5._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate5._y - _y) < ((_height / 2) + (_root.crate5._height / 2)))) {
_root.cant_move_crate3_left_against_crate5 = true;
_root.cant_move_crate3_left_against_left_wall = true;
_root.cant_move_crate3_left_against_orange_wall = true;
_root.cant_move_crate3_left_against_green_wall = true;
_root.cant_move_crate3_left_against_middle_wall = true;
} else {
_root.cant_move_crate3_left_against_crate5 = false;
}
if (hitTest(_root.crate5) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate5.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate3_right_against_crate5 = true;
}
if ((((((_root.crate5._x - _x) - (_root.crate5._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate5._x - _x) - (_root.crate5._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate5._y - _y) < ((_height / 2) + (_root.crate5._height / 2)))) {
_root.cant_move_crate3_right_against_crate5 = true;
_root.cant_move_crate3_right_against_right_wall = true;
_root.cant_move_crate3_right_against_orange_wall = true;
_root.cant_move_crate3_right_against_green_wall = true;
_root.cant_move_crate3_right_against_middle_wall = true;
} else {
_root.cant_move_crate3_right_against_crate5 = false;
}
}
if (hitTest(_root.greenwall)) {
_root.greenwall_crate3_hit = true;
if ((_root.hit_crate3 == true) and (_root.moveright == true)) {
if ((_root.crate3_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate3_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate3_right_against_green_wall = true;
}
}
if ((_root.hit_crate3 == true) and (_root.moveleft == true)) {
if ((_root.crate3_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate3_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate3_left_against_green_wall = true;
}
}
if ((_root.hit_crate3 == true) and (_root.movedown == true)) {
if ((_root.crate3_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate3_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate3_down_against_green_wall = true;
}
}
if ((_root.hit_crate3 == true) and (_root.moveup == true)) {
if ((_root.crate3_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate3_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate3_up_against_green_wall = true;
}
}
} else {
_root.greenwall_crate3_hit = false;
}
if (((_root.difference_x_green_with_crate3_right <= 0.3) && (_root.difference_x_green_with_crate3_right >= -8)) && (_root.distance_y_between_greenwall_and_crate3 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate3_right_against_green_wall = true;
_root.cant_move_crate3_right_against_middle_wall = true;
_root.cant_move_crate3_right_against_orange_wall = true;
_root.cant_move_crate3_right_against_right_wall = true;
_root.green_wall_and_crate3_rightside_touching = true;
} else {
_root.cant_move_crate3_right_against_green_wall = false;
_root.green_wall_and_crate3_rightside_touching = false;
}
if ((((_root.greenwall_movement == true) and (_root.green_wall_and_crate3_rightside_touching == true)) and (_root.distance_y_between_greenwall_and_crate3 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - (_width / 2)) - 0.7);
_root.crate3_is_pushed_by_green_wall = true;
}
if (((_root.difference_x_ball1_with_crate3_leftside <= 0.3) && (_root.difference_x_ball1_with_crate3_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate3 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate3_leftside_touching = true;
} else {
_root.ball1_and_crate3_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate3_leftside <= 0.3) && (_root.difference_x_ball2_with_crate3_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate3 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate3_leftside_touching = true;
} else {
_root.ball2_and_crate3_leftside_touching = false;
}
if ((((_root.ball1_and_crate3_leftside_touching == true) and (_root.crate3_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate3 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball1_and_crate3 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball1._width / 2)) - 0.5;
_root.ball1_is_pushed_by_crate3_is_pushed_by_green_wall = true;
} else {
_root.ball1_is_pushed_by_crate3_is_pushed_by_green_wall = false;
}
if ((((_root.ball2_and_crate3_leftside_touching == true) and (_root.crate3_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate3 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball2_and_crate3 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball2._width / 2)) - 0.5;
_root.ball2_is_pushed_by_crate3_is_pushed_by_green_wall = true;
} else {
_root.ball2_is_pushed_by_crate3_is_pushed_by_green_wall = false;
}
if (((((_root.ball1_and_crate3_rightside_touching == true) and (_root.ball1_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball1_and_crate3 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveleft == false)) and (_currentframe == 1)) {
_root.cant_move_crate3_right_against_green_wall = false;
_x = (((_root.ball1._x - (_root.ball1._width / 2)) - (_width / 2)) - 0.5);
_root.crate3_is_pushed_by_ball1_is_pushed_by_greenwall = true;
} else {
_root.crate3_is_pushed_by_ball1_is_pushed_by_greenwall = false;
}
if ((((_root.ball2_and_crate3_rightside_touching == true) and (_root.ball2_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball2_and_crate3 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveleft == false)) {
_x = (((_root.ball2._x - (_root.ball2._width / 2)) - (_width / 2)) - 0.5);
_root.crate3_is_pushed_by_ball2_is_pushed_by_greenwall = true;
} else {
_root.crate3_is_pushed_by_ball2_is_pushed_by_greenwall = false;
}
if ((_root.distance_y_between_greenwall_and_crate3 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.greenwall_movement == true)) {
_root.crate3_against_green_wall_boundaries_prevention = true;
} else {
_root.crate3_against_green_wall_boundaries_prevention = false;
}
if (((_root.distance_y_between_greenwall_and_crate3 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.distance_y_between_greenwall_and_ball <= ((_root.ball1._height / 2) + (_root.greenwall._height / 2)))) and (_root.greenwall_movement == true)) {
_root.crate3_against_green_wall_boundaries_prevention2 = true;
} else {
_root.crate3_against_green_wall_boundaries_prevention2 = false;
}
if (((_root.difference_x_green_with_crate3_left <= 0.3) && (_root.difference_x_green_with_crate3_left >= -8)) && (_root.distance_y_between_greenwall_and_crate3 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate3_left_against_green_wall = true;
_root.cant_move_crate3_left_against_middlewall = true;
_root.cant_move_crate3_left_against_orange_wall = true;
_root.cant_move_crate3_left_against_left_wall = true;
} else {
_root.cant_move_crate3_left_against_green_wall = false;
}
if (_root.crate3_against_green_wall_boundaries_prevention == false) {
if (((_root.difference_y_green_with_crate3_up <= 0.3) && (_root.difference_y_green_with_crate3_up >= -8)) && (_root.distance_x_between_greenwall_and_crate3 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate3_up_against_green_wall = true;
_root.cant_move_crate3_up_against_top_wall = true;
_root.cant_move_crate3_up_against_orange_wall = true;
_root.cant_move_crate3_up_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate3_up_against_green_wall = false;
}
if (((_root.difference_y_green_with_crate3_down <= 0.3) && (_root.difference_y_green_with_crate3_down >= -8)) && (_root.distance_x_between_greenwall_and_crate3 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate3_down_against_green_wall = true;
_root.cant_move_crate3_down_against_bottom_wall = true;
_root.cant_move_crate3_down_against_orange_wall = true;
_root.cant_move_crate3_down_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate3_down_against_green_wall = false;
}
} else if ((((_root.distance_y_between_greenwall_and_crate3 < ((_height / 2) + (_root.greenwall._height / 2))) && (_root.distance_y_between_ball1_and_crate3 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate3_leftside <= 0.3)) && (_root.difference_x_ball1_with_crate3_leftside >= -8)) {
_root.cant_move_crate3_down_against_green_wall = true;
_root.cant_move_crate3_up_against_green_wall = true;
_root.cant_move_crate3_left_against_green_wall = true;
_root.cant_move_crate3_right_against_green_wall = true;
} else {
_root.cant_move_crate3_down_against_green_wall = false;
_root.cant_move_crate3_up_against_green_wall = false;
}
if (((((_root.difference_x_ball1_with_crate3_leftside <= 0.7) && (_root.difference_x_ball1_with_crate3_leftside >= -6)) && (_root.distance_between_rightmiddlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate3 < ((_root.ball1._height / 2) + (_height / 2)))) or ((((_root.difference_x_ball2_with_crate3_leftside <= 0.5) && (_root.difference_x_ball2_with_crate3_leftside >= -3)) && (_root.distance_between_rightmiddlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate3 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.green_hit_right = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate3_up_against_green_wall = false;
_root.cant_move_crate3_down_against_green_wall = false;
trace("pooppp");
}
if (((((_root.difference_x_ball1_with_crate3_leftside <= 0.7) && (_root.difference_x_ball1_with_crate3_leftside >= -6)) && (_root.distance_between_lb_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate3 < ((_root.ball1._height / 2) + (_height / 2)))) or ((((_root.difference_x_ball2_with_crate3_leftside <= 0.5) && (_root.difference_x_ball2_with_crate3_leftside >= -3)) && (_root.distance_between_lb_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate3 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.green_hit_left = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate3_up_against_green_wall = false;
_root.cant_move_crate3_down_against_green_wall = false;
trace("pooppp");
}
if ((((_root.difference_x_crate3_leftside_with_lb <= 0.3) && (_root.difference_x_crate3_leftside_with_lb >= -8)) or (((_root.difference_x_crate3_leftside_with_bluewall2 <= 1) && (_root.difference_x_crate3_leftside_with_bluewall2 >= -8)) && (_y < 426.1))) && (((_root.crate3_is_pushed_by_green_wall == true) or (_root.crate3_is_pushed_by_ball1_is_pushed_by_greenwall == true)) or (_root.crate3_is_pushed_by_ball2_is_pushed_by_greenwall == true))) {
gotoAndStop (2);
_root.greenwall_movement = false;
}
}
Instance of Symbol 1071 MovieClip "crate4" in Frame 16
onClipEvent (load) {
_root.cant_move_crate4_right_against_middle_wall = false;
_root.cant_move_crate4_right_against_orange_wall = false;
_root.cant_move_crate4_left_against_orange_wall = false;
_root.cant_move_crate4_down_against_orange_wall = false;
_root.cant_move_crate4_up_against_orange_wall = false;
_root.hit_crate4 = false;
_root.orange_wall_and_crate4_leftside_touching = false;
_root.crate4_against_orange_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
_root.ball1_and_crate4_rightside_touching = false;
_root.ball1_and_crate4_leftside_touching = false;
_root.ball2_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
_root.ball2_and_crate4_rightside_touching = false;
_root.ball2_and_crate4_leftside_touching = false;
_root.cant_move_crate4_right_against_right_wall = false;
_root.cant_move_crate4_left_against_left_wall = false;
_root.cant_move_crate4_left_against_middle_wall = false;
_root.cant_move_crate4_right_against_green_wall = false;
_root.cant_move_crate4_left_against_green_wall = false;
_root.cant_move_crate4_down_against_green_wall = false;
_root.cant_move_crate4_up_against_green_wall = false;
_root.cant_move_crate4_up_against_bluewall2 = false;
_root.cant_move_crate4_up_against_middlewall_insidetop = false;
_root.cant_move_crate4_down_against_middlewall_insidebottom = false;
_root.cant_move_crate4_left_against_midwid = false;
_root.cant_move_crate4_up_against_midwid = false;
_root.cant_move_crate4_up_against_crate3 = false;
_root.cant_move_crate4_left_against_crate3 = false;
_root.cant_move_crate4_down_against_crate3 = false;
_root.cant_move_crate4_right_against_crate3 = false;
_root.cant_move_crate4_up_against_crate5 = false;
_root.cant_move_crate4_left_against_crate5 = false;
_root.cant_move_crate4_down_against_crate5 = false;
_root.cant_move_crate4_right_against_crate5 = false;
_root.green_wall_and_crate4_rightside_touching = false;
_root.crate4_against_green_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall = false;
_root.ball2_is_pushed_by_crate4_is_pushed_by_green_wall = false;
_root.crate4_is_pushed_by_ball1_is_pushed_by_greenwall = false;
_root.crate4_is_pushed_by_ball2_is_pushed_by_greenwall = false;
_root.crate4_is_pushed_by_green_wall = false;
}
onClipEvent (enterFrame) {
_root.difference_x_orange_with_crate4_left = ((_x - (_width / 2)) - _root.orangewall._x) - (_root.orangewall._width / 2);
_root.difference_x_orange_with_crate4_right = ((_root.orangewall._x - (_root.orangewall._width / 2)) - _x) - (_width / 2);
_root.difference_y_orange_with_crate4_up = ((_y - (_height / 2)) - _root.orangewall._y) - (_root.orangewall._height / 2);
_root.difference_y_orange_with_crate4_down = ((_root.orangewall._y - (_root.orangewall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_orangewall_and_crate4 = Math.abs(_root.orangewall._x - _x);
_root.distance_y_between_orangewall_and_crate4 = Math.abs(_root.orangewall._y - _y);
_root.distance_y_between_ball1_and_crate4 = Math.abs(_root.ball1._y - _y);
_root.difference_x_ball1_with_crate4_rightside = ((_root.ball1._x - _x) - (_width / 2)) - (_root.ball1._width / 2);
_root.difference_x_ball1_with_crate4_leftside = ((_x - _root.ball1._x) - (_width / 2)) - (_root.ball1._width / 2);
_root.distance_y_between_ball2_and_crate4 = Math.abs(_root.ball2._y - _y);
_root.difference_x_ball2_with_crate4_rightside = ((_root.ball2._x - _x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_ball2_with_crate4_leftside = ((_x - _root.ball2._x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_green_with_crate4_left = ((_x - (_width / 2)) - _root.greenwall._x) - (_root.greenwall._width / 2);
_root.difference_x_green_with_crate4_right = ((_root.greenwall._x - (_root.greenwall._width / 2)) - _x) - (_width / 2);
_root.difference_y_green_with_crate4_up = ((_y - (_height / 2)) - _root.greenwall._y) - (_root.greenwall._height / 2);
_root.difference_y_green_with_crate4_down = ((_root.greenwall._y - (_root.greenwall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_greenwall_and_crate4 = Math.abs(_root.greenwall._x - _x);
_root.distance_y_between_greenwall_and_crate4 = Math.abs(_root.greenwall._y - _y);
_root.difference_x_crate4_leftside_with_lb = ((_x - (_width / 2)) - (_root.lb._width / 2)) - _root.lb._x;
_root.difference_x_crate4_leftside_with_bluewall2 = ((_x - (_width / 2)) - (_root.bluewall2._width / 2)) - _root.bluewall2._x;
_root.distance_x_between_middlewall_and_crate4 = Math.abs(_root.middlewall._x - _x);
_root.difference_y_middlewall_insidebottom_with_crate4_down = ((423.8 - (_root.middlewall.middlewall_insidebottom._height / 2)) - (_height / 2)) - _y;
_root.difference_y_middlewall_insidetop_with_crate4_up = (_y - 194) - (_height / 2);
if (hitTest(_root.orangewall)) {
_root.orangewall_crate4_hit = true;
if ((_root.hit_crate4 == true) and (_root.moveright == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_orange_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.moveleft == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_orange_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.movedown == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
_root.cant_move_crate4_down_against_orange_wall = true;
}
if ((_root.hit_crate4 == true) and (_root.moveup == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_orange_wall = true;
}
}
} else {
_root.orangewall_crate4_hit = false;
}
if (((_root.difference_x_orange_with_crate4_left <= 0.3) && (_root.difference_x_orange_with_crate4_left >= -8)) && (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) {
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_middle_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_left_wall = true;
_root.orange_wall_and_crate4_leftside_touching = true;
} else {
_root.cant_move_crate4_left_against_orange_wall = false;
_root.orange_wall_and_crate4_leftside_touching = false;
}
if ((((_root.orangewall_movement == true) and (_root.orange_wall_and_crate4_leftside_touching == true)) and (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + (_width / 2)) + 0.7);
_root.crate4_is_pushed_by_orange_wall = true;
}
if (((_root.difference_x_ball1_with_crate4_rightside <= 1.5) && (_root.difference_x_ball1_with_crate4_rightside >= -8)) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate4_rightside_touching = true;
} else {
_root.ball1_and_crate4_rightside_touching = false;
}
if (((_root.difference_x_ball2_with_crate4_rightside <= 0.3) && (_root.difference_x_ball2_with_crate4_rightside >= -8)) && (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate4_rightside_touching = true;
} else {
_root.ball2_and_crate4_rightside_touching = false;
}
if ((((_root.ball1_and_crate4_rightside_touching == true) and (_root.crate4_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1._x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + _width) + (_root.ball1._width / 2)) + 0.5;
_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall = true;
} else {
_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
}
if ((((_root.ball2_and_crate4_rightside_touching == true) and (_root.crate4_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2._x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + _width) + (_root.ball2._width / 2)) + 0.5;
_root.ball2_is_pushed_by_crate4_is_pushed_by_orange_wall = true;
} else {
_root.ball2_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
}
if (((_root.difference_x_ball1_with_crate4_leftside <= 0.3) && (_root.difference_x_ball1_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate4_leftside_touching = true;
} else {
_root.ball1_and_crate4_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate4_leftside <= 0.3) && (_root.difference_x_ball2_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate4_leftside_touching = true;
} else {
_root.ball2_and_crate4_leftside_touching = false;
}
if (((((_root.ball1_and_crate4_leftside_touching == true) and (_root.ball1_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveright == false)) and (_currentframe == 1)) {
_x = (((_root.ball1._x + (_root.ball1._width / 2)) + (_width / 2)) + 0.5);
}
if ((((_root.ball2_and_crate4_leftside_touching == true) and (_root.ball2_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveright == false)) {
_x = (((_root.ball2._x + (_root.ball2._width / 2)) + (_width / 2)) + 0.5);
}
if ((_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2))) && (_root.orangewall_movement == true)) {
_root.crate4_against_orange_wall_boundaries_prevention = true;
} else {
_root.crate4_against_orange_wall_boundaries_prevention = false;
}
if (((_root.difference_x_orange_with_crate4_right <= 0.3) && (_root.difference_x_orange_with_crate4_right >= -8)) && (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) {
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_middlewall = true;
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_right_wall = true;
} else {
_root.cant_move_crate4_right_against_orange_wall = false;
}
if (_root.crate4_against_orange_wall_boundaries_prevention == false) {
if (((_root.difference_y_orange_with_crate4_up <= 0.3) && (_root.difference_y_orange_with_crate4_up >= -8)) && (_root.distance_x_between_orangewall_and_crate4 < ((_width / 2) + (_root.orangewall._width / 2)))) {
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
_root.cant_move_crate4_up_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate4_up_against_orange_wall = false;
}
if (((_root.difference_y_orange_with_crate4_down <= 0.3) && (_root.difference_y_orange_with_crate4_down >= -8)) && (_root.distance_x_between_orangewall_and_crate4 < ((_width / 2) + (_root.orangewall._width / 2)))) {
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_green_wall = true;
_root.cant_move_crate4_down_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate4_down_against_orange_wall = false;
}
} else if ((((_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2))) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate4_rightside <= 0.3)) && (_root.difference_x_ball1_with_crate4_rightside >= -8)) {
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
} else {
_root.cant_move_crate4_down_against_orange_wall = false;
_root.cant_move_crate4_up_against_orange_wall = false;
}
if (((((_root.difference_x_ball1_with_crate4_rightside <= 0.5) && (_root.difference_x_ball1_with_crate4_rightside >= -3)) && (_root.distance_between_leftmiddlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate4 < ((_root.ball1._height / 2) + (_height / 2)))) or ((((_root.difference_x_ball2_with_crate4_rightside <= 0.5) && (_root.difference_x_ball2_with_crate4_rightside >= -3)) && (_root.distance_between_leftmiddlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate4 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.ball_location = false;
_root.ball_locator();
_root.orange_hit = true;
}
if (hitTest(_root.middlewall.middlewall_insidetop) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.middlewall_insidetop.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_middle_wall = true;
}
if (((((_x - _root.middlewall._x) - (_root.middlewall._width / 2)) - (_width / 2)) <= 0.3) and (_y < 209.9)) {
_root.cant_move_crate4_left_against_middle_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_left_wall = true;
} else {
_root.cant_move_crate4_left_against_middle_wall = false;
}
if (hitTest(_root.leftwall)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_left_wall = true;
}
if ((((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate4_left_against_left_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_middle_wall = true;
} else {
_root.cant_move_crate4_left_against_left_wall = false;
}
if (hitTest(_root.midwid) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.midwid.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_midwid = true;
}
if (((Math.abs(((_x - _root.midwid._x) - (_root.midwid._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.midwid._y + (_root.midwid._height / 2)) + (_height / 2)))) and (_y > ((_root.midwid._y - (_root.midwid._height / 2)) - (_height / 2)))) {
_root.cant_move_crate4_left_against_midwid = true;
} else {
_root.cant_move_crate4_left_against_midwid = false;
}
if (hitTest(_root.midwid) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.midwid.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_midwid = true;
}
if (((Math.abs(((_y - _root.midwid._y) - (_root.midwid._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.midwid._x + (_root.midwid._width / 2)) + (_width / 2)))) and (_x > ((_root.midwid._x - (_root.midwid._width / 2)) - (_width / 2)))) {
_root.cant_move_crate4_up_against_midwid = true;
} else {
_root.cant_move_crate4_up_against_midwid = false;
}
if (hitTest(_root.rightwall)) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_right_wall = true;
}
if ((((_root.rightwall._x - _x) - (_root.rightwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate4_right_against_right_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_middle_wall = true;
} else {
_root.cant_move_crate4_right_against_right_wall = false;
}
if (hitTest(_root.topwall)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_top_wall = true;
}
if ((((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
} else {
_root.cant_move_crate4_up_against_top_wall = false;
}
if (hitTest(_root.bluewall2)) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_bluewall2 = true;
}
if ((((_y - _root.bluewall2._y) - (_root.bluewall2._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate4_up_against_bluewall2 = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
} else {
_root.cant_move_crate4_up_against_bluewall2 = false;
}
if (hitTest(_root.bottomwall)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate4_down_against_bottom_wall = true;
}
if ((((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_green_wall = true;
} else {
_root.cant_move_crate4_down_against_bottom_wall = false;
}
if (hitTest(_root.middlewall.middlewall_insidetop) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.middlewall_insidetop.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_middlewall_insidetop = true;
}
if (((_root.difference_y_middlewall_insidetop_with_crate4_up <= 0.3) && (_root.difference_y_middlewall_insidetop_with_crate4_up >= -8)) && (_root.distance_x_between_middlewall_and_crate4 < ((_width / 2) + (_root.middlewall._width / 2)))) {
_root.cant_move_crate4_up_against_middlewall_insidetop = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
_root.cant_move_crate4_up_against_top_wall = true;
} else {
_root.cant_move_crate4_up_against_middlewall_insidetop = false;
}
if (_root.hit_crate4_2) {
if (hitTest(_root.crate3) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate3.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_crate3 = true;
}
if ((((((_y - _root.crate3._y) - (_root.crate3._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate3._y) - (_root.crate3._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate3._x - _x) < ((_width / 2) + (_root.crate3._width / 2)))) {
_root.cant_move_crate4_up_against_crate3 = true;
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
} else {
_root.cant_move_crate4_up_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate3.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate4_down_against_crate3 = true;
}
if ((((((_root.crate3._y - _y) - (_root.crate3._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate3._y - _y) - (_root.crate3._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate3._x - _x) < ((_width / 2) + (_root.crate3._width / 2)))) {
_root.cant_move_crate4_down_against_crate3 = true;
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_green_wall = true;
} else {
_root.cant_move_crate4_down_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate3.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_crate3 = true;
}
if ((((((_x - _root.crate3._x) - (_root.crate3._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate3._x) - (_root.crate3._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate3._y - _y) < ((_height / 2) + (_root.crate3._height / 2)))) {
_root.cant_move_crate4_left_against_crate3 = true;
_root.cant_move_crate4_left_against_left_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_middle_wall = true;
} else {
_root.cant_move_crate4_left_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate3.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_crate3 = true;
}
if ((((((_root.crate3._x - _x) - (_root.crate3._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate3._x - _x) - (_root.crate3._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate3._y - _y) < ((_height / 2) + (_root.crate3._height / 2)))) {
_root.cant_move_crate4_right_against_crate3 = true;
_root.cant_move_crate4_right_against_right_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_middle_wall = true;
} else {
_root.cant_move_crate4_right_against_crate3 = false;
}
if (hitTest(_root.crate5) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate5.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_crate5 = true;
}
if ((((((_y - _root.crate5._y) - (_root.crate5._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate5._y) - (_root.crate5._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate5._x - _x) < ((_width / 2) + (_root.crate5._width / 2)))) {
_root.cant_move_crate4_up_against_crate5 = true;
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
} else {
_root.cant_move_crate4_up_against_crate5 = false;
}
if (hitTest(_root.crate5) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate5.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate4_down_against_crate5 = true;
}
if ((((((_root.crate5._y - _y) - (_root.crate5._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate5._y - _y) - (_root.crate5._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate5._x - _x) < ((_width / 2) + (_root.crate5._width / 2)))) {
_root.cant_move_crate4_down_against_crate5 = true;
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_green_wall = true;
} else {
_root.cant_move_crate4_down_against_crate5 = false;
}
if (hitTest(_root.crate5) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate5.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_crate5 = true;
}
if ((((((_x - _root.crate5._x) - (_root.crate5._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate5._x) - (_root.crate5._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate5._y - _y) < ((_height / 2) + (_root.crate5._height / 2)))) {
_root.cant_move_crate4_left_against_crate5 = true;
_root.cant_move_crate4_left_against_left_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_middle_wall = true;
} else {
_root.cant_move_crate4_left_against_crate5 = false;
}
if (hitTest(_root.crate5) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate5.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_crate5 = true;
}
if ((((((_root.crate5._x - _x) - (_root.crate5._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate5._x - _x) - (_root.crate5._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate5._y - _y) < ((_height / 2) + (_root.crate5._height / 2)))) {
_root.cant_move_crate4_right_against_crate5 = true;
_root.cant_move_crate4_right_against_right_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_middle_wall = true;
} else {
_root.cant_move_crate4_right_against_crate5 = false;
}
}
if (hitTest(_root.greenwall)) {
_root.greenwall_crate4_hit = true;
if ((_root.hit_crate4 == true) and (_root.moveright == true)) {
if ((_root.crate4_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_green_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.moveleft == true)) {
if ((_root.crate4_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_green_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.movedown == true)) {
if ((_root.crate4_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate4_down_against_green_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.moveup == true)) {
if ((_root.crate4_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_green_wall = true;
}
}
} else {
_root.greenwall_crate4_hit = false;
}
if (((_root.difference_x_green_with_crate4_right <= 0.3) && (_root.difference_x_green_with_crate4_right >= -8)) && (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_middle_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_right_wall = true;
_root.green_wall_and_crate4_rightside_touching = true;
} else {
_root.cant_move_crate4_right_against_green_wall = false;
_root.green_wall_and_crate4_rightside_touching = false;
}
if ((((_root.greenwall_movement == true) and (_root.green_wall_and_crate4_rightside_touching == true)) and (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - (_width / 2)) - 0.7);
_root.crate4_is_pushed_by_green_wall = true;
}
if (((_root.difference_x_ball1_with_crate4_leftside <= 0.3) && (_root.difference_x_ball1_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate4_leftside_touching = true;
} else {
_root.ball1_and_crate4_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate4_leftside <= 0.3) && (_root.difference_x_ball2_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate4_leftside_touching = true;
} else {
_root.ball2_and_crate4_leftside_touching = false;
}
if (((((_root.ball1_and_crate4_leftside_touching == true) and (_root.crate4_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.greenwall_movement == true)) {
_root.ball1._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball1._width / 2)) - 0.5;
_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall = true;
} else {
_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall = false;
}
if ((((_root.ball2_and_crate4_leftside_touching == true) and (_root.crate4_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball2._width / 2)) - 0.5;
_root.ball2_is_pushed_by_crate4_is_pushed_by_green_wall = true;
} else {
_root.ball2_is_pushed_by_crate4_is_pushed_by_green_wall = false;
}
if (((((_root.ball1_and_crate4_rightside_touching == true) and (_root.ball1_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveleft == false)) and (_currentframe == 1)) {
_root.cant_move_crate4_right_against_green_wall = false;
_x = (((_root.ball1._x - (_root.ball1._width / 2)) - (_width / 2)) - 0.5);
_root.crate4_is_pushed_by_ball1_is_pushed_by_greenwall = true;
} else {
_root.crate4_is_pushed_by_ball1_is_pushed_by_greenwall = false;
}
if ((((_root.ball2_and_crate4_rightside_touching == true) and (_root.ball2_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveleft == false)) {
_x = (((_root.ball2._x - (_root.ball2._width / 2)) - (_width / 2)) - 0.5);
_root.crate4_is_pushed_by_ball2_is_pushed_by_greenwall = true;
} else {
_root.crate4_is_pushed_by_ball2_is_pushed_by_greenwall = false;
}
if ((_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.greenwall_movement == true)) {
_root.crate4_against_green_wall_boundaries_prevention = true;
} else {
_root.crate4_against_green_wall_boundaries_prevention = false;
}
if (((_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.distance_y_between_greenwall_and_ball <= ((_root.ball1._height / 2) + (_root.greenwall._height / 2)))) and (_root.greenwall_movement == true)) {
_root.crate4_against_green_wall_boundaries_prevention2 = true;
} else {
_root.crate4_against_green_wall_boundaries_prevention2 = false;
}
if (((_root.difference_x_green_with_crate4_left <= 0.3) && (_root.difference_x_green_with_crate4_left >= -8)) && (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_middlewall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_left_wall = true;
} else {
_root.cant_move_crate4_left_against_green_wall = false;
}
if (_root.crate4_against_green_wall_boundaries_prevention == false) {
if (((_root.difference_y_green_with_crate4_up <= 0.3) && (_root.difference_y_green_with_crate4_up >= -8)) && (_root.distance_x_between_greenwall_and_crate4 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate4_up_against_green_wall = true;
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate4_up_against_green_wall = false;
}
if (((_root.difference_y_green_with_crate4_down <= 0.3) && (_root.difference_y_green_with_crate4_down >= -8)) && (_root.distance_x_between_greenwall_and_crate4 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate4_down_against_green_wall = true;
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate4_down_against_green_wall = false;
}
} else if ((((_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2))) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate4_leftside <= 0.3)) && (_root.difference_x_ball1_with_crate4_leftside >= -8)) {
_root.cant_move_crate4_down_against_green_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_right_against_green_wall = true;
} else {
_root.cant_move_crate4_down_against_green_wall = false;
_root.cant_move_crate4_up_against_green_wall = false;
}
if (((_root.greenwall_movement == true) and ((((_root.difference_x_ball1_with_crate4_leftside <= 0.7) && (_root.difference_x_ball1_with_crate4_leftside >= -6)) && (_root.distance_between_rightmiddlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate4 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate4_leftside <= 0.5) && (_root.difference_x_ball2_with_crate4_leftside >= -3)) && (_root.distance_between_rightmiddlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate4 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.green_hit_right = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate4_up_against_green_wall = false;
_root.cant_move_crate4_down_against_green_wall = false;
trace("pooppp");
}
if (((_root.greenwall_movement == true) and ((((_root.difference_x_ball1_with_crate4_leftside <= 0.7) && (_root.difference_x_ball1_with_crate4_leftside >= -6)) && (_root.distance_between_lb_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate4 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate4_leftside <= 0.5) && (_root.difference_x_ball2_with_crate4_leftside >= -3)) && (_root.distance_between_lb_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate4 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.green_hit_left = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate4_up_against_green_wall = false;
_root.cant_move_crate4_down_against_green_wall = false;
trace("pooppp");
}
if ((((_root.difference_x_crate4_leftside_with_lb <= 0.3) && (_root.difference_x_crate4_leftside_with_lb >= -8)) or (((_root.difference_x_crate4_leftside_with_bluewall2 <= 1) && (_root.difference_x_crate4_leftside_with_bluewall2 >= -8)) && (_y < 426.1))) && (((_root.crate4_is_pushed_by_green_wall == true) or (_root.crate4_is_pushed_by_ball1_is_pushed_by_greenwall == true)) or (_root.crate4_is_pushed_by_ball2_is_pushed_by_greenwall == true))) {
gotoAndStop (2);
_root.greenwall_movement = false;
}
}
Instance of Symbol 1257 MovieClip "ball1" in Frame 16
onClipEvent (load) {
_root.hit_crate1 = false;
}
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lm)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lm.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lm.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lm.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lm.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.midwid)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.midwid.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.midwid.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.midwid.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.midwid.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lb)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lb.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lb.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lb.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lb.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.crate1)) {
if (_root.crate1._currentframe == 1) {
_root.hit_crate1 = true;
if (xmove > 0) {
if ((_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate1.getBounds(_root).xMin) + 0.1));
if (((_root.cant_move_crate1_right_against_green_wall == false) and (_root.cant_move_crate1_right_against_right_wall == false)) and (_root.small == false)) {
_root.cratespeed_xright = 1;
_root.crate1._x = _root.crate1._x + _root.cratespeed_xright;
_root.moveright = true;
}
}
} else {
_root.moveright = false;
}
if (xmove < 0) {
if (_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall == false) {
_x = (_x - ((getBounds(_root).xMin - _root.crate1.getBounds(_root).xMax) - 0.1));
if (((_root.cant_move_crate1_left_against_green_wall == false) and (_root.cant_move_crate1_left_against_middle_wall == false)) and (_root.small == false)) {
_root.cratespeed_xleft = 1;
_root.crate1._x = _root.crate1._x - _root.cratespeed_xleft;
_root.moveleft = true;
}
}
} else {
_root.moveleft = false;
}
if (ymove > 0) {
if ((((_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false) && (_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall == false)) and (_root.difference_x_ball1_with_crate1_leftside <= -1)) and (_root.difference_x_ball1_with_crate1_rightside <= -1)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate1.getBounds(_root).yMin) + 0.1));
if (((_root.cant_move_crate1_down_against_green_wall == false) and (_root.cant_move_crate1_down_against_bottom_wall == false)) and (_root.small == false)) {
_root.cratespeed_ydown = 1;
_root.crate1._y = _root.crate1._y + _root.cratespeed_ydown;
_root.movedown = true;
}
}
} else {
_root.movedown = false;
}
if (ymove < 0) {
if ((((_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false) && (_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall == false)) and (_root.difference_x_ball1_with_crate1_leftside <= -1)) and (_root.difference_x_ball1_with_crate1_rightside <= -1)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate1.getBounds(_root).yMax) - 0.1));
if (((_root.cant_move_crate1_up_against_green_wall == false) and (_root.cant_move_crate1_up_against_middlewall_insidetop == false)) and (_root.small == false)) {
_root.cratespeed_yup = 1;
_root.crate1._y = _root.crate1._y - _root.cratespeed_yup;
_root.moveup = true;
}
}
} else {
_root.moveup = false;
}
}
} else {
_root.cratespeed_xright = 0;
_root.cratespeed_xleft = 0;
_root.cratespeed_ydown = 0;
_root.cratespeed_yup = 0;
}
if (hitTest(_root.crate3)) {
_root.hit_crate3 = true;
_root.hit_crate4_2 = false;
_root.hit_crate3_2 = true;
_root.hit_crate5_2 = false;
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.crate3.getBounds(_root).xMin) + 0.1));
if (((_root.cant_move_crate3_right_against_green_wall == false) and (_root.cant_move_crate3_right_against_right_wall == false)) and (_root.small == false)) {
_root.cratespeed_xright = 1;
_root.crate3._x = _root.crate3._x + _root.cratespeed_xright;
_root.moveright = true;
}
} else {
_root.moveright = false;
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.crate3.getBounds(_root).xMax) - 0.1));
if ((((_root.cant_move_crate3_left_against_green_wall == false) and (_root.cant_move_crate3_left_against_middle_wall == false)) and (_root.cant_move_crate3_left_against_midwid == false)) and (_root.small == false)) {
_root.cratespeed_xleft = 1;
_root.crate3._x = _root.crate3._x - _root.cratespeed_xleft;
_root.moveleft = true;
}
} else {
_root.moveleft = false;
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.crate3.getBounds(_root).yMin) + 0.1));
if (((_root.cant_move_crate3_down_against_green_wall == false) and (_root.cant_move_crate3_down_against_bottom_wall == false)) and (_root.small == false)) {
_root.cratespeed_ydown = 1;
_root.crate3._y = _root.crate3._y + _root.cratespeed_ydown;
_root.movedown = true;
}
} else {
_root.movedown = false;
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.crate3.getBounds(_root).yMax) - 0.1));
if (((((_root.cant_move_crate3_up_against_green_wall == false) and (_root.cant_move_crate3_up_against_middlewall_insidetop == false)) and (_root.cant_move_crate3_up_against_top_wall == false)) and (_root.cant_move_crate3_up_against_midwid == false)) and (_root.small == false)) {
_root.cratespeed_yup = 1;
_root.crate3._y = _root.crate3._y - _root.cratespeed_yup;
_root.moveup = true;
}
} else {
_root.moveup = false;
}
} else {
_root.cratespeed_xright = 0;
_root.cratespeed_xleft = 0;
_root.cratespeed_ydown = 0;
_root.cratespeed_yup = 0;
}
if (hitTest(_root.crate4)) {
_root.hit_crate4 = true;
_root.hit_crate4_2 = true;
_root.hit_crate3_2 = false;
_root.hit_crate5_2 = false;
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.crate4.getBounds(_root).xMin) + 0.1));
if (((_root.cant_move_crate4_right_against_green_wall == false) and (_root.cant_move_crate4_right_against_right_wall == false)) and (_root.small == false)) {
_root.cratespeed_xright = 1;
_root.crate4._x = _root.crate4._x + _root.cratespeed_xright;
_root.moveright = true;
}
} else {
_root.moveright = false;
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.crate4.getBounds(_root).xMax) - 0.5));
if ((((_root.cant_move_crate4_left_against_green_wall == false) and (_root.cant_move_crate4_left_against_middle_wall == false)) and (_root.cant_move_crate4_left_against_midwid == false)) and (_root.small == false)) {
_root.cratespeed_xleft = 1;
_root.crate4._x = _root.crate4._x - _root.cratespeed_xleft;
_root.moveleft = true;
}
} else {
_root.moveleft = false;
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.crate4.getBounds(_root).yMin) + 0.1));
if (((_root.cant_move_crate4_down_against_green_wall == false) and (_root.cant_move_crate4_down_against_bottom_wall == false)) and (_root.small == false)) {
_root.cratespeed_ydown = 1;
_root.crate4._y = _root.crate4._y + _root.cratespeed_ydown;
_root.movedown = true;
}
} else {
_root.movedown = false;
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.crate4.getBounds(_root).yMax) - 0.1));
if (((((_root.cant_move_crate4_up_against_green_wall == false) and (_root.cant_move_crate4_up_against_middlewall_insidetop == false)) and (_root.cant_move_crate4_up_against_top_wall == false)) and (_root.cant_move_crate4_up_against_midwid == false)) and (_root.small == false)) {
_root.cratespeed_yup = 1;
_root.crate4._y = _root.crate4._y - _root.cratespeed_yup;
_root.moveup = true;
}
} else {
_root.moveup = false;
}
} else {
_root.cratespeed_xright = 0;
_root.cratespeed_xleft = 0;
_root.cratespeed_ydown = 0;
_root.cratespeed_yup = 0;
}
if (hitTest(_root.crate5)) {
_root.hit_crate5 = true;
_root.hit_crate4_2 = false;
_root.hit_crate3_2 = false;
_root.hit_crate5_2 = true;
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.crate5.getBounds(_root).xMin) + 0.1));
if (((_root.cant_move_crate5_right_against_green_wall == false) and (_root.cant_move_crate5_right_against_right_wall == false)) and (_root.small == false)) {
_root.cratespeed_xright = 1;
_root.crate5._x = _root.crate5._x + _root.cratespeed_xright;
_root.moveright = true;
}
} else {
_root.moveright = false;
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.crate5.getBounds(_root).xMax) - 0.1));
if ((((_root.cant_move_crate5_left_against_green_wall == false) and (_root.cant_move_crate5_left_against_middle_wall == false)) and (_root.cant_move_crate5_left_against_midwid == false)) and (_root.small == false)) {
_root.cratespeed_xleft = 1;
_root.crate5._x = _root.crate5._x - _root.cratespeed_xleft;
_root.moveleft = true;
}
} else {
_root.moveleft = false;
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.crate5.getBounds(_root).yMin) + 0.1));
if (((_root.cant_move_crate5_down_against_green_wall == false) and (_root.cant_move_crate5_down_against_bottom_wall == false)) and (_root.small == false)) {
_root.cratespeed_ydown = 1;
_root.crate5._y = _root.crate5._y + _root.cratespeed_ydown;
_root.movedown = true;
}
} else {
_root.movedown = false;
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.crate5.getBounds(_root).yMax) - 0.1));
if (((((_root.cant_move_crate5_up_against_green_wall == false) and (_root.cant_move_crate5_up_against_middlewall_insidetop == false)) and (_root.cant_move_crate5_up_against_top_wall == false)) and (_root.cant_move_crate5_up_against_midwid == false)) and (_root.small == false)) {
_root.cratespeed_yup = 1;
_root.crate5._y = _root.crate5._y - _root.cratespeed_yup;
_root.moveup = true;
}
} else {
_root.moveup = false;
}
} else {
_root.cratespeed_xright = 0;
_root.cratespeed_xleft = 0;
_root.cratespeed_ydown = 0;
_root.cratespeed_yup = 0;
}
if (hitTest(_root.crate2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.crate2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.crate2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.crate2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.crate2.getBounds(_root).yMax) - 0.1));
}
}
}
if ((((!Key.isDown(37)) and (!Key.isDown(39))) and (!Key.isDown(38))) and (!Key.isDown(40))) {
_root.moveup = false;
_root.movedown = false;
_root.moveright = false;
_root.moveleft = false;
move(0, 0);
_root.hit_crate1 = false;
_root.hit_crate3 = false;
_root.hit_crate4 = false;
_root.hit_crate5 = false;
}
if (_root.ball_movement == true) {
if (_root.ball_location) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
if (_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false) {
move(5, 0);
}
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
}
Instance of Symbol 1745 MovieClip "ball2" in Frame 17
onClipEvent (load) {
xmove2 = 0;
ymove2 = 0;
}
onClipEvent (enterFrame) {
function move2(xmove2, ymove2) {
_x = (_x + xmove2);
_y = (_y + ymove2);
if (hitTest(_root.leftwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightside)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightside.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightside.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftside)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftside.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftside.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftside.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightright)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightright.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightright.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightright.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightright.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.warp_on == true) {
if (Key.isDown(37)) {
move2(5, 0);
}
if (Key.isDown(39)) {
move2(-5, 0);
}
if (Key.isDown(38)) {
move2(0, 5);
}
if (Key.isDown(40)) {
move2(0, -5);
}
}
}
Frame 18
function restartLevel() {
_root.scoresubmit15 = savefile.data.scoresubmit15;
savefile.flush();
soundstart = false;
small = false;
explosionsound2 = false;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
if (((((((((((((((var16 != true) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var15 = true;
}
var14 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
greenwallleft_movement = false;
greenwallright_movement = false;
greentransparent_movement = false;
redwall_movement = false;
bluewall_movement = false;
ball_movement = true;
finisher = false;
bluekey._width = 32.1;
bluekey._height = 28.1;
ball_location = true;
black_is_hit_blue_right = false;
black_is_hit_blue_left = false;
gray_is_hit_blue_right = false;
gray_is_hit_blue_left = false;
blue_hit_right = false;
blue_hit_left = false;
gray_is_hit_green = false;
black_is_hit_green = false;
green_hit = false;
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
greenkey._x = 579.1;
greenkey._y = 480.9;
redkey._x = 200;
redkey._y = 76;
bluekey._x = 513;
bluekey._y = 273.5;
bluewall._x = 129.1;
bluewall._y = 274.2;
redwall._x = 470.8;
redwall._y = 183.2;
greenwallleft._x = 130.8;
greenwallleft._y = 71.5;
greenwallright._x = 269.2;
greenwallright._y = 71.5;
green_transparent._y = 71.3;
green_transparent._x = 200.2;
greenwall._y = 71.2;
greenwall._x = 200.8;
ball1._x = 200;
ball1._y = 273.5;
ball2._x = 431;
ball2._y = 273.5;
lb._x = 200;
lb._y = 373.4;
lm._x = 200;
lm._y = 175.1;
rl._x = 440.1;
rl._y = 404.9;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 494;
finish._y = 93.5;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_blue_left == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
_root.decoy.inside2.gotoAndPlay(1);
_root.decoy2.inside3.gotoAndPlay(1);
}
if (gray_is_hit_blue_left == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
_root.decoy.inside3.gotoAndPlay(1);
_root.decoy2.inside2.gotoAndPlay(1);
}
if (black_is_hit_blue_right == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
_root.decoy.inside2.gotoAndPlay(1);
_root.decoy2.inside3.gotoAndPlay(1);
}
if (gray_is_hit_blue_right == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
_root.decoy.inside3.gotoAndPlay(1);
_root.decoy2.inside2.gotoAndPlay(1);
}
if (black_is_hit_green == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
_root.decoy.inside2.gotoAndPlay(1);
_root.decoy2.inside3.gotoAndPlay(1);
}
if (gray_is_hit_green == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
_root.decoy.inside3.gotoAndPlay(1);
_root.decoy2.inside2.gotoAndPlay(1);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(15);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l14");
};
ball1.onEnterFrame = function () {
if (this.hitTest(redkey)) {
keystart = true;
redkey._x = 100000 /* 0x0186A0 */;
redwall_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 100000 /* 0x0186A0 */;
greenwallleft_movement = true;
greenwallright_movement = true;
greentransparent_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (this.hitTest(bluekey)) {
keystart = true;
bluekey._x = 100000 /* 0x0186A0 */;
bluewall_movement = true;
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndPlay(1);
}
if (greenwallright.hitTest(bluewall)) {
soundstart = true;
greenwallright_movement = false;
greenwallleft_movement = false;
greentransparent_movement = false;
bluewall_movement = false;
if ((((greenwallright._x - (greenwallright._width / 2)) - bluewall._x) - (bluewall._width / 2)) < -1) {
greenwallright._y = (bluewall._y - (bluewall._height / 2)) - (greenwallright._height / 2);
greenwallleft._y = (bluewall._y - (bluewall._height / 2)) - (greenwallleft._height / 2);
green_transparent._y = (bluewall._y - (bluewall._height / 2)) - (green_transparent._height / 2);
greenwall._y = (bluewall._y - (bluewall._height / 2)) - (greenwall._height / 2);
} else {
bluewall._x = ((greenwallright._x - (greenwallright._width / 2)) - (bluewall._width / 2)) - 0.3;
}
}
if (scoresubmit15) {
scoresubmit = false;
} else if (scoresubmit15 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 15) or scoresubmit) {
level15_best_time = seconds;
scoresubmit15 = true;
savefile.data.scoresubmit15 = _root.scoresubmit15;
savefile.flush();
}
if (seconds < level15_best_time) {
level15_best_time = seconds;
}
savefile.data.level15_best_time = _root.level15_best_time;
savefile.flush();
if (_root.score <= 16) {
_root.score = 16;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(15);
_root.win.meter.gotoAndStop(16);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l14");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var15) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l21");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l14");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (greenwallleft_movement) {
greenwallleft._y = greenwallleft._y + 1;
}
if (greenwallright_movement) {
greenwallright._y = greenwallright._y + 1;
green_transparent._y = green_transparent._y + 1;
greenwall._y = greenwall._y + 1;
}
if (greenwallleft._y > 469.5) {
greenwallleft_movement = false;
soundstart = true;
greenwallleft._y = 469.5;
greenwallright._y = 469.5;
}
if (greenwallright._y > 469.5) {
greenwallright_movement = false;
}
if (redwall_movement) {
redwall._x = redwall._x + 2;
}
if (bluewall_movement) {
bluewall._x = bluewall._x + 0.4;
}
if (bluewall._x > 510.6) {
bluewall_movement = false;
soundstart = true;
bluewall._x = 510.6;
}
differenceblue = ((ball1._x - bluewall._x) - (bluewall._width / 2)) - (ball1._width / 2);
differenceblue2 = ((ball2._x - bluewall._x) - (bluewall._width / 2)) - (ball2._width / 2);
distance_between_leftmiddlewall_and_ball = Math.abs(((middlewall._x - ball1._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_leftmiddlewall_and_ball2 = Math.abs(((middlewall._x - ball2._x) - (middlewall._width / 2)) - (ball2._width / 2));
distance_between_rr_and_ball = Math.abs(((rr._x - ball1._x) - (rr._width / 2)) - (ball1._width / 2));
distance_between_rr_and_ball2 = Math.abs(((rr._x - ball2._x) - (rr._width / 2)) - (ball2._width / 2));
distance_y_between_bluewall_and_ball = Math.abs(bluewall._y - ball1._y);
distance_y_between_bluewall_and_ball2 = Math.abs(bluewall._y - ball2._y);
if ((((bluewall_movement == true) and (differenceblue <= 0.2)) and (differenceblue >= -8)) and (distance_y_between_bluewall_and_ball < ((ball1._height / 2) + (bluewall._height / 2)))) {
ball1._x = ((bluewall._x + (bluewall._width / 2)) + (ball1._width / 2)) + 0.2;
}
if ((((bluewall_movement == true) and (differenceblue2 <= 0.2)) and (differenceblue2 >= -8)) and (distance_y_between_bluewall_and_ball2 < ((ball2._height / 2) + (bluewall._height / 2)))) {
ball2._x = ((bluewall._x + (bluewall._width / 2)) + (ball2._width / 2)) + 0.2;
}
if (((((differenceblue <= 0.5) && (differenceblue >= -1)) && (distance_between_leftmiddlewall_and_ball <= 0.5)) && (distance_y_between_bluewall_and_ball < ((ball1._height / 2) + (bluewall._height / 2)))) or ((((differenceblue2 <= 0.5) && (differenceblue2 >= -1)) && (distance_between_leftmiddlewall_and_ball2 <= 0.5)) && (distance_y_between_bluewall_and_ball2 < ((ball2._height / 2) + (bluewall._height / 2))))) {
blue_hit_left = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (((((differenceblue <= 0.5) && (differenceblue >= -1)) && (distance_between_rr_and_ball <= 1)) && (distance_y_between_bluewall_and_ball < ((ball1._height / 2) + (bluewall._height / 2)))) or ((((differenceblue2 <= 0.5) && (differenceblue2 >= -1)) && (distance_between_rr_and_ball2 <= 0.5)) && (distance_y_between_bluewall_and_ball2 < ((ball2._height / 2) + (bluewall._height / 2))))) {
blue_hit_right = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if ((((((ball1._y > Stage.height) and (ball1._y < 1000)) or ((ball1._y < 0) and (ball1._y > -1000))) or ((ball1._x > Stage.width) and (ball1._x < 1000))) or ((ball1._x < 0) and (ball1._x > -1000))) and (bluewall._x <= ((Stage.width / 2) - (bluewall._width / 2)))) {
blue_hit_left = true;
ball_location = false;
}
if ((((((ball1._y > Stage.height) and (ball1._y < 1000)) or ((ball1._y < 0) and (ball1._y > -1000))) or ((ball1._x > Stage.width) and (ball1._x < 1000))) or ((ball1._x < 0) and (ball1._x > -1000))) and (bluewall._x >= ((Stage.width / 2) + (bluewall._width / 2)))) {
blue_hit_right = true;
ball_location = false;
}
differencegreen = ((ball1._y - greenwallright._y) - (greenwallright._height / 2)) - (ball1._height / 2);
differencegreen2 = ((ball2._y - greenwallright._y) - (greenwallright._height / 2)) - (ball2._height / 2);
distance_between_bluewall_and_ball = Math.abs(((bluewall._y - ball1._y) - (bluewall._height / 2)) - (ball1._height / 2));
distance_between_bluewall_and_ball2 = Math.abs(((bluewall._y - ball2._y) - (bluewall._height / 2)) - (ball2._height / 2));
distance_between_lb_and_ball = Math.abs(((lb._y - ball1._y) - (lb._height / 2)) - (ball1._height / 2));
distance_between_lb_and_ball2 = Math.abs(((lb._y - ball2._y) - (lb._height / 2)) - (ball2._height / 2));
distance_between_bottomwall_and_ball = Math.abs(((bottomwall._y - ball1._y) - (bottomwall._height / 2)) - (ball1._height / 2));
distance_between_bottomwall_and_ball2 = Math.abs(((bottomwall._y - ball2._y) - (bottomwall._height / 2)) - (ball2._height / 2));
distance_x_between_greenwallright_and_ball = Math.abs(greenwallright._x - ball1._x);
distance_x_between_greenwallright_and_ball2 = Math.abs(greenwallright._x - ball2._x);
distance_x_between_greenwallleft_and_ball = Math.abs(greenwallleft._x - ball1._x);
distance_x_between_greenwallleft_and_ball2 = Math.abs(greenwallleft._x - ball2._x);
if ((((greenwallright_movement == true) and (differencegreen <= 0.2)) and (differencegreen >= -8)) and (distance_x_between_greenwallright_and_ball < ((ball1._width / 2) + (greenwallright._width / 2)))) {
ball1._y = ((greenwallright._y + (greenwallright._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((greenwallright_movement == true) and (differencegreen2 <= 0.2)) and (differencegreen2 >= -8)) and (distance_x_between_greenwallright_and_ball2 < ((ball2._width / 2) + (greenwallright._width / 2)))) {
ball2._y = ((greenwallright._y + (greenwallright._height / 2)) + (ball2._height / 2)) + 0.2;
}
if ((((greenwallleft_movement == true) and (differencegreen <= 0.2)) and (differencegreen >= -8)) and (distance_x_between_greenwallleft_and_ball < ((ball1._width / 2) + (greenwallleft._width / 2)))) {
ball1._y = ((greenwallright._y + (greenwallright._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((greenwallleft_movement == true) and (differencegreen2 <= 0.2)) and (differencegreen2 >= -8)) and (distance_x_between_greenwallleft_and_ball2 < ((ball2._width / 2) + (greenwallleft._width / 2)))) {
ball2._y = ((greenwallright._y + (greenwallright._height / 2)) + (ball2._height / 2)) + 0.2;
}
if (((((((differencegreen <= 1) && (differencegreen >= -2)) && (distance_between_bluewall_and_ball <= 3)) && (ball1._x > ((bluewall._x - (bluewall._width / 2)) - (ball1._width / 2)))) && (ball1._x < ((bluewall._x + (bluewall._width / 2)) + (ball1._width / 2)))) && (distance_x_between_greenwallright_and_ball < ((ball1._width / 2) + (greenwallright._width / 2)))) or ((((((differencegreen2 <= 0.5) && (differencegreen2 >= -1)) && (distance_between_bluewall_and_ball2 <= 0.5)) && (ball2._x > ((bluewall._x - (bluewall._width / 2)) - (ball2._width / 2)))) && (ball2._x < ((bluewall._x + (bluewall._width / 2)) + (ball2._width / 2)))) && (distance_x_between_greenwallright_and_ball2 < ((ball2._width / 2) + (greenwallright._width / 2))))) {
green_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differencegreen <= 2) && (differencegreen >= -2)) && (distance_between_lb_and_ball <= 3)) && (ball1._x < ((lb._x + (lb._width / 2)) + (ball1._width / 2)))) && (distance_x_between_greenwallright_and_ball < ((ball1._width / 2) + (greenwallright._width / 2)))) or (((((differencegreen2 <= 0.5) && (differencegreen2 >= -1)) && (distance_between_lb_and_ball2 <= 0.5)) && (ball2._x < ((lb._x + (lb._width / 2)) + (ball2._width / 2)))) && (distance_x_between_greenwallright_and_ball2 < ((ball2._width / 2) + (greenwallright._width / 2))))) {
trace("green against lb problem");
green_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if (((((differencegreen <= 1) && (differencegreen >= -2)) && (distance_between_bottomwall_and_ball <= 2)) && (distance_x_between_greenwallright_and_ball < ((ball1._width / 2) + (greenwallright._width / 2)))) or (((differencegreen2 <= 0.5) && (distance_between_bottomwall_and_ball2 <= 0.5)) && (distance_x_between_greenwallright_and_ball2 < ((ball2._width / 2) + (greenwallright._width / 2))))) {
green_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differencegreen <= 2) && (differencegreen >= -2)) && (distance_between_lb_and_ball <= 3)) && (ball1._x > ((lb._x - (lb._width / 2)) - (ball1._width / 2)))) && (distance_x_between_greenwallleft_and_ball < ((ball1._width / 2) + (greenwallleft._width / 2)))) or (((((differencegreen2 <= 0.5) && (differencegreen2 >= -1)) && (distance_between_lb_and_ball2 <= 0.5)) && (ball2._x > ((lb._x - (lb._width / 2)) - (ball2._width / 2)))) && (distance_x_between_greenwallleft_and_ball2 < ((ball2._width / 2) + (greenwallleft._width / 2))))) {
trace("green against lb problem");
green_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if (((((differencegreen <= 1) && (differencegreen >= -2)) && (distance_between_bottomwall_and_ball <= 2)) && (distance_x_between_greenwallleft_and_ball < ((ball1._width / 2) + (greenwallleft._width / 2)))) or (((differencegreen2 <= 0.5) && (distance_between_bottomwall_and_ball2 <= 0.5)) && (distance_x_between_greenwallleft_and_ball2 < ((ball2._width / 2) + (greenwallleft._width / 2))))) {
green_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (blue_hit_left == true) {
black_is_hit_blue_left = true;
}
if (blue_hit_right == true) {
gray_is_hit_blue_right = true;
}
if (green_hit) {
black_is_hit_green = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (blue_hit_right == true) {
black_is_hit_blue_right = true;
}
if (blue_hit_left == true) {
gray_is_hit_blue_left = true;
}
if (green_hit) {
gray_is_hit_green = true;
}
}
ball_locator();
}
};
Instance of Symbol 1297 MovieClip "ball1" in Frame 18
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwallleft)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwallleft.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwallleft.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwallleft.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwallleft.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwallright)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwallright.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwallright.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwallright.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwallright.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lb)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lb.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lb.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lb.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lb.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lm)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lm.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lm.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lm.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lm.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rl)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rl.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rl.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rl.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rl.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rr)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rr.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rr.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rr.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rr.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 19
function restartLevel() {
_root.scoresubmit23 = savefile.data.scoresubmit23;
savefile.flush();
soundstart = false;
small = false;
if (((((((var24 != true) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var23 = true;
}
var22 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
orangewall_movement = false;
pinkwall_movement = false;
bluewall_movement = false;
ball_movement = true;
finisher = false;
ball_location = true;
gray_is_hit_blue = false;
black_is_hit_blue = false;
blue_hit = false;
gray_is_hit_orange = false;
black_is_hit_orange = false;
orange_hit = false;
warp_on = false;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
pinkkey._x = 138.7;
pinkkey._y = 474.4;
orangekey._x = 571.7;
orangekey._y = 305.1;
bluekey._x = 206.9;
bluekey._y = 128.7;
warpkey._x = 571.7;
warpkey._y = 257.2;
bluestop._x = 570.5;
bluestop._y = 74.5;
bluewall._x = 138.7;
bluewall._y = 275;
orangewall._x = 459.6;
orangewall._y = 417.9;
pinkwall._x = 459.6;
pinkwall._y = 367.1;
ball1._x = 134.8;
ball1._y = 74.5;
ball2._x = 571.7;
ball2._y = 474.4;
rr._x = 579.8;
rr._y = 274.6;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 459.6;
finish._y = 472.9;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_blue == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_blue == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_orange == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_orange == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(27);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l30");
};
ball1.onEnterFrame = function () {
if (this.hitTest(pinkkey)) {
keystart = true;
pinkkey._x = 100000 /* 0x0186A0 */;
pinkwall_movement = true;
_root.ball1.scan.gotoAndStop(5);
}
if (this.hitTest(bluekey)) {
keystart = true;
bluekey._x = 100000 /* 0x0186A0 */;
bluewall_movement = true;
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndPlay(1);
}
if (this.hitTest(orangekey)) {
keystart = true;
orangekey._x = 100000 /* 0x0186A0 */;
orangewall_movement = true;
_root.ball1.scan.gotoAndStop(8);
}
if (this.hitTest(bluestop)) {
stopstart = true;
bluestop._x = 100000 /* 0x0186A0 */;
bluewall_movement = false;
_root.ball1.scan.gotoAndStop(11);
}
if (ball2.hitTest(pinkkey)) {
pinkkey._x = 100000 /* 0x0186A0 */;
pinkwall_movement = true;
_root.ball1.scan.gotoAndStop(5);
}
if (ball2.hitTest(bluekey)) {
bluekey._x = 100000 /* 0x0186A0 */;
bluewall_movement = true;
_root.ball1.scan.gotoAndStop(4);
}
if (ball2.hitTest(bluestop)) {
bluestop._x = 100000 /* 0x0186A0 */;
bluewall_movement = false;
}
if (this.hitTest(warpkey)) {
_root.reversestart = true;
warpkey._x = 10000;
warp_on = true;
}
if (orangewall.hitTest(bluewall) and (bluewall_movement == true)) {
bluewall_movement = false;
orangewall_movement = false;
soundstart = true;
orangewall._x = 237.3;
} else if (orangewall.hitTest(bluewall) and (bluewall_movement == false)) {
orangewall_movement = false;
soundstart = true;
orangewall._x = 237.3;
}
if (scoresubmit23) {
scoresubmit = false;
} else if (scoresubmit23 == false) {
scoresubmit = true;
}
if ((this.hitTest(finish) or this.hitTest(finish2)) and (ball2.hitTest(finish) or ball2.hitTest(finish2))) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 23) or scoresubmit) {
level23_best_time = seconds;
scoresubmit23 = true;
savefile.data.scoresubmit23 = _root.scoresubmit23;
savefile.flush();
}
if (seconds < level23_best_time) {
level23_best_time = seconds;
}
savefile.data.level23_best_time = _root.level23_best_time;
savefile.flush();
if (_root.score <= 24) {
_root.score = 24;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(23);
_root.win.meter.gotoAndStop(26);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l30");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var23) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l11");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l30");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
decoyy = decoy._y;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (bluewall_movement) {
bluewall._y = bluewall._y + 0.3;
}
if (bluewall._y > 335.6) {
soundstart = true;
bluewall._y = 335.6;
bluewall_movement = false;
}
if (orangewall_movement) {
orangewall._x = orangewall._x - 1;
}
if (orangewall._x < 236.9) {
orangewall_movement = false;
soundstart = true;
orangewall._x = 236.9;
}
if (pinkwall_movement) {
pinkwall._x = pinkwall._x - 1.5;
}
if (pinkwall._x < 330) {
pinkwall_movement = false;
}
differenceorange = ((orangewall._x - ball1._x) - (orangewall._width / 2)) - (ball1._width / 2);
differenceorange2 = ((orangewall._x - ball2._x) - (orangewall._width / 2)) - (ball2._width / 2);
distance_between_bluewall_and_ball = Math.abs(((ball1._x - bluewall._x) - (bluewall._width / 2)) - (ball1._width / 2));
distance_between_bluewall_and_ball2 = Math.abs(((ball2._x - bluewall._x) - (bluewall._width / 2)) - (ball2._width / 2));
distance_y_between_orangewall_and_ball = Math.abs(orangewall._y - ball1._y);
distance_y_between_orangewall_and_ball2 = Math.abs(orangewall._y - ball2._y);
if ((((orangewall_movement == true) and (differenceorange <= 0.2)) and (differenceorange >= -8)) and (distance_y_between_orangewall_and_ball < ((ball1._height / 2) + (orangewall._height / 2)))) {
ball1._x = ((orangewall._x - (orangewall._width / 2)) - (ball1._width / 2)) - 0.2;
}
if ((((orangewall_movement == true) and (differenceorange2 <= 0.2)) and (differenceorange2 >= -8)) and (distance_y_between_orangewall_and_ball2 < ((ball2._height / 2) + (orangewall._height / 2)))) {
ball2._x = ((orangewall._x - (orangewall._width / 2)) - (ball2._width / 2)) - 0.2;
}
if (((((differenceorange <= 0.5) && (differenceorange >= -2)) && (distance_between_bluewall_and_ball <= 1)) && (distance_y_between_orangewall_and_ball < ((ball1._height / 2) + (orangewall._height / 2)))) or ((((differenceorange2 <= 0.5) && (differenceorange2 >= -2)) && (distance_between_bluewall_and_ball2 <= 1)) && (distance_y_between_orangewall_and_ball2 < ((ball2._height / 2) + (orangewall._height / 2))))) {
orange_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differenceblue = ((ball1._y - bluewall._y) - (bluewall._height / 2)) - (ball1._height / 2);
differenceblue2 = ((ball2._y - bluewall._y) - (bluewall._height / 2)) - (ball2._height / 2);
distance_between_bottomwall_and_ball = Math.abs(((bottomwall._y - ball1._y) - (bottomwall._height / 2)) - (ball1._height / 2));
distance_between_bottomwall_and_ball2 = Math.abs(((bottomwall._y - ball2._y) - (bottomwall._height / 2)) - (ball2._height / 2));
distance_x_between_bluewall_and_ball = Math.abs(bluewall._x - ball1._x);
distance_x_between_bluewall_and_ball2 = Math.abs(bluewall._x - ball2._x);
if ((((bluewall_movement == true) and (differenceblue <= 0.2)) and (differenceblue >= -8)) and (distance_x_between_bluewall_and_ball < ((ball1._width / 2) + (bluewall._width / 2)))) {
ball1._y = ((bluewall._y + (bluewall._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((bluewall_movement == true) and (differenceblue2 <= 0.2)) and (differenceblue2 >= -8)) and (distance_x_between_bluewall_and_ball2 < ((ball2._width / 2) + (bluewall._width / 2)))) {
ball2._y = ((bluewall._y + (bluewall._height / 2)) + (ball2._height / 2)) + 0.2;
}
if (((((differenceblue <= 0.5) && (differenceblue >= -1)) && (distance_between_bottomwall_and_ball <= 1)) && (distance_x_between_bluewall_and_ball < ((ball1._width / 2) + (bluewall._width / 2)))) or ((((differenceblue2 <= 0.5) && (differenceblue2 >= -1)) && (distance_between_bottomwall_and_ball2 <= 0.5)) && (distance_x_between_bluewall_and_ball2 < ((ball2._width / 2) + (bluewall._width / 2))))) {
blue_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (orange_hit == true) {
black_is_hit_orange = true;
}
if (blue_hit == true) {
black_is_hit_blue = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (orange_hit == true) {
gray_is_hit_orange = true;
}
if (blue_hit == true) {
gray_is_hit_blue = true;
}
}
ball_locator();
}
};
Instance of Symbol 1917 MovieClip "ball1" in Frame 19
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middletop)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middletop.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middletop.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middletop.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middletop.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rl)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rl.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rl.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rl.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rl.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rr)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rr.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rr.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rr.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rr.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Instance of Symbol 1918 MovieClip "ball2" in Frame 19
onClipEvent (load) {
xmove2 = 0;
ymove2 = 0;
}
onClipEvent (enterFrame) {
function move2(xmove2, ymove2) {
_x = (_x + xmove2);
_y = (_y + ymove2);
if (hitTest(_root.leftwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middletop)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middletop.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middletop.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middletop.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middletop.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rl)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rl.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rl.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rl.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rl.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rr)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rr.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rr.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rr.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rr.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.warp_on == true) {
if (_root.ball_movement) {
if (Key.isDown(37)) {
move2(5, 0);
}
if (Key.isDown(39)) {
move2(-5, 0);
}
if (Key.isDown(38)) {
move2(0, 5);
}
if (Key.isDown(40)) {
move2(0, -5);
}
}
}
}
Frame 20
function restartLevel() {
_root.scoresubmit11 = savefile.data.scoresubmit11;
savefile.flush();
soundstart = false;
small = false;
if (((((((((((((((((((var12 != true) and (var13 != true)) and (var14 != true)) and (var15 != true)) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var11 = true;
}
var10 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
orangewall1_movement = false;
orangewall2_movement = false;
orangewall3_movement = false;
pinkwall_movement = false;
ball_movement = true;
finisher = false;
ball_location = true;
gray_is_hit_orange1 = false;
black_is_hit_orange1 = false;
orange1_hit = false;
gray_is_hit_orange2 = false;
black_is_hit_orange2 = false;
orange2_hit = false;
gray_is_hit_orange3 = false;
black_is_hit_orange3 = false;
orange3_hit = false;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
pinkkey._x = 200.5;
pinkkey._y = 215;
orangekey._x = 436.9;
orangekey._y = 307.8;
orangewall1._x = 612.4;
orangewall1._y = 436.4;
orangewall2._x = 199.8;
orangewall2._y = 307.8;
orangewall3._x = 648.3;
orangewall3._y = 143.8;
pinkwall._x = 200.5;
pinkwall._y = 436.5;
ball1._x = 200;
ball1._y = 73.5;
ball2._x = 561.7;
ball2._y = 315;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 136.5;
finish._y = 462.9;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_orange2 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_orange2 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_orange3 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_orange3 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(11);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l26");
};
ball1.onEnterFrame = function () {
if (this.hitTest(pinkkey)) {
keystart = true;
pinkkey._x = 100000 /* 0x0186A0 */;
pinkwall_movement = true;
_root.ball1.scan.gotoAndStop(5);
}
if (this.hitTest(orangekey)) {
keystart = true;
orangekey._x = 100000 /* 0x0186A0 */;
orangewall1_movement = true;
orangewall2_movement = true;
orangewall3_movement = true;
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndPlay(1);
}
if (orangewall1.hitTest(pinkwall) and (pinkwall_movement == true)) {
pinkwall_movement = false;
orangewall1_movement = false;
soundstart = true;
orangewall1._x = (pinkwall._x + (pinkwall._width / 2)) + (orangewall1._width / 2);
} else if (orangewall1.hitTest(pinkwall) and (pinkwall_movement == false)) {
orangewall1_movement = false;
soundstart = true;
orangewall1._x = ((pinkwall._x + (pinkwall._width / 2)) + (orangewall1._width / 2)) + 0.2;
}
if (scoresubmit11) {
scoresubmit = false;
} else if (scoresubmit11 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 11) or scoresubmit) {
level11_best_time = seconds;
scoresubmit11 = true;
savefile.data.scoresubmit11 = _root.scoresubmit11;
savefile.flush();
}
if (seconds < level11_best_time) {
level11_best_time = seconds;
}
savefile.data.level11_best_time = _root.level11_best_time;
savefile.flush();
if (_root.score <= 12) {
_root.score = 12;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(11);
_root.win.meter.gotoAndStop(12);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l13");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var11) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l8");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l13");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (pinkwall_movement) {
pinkwall._y = pinkwall._y + 0.5;
}
if (pinkwall._y > 700) {
pinkwall_movement = false;
}
if (orangewall2_movement) {
orangewall2._x = orangewall2._x + 0.5;
}
if (orangewall2._x > 500) {
orangewall2_movement = false;
soundstart = true;
orangewall2._x = 500;
}
if (orangewall1_movement) {
orangewall1._x = orangewall1._x - 1;
}
if (orangewall1._x < 388.1) {
orangewall1_movement = false;
soundstart = true;
orangewall1._x = 388.1;
}
if (orangewall3_movement) {
orangewall3._x = orangewall3._x - 0.7;
}
if (orangewall3._x < 349.6) {
orangewall3_movement = false;
soundstart = true;
orangewall3._x = 349.9;
}
differenceorange1_or_3 = ((orangewall3._x - ball1._x) - (orangewall3._width / 2)) - (ball1._width / 2);
differenceorange1_or_3_2 = ((orangewall3._x - ball2._x) - (orangewall3._width / 2)) - (ball2._width / 2);
differenceorange2 = ((ball1._x - orangewall2._x) - (orangewall2._width / 2)) - (ball1._width / 2);
differenceorange2_2 = ((ball2._x - orangewall2._x) - (orangewall2._width / 2)) - (ball2._width / 2);
distance_between_rightwall_and_ball = Math.abs(((rightwall._x - ball1._x) - (rightwall._width / 2)) - (ball1._width / 2));
distance_between_rightwall_and_ball2 = Math.abs(((rightwall._x - ball2._x) - (rightwall._width / 2)) - (ball2._width / 2));
distance_between_leftwall_and_ball = Math.abs(((ball1._x - leftwall._x) - (leftwall._width / 2)) - (ball1._width / 2));
distance_between_leftwall_and_ball2 = Math.abs(((ball2._x - leftwall._x) - (leftwall._width / 2)) - (ball2._width / 2));
distance_y_between_orangewall2_and_ball = Math.abs(orangewall2._y - ball1._y);
distance_y_between_orangewall2_and_ball2 = Math.abs(orangewall2._y - ball2._y);
distance_y_between_orangewall3_and_ball = Math.abs(orangewall3._y - ball1._y);
distance_y_between_orangewall3_and_ball2 = Math.abs(orangewall3._y - ball2._y);
distance_y_between_orangewall1_and_ball = Math.abs(orangewall1._y - ball1._y);
distance_y_between_orangewall1_and_ball2 = Math.abs(orangewall1._y - ball2._y);
if ((((orangewall3_movement == true) and (differenceorange1_or_3 <= 0.2)) and (differenceorange1_or_3 >= -8)) and (distance_y_between_orangewall3_and_ball < ((ball1._height / 2) + (orangewall3._height / 2)))) {
ball1._x = ((orangewall3._x - (orangewall3._width / 2)) - (ball1._width / 2)) - 0.2;
}
if ((((orangewall3_movement == true) and (differenceorange1_or_3_2 <= 0.2)) and (differenceorange1_or_3_2 >= -8)) and (distance_y_between_orangewall3_and_ball2 < ((ball2._height / 2) + (orangewall3._height / 2)))) {
ball2._x = ((orangewall3._x - (orangewall3._width / 2)) - (ball2._width / 2)) - 0.2;
}
if ((((orangewall1_movement == true) and (differenceorange1_or_3 <= 0.2)) and (differenceorange1_or_3 >= -8)) and (distance_y_between_orangewall1_and_ball < ((ball1._height / 2) + (orangewall1._height / 2)))) {
ball1._x = ((orangewall3._x - (orangewall3._width / 2)) - (ball1._width / 2)) - 0.2;
}
if ((((orangewall1_movement == true) and (differenceorange1_or_3_2 <= 0.2)) and (differenceorange1_or_3_2 >= -8)) and (distance_y_between_orangewall1_and_ball2 < ((ball2._height / 2) + (orangewall1._height / 2)))) {
ball2._x = ((orangewall3._x - (orangewall3._width / 2)) - (ball2._width / 2)) - 0.2;
}
if (((((differenceorange1_or_3 <= 0.5) && (differenceorange1_or_3 >= -2)) && (distance_between_leftwall_and_ball <= 0.5)) && (distance_y_between_orangewall3_and_ball < ((ball1._height / 2) + (orangewall3._height / 2)))) or ((((differenceorange1_or_3_2 <= 0.5) && (differenceorange1_or_3_2 >= -2)) && (distance_between_leftwall_and_ball2 <= 0.5)) && (distance_y_between_orangewall3_and_ball2 < ((ball2._height / 2) + (orangewall3._height / 2))))) {
orange3_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if ((((orangewall2_movement == true) and (differenceorange2 <= 0.2)) and (differenceorange2 >= -8)) and (distance_y_between_orangewall2_and_ball < ((ball1._height / 2) + (orangewall2._height / 2)))) {
ball1._x = ((orangewall2._x + (orangewall2._width / 2)) + (ball1._width / 2)) + 0.2;
}
if ((((orangewall2_movement == true) and (differenceorange2_2 <= 0.2)) and (differenceorange2_2 >= -8)) and (distance_y_between_orangewall2_and_ball2 < ((ball2._height / 2) + (orangewall2._height / 2)))) {
ball2._x = ((orangewall2._x + (orangewall2._width / 2)) + (ball2._width / 2)) + 0.2;
}
if (((((differenceorange2 <= 0.5) && (differenceorange2 >= -2)) && (distance_between_rightwall_and_ball <= 0.5)) && (distance_y_between_orangewall2_and_ball < ((ball1._height / 2) + (orangewall2._height / 2)))) or ((((differenceorange2_2 <= 0.5) && (differenceorange2_2 >= -2)) && (distance_between_rightwall_and_ball2 <= 0.5)) && (distance_y_between_orangewall2_and_ball2 < ((ball2._height / 2) + (orangewall2._height / 2))))) {
orange2_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (orange3_hit == true) {
black_is_hit_orange3 = true;
}
if (orange2_hit == true) {
gray_is_hit_orange2 = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (orange3_hit == true) {
gray_is_hit_orange3 = true;
}
if (orange2_hit == true) {
black_is_hit_orange2 = true;
}
}
ball_locator();
}
};
Instance of Symbol 1917 MovieClip "ball1" in Frame 20
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rotunda)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rotunda.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rotunda.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rotunda.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rotunda.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 21
function restartLevel() {
_root.scoresubmit17 = savefile.data.scoresubmit17;
savefile.flush();
soundstart = false;
small = false;
if (((((((((((((var18 != true) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var17 = true;
}
var16 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
greenwall_movement = false;
bluewall_movement = false;
redwall_movement = false;
orangewall_movement = false;
ball_movement = true;
finisher = false;
redswitch.gotoAndStop(1);
greenswitch.gotoAndStop(1);
orangeswitch.gotoAndStop(1);
blueswitch.gotoAndStop(1);
_root.hit_crate1 = false;
_root.cant_move_crate1_left_against_left_wall = false;
_root.cant_move_crate1_right_against_middle_wall = false;
_root.cant_move_crate1_down_against_bottom_wall = false;
_root.cant_move_crate1_up_against_top_wall = false;
_root.cant_move_crate1_left_against_lll = false;
_root.cant_move_crate1_down_against_lll = false;
_root.cant_move_crate1_up_against_lll = false;
_root.cant_move_crate1_left_against_llr = false;
_root.cant_move_crate1_down_against_llr = false;
_root.cant_move_crate1_up_against_llr = false;
_root.cant_move_crate1_right_against_lrr = false;
_root.cant_move_crate1_down_against_lrr = false;
_root.cant_move_crate1_up_against_lrr = false;
_root.cant_move_crate1_right_against_lrl = false;
_root.cant_move_crate1_down_against_lrl = false;
_root.cant_move_crate1_up_against_lrl = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
bluewall._x = 500.1;
bluewall._y = 238.9;
orangewall._x = 499.8;
orangewall._y = 284.8;
greenwall._x = 500.1;
greenwall._y = 333.1;
redwall._x = 500.1;
redwall._y = 380;
redswitch._x = 134.5;
redswitch._y = 443.9;
blueswitch._x = 265.9;
blueswitch._y = 107.2;
greenswitch._x = 265.9;
greenswitch._y = 443.9;
orangeswitch._x = 134.5;
orangeswitch._y = 107.2;
crate1._x = 191.6;
crate1._y = 384.1;
ball1._x = 191.6;
ball1._y = 466.9;
ball2._x = 500;
ball2._y = 111;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 500;
finish._y = 453.8;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(17);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l23");
};
ball1.onEnterFrame = function () {
if ((_root.greenswitch._currentframe == 1) and crate1.hitTest(_root.greenswitch.button)) {
switchstart = true;
greenswitch.gotoAndStop(2);
greenwall_movement = true;
}
if (crate1.hitTest(_root.blueswitch.button) and (_root.blueswitch._currentframe == 1)) {
switchstart = true;
blueswitch.gotoAndStop(2);
bluewall_movement = true;
}
if (crate1.hitTest(_root.orangeswitch.button) and (_root.orangeswitch._currentframe == 1)) {
switchstart = true;
orangeswitch.gotoAndStop(2);
orangewall_movement = true;
}
if (crate1.hitTest(_root.redswitch.button) and (_root.redswitch._currentframe == 1)) {
switchstart = true;
redswitch.gotoAndStop(2);
redwall_movement = true;
}
if (scoresubmit17) {
scoresubmit = false;
} else if (scoresubmit17 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 17) or scoresubmit) {
level17_best_time = seconds;
scoresubmit17 = true;
savefile.data.scoresubmit17 = _root.scoresubmit17;
savefile.flush();
}
if (seconds < level17_best_time) {
level17_best_time = seconds;
}
savefile.data.level17_best_time = _root.level17_best_time;
savefile.flush();
if (_root.score <= 18) {
_root.score = 18;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(17);
_root.win.meter.gotoAndStop(18);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l23");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var17) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l14");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l23");
}
w_is_DOWN = false;
}
}
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (greenwall_movement) {
greenwall._x = greenwall._x + 2;
}
if (bluewall_movement) {
bluewall._x = bluewall._x + 2;
}
if (orangewall_movement) {
orangewall._x = orangewall._x + 2;
}
if (redwall_movement) {
redwall._x = redwall._x + 2;
}
};
Instance of Symbol 1071 MovieClip "crate1" in Frame 21
onClipEvent (load) {
_root.hit_crate1 = false;
_root.cant_move_crate1_left_against_left_wall = false;
_root.cant_move_crate1_right_against_middle_wall = false;
_root.cant_move_crate1_down_against_bottom_wall = false;
_root.cant_move_crate1_up_against_top_wall = false;
_root.cant_move_crate1_left_against_lll = false;
_root.cant_move_crate1_down_against_lll = false;
_root.cant_move_crate1_up_against_lll = false;
_root.cant_move_crate1_left_against_llr = false;
_root.cant_move_crate1_down_against_llr = false;
_root.cant_move_crate1_up_against_llr = false;
_root.cant_move_crate1_right_against_lrr = false;
_root.cant_move_crate1_down_against_lrr = false;
_root.cant_move_crate1_up_against_lrr = false;
_root.cant_move_crate1_right_against_lrl = false;
_root.cant_move_crate1_down_against_lrl = false;
_root.cant_move_crate1_up_against_lrl = false;
}
onClipEvent (enterFrame) {
if (hitTest(_root.leftwall)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_left_wall = true;
}
if ((((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate1_left_against_left_wall = true;
} else {
_root.cant_move_crate1_left_against_left_wall = false;
}
if (hitTest(_root.lll) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.lll.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_lll = true;
}
if (((Math.abs(((_x - _root.lll._x) - (_root.lll._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.lll._y + (_root.lll._height / 2)) + (_height / 2)))) and (_y > ((_root.lll._y - (_root.lll._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_left_against_lll = true;
} else {
_root.cant_move_crate1_left_against_lll = false;
}
if (hitTest(_root.llr) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.llr.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_llr = true;
}
if (((Math.abs(((_x - _root.llr._x) - (_root.llr._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.llr._y + (_root.llr._height / 2)) + (_height / 2)))) and (_y > ((_root.llr._y - (_root.llr._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_left_against_llr = true;
} else {
_root.cant_move_crate1_left_against_llr = false;
}
if (hitTest(_root.middlewall1)) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall1.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_middle_wall = true;
}
if ((((_root.middlewall1._x - _x) - (_root.middlewall1._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate1_right_against_middle_wall = true;
} else {
_root.cant_move_crate1_right_against_middle_wall = false;
}
if (hitTest(_root.lrl) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.lrl.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_lrl = true;
}
if (((Math.abs(((_root.lrl._x - _x) - (_root.lrl._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.lrl._y + (_root.lrl._height / 2)) + (_height / 2)))) and (_y > ((_root.lrl._y - (_root.lrl._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_lrl = true;
} else {
_root.cant_move_crate1_right_against_lrl = false;
}
if (hitTest(_root.lrr) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.lrr.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_lrr = true;
}
if (((Math.abs(((_root.lrr._x - _x) - (_root.lrr._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.lrr._y + (_root.lrr._height / 2)) + (_height / 2)))) and (_y > ((_root.lrr._y - (_root.lrr._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_lrr = true;
} else {
_root.cant_move_crate1_right_against_lrr = false;
}
if (hitTest(_root.topwall)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_top_wall = true;
}
if ((((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate1_up_against_top_wall = true;
} else {
_root.cant_move_crate1_up_against_top_wall = false;
}
if (hitTest(_root.lll) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.lll.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_lll = true;
}
if (((Math.abs(((_y - _root.lll._y) - (_root.lll._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.lll._x + (_root.lll._width / 2)) + (_width / 2)))) and (_x > ((_root.lll._x - (_root.lll._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_lll = true;
} else {
_root.cant_move_crate1_up_against_lll = false;
}
if (hitTest(_root.llr) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.llr.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_llr = true;
}
if (((Math.abs(((_y - _root.llr._y) - (_root.llr._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.llr._x + (_root.llr._width / 2)) + (_width / 2)))) and (_x > ((_root.llr._x - (_root.llr._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_llr = true;
} else {
_root.cant_move_crate1_up_against_llr = false;
}
if (hitTest(_root.lrl) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.lrl.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_lrl = true;
}
if (((Math.abs(((_y - _root.lrl._y) - (_root.lrl._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.lrl._x + (_root.lrl._width / 2)) + (_width / 2)))) and (_x > ((_root.lrl._x - (_root.lrl._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_lrl = true;
} else {
_root.cant_move_crate1_up_against_lrl = false;
}
if (hitTest(_root.lrr) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.lrr.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_lrr = true;
}
if (((Math.abs(((_y - _root.lrr._y) - (_root.lrr._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.lrr._x + (_root.lrr._width / 2)) + (_width / 2)))) and (_x > ((_root.lrr._x - (_root.lrr._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_lrr = true;
} else {
_root.cant_move_crate1_up_against_lrr = false;
}
if (hitTest(_root.bottomwall)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_bottom_wall = true;
}
if ((((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate1_down_against_bottom_wall = true;
} else {
_root.cant_move_crate1_down_against_bottom_wall = false;
}
if (hitTest(_root.lll) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.lll.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_lll = true;
}
if (((Math.abs(((_root.lll._y - _y) - (_root.lll._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.lll._x + (_root.lll._width / 2)) + (_width / 2)))) and (_x > ((_root.lll._x - (_root.lll._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_lll = true;
} else {
_root.cant_move_crate1_down_against_lll = false;
}
if (hitTest(_root.llr) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.llr.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_llr = true;
}
if (((Math.abs(((_root.llr._y - _y) - (_root.llr._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.llr._x + (_root.llr._width / 2)) + (_width / 2)))) and (_x > ((_root.llr._x - (_root.llr._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_llr = true;
} else {
_root.cant_move_crate1_down_against_llr = false;
}
if (hitTest(_root.lrl) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.lrl.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_lrl = true;
}
if (((Math.abs(((_root.lrl._y - _y) - (_root.lrl._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.lrl._x + (_root.lrl._width / 2)) + (_width / 2)))) and (_x > ((_root.lrl._x - (_root.lrl._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_lrl = true;
} else {
_root.cant_move_crate1_down_against_lrl = false;
}
if (hitTest(_root.lrr) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.lrr.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_lrr = true;
}
if (((Math.abs(((_root.lrr._y - _y) - (_root.lrr._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.lrr._x + (_root.lrr._width / 2)) + (_width / 2)))) and (_x > ((_root.lrr._x - (_root.lrr._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_lrr = true;
} else {
_root.cant_move_crate1_down_against_lrr = false;
}
}
Instance of Symbol 1917 MovieClip "ball1" in Frame 21
onClipEvent (load) {
_root.hit_crate1 = false;
}
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lll)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lll.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lll.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lll.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lll.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.llr)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.llr.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.llr.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.llr.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.llr.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lrl)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lrl.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lrl.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lrl.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lrl.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lrr)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lrr.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lrr.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lrr.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lrr.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.crate1)) {
if (_root.crate1._currentframe == 1) {
_root.hit_crate1 = true;
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.crate1.getBounds(_root).xMin) + 0.1));
if (((_root.cant_move_crate1_right_against_middle_wall == false) and (_root.cant_move_crate1_right_against_lrl == false)) and (_root.cant_move_crate1_right_against_lrr == false)) {
_root.cratespeed_xright = 1;
_root.crate1._x = _root.crate1._x + _root.cratespeed_xright;
_root.moveright = true;
}
} else {
_root.moveright = false;
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.crate1.getBounds(_root).xMax) - 0.1));
if (((_root.cant_move_crate1_left_against_lll == false) and (_root.cant_move_crate1_left_against_llr == false)) and (_root.cant_move_crate1_left_against_left_wall == false)) {
_root.cratespeed_xleft = 1;
_root.crate1._x = _root.crate1._x - _root.cratespeed_xleft;
_root.moveleft = true;
}
} else {
_root.moveleft = false;
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.crate1.getBounds(_root).yMin) + 0.1));
if (((((_root.cant_move_crate1_down_against_lll == false) and (_root.cant_move_crate1_down_against_bottom_wall == false)) and (_root.cant_move_crate1_down_against_llr == false)) and (_root.cant_move_crate1_down_against_lrl == false)) and (_root.cant_move_crate1_down_against_lrr == false)) {
_root.cratespeed_ydown = 1;
_root.crate1._y = _root.crate1._y + _root.cratespeed_ydown;
_root.movedown = true;
}
} else {
_root.movedown = false;
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.crate1.getBounds(_root).yMax) - 0.1));
if (((((_root.cant_move_crate1_up_against_lll == false) and (_root.cant_move_crate1_up_against_llr == false)) and (_root.cant_move_crate1_up_against_top_wall == false)) and (_root.cant_move_crate1_up_against_lrl == false)) and (_root.cant_move_crate1_up_against_lrr == false)) {
_root.cratespeed_yup = 1;
_root.crate1._y = _root.crate1._y - _root.cratespeed_yup;
_root.moveup = true;
}
} else {
_root.moveup = false;
}
}
} else {
_root.cratespeed_xright = 0;
_root.cratespeed_xleft = 0;
_root.cratespeed_ydown = 0;
_root.cratespeed_yup = 0;
}
}
if ((((!Key.isDown(37)) and (!Key.isDown(39))) and (!Key.isDown(38))) and (!Key.isDown(40))) {
_root.moveup = false;
_root.movedown = false;
_root.moveright = false;
_root.moveleft = false;
move(0, 0);
_root.hit_crate1 = false;
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 22
function restartLevel() {
_root.scoresubmit20 = savefile.data.scoresubmit20;
savefile.flush();
soundstart = false;
small = false;
if ((((((((((var21 != true) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var20 = true;
}
var19 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
redwall_movement = false;
bluewall_movement = false;
pinkwall1_movement = false;
pinkwall2_movement = false;
pinktransparent_movement = false;
orangewall1_movement = false;
orangewall2_movement = false;
orangeswitch.gotoAndStop(1);
ball_location = true;
bluestart = false;
blue_count = 0;
_root.ball1.scan.bluemove.gotoAndStop(1);
gray_is_hit_orange1 = false;
black_is_hit_orange1 = false;
orange1_hit = false;
gray_is_hit_orange2 = false;
black_is_hit_orange2 = false;
orange2_hit = false;
gray_is_hit_red_right = false;
black_is_hit_red_right = false;
gray_is_hit_red_left = false;
black_is_hit_red_left = false;
red_hit_left = false;
red_hit_right = false;
ball_movement = true;
finisher = false;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
redkey._x = 425.8;
redkey._y = 126.7;
orangeswitch._x = 425.8;
orangeswitch._y = 308.6;
bluekey1._x = 116.5;
bluekey1._y = 177.3;
bluekey2._x = 116.5;
bluekey2._y = 211.8;
bluekey3._x = 116.5;
bluekey3._y = 243.6;
bluekey4._x = 116.5;
bluekey4._y = 277.6;
bluekey5._x = 181.8;
bluekey5._y = 60.8;
bluekey6._x = 181.8;
bluekey6._y = 180.5;
bluekey7._x = 524.8;
bluekey7._y = 470.1;
bluekey8._x = 576.3;
bluekey8._y = 470.1;
bluekey9._x = 524.8;
bluekey9._y = 171.1;
bluekey10._x = 281.8;
bluekey10._y = 60.8;
bluekey11._x = 232.8;
bluekey11._y = 121.3;
bluekey12._x = 425.8;
bluekey12._y = 171.1;
bluekey13._x = 481.6;
bluekey13._y = 211.6;
bluekey14._x = 416.3;
bluekey14._y = 485.5;
bluekey15._x = 576.3;
bluekey15._y = 171.1;
bluekey16._x = 281.8;
bluekey16._y = 180.5;
bluekey17._x = 481.6;
bluekey17._y = 249.6;
bluekey18._x = 481.6;
bluekey18._y = 416.6;
bluekey19._x = 481.6;
bluekey19._y = 291.1;
bluekey20._x = 181.8;
bluekey20._y = 121.3;
bluekey21._x = 232.8;
bluekey21._y = 60.8;
bluekey22._x = 232.8;
bluekey22._y = 180.5;
bluekey23._x = 281.8;
bluekey23._y = 450.6;
bluekey24._x = 481.6;
bluekey24._y = 332.4;
bluekey25._x = 281.8;
bluekey25._y = 123.1;
bluekey26._x = 116.5;
bluekey26._y = 141.6;
bluekey27._x = 249.3;
bluekey27._y = 450.6;
bluekey28._x = 281.8;
bluekey28._y = 415.6;
bluekey29._x = 481.6;
bluekey29._y = 374.6;
bluewall._x = 514.6;
bluewall._y = 78.9;
redwall._x = 690;
redwall._y = 314.2;
redwall2._x = 184.3;
redwall2._y = 470.9;
redwall3._x = 133.3;
redwall3._y = 453.4;
orangewall1._x = 313.6;
orangewall1._y = 486.1;
orangewall2._x = 115.3;
orangewall2._y = -123.8;
ball1._x = 116.2;
ball1._y = 486.4;
ball2._x = 468.9;
ball2._y = 80.2;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 565.7;
finish._y = 78.3;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_red_left == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_red_left == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_red_right == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_red_right == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_orange1 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_orange1 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_orange2 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_orange2 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(20);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l22");
};
ball1.onEnterFrame = function () {
if (this.hitTest(bluekey1)) {
keystart = true;
bluekey1._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey2)) {
keystart = true;
bluekey2._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey3)) {
keystart = true;
bluekey3._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey4)) {
keystart = true;
if (bluestart == true) {
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
} else {
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndStop(2);
bluestart = true;
}
bluekey4._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
}
if (this.hitTest(bluekey5)) {
keystart = true;
bluekey5._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
}
if (this.hitTest(bluekey6)) {
keystart = true;
if (bluestart == true) {
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
} else {
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndStop(2);
bluestart = true;
}
bluekey6._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
}
if (this.hitTest(bluekey7)) {
keystart = true;
bluekey7._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey8)) {
keystart = true;
bluekey8._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
}
if (this.hitTest(bluekey9)) {
keystart = true;
bluekey9._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey10)) {
keystart = true;
bluekey10._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey11)) {
keystart = true;
bluekey11._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
}
if (this.hitTest(bluekey12)) {
keystart = true;
if (bluestart == true) {
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
} else {
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndStop(2);
bluestart = true;
}
bluekey12._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
}
if (this.hitTest(bluekey13)) {
keystart = true;
bluekey13._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey14)) {
keystart = true;
bluekey14._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
}
if (this.hitTest(bluekey15)) {
keystart = true;
bluekey15._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey16)) {
keystart = true;
if (bluestart == true) {
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
} else {
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndStop(2);
bluestart = true;
}
bluekey16._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
}
if (this.hitTest(bluekey17)) {
keystart = true;
bluekey17._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
}
if (this.hitTest(bluekey18)) {
keystart = true;
bluekey18._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey19)) {
keystart = true;
bluekey19._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
}
if (this.hitTest(bluekey20)) {
keystart = true;
bluekey20._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey21)) {
keystart = true;
bluekey21._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
}
if (this.hitTest(bluekey22)) {
keystart = true;
if (bluestart == true) {
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
} else {
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndStop(2);
bluestart = true;
}
bluekey22._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
}
if (this.hitTest(bluekey23)) {
keystart = true;
bluekey23._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey24)) {
keystart = true;
bluekey24._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey25)) {
keystart = true;
bluekey25._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey26)) {
keystart = true;
bluekey26._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (this.hitTest(bluekey27)) {
keystart = true;
bluekey27._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
}
if (this.hitTest(bluekey28)) {
keystart = true;
bluekey28._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 2);
}
if (this.hitTest(bluekey29)) {
keystart = true;
bluekey29._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 3);
}
if (_root.ball1.scan.bluemove._currentframe == 64) {
_root.ball1.scan.bluemove.gotoAndPlay(65);
}
if (pinkwall2.hitTest(skinnyleft)) {
pinkwall2_movement = false;
pinkwall1_movement = false;
pinktransparent_movement = false;
}
if (redwall.hitTest(_root.orangeswitch.button) and (_root.orangeswitch._currentframe == 1)) {
switchstart = true;
_root.orangeswitch.gotoAndStop(2);
if (orangewall2._y >= 268.6) {
orangewall2_movement = false;
} else {
orangewall2_movement = true;
}
}
if (this.hitTest(redkey)) {
keystart = true;
redkey._x = 10000;
redwall_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if (blue_count >= 25) {
bluewall_movement = true;
}
if (scoresubmit20) {
scoresubmit = false;
} else if (scoresubmit20 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 20) or scoresubmit) {
level20_best_time = seconds;
scoresubmit20 = true;
savefile.data.scoresubmit20 = _root.scoresubmit20;
savefile.flush();
}
if (seconds < level20_best_time) {
level20_best_time = seconds;
}
savefile.data.level20_best_time = _root.level20_best_time;
savefile.flush();
if (_root.score <= 21) {
_root.score = 21;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(20);
_root.win.meter.gotoAndStop(21);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l22");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
orangey = orangewall2._y;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var20) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l12");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l22");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (bluewall_movement) {
bluewall._y = bluewall._y - 2;
}
if (bluewall._y < 30.1) {
bluewall_movement = false;
}
if (redwall_movement) {
redwall._x = redwall._x - 0.25;
redwall3._x = redwall3._x - 1;
redwall2._y = redwall2._y + 1;
}
if (redwall._x < 575) {
redwall_movement = false;
soundstart = true;
redwall._x = 575;
}
if (pinkwall1_movement) {
pinkwall1._x = pinkwall1._x - 1;
}
if (pinkwall2_movement) {
pinkwall2._x = pinkwall2._x - 1;
}
if (pinktransparent_movement) {
pinktransparent._x = pinktransparent._x - 1;
}
if (orangewall1_movement) {
orangewall1._x = orangewall1._x - 0.1;
}
if (orangewall1._x < 216) {
orangewall1_movement = false;
}
if (orangewall2_movement) {
orangewall2._y = orangewall2._y + 0.55;
}
if (orangewall2._y > 269) {
orangewall2_movement = false;
soundstart = true;
orangewall2._y = 268.9;
}
differencered = ((redwall._x - ball1._x) - (redwall._width / 2)) - (ball1._width / 2);
differencered2 = ((redwall._x - ball2._x) - (redwall._width / 2)) - (ball2._width / 2);
distance_between_middlewall_and_ball = Math.abs(((ball1._x - middlewall._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_middlewall_and_ball2 = Math.abs(((ball2._x - middlewall._x) - (middlewall._width / 2)) - (ball2._width / 2));
distance_between_skinnyleft_and_ball = Math.abs(((ball1._x - skinnyleft._x) - (skinnyleft._width / 2)) - (ball1._width / 2));
distance_between_skinnyleft_and_ball2 = Math.abs(((ball2._x - skinnyleft._x) - (skinnyleft._width / 2)) - (ball2._width / 2));
distance_between_pinkwall1_and_ball = Math.abs(((ball1._x - pinkwall1._x) - (pinkwall1._width / 2)) - (ball1._width / 2));
distance_between_pinkwall1_and_ball2 = Math.abs(((ball2._x - pinkwall1._x) - (pinkwall1._width / 2)) - (ball2._width / 2));
distance_y_between_redwall_and_ball = Math.abs(redwall._y - ball1._y);
distance_y_between_redwall_and_ball2 = Math.abs(redwall._y - ball2._y);
if ((((redwall_movement == true) and (differencered <= 0.2)) and (differencered >= -8)) and (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) {
ball1._x = ((redwall._x - (redwall._width / 2)) - (ball1._width / 2)) - 0.2;
}
if ((((redwall_movement == true) and (differencered2 <= 0.2)) and (differencered2 >= -8)) and (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2)))) {
ball2._x = ((redwall._x - (redwall._width / 2)) - (ball2._width / 2)) - 0.2;
}
if (((((differencered <= 0.5) && (differencered >= -2)) && (distance_between_middlewall_and_ball <= 1)) && (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) or ((((differencered2 <= 0.5) && (differencered2 >= -2)) && (distance_between_middlewall_and_ball2 <= 1)) && (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2))))) {
red_hit_right = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (((((differencered <= 0.5) && (differencered >= -2)) && (distance_between_skinnyleft_and_ball <= 1)) && (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) or ((((differencered2 <= 0.5) && (differencered2 >= -2)) && (distance_between_skinnyleft_and_ball2 <= 1)) && (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2))))) {
red_hit_left = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if ((((((differencered <= 0.5) && (differencered >= -2)) && (distance_between_pinkwall1_and_ball <= 1)) && (ball1._y < ((pinkwall1._y + (pinkwall1._height / 2)) + (ball1._height / 2)))) && (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) or (((((differencered2 <= 0.5) && (differencered2 >= -2)) && (distance_between_pinkwall1_and_ball2 <= 1)) && (ball2._y < ((pinkwall1._y + (pinkwall1._height / 2)) + (ball2._height / 2)))) && (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2))))) {
red_hit_left = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differenceorange = ((ball1._y - orangewall2._y) - (orangewall2._height / 2)) - (ball1._height / 2);
differenceorange2 = ((ball2._y - orangewall2._y) - (orangewall2._height / 2)) - (ball2._height / 2);
distance_between_bottomwall_and_ball = Math.abs(((bottomwall._y - ball1._y) - (bottomwall._height / 2)) - (ball1._height / 2));
distance_between_bottomwall_and_ball2 = Math.abs(((bottomwall._y - ball2._y) - (bottomwall._height / 2)) - (ball2._height / 2));
distance_x_between_orangewall2_and_ball = Math.abs(orangewall2._x - ball1._x);
distance_x_between_orangewall2_and_ball2 = Math.abs(orangewall2._x - ball2._x);
if ((((orangewall2_movement == true) and (differenceorange <= 0.2)) and (differenceorange >= -8)) and (distance_x_between_orangewall2_and_ball < ((ball1._width / 2) + (orangewall2._width / 2)))) {
ball1._y = ((orangewall2._y + (orangewall2._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((orangewall2_movement == true) and (differenceorange2 <= 0.2)) and (differenceorange2 >= -8)) and (distance_x_between_orangewall2_and_ball2 < ((ball2._width / 2) + (orangewall2._width / 2)))) {
ball2._y = ((orangewall2._y + (orangewall2._height / 2)) + (ball2._height / 2)) + 0.2;
}
if (((((differenceorange <= 0.5) && (differenceorange >= -1)) && (distance_between_bottomwall_and_ball <= 1)) && (distance_x_between_orangewall2_and_ball < ((ball1._width / 2) + (orangewall2._width / 2)))) or ((((differenceorange2 <= 0.5) && (differenceorange2 >= -1)) && (distance_between_bottomwall_and_ball2 <= 0.5)) && (distance_x_between_orangewall2_and_ball2 < ((ball2._width / 2) + (orangewall2._width / 2))))) {
orange2_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differenceorangever = ((orangewall1._x - ball1._x) - (orangewall1._width / 2)) - (ball1._width / 2);
differenceorangever2 = ((orangewall1._x - ball2._x) - (orangewall1._width / 2)) - (ball2._width / 2);
distance_y_between_orangewall1_and_ball = Math.abs(orangewall1._y - ball1._y);
distance_y_between_orangewall1_and_ball2 = Math.abs(orangewall1._y - ball2._y);
if ((((orangewall1_movement == true) and (differenceorangever <= 0.2)) and (differenceorangever >= -8)) and (distance_y_between_orangewall1_and_ball < ((ball1._height / 2) + (orangewall1._height / 2)))) {
ball1._x = ((orangewall1._x - (orangewall1._width / 2)) - (ball1._width / 2)) - 0.2;
}
if ((((orangewall1_movement == true) and (differenceorangever2 <= 0.2)) and (differenceorangever2 >= -8)) and (distance_y_between_orangewall1_and_ball2 < ((ball2._height / 2) + (orangewall1._height / 2)))) {
ball2._x = ((orangewall1._x - (orangewall1._width / 2)) - (ball2._width / 2)) - 0.2;
}
if ((((((differenceorangever <= 0.5) && (differenceorangever >= -2)) && (distance_between_skinnyleft_and_ball <= 1)) && (ball1._y < ((skinnyleft._y + (skinnyleft._height / 2)) + (ball1._height / 2)))) && (distance_y_between_orangewall1_and_ball < ((ball1._height / 2) + (orangewall1._height / 2)))) or (((((differenceorangever2 <= 0.5) && (differenceorangever2 >= -2)) && (distance_between_skinnyleft_and_ball2 <= 1)) && (ball2._y < ((skinnyleft._y + (skinnyleft._height / 2)) + (ball2._height / 2)))) && (distance_y_between_orangewall1_and_ball2 < ((ball2._height / 2) + (orangewall1._height / 2))))) {
orange1_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation > (Stage.width / 2)) {
if (red_hit_right == true) {
black_is_hit_red_right = true;
}
if (red_hit_left == true) {
gray_is_hit_red_left = true;
}
if (orange1_hit == true) {
gray_is_hit_orange1 = true;
}
if (orange2_hit == true) {
gray_is_hit_orange2 = true;
}
} else if (ball1_xlocation < (Stage.width / 2)) {
if (red_hit_right == true) {
gray_is_hit_red_right = true;
}
if (red_hit_left == true) {
black_is_hit_red_left = true;
}
if (orange1_hit == true) {
black_is_hit_orange1 = true;
}
if (orange2_hit == true) {
black_is_hit_orange2 = true;
}
}
ball_locator();
}
};
Instance of Symbol 1997 MovieClip "ball1" in Frame 22
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.skinnyleft)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.skinnyleft.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.skinnyleft.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.skinnyleft.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.skinnyleft.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.skinnyright)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.skinnyright.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.skinnyright.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.skinnyright.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.skinnyright.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall1.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 23
function restartLevel() {
_root.scoresubmit14 = savefile.data.scoresubmit14;
savefile.flush();
soundstart = false;
small = false;
if ((((((((((((((((var15 != true) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var14 = true;
}
var13 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
redwall_movement = false;
redwall2_movement = false;
ball_location = true;
black_is_hit_red = false;
gray_is_hit_red = false;
red_hit = false;
ball1_is_pushed_by_red_wall = false;
ball2_is_pushed_by_red_wall = false;
finish_is_attached_to_crate1 = true;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.crate1.gotoAndStop(1);
_root.crate2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
ball_movement = true;
finisher = false;
if (_root.redwall2.thingy._x <= 212) {
_root.redwall2.thingy._x = 212.85;
}
_root.hit_crate1 = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_left_against_lb = false;
_root.cant_move_crate1_left_against_lm = false;
_root.cant_move_crate1_down_against_insidebottom = false;
_root.cant_move_crate1_down_against_lb = false;
_root.cant_move_crate1_up_against_insidetop = false;
_root.cant_move_crate1_up_against_lm = false;
_root.red_wall_and_crate1_rightside_touching = false;
_root.crate1_against_red_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_red_wall = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
crate1._x = 278.7;
crate1._y = 276.3;
redkey._x = 265.6;
redkey._y = 111;
redwall._x = 728;
redwall._y = 277.4;
redwall2._x = -91;
redwall2._y = 275;
ball1._x = 265.6;
ball1._y = 445.9;
ball2._x = 498.9;
ball2._y = 106.1;
youwin._x = 10000;
winningscreen._x = 1000;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_red == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
}
if (gray_is_hit_red == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(14);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l16");
};
ball1.onEnterFrame = function () {
if (this.hitTest(redkey)) {
keystart = true;
redkey._x = 100000 /* 0x0186A0 */;
redwall_movement = true;
redwall2_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if (redwall.hitTest(redwall2)) {
redwall_movement = false;
}
if (redwall2._x > -53.2) {
redwall2_movement = false;
soundstart = true;
redwall2._x = -53.2;
_root.redwall2.thingy._x = _root.redwall2.thingy._x - 1;
}
if (scoresubmit14) {
scoresubmit = false;
} else if (scoresubmit14 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 14) or scoresubmit) {
level14_best_time = seconds;
scoresubmit14 = true;
savefile.data.scoresubmit14 = _root.scoresubmit14;
savefile.flush();
}
if (seconds < level14_best_time) {
level14_best_time = seconds;
}
savefile.data.level14_best_time = _root.level14_best_time;
savefile.flush();
if (_root.score <= 15) {
_root.score = 15;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(14);
_root.win.meter.gotoAndStop(15);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 100000 /* 0x0186A0 */;
gotoAndStop ("l16");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
thingyx = _root.redwall2.thingy._x;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var14) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l26");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l16");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
crate1y = crate1._y;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (finish_is_attached_to_crate1 == true) {
finish._x = crate1._x;
finish._y = crate1._y;
}
ballx = ball1._x;
bally = ball1._y;
if (redwall_movement) {
redwall._x = redwall._x - 1;
}
if (redwall2_movement) {
redwall2._x = redwall2._x + 1;
}
differencered = ((redwall._x - (redwall._width / 2)) - (ball1._width / 2)) - ball1._x;
differencered2 = ((redwall._x - (redwall._width / 2)) - (ball2._width / 2)) - ball2._x;
distance_between_middlewall_and_ball = Math.abs(((ball1._x - middlewall._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_middlewall_and_ball2 = Math.abs(((ball2._x - middlewall._x) - (middlewall._width / 2)) - (ball2._width / 2));
distance_y_between_redwall_and_ball = Math.abs(redwall._y - ball1._y);
distance_y_between_redwall_and_ball2 = Math.abs(redwall._y - ball2._y);
if ((((redwall_movement == true) and (differencered <= 0.2)) and (differencered >= -8)) and (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) {
ball1._x = ((redwall._x - (redwall._width / 2)) - (ball1._width / 2)) - 0.2;
ball1_is_pushed_by_red_wall = true;
} else {
ball1_is_pushed_by_red_wall = false;
}
if ((((redwall_movement == true) and (differencered2 <= 0.2)) and (differencered2 >= -8)) and (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2)))) {
ball2._x = ((redwall._x - (redwall._width / 2)) - (ball2._width / 2)) - 0.2;
ball2_is_pushed_by_red_wall = true;
} else {
ball2_is_pushed_by_red_wall = false;
}
if (((((differencered <= 0.5) && (differencered >= -8)) && (distance_between_middlewall_and_ball <= 1)) && (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) or ((((differencered2 <= 0.5) && (differencered2 >= -1)) && (distance_between_middlewall_and_ball2 <= 0.5)) && (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2))))) {
red_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (red_hit == true) {
gray_is_hit_red = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (red_hit == true) {
black_is_hit_red = true;
}
}
ball_locator();
}
};
Instance of Symbol 2025 MovieClip "crate1" in Frame 23
onClipEvent (load) {
_root.hit_crate1 = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_left_against_lb = false;
_root.cant_move_crate1_left_against_lm = false;
_root.cant_move_crate1_down_against_insidebottom = false;
_root.cant_move_crate1_down_against_lb = false;
_root.cant_move_crate1_up_against_insidetop = false;
_root.cant_move_crate1_up_against_lm = false;
_root.red_wall_and_crate1_rightside_touching = false;
_root.crate1_against_red_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_red_wall = false;
}
onClipEvent (enterFrame) {
_root.distance_y_between_ball1_and_crate1 = Math.abs(_root.ball1._y - _y);
_root.difference_x_ball1_with_crate1_rightside = ((_root.ball1._x - _x) - (_width / 2)) - (_root.ball1._width / 2);
_root.difference_x_ball1_with_crate1_leftside = ((_x - _root.ball1._x) - (_width / 2)) - (_root.ball1._width / 2);
_root.distance_y_between_ball2_and_crate1 = Math.abs(_root.ball2._y - _y);
_root.difference_x_ball2_with_crate1_rightside = ((_root.ball2._x - _x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_ball2_with_crate1_leftside = ((_x - _root.ball2._x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_red_with_crate1_left = ((_x - (_width / 2)) - _root.redwall._x) - (_root.redwall._width / 2);
_root.difference_x_red_with_crate1_right = ((_root.redwall._x - (_root.redwall._width / 2)) - _x) - (_width / 2);
_root.difference_y_red_with_crate1_up = ((_y - (_height / 2)) - _root.redwall._y) - (_root.redwall._height / 2);
_root.difference_y_red_with_crate1_down = ((_root.redwall._y - (_root.redwall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_redwall_and_crate1 = Math.abs(_root.redwall._x - _x);
_root.distance_y_between_redwall_and_crate1 = Math.abs(_root.redwall._y - _y);
_root.difference_x_crate1_leftside_with_lb = ((_x - (_width / 2)) - (_root.lb._width / 2)) - _root.lb._x;
_root.difference_x_crate1_leftside_with_redwall2 = ((_x - (_width / 2)) - (_root.redwall2._width / 2)) - _root.redwall2._x;
if ((_y > ((_root.lb._y - (_root.lb._height / 2)) - (_height / 2))) or (_y < ((_root.lm._y + (_root.lm._height / 2)) + (_height / 2)))) {
_root.cant_move_crate1_left_against_lm = true;
_root.cant_move_crate1_left_against_lb = true;
} else {
_root.cant_move_crate1_left_against_lm = false;
_root.cant_move_crate1_left_against_lb = false;
}
if (hitTest(_root.middlewall_insidetop) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall_insidetop.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_insidetop = true;
}
if (((Math.abs(((_y - _root.middlewall_insidetop._y) - (_root.middlewall_insidetop._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.middlewall_insidetop._x + (_root.middlewall_insidetop._width / 2)) + (_width / 2)))) and (_x > ((_root.middlewall_insidetop._x - (_root.middlewall_insidetop._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_insidetop = true;
} else {
_root.cant_move_crate1_up_against_insidetop = false;
}
if (hitTest(_root.lm) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.lm.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_lm = true;
}
if (((Math.abs(((_y - _root.lm._y) - (_root.lm._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.lm._x + (_root.lm._width / 2)) + (_width / 2)))) and (_x > ((_root.lm._x - (_root.lm._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_lm = true;
} else {
_root.cant_move_crate1_up_against_lm = false;
}
if (hitTest(_root.middlewall_insidebottom) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall_insidebottom.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_insidebottom = true;
}
if (((Math.abs(((_root.middlewall_insidebottom._y - _y) - (_root.middlewall_insidebottom._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.middlewall_insidebottom._x + (_root.middlewall_insidebottom._width / 2)) + (_width / 2)))) and (_x > ((_root.middlewall_insidebottom._x - (_root.middlewall_insidebottom._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_insidebottom = true;
} else {
_root.cant_move_crate1_down_against_insidebottom = false;
}
if (hitTest(_root.lb) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.lb.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_lb = true;
}
if (((Math.abs(((_root.lb._y - _y) - (_root.lb._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.lb._x + (_root.lb._width / 2)) + (_width / 2)))) and (_x > ((_root.lb._x - (_root.lb._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_lb = true;
} else {
_root.cant_move_crate1_down_against_lb = false;
}
if (hitTest(_root.redwall)) {
_root.redwall_crate1_hit = true;
if ((_root.hit_crate1 == true) and (_root.moveright == true)) {
if (((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) and (_root.ball1_is_pushed_by_red_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_red_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.moveleft == true)) {
if ((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_red_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.movedown == true)) {
if (((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) and (_root.crate1_is_pushed_by_red_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_red_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.moveup == true)) {
if (((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) and (_root.crate1_is_pushed_by_red_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_red_wall = true;
}
}
} else {
_root.redwall_crate1_hit = false;
}
if (((_root.difference_x_red_with_crate1_right <= 3) && (_root.difference_x_red_with_crate1_right >= -8)) && (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) {
_root.cant_move_crate1_right_against_red_wall = true;
_root.red_wall_and_crate1_rightside_touching = true;
} else {
_root.cant_move_crate1_right_against_red_wall = false;
_root.red_wall_and_crate1_rightside_touching = false;
}
if ((((_root.redwall_movement == true) and (_root.red_wall_and_crate1_rightside_touching == true)) and (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.redwall._x - (_root.redwall._width / 2)) - (_width / 2)) - 0.7);
_root.crate1_is_pushed_by_red_wall = true;
}
if (((_root.difference_x_ball1_with_crate1_leftside <= 0.3) && (_root.difference_x_ball1_with_crate1_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate1_leftside_touching = true;
} else {
_root.ball1_and_crate1_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate1_leftside <= 0.3) && (_root.difference_x_ball2_with_crate1_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate1_leftside_touching = true;
} else {
_root.ball2_and_crate1_leftside_touching = false;
}
if (((_root.difference_x_ball1_with_crate1_rightside <= 2) && (_root.difference_x_ball1_with_crate1_rightside >= -8)) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate1_rightside_touching = true;
} else {
_root.ball1_and_crate1_rightside_touching = false;
}
if (((_root.difference_x_ball2_with_crate1_rightside <= 0.3) && (_root.difference_x_ball2_with_crate1_rightside >= -8)) && (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate1_rightside_touching = true;
} else {
_root.ball2_and_crate1_rightside_touching = false;
}
if (((((_root.ball1_and_crate1_leftside_touching == true) and (_root.crate1_is_pushed_by_red_wall == true)) and (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.redwall_movement == true)) {
_root.ball1._x = (((_root.redwall._x - (_root.redwall._width / 2)) - _width) - (_root.ball1._width / 2)) - 0.5;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = true;
} else {
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
}
if (((((_root.ball2_and_crate1_leftside_touching == true) and (_root.crate1_is_pushed_by_red_wall == true)) and (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.redwall_movement == true)) {
_root.ball2._x = (((_root.redwall._x - (_root.redwall._width / 2)) - _width) - (_root.ball2._width / 2)) - 0.5;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = true;
} else {
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
}
if (((((_root.ball1_and_crate1_rightside_touching == true) and (_root.ball1_is_pushed_by_red_wall == true)) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveleft == false)) and (_currentframe == 1)) {
_root.cant_move_crate1_right_against_red_wall = false;
_x = (((_root.ball1._x - (_root.ball1._width / 2)) - (_width / 2)) - 0.5);
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = true;
} else {
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
}
if ((((_root.ball2_and_crate1_rightside_touching == true) and (_root.ball2_is_pushed_by_red_wall == true)) and (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveleft == false)) {
_x = (((_root.ball2._x - (_root.ball2._width / 2)) - (_width / 2)) - 0.5);
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = true;
} else {
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
}
if ((((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) and (_root.redwall_movement == true)) and (_root.difference_x_red_with_crate1_right < 0.5)) and (_root.difference_x_red_with_crate1_right > -3)) {
_root.crate1_against_red_wall_boundaries_prevention = true;
} else {
_root.crate1_against_red_wall_boundaries_prevention = false;
}
if (((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) and (_root.distance_y_between_redwall_and_ball <= ((_root.ball1._height / 2) + (_root.redwall._height / 2)))) and (_root.redwall_movement == true)) {
_root.crate1_against_red_wall_boundaries_prevention2 = true;
} else {
_root.crate1_against_red_wall_boundaries_prevention2 = false;
}
if (((_root.difference_x_red_with_crate1_left <= 0.3) && (_root.difference_x_red_with_crate1_left >= -8)) && (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) {
_root.cant_move_crate1_left_against_red_wall = true;
} else {
_root.cant_move_crate1_left_against_red_wall = false;
}
if (_root.crate1_against_red_wall_boundaries_prevention == false) {
if (((_root.difference_y_red_with_crate1_up <= 0.3) && (_root.difference_y_red_with_crate1_up >= -8)) && (_root.distance_x_between_redwall_and_crate1 < ((_width / 2) + (_root.redwall._width / 2)))) {
_root.cant_move_crate1_up_against_red_wall = true;
_root.cant_move_crate1_up_against_insidetop = true;
_root.cant_move_crate1_up_against_lm = true;
} else {
_root.cant_move_crate1_up_against_red_wall = false;
}
if (((_root.difference_y_red_with_crate1_down <= 0.3) && (_root.difference_y_red_with_crate1_down >= -8)) && (_root.distance_x_between_redwall_and_crate1 < ((_width / 2) + (_root.redwall._width / 2)))) {
_root.cant_move_crate1_down_against_insidebottom = true;
_root.cant_move_crate1_down_against_lb = true;
} else {
_root.cant_move_crate1_down_against_red_wall = false;
}
} else if ((((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate1_leftside <= 0.3)) && (_root.difference_x_ball1_with_crate1_leftside >= -8)) {
_root.cant_move_crate1_down_against_red_wall = true;
_root.cant_move_crate1_up_against_red_wall = true;
_root.cant_move_crate1_left_against_red_wall = true;
_root.cant_move_crate1_right_against_red_wall = true;
} else {
_root.cant_move_crate1_down_against_red_wall = false;
_root.cant_move_crate1_up_against_red_wall = false;
}
if (((_root.redwall_movement == true) and ((((_root.difference_x_ball1_with_crate1_leftside <= 0.7) && (_root.difference_x_ball1_with_crate1_leftside >= -6)) && (_root.distance_between_middlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate1 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate1_leftside <= 0.7) && (_root.difference_x_ball2_with_crate1_leftside >= -6)) && (_root.distance_between_middlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate1 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.red_hit = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate1_up_against_red_wall = false;
_root.cant_move_crate1_down_against_red_wall = false;
}
if ((((_root.difference_x_crate1_leftside_with_lb <= 0.3) && (_root.difference_x_crate1_leftside_with_lb >= -8)) and ((this._y > 279.4) or (this._y < 264.9))) && (((_root.crate1_is_pushed_by_red_wall == true) or (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == true)) or (_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall == true))) {
_root.finish_is_attached_to_crate1 = false;
_root.decoy_crate.inside.gotoAndPlay(1);
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 2000;
_root.redwall_movement = false;
}
if (((_root.difference_x_crate1_leftside_with_redwall2 <= 0.3) && (_root.difference_x_crate1_leftside_with_redwall2 >= -8)) && (_root.crate1_is_pushed_by_red_wall == true)) {
_root.finish_is_attached_to_crate1 = false;
_root.decoy_crate.inside.gotoAndPlay(1);
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 2000;
_root.redwall_movement = false;
}
}
Instance of Symbol 1917 MovieClip "ball1" in Frame 23
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall_insidetop)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall_insidetop.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall_insidetop.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall_insidetop.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall_insidetop.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall_insidebottom)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall_insidebottom.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall_insidebottom.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall_insidebottom.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall_insidebottom.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lb)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lb.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lb.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lb.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lb.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lm)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lm.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lm.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lm.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lm.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.crate1)) {
if (_root.crate1._currentframe == 1) {
_root.hit_crate1 = true;
if (xmove > 0) {
if ((_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate1.getBounds(_root).xMin) + 0.1));
if (_root.cant_move_crate1_right_against_red_wall == false) {
_root.cratespeed_xright = 1;
_root.crate1._x = _root.crate1._x + _root.cratespeed_xright;
_root.moveright = true;
if (_root.ball2_and_crate1_rightside_touching) {
_root.ball2._x = _root.ball2._x + 1;
}
}
}
} else {
_root.moveright = false;
}
if (xmove < 0) {
if (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false) {
_x = (_x - ((getBounds(_root).xMin - _root.crate1.getBounds(_root).xMax) - 0.1));
if (((_root.cant_move_crate1_left_against_red_wall == false) and (_root.cant_move_crate1_left_against_lb == false)) and (_root.cant_move_crate1_left_against_lm == false)) {
_root.cratespeed_xleft = 1;
_root.crate1._x = _root.crate1._x - _root.cratespeed_xleft;
_root.moveleft = true;
if (_root.ball2_and_crate1_leftside_touching) {
_root.ball2._x = _root.ball2._x - 1;
}
}
}
} else {
_root.moveleft = false;
}
if (ymove > 0) {
if ((((_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false) && (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false)) and (_root.difference_x_ball1_with_crate1_leftside <= -1)) and (_root.difference_x_ball1_with_crate1_rightside <= -1)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate1.getBounds(_root).yMin) + 0.1));
if (((_root.cant_move_crate1_down_against_red_wall == false) and (_root.cant_move_crate1_down_against_insidebottom == false)) and (_root.cant_move_crate1_down_against_lb == false)) {
_root.cratespeed_ydown = 1;
_root.crate1._y = _root.crate1._y + _root.cratespeed_ydown;
_root.movedown = true;
}
}
} else {
_root.movedown = false;
}
if (ymove < 0) {
if ((((_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false) && (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false)) and (_root.difference_x_ball1_with_crate1_leftside <= -1)) and (_root.difference_x_ball1_with_crate1_rightside <= -1)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate1.getBounds(_root).yMax) - 0.1));
if (((_root.cant_move_crate1_up_against_red_wall == false) and (_root.cant_move_crate1_up_against_insidetop == false)) and (_root.cant_move_crate1_up_against_lm == false)) {
_root.cratespeed_yup = 1;
_root.crate1._y = _root.crate1._y - _root.cratespeed_yup;
_root.moveup = true;
}
}
} else {
_root.moveup = false;
}
}
}
}
if ((((!Key.isDown(37)) and (!Key.isDown(39))) and (!Key.isDown(38))) and (!Key.isDown(40))) {
_root.moveup = false;
_root.movedown = false;
_root.moveright = false;
_root.moveleft = false;
move(0, 0);
_root.hit_crate1 = false;
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
if (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false) {
move(5, 0);
}
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 24
function restartLevel() {
_root.scoresubmit21 = savefile.data.scoresubmit21;
savefile.flush();
soundstart = false;
small = false;
if (((((((((var22 != true) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var21 = true;
}
var20 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
greenwall_movement = false;
redwall_movement = false;
bluewall_movement = false;
greenswitch.gotoAndStop(1);
orangekey_is_attached_to_crate1 = true;
ball_location = true;
black_is_hit_red = false;
gray_is_hit_red = false;
red_hit = false;
transport = false;
orange_is_attached_to_crate1 = true;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.crate1.gotoAndStop(1);
_root.crate2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
ball_movement = true;
finisher = false;
_root.hit_crate1 = false;
_root.crate_is_pushed_by_blue = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_left_against_leftwall = false;
_root.cant_move_crate1_left_against_bluewall = false;
_root.cant_move_crate1_left_against_insidewall = false;
_root.cant_move_crate1_right_against_rightwall = false;
_root.cant_move_crate1_right_against_middlewall = false;
_root.cant_move_crate1_down_against_l1 = false;
_root.cant_move_crate1_down_against_l2 = false;
_root.cant_move_crate1_down_against_bottomwall = false;
_root.cant_move_crate1_down_against_middlewall2 = false;
_root.cant_move_crate1_up_against_l2 = false;
_root.cant_move_crate1_up_against_topwall = false;
_root.cant_move_crate1_up_against_bluewall = false;
_root.cant_move_crate1_up_against_red_wall = false;
_root.movement_activate = false;
_root.blue_wall_and_crate1_topside_touching = false;
_root.red_wall_and_crate1_rightside_touching = false;
_root.crate1_against_red_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_red_wall = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
crate1._x = 200;
crate1._y = 334.4;
bluekey._x = 271;
bluekey._y = 471.9;
redkey._x = 225.3;
redkey._y = 112;
redstop._x = 179.8;
redstop._y = 112;
greenswitch._x = 482;
greenswitch._y = 237.7;
redwall._x = 585;
redwall._y = 173.8;
orangewall._x = 500;
orangewall._y = 223;
bluewall._x = 467.1;
bluewall._y = 44.8;
greenwall._x = 500.1;
greenwall._y = 381.9;
ball1._x = 179.5;
ball1._y = 472.9;
ball2._x = 419.1;
ball2._y = 65.3;
transporter1._x = 129.8;
transporter1._y = 470.8;
transporter2._x = 527.1;
transporter2._y = 108.1;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 500;
finish._y = 453.8;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_red == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
}
if (gray_is_hit_red == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(21);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l11");
};
ball1.onEnterFrame = function () {
if (this.hitTest(redkey)) {
keystart = true;
redkey._x = 100000 /* 0x0186A0 */;
redwall_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if (this.hitTest(bluekey)) {
keystart = true;
bluekey._x = 10000;
bluewall_movement = true;
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndPlay(1);
}
if (_root.crate1.hitTest(_root.greenswitch.button) and (_root.greenswitch._currentframe == 1)) {
switchstart = true;
_root.greenswitch.gotoAndStop(2);
greenwall_movement = true;
}
if ((this.hitTest(transporter2) or ball2.hitTest(transporter2)) and (transport == false)) {
transporter2._alpha = 67;
transporter1._alpha = 67;
} else {
transporter2._alpha = 100;
transporter1._alpha = 100;
}
if (transporter2._alpha == 100) {
if (crate1.hitTest(transporter1)) {
_root.transstart = true;
crate1._x = transporter2._x;
crate1._y = transporter2._y;
transport = true;
}
}
if (this.hitTest(redstop)) {
stopstart = true;
redstop._x = 10000;
redwall_movement = false;
movement_activate = false;
_root.ball1.scan.gotoAndStop(11);
}
if (redwall.hitTest(bluewall)) {
soundstart = true;
redwall_movement = false;
bluewall_movement = false;
if ((((redwall._x - (bluewall._width / 2)) - bluewall._x) - (redwall._width / 2)) < -1) {
bluewall._y = ((redwall._y - (redwall._height / 2)) - (bluewall._height / 2)) - 0.1;
} else {
redwall._x = ((bluewall._x + (bluewall._width / 2)) + (redwall._width / 2)) + 0.1;
}
}
if (redwall.hitTest(middlewall22)) {
redwall_movement = false;
}
if (scoresubmit21) {
scoresubmit = false;
} else if (scoresubmit21 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 21) or scoresubmit) {
level21_best_time = seconds;
scoresubmit21 = true;
savefile.data.scoresubmit21 = _root.scoresubmit21;
savefile.flush();
}
if (seconds < level21_best_time) {
level21_best_time = seconds;
}
savefile.data.level21_best_time = _root.level21_best_time;
savefile.flush();
if (_root.score <= 22) {
_root.score = 22;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(21);
_root.win.meter.gotoAndStop(22);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l11");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var21) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l20");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l11");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
ballx = ball1._x;
bally = ball1._y;
if (greenwall_movement) {
greenwall._x = greenwall._x + 1;
}
if (redwall_movement) {
redwall._x = redwall._x - 0.4;
}
if (redwall._x < 422.9) {
redwall_movement = false;
soundstart = true;
redwall._x = 422.9;
}
if (bluewall_movement) {
bluewall._y = bluewall._y + 1;
}
if (bluewall._y > 112.2) {
bluewall_movement = false;
soundstart = true;
bluewall._y = 112.1;
}
if ((bluewall._y == 26.4) and (crate_is_pushed_by_blue == true)) {
crate._y = 26.9;
}
differencered = ((redwall._x - ball1._x) - (redwall._width / 2)) - (ball1._width / 2);
differencered2 = ((redwall._x - ball2._x) - (redwall._width / 2)) - (ball2._width / 2);
distance_between_middlewall22_and_ball = Math.abs(((ball1._x - middlewall22._x) - (middlewall22._width / 2)) - (ball1._width / 2));
distance_between_middlewall22_and_ball2 = Math.abs(((ball2._x - middlewall22._x) - (middlewall22._width / 2)) - (ball2._width / 2));
distance_between_bluewall_and_ball = Math.abs(((ball1._x - bluewall._x) - (bluewall._width / 2)) - (ball1._width / 2));
distance_between_bluewall_and_ball2 = Math.abs(((ball2._x - bluewall._x) - (bluewall._width / 2)) - (ball2._width / 2));
distance_y_between_redwall_and_ball = Math.abs(redwall._y - ball1._y);
distance_y_between_redwall_and_ball2 = Math.abs(redwall._y - ball2._y);
if ((((redwall_movement == true) and (differencered <= 0.2)) and (differencered >= -8)) and (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) {
ball1._x = ((redwall._x - (redwall._width / 2)) - (ball1._width / 2)) - 0.2;
}
if ((((redwall_movement == true) and (differencered2 <= 0.2)) and (differencered2 >= -8)) and (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2)))) {
ball2._x = ((redwall._x - (redwall._width / 2)) - (ball2._width / 2)) - 0.2;
}
if (((((differencered <= 0.5) && (differencered >= -1)) && (distance_between_middlewall22_and_ball <= 0.5)) && (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) or ((((differencered2 <= 0.5) && (differencered2 >= -1)) && (distance_between_middlewall22_and_ball2 <= 0.5)) && (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2))))) {
red_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (((((((differencered <= 0.5) && (differencered >= -1)) && (redwall_movement == true)) && (ball1._y < ((bluewall._y + (bluewall._height / 2)) + (ball1._height / 2)))) && (distance_between_bluewall_and_ball <= 0.5)) && (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) or ((((((differencered2 <= 0.5) && (differencered2 >= -1)) && (ball2._y < ((bluewall._y + (bluewall._height / 2)) + (ball2._height / 2)))) && (redwall_movement == true)) && (distance_between_bluewall_and_ball2 <= 0.5)) && (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2))))) {
red_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differenceblue = ((ball1._y - bluewall._y) - (bluewall._height / 2)) - (ball1._height / 2);
differenceblue2 = ((ball2._y - bluewall._y) - (bluewall._height / 2)) - (ball2._height / 2);
distance_between_bottomwall_and_ball = Math.abs(((topmiddlewall._y - ball1._y) - (topmiddlewall._height / 2)) - (ball1._height / 2));
distance_between_bottomwall_and_ball2 = Math.abs(((topmiddlewall._y - ball2._y) - (topmiddlewall._height / 2)) - (ball2._height / 2));
distance_x_between_bluewall_and_ball = Math.abs(bluewall._x - ball1._x);
distance_x_between_bluewall_and_ball2 = Math.abs(bluewall._x - ball2._x);
if ((((bluewall_movement == true) and (differenceblue <= 0.2)) and (differenceblue >= -8)) and (distance_x_between_bluewall_and_ball < ((ball1._width / 2) + (bluewall._width / 2)))) {
ball1._y = ((bluewall._y + (bluewall._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((bluewall_movement == true) and (differenceblue2 <= 0.2)) and (differenceblue2 >= -8)) and (distance_x_between_bluewall_and_ball2 < ((ball2._width / 2) + (bluewall._width / 2)))) {
ball2._y = ((bluewall._y + (bluewall._height / 2)) + (ball2._height / 2)) + 0.2;
}
if ((((((bluewall_movement == true) and (differenceblue <= 0.5)) && (differenceblue >= -1)) && (distance_between_bottomwall_and_ball <= 1)) && (distance_x_between_bluewall_and_ball < ((ball1._width / 2) + (bluewall._width / 2)))) or (((((bluewall_movement == true) and (differenceblue2 <= 0.5)) && (differenceblue2 >= -1)) && (distance_between_bottomwall_and_ball2 <= 0.5)) && (distance_x_between_bluewall_and_ball2 < ((ball2._width / 2) + (bluewall._width / 2))))) {
red_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (red_hit == true) {
gray_is_hit_red = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (red_hit == true) {
black_is_hit_red = true;
}
}
ball_locator();
}
};
Instance of Symbol 2077 MovieClip "ball1" in Frame 24
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall22)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall22.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall22.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall22.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall22.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightmiddle)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightmiddle.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightmiddle.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightmiddle.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightmiddle.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightmiddle)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightmiddle.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightmiddle.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightmiddle.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightmiddle.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottommiddle)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottommiddle.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottommiddle.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottommiddle.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottommiddle.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.skinnyright)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.skinnyright.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.skinnyright.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.skinnyright.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.skinnyright.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.5));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if ((ymove < 0) and (_y > (_root.redwall._y + (_root.redwall._width / 2)))) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.crate1)) {
if (_root.crate1._currentframe == 1) {
_root.hit_crate1 = true;
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.crate1.getBounds(_root).xMin) + 0.1));
if (((_root.cant_move_crate1_right_against_red_wall == false) and (_root.cant_move_crate1_right_against_rightwall == false)) and (_root.cant_move_crate1_right_against_middlewall == false)) {
_root.cratespeed_xright = 1;
_root.crate1._x = _root.crate1._x + _root.cratespeed_xright;
_root.moveright = true;
}
} else {
_root.moveright = false;
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.crate1.getBounds(_root).xMax) - 0.1));
if (((_root.cant_move_crate1_left_against_leftwall == false) and (_root.cant_move_crate1_left_against_bluewall == false)) and (_root.cant_move_crate1_left_against_insidewall == false)) {
_root.cratespeed_xleft = 1;
_root.crate1._x = _root.crate1._x - _root.cratespeed_xleft;
_root.moveleft = true;
}
} else {
_root.moveleft = false;
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.crate1.getBounds(_root).yMin) + 0.1));
if ((((_root.cant_move_crate1_down_against_red_wall == false) and (_root.cant_move_crate1_down_against_bottomwall == false)) and (_root.cant_move_crate1_down_against_l1 == false)) and (_root.cant_move_crate1_down_against_l2 == false)) {
_root.cratespeed_ydown = 1;
_root.crate1._y = _root.crate1._y + _root.cratespeed_ydown;
_root.movedown = true;
}
} else {
_root.movedown = false;
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.crate1.getBounds(_root).yMax) - 0.1));
if (((_root.cant_move_crate1_up_against_topwall == false) and (_root.cant_move_crate1_up_against_bluewall == false)) and (_root.cant_move_crate1_up_against_red_wall == false)) {
_root.cratespeed_yup = 1;
_root.crate1._y = _root.crate1._y - _root.cratespeed_yup;
_root.moveup = true;
}
} else {
_root.moveup = false;
}
}
}
}
if ((((!Key.isDown(37)) and (!Key.isDown(39))) and (!Key.isDown(38))) and (!Key.isDown(40))) {
_root.moveup = false;
_root.movedown = false;
_root.moveright = false;
_root.moveleft = false;
move(0, 0);
_root.hit_crate1 = false;
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Instance of Symbol 1071 MovieClip "crate1" in Frame 24
onClipEvent (load) {
_root.hit_crate1 = false;
_root.crate_is_pushed_by_blue = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_left_against_leftwall = false;
_root.cant_move_crate1_left_against_bluewall = false;
_root.cant_move_crate1_left_against_insidewall = false;
_root.cant_move_crate1_right_against_rightwall = false;
_root.cant_move_crate1_right_against_middlewall = false;
_root.cant_move_crate1_down_against_l1 = false;
_root.cant_move_crate1_down_against_l2 = false;
_root.cant_move_crate1_down_against_bottomwall = false;
_root.cant_move_crate1_down_against_middlewall2 = false;
_root.cant_move_crate1_up_against_l2 = false;
_root.cant_move_crate1_up_against_topwall = false;
_root.cant_move_crate1_up_against_bluewall = false;
_root.cant_move_crate1_up_against_red_wall = false;
_root.movement_activate = false;
_root.blue_wall_and_crate1_topside_touching = false;
_root.red_wall_and_crate1_rightside_touching = false;
_root.crate1_against_red_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_red_wall = false;
}
onClipEvent (enterFrame) {
_root.distance_y_between_ball1_and_crate1 = Math.abs(_root.ball1._y - _y);
_root.difference_x_ball1_with_crate1_rightside = ((_root.ball1._x - _x) - (_width / 2)) - (_root.ball1._width / 2);
_root.difference_x_ball1_with_crate1_leftside = ((_x - _root.ball1._x) - (_width / 2)) - (_root.ball1._width / 2);
_root.distance_y_between_ball2_and_crate1 = Math.abs(_root.ball2._y - _y);
_root.difference_x_ball2_with_crate1_rightside = ((_root.ball2._x - _x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_ball2_with_crate1_leftside = ((_x - _root.ball2._x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_y_blue_with_crate1_up = ((_y - _root.bluewall._y) - (_root.bluewall._height / 2)) - (_height / 2);
_root.difference_x_red_with_crate1_left = ((_x - (_width / 2)) - _root.redwall._x) - (_root.redwall._width / 2);
_root.difference_x_red_with_crate1_right = ((_root.redwall._x - (_root.redwall._width / 2)) - _x) - (_width / 2);
_root.difference_y_red_with_crate1_up = ((_y - (_height / 2)) - _root.redwall._y) - (_root.redwall._height / 2);
_root.difference_y_red_with_crate1_down = ((_root.redwall._y - (_root.redwall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_skinnyright_and_crate1 = Math.abs(_root.skinnyright._x - _x);
_root.distance_x_between_bluewall_and_crate1 = Math.abs(_root.bluewall._x - _x);
_root.distance_x_between_redwall_and_crate1 = Math.abs(_root.redwall._x - _x);
_root.distance_y_between_redwall_and_crate1 = Math.abs(_root.redwall._y - _y);
_root.difference_x_crate1_leftside_with_lb = ((_x - (_width / 2)) - (_root.lb._width / 2)) - _root.lb._x;
_root.difference_x_crate1_leftside_with_middlewall22 = ((_x - (_width / 2)) - (_root.middlewall22._width / 2)) - _root.middlewall22._x;
_root.difference_x_crate1_leftside_with_bluewall = ((_x - (_width / 2)) - (_root.bluewall._width / 2)) - _root.bluewall._x;
_root.difference_x_crate1_leftside_with_insidewall = ((_x - (_width / 2)) - _root.insidewall._x) - (_root.insidewall._width / 2);
_root.difference_y_skinnyright_with_crate1 = Math.abs(((_root.bottommiddle._y - _y) - (_height / 2)) - (_root.bottommiddle._height / 2));
if (hitTest(_root.leftwall) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_leftwall = true;
}
if (((Math.abs(((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.leftwall._y + (_root.leftwall._height / 2)) + (_height / 2)))) and (_y > ((_root.leftwall._y - (_root.leftwall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_left_against_leftwall = true;
} else {
_root.cant_move_crate1_left_against_leftwall = false;
}
if (hitTest(_root.bluewall) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_bluewall = true;
}
if (((Math.abs(((_x - _root.bluewall._x) - (_root.bluewall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.bluewall._y + (_root.bluewall._height / 2)) + (_height / 2)))) and (_y > ((_root.bluewall._y - (_root.bluewall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_left_against_bluewall = true;
} else {
_root.cant_move_crate1_left_against_bluewall = false;
}
if (hitTest(_root.middlewall2.insidewall) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall2.insidewall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_insidewall = true;
}
if (((Math.abs(((_x - _root.middlewall2.insidewall._x) - (_root.middlewall2.insidewall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.middlewall2.insidewall._y + (_root.middlewall2.insidewall._height / 2)) + (_height / 2)))) and (_y > ((_root.middlewall2.insidewall._y - (_root.middlewall2.insidewall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_left_against_insidewall = true;
} else {
_root.cant_move_crate1_left_against_insidewall = false;
}
if (hitTest(_root.rightwall) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_rightwall = true;
}
if (((Math.abs(((_root.rightwall._x - _x) - (_root.rightwall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.rightwall._y + (_root.rightwall._height / 2)) + (_height / 2)))) and (_y > ((_root.rightwall._y - (_root.rightwall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_rightwall = true;
} else {
_root.cant_move_crate1_right_against_rightwall = false;
}
if (hitTest(_root.middlewall22) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall22.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_middlewall = true;
}
if (((Math.abs(((_root.middlewall22._x - _x) - (_root.middlewall22._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.middlewall22._y + (_root.middlewall22._height / 2)) + (_height / 2)))) and (_y > ((_root.middlewall22._y - (_root.middlewall22._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_middlewall = true;
} else {
_root.cant_move_crate1_right_against_middlewall = false;
}
if (hitTest(_root.insidewall2) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.insidewall2.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_middlewall = true;
}
if (((Math.abs(((_root.insidewall2._x - _x) - (_root.insidewall2._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.insidewall2._y + (_root.insidewall2._height / 2)) + (_height / 2)))) and (_y > ((_root.insidewall2._y - (_root.insidewall2._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_middlewall = true;
} else {
_root.cant_move_crate1_right_against_middlewall = false;
}
if (hitTest(_root.l2) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.l2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_l2 = true;
}
if (((Math.abs(((_y - _root.l2._y) - (_root.l2._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l2._x + (_root.l2._width / 2)) + (_width / 2)))) and (_x > ((_root.l2._x - (_root.l2._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_l2 = true;
} else {
_root.cant_move_crate1_up_against_l2 = false;
}
if (hitTest(_root.bluewall) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_bluewall = true;
}
if (((Math.abs(((_y - _root.bluewall._y) - (_root.bluewall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.bluewall._x + (_root.bluewall._width / 2)) + (_width / 2)))) and (_x > ((_root.bluewall._x - (_root.bluewall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_bluewall = true;
} else {
_root.cant_move_crate1_up_against_bluewall = false;
}
if (hitTest(_root.topwall) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_topwall = true;
}
if (((Math.abs(((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.topwall._x + (_root.topwall._width / 2)) + (_width / 2)))) and (_x > ((_root.topwall._x - (_root.topwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_topwall = true;
} else {
_root.cant_move_crate1_up_against_topwall = false;
}
if (hitTest(_root.l1) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.l1.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_l1 = true;
}
if (((Math.abs(((_root.l1._y - _y) - (_root.l1._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l1._x + (_root.l1._width / 2)) + (_width / 2)))) and (_x > ((_root.l1._x - (_root.l1._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_l1 = true;
} else {
_root.cant_move_crate1_down_against_l1 = false;
}
if (hitTest(_root.l2) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.l2.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_l2 = true;
}
if (((Math.abs(((_root.l2._y - _y) - (_root.l2._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l2._x + (_root.l2._width / 2)) + (_width / 2)))) and (_x > ((_root.l2._x - (_root.l2._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_l2 = true;
} else {
_root.cant_move_crate1_down_against_l2 = false;
}
if (hitTest(_root.bottomwall) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_bottomwall = true;
}
if (((Math.abs(((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.bottomwall._x + (_root.bottomwall._width / 2)) + (_width / 2)))) and (_x > ((_root.bottomwall._x - (_root.bottomwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_bottomwall = true;
} else {
_root.cant_move_crate1_down_against_bottomwall = false;
}
if ((hitTest(_root.redwall) and (_root.movedown == true)) and (_root.red_wall_and_crate1_rightside_touching == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_red_wall = true;
}
if ((((_root.red_wall_and_crate1_rightside_touching == false) and (Math.abs(((_root.redwall._y - _y) - (_root.redwall._height / 2)) - (_height / 2)) <= 0.3)) and (_x < ((_root.redwall._x + (_root.redwall._width / 2)) + (_width / 2)))) and (_x > ((_root.redwall._x - (_root.redwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_red_wall = true;
} else {
_root.cant_move_crate1_down_against_red_wall = false;
}
if (hitTest(_root.redwall)) {
_root.redwall_crate1_hit = true;
if ((_root.hit_crate1 == true) and (_root.moveright == true)) {
if ((((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) and (_root.ball1_is_pushed_by_red_wall == false)) and ((_y > 206.6) and (_x > (Stage.width / 2)))) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_red_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.moveleft == true)) {
if (((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) and ((_y > 206.6) and (_x > (Stage.width / 2)))) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_red_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.movedown == true)) {
if ((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.crate1_is_pushed_by_red_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_red_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.moveup == true)) {
if ((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.crate1_is_pushed_by_red_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_red_wall = true;
}
}
} else {
_root.redwall_crate1_hit = false;
}
if (((_root.difference_x_red_with_crate1_right <= 1) && (_root.difference_x_red_with_crate1_right >= -8)) && (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) {
_root.cant_move_crate1_right_against_red_wall = true;
_root.red_wall_and_crate1_rightside_touching = true;
} else {
_root.cant_move_crate1_right_against_red_wall = false;
_root.red_wall_and_crate1_rightside_touching = false;
}
if (((_root.difference_y_blue_with_crate1_up <= 0.3) && (_root.difference_y_blue_with_crate1_up >= -8)) && (_root.distance_x_between_bluewall_and_crate1 < ((_width / 2) + (_root.bluewall._width / 2)))) {
_root.blue_wall_and_crate1_topside_touching = true;
} else {
_root.blue_wall_and_crate1_topside_touching = false;
}
if ((((_root.redwall_movement == true) and (_root.red_wall_and_crate1_rightside_touching == true)) and (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and (_currentframe == 1)) {
_root.movement_activate = true;
}
if (_root.movement_activate == true) {
_x = (((_root.redwall._x - (_root.redwall._width / 2)) - (_width / 2)) - 0.2);
_root.crate1_is_pushed_by_red_wall = true;
} else {
_root.crate1_is_pushed_by_red_wall = false;
}
if ((((_root.bluewall_movement == true) and (_root.blue_wall_and_crate1_topside_touching == true)) and (_root.distance_x_between_bluewall_and_crate1 < ((_width / 2) + (_root.bluewall._width / 2)))) and (_currentframe == 1)) {
_y = (((_root.bluewall._y + (_root.bluewall._height / 2)) + (_height / 2)) + 1);
_root.crate_is_pushed_by_blue = true;
}
if ((((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) and (_root.redwall_movement == true)) and (_root.difference_x_red_with_crate1_right < 0.5)) and (_root.difference_x_red_with_crate1_right > -3)) {
_root.crate1_against_red_wall_boundaries_prevention = true;
} else {
_root.crate1_against_red_wall_boundaries_prevention = false;
}
if (((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) and (_root.distance_y_between_redwall_and_ball <= ((_root.ball1._height / 2) + (_root.redwall._height / 2)))) and (_root.redwall_movement == true)) {
_root.crate1_against_red_wall_boundaries_prevention2 = true;
} else {
_root.crate1_against_red_wall_boundaries_prevention2 = false;
}
if (_root.crate1_against_red_wall_boundaries_prevention == false) {
if (((_root.difference_y_red_with_crate1_up <= 0.3) && (_root.difference_y_red_with_crate1_up >= -8)) && (_root.distance_x_between_redwall_and_crate1 < ((_width / 2) + (_root.redwall._width / 2)))) {
_root.cant_move_crate1_up_against_red_wall = true;
_root.cant_move_crate1_up_against_insidetop = true;
_root.cant_move_crate1_up_against_lm = true;
} else {
_root.cant_move_crate1_up_against_red_wall = false;
}
if (((_root.difference_y_red_with_crate1_down <= 0.3) && (_root.difference_y_red_with_crate1_down >= -8)) && (_root.distance_x_between_redwall_and_crate1 < ((_width / 2) + (_root.redwall._width / 2)))) {
_root.cant_move_crate1_down_against_insidebottom = true;
_root.cant_move_crate1_down_against_lb = true;
} else {
_root.cant_move_crate1_down_against_red_wall = false;
}
} else if ((((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate1_leftside <= 0.3)) && (_root.difference_x_ball1_with_crate1_leftside >= -8)) {
_root.cant_move_crate1_down_against_red_wall = true;
_root.cant_move_crate1_up_against_red_wall = true;
_root.cant_move_crate1_left_against_red_wall = true;
_root.cant_move_crate1_right_against_red_wall = true;
} else {
_root.cant_move_crate1_down_against_red_wall = false;
_root.cant_move_crate1_up_against_red_wall = false;
}
if (this.hitTest(_root.rightmiddle)) {
_root.middle_hit = true;
} else {
_root.middle_hit = false;
}
if (((_root.difference_x_crate1_leftside_with_middlewall22 <= 0.3) && (_root.difference_x_crate1_leftside_with_middlewall22 >= -8)) && (_root.movement_activate == true)) {
_root.movement_activate = false;
_root.decoy_crate.inside.gotoAndPlay(1);
_root.redwall_movement = false;
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 20002;
trace("midwall");
}
if ((((_root.difference_x_crate1_leftside_with_bluewall <= 0.3) && (_root.difference_x_crate1_leftside_with_bluewall >= -8)) && (_root.movement_activate == true)) and (_y < ((_root.bluewall._y + (_root.bluewall._height / 2)) + (_height / 2)))) {
_root.movement_activate = false;
_root.decoy_crate.inside.gotoAndPlay(1);
_root.redwall_movement = false;
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 20002;
trace("blue");
}
if (((_root.difference_x_crate1_leftside_with_insidewall <= 0.3) && (_root.difference_x_crate1_leftside_with_insidewall >= -8)) and (_root.middle_hit == true)) {
_root.movement_activate = false;
_root.decoy_crate.inside.gotoAndPlay(1);
_root.redwall_movement = false;
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 20002;
trace("inside");
}
if (_root.difference_y_skinnyright_with_crate1 < 1) {
this.gotoAndStop(2);
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_x = 20002;
_root.decoy_crate.inside.gotoAndPlay(1);
_root.bluewall_movement = false;
_root.decoy_crate.gotoAndStop(2);
trace("botom");
}
}
Frame 25
function restartLevel() {
_root.scoresubmit18 = savefile.data.scoresubmit18;
savefile.flush();
soundstart = false;
small = false;
if ((((((((((((var19 != true) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var18 = true;
}
var17 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
greenwall_movement = false;
pinkwall_movement = false;
orangewall_movement = false;
lgreenwall_movement = false;
lredwall_movement = false;
aquawall_movement = false;
yellowwall_movement = false;
lgreenwall_movement = false;
bluewall_movement = false;
redwall_movement = false;
ball_location = true;
black_is_hit_red = false;
gray_is_hit_red = false;
red_hit = false;
ball1_is_pushed_by_red_wall = false;
ball2_is_pushed_by_red_wall = false;
black_is_hit_lgreen = false;
gray_is_hit_lgreen = false;
lgreen_hit = false;
small = false;
smallkey1_is_attached_to_crate1 = true;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.crate1.gotoAndStop(1);
_root.crate2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
ball_movement = true;
finisher = false;
soundstart = false;
_root.hit_crate1 = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_right_against_l1 = false;
_root.cant_move_crate1_right_against_l2 = false;
_root.cant_move_crate1_right_against_l3 = false;
_root.cant_move_crate1_right_against_lred_wall = false;
_root.cant_move_crate1_left_against_left_wall = false;
_root.cant_move_crate1_down_against_bottom_wall = false;
_root.cant_move_crate1_down_against_l1 = false;
_root.cant_move_crate1_up_against_pink_wall = false;
_root.cant_move_crate1_up_against_l3 = false;
_root.red_wall_and_crate1_rightside_touching = false;
_root.crate1_against_red_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_red_wall = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
crate1._x = 216.3;
crate1._y = 360.1;
greenkey._x = 120.1;
greenkey._y = 276.5;
orangekey._x = 120.1;
orangekey._y = 482.9;
pinkkey._x = 568;
pinkkey._y = 480.9;
redkey._x = 427;
redkey._y = 239.3;
yellowkey._x = 120.1;
yellowkey._y = 414.1;
lredkey._x = 261;
lredkey._y = 85.5;
lgreenkey._x = 120.1;
lgreenkey._y = 345.3;
bluekey._x = 278.9;
bluekey._y = 480.9;
aquakey._x = 120.1;
aquakey._y = 207.7;
greenwall._x = 477;
greenwall._y = 274.1;
pinkwall._x = 160.1;
pinkwall._y = 154;
redwall._x = 299.4;
redwall._y = 258.5;
yellowwall._x = 550;
yellowwall._y = 162.3;
orangewall._x = ((yellowwall._x - (yellowwall._width / 2)) - (orangewall._width / 2)) - 0.1;
orangewall._y = 166.5;
lredwall._x = 228.5;
lredwall._y = 478.5;
lgreenwall._x = ((greenwall._x + (greenwall._width / 2)) + (lgreenwall._width / 2)) + 0.1;
lgreenwall._y = 306.7;
bluewall._x = 518.5;
bluewall._y = 480.6;
aquawall._x = 427.1;
aquawall._y = 396.8;
ball1._x = 166.7;
ball1._y = 482.9;
ball2._x = 424;
ball2._y = 480.9;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 140.2;
finish._y = 81.5;
soundstart = false;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_red == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
}
if (gray_is_hit_red == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_lgreen == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
}
if (gray_is_hit_lgreen == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
soundstart = false;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(18);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l12");
};
ball1.onEnterFrame = function () {
if (this.hitTest(smallkey1)) {
smallstart = true;
ball1.gotoAndStop(2);
ball2.gotoAndStop(2);
smallkey1._x = 9000;
small = true;
}
if (this.hitTest(redkey)) {
keystart = true;
redkey._x = 100000 /* 0x0186A0 */;
redwall_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 100000 /* 0x0186A0 */;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (this.hitTest(orangekey)) {
keystart = true;
orangekey._x = 100000 /* 0x0186A0 */;
orangewall_movement = true;
_root.ball1.scan.gotoAndStop(6);
}
if (this.hitTest(lredkey)) {
keystart = true;
lredkey._x = 100000 /* 0x0186A0 */;
lredwall_movement = true;
_root.ball1.scan.gotoAndStop(5);
}
if (this.hitTest(lgreenkey)) {
keystart = true;
lgreenkey._x = 100000 /* 0x0186A0 */;
lgreenwall_movement = true;
_root.ball1.scan.gotoAndStop(7);
}
if (this.hitTest(yellowkey)) {
keystart = true;
yellowkey._x = 100000 /* 0x0186A0 */;
yellowwall_movement = true;
_root.ball1.scan.gotoAndStop(10);
}
if (this.hitTest(pinkkey)) {
keystart = true;
pinkkey._x = 100000 /* 0x0186A0 */;
pinkwall_movement = true;
_root.ball1.scan.gotoAndStop(9);
}
if (this.hitTest(aquakey)) {
keystart = true;
aquakey._x = 100000 /* 0x0186A0 */;
aquawall_movement = true;
_root.ball1.scan.gotoAndStop(8);
}
if (this.hitTest(bluekey)) {
keystart = true;
bluekey._x = 100000 /* 0x0186A0 */;
bluewall_movement = true;
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndPlay(1);
}
if (aquawall.hitTest(lgreenwall)) {
trace("aqua vs. lgreen");
aquawall_movement = false;
soundstart = true;
aquawall._y = 396.8;
lgreenwall_movement = false;
lgreenwall._x = ((aqauwall._x + (aquawall._width / 2)) + (lgreenwall._width / 2)) + 0.1;
}
if (aquawall.hitTest(orangewall)) {
trace("aqua vs. orangen");
aquawall_movement = false;
orangewall_movement = false;
soundstart = true;
aquawall._y = ((orangewall._y + (orangewall._height / 2)) + (aquawall._height / 2)) + 0.1;
}
if (greenwall.hitTest(orangewall)) {
trace("green vs. orangen");
greenwall_movement = false;
orangewall_movement = false;
soundstart = true;
greenwall._y = ((orangewall._y + (orangewall._height / 2)) + (greenwall._height / 2)) + 0.1;
}
if (orangewall.hitTest(yellowwall)) {
trace("orange vs. yellow");
yellowwall_movement = false;
orangewall_movement = false;
soundstart = true;
orangewall._x = ((yellowwall._x - (yellowwall._width / 2)) - (orangewall._width / 2)) - 0.1;
}
if (lgreenwall.hitTest(greenwall)) {
trace("lgreen vs. green");
lgreenwall_movement = false;
greenwall_movement = false;
soundstart = true;
lgreenwall._x = ((greenwall._x + (greenwall._width / 2)) + (lgreenwall._width / 2)) - 0.3;
}
if (scoresubmit18) {
scoresubmit = false;
} else if (scoresubmit18 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 18) or scoresubmit) {
level18_best_time = seconds;
scoresubmit18 = true;
savefile.data.scoresubmit18 = _root.scoresubmit18;
savefile.flush();
}
if (seconds < level18_best_time) {
level18_best_time = seconds;
}
savefile.data.level18_best_time = _root.level18_best_time;
savefile.flush();
if (_root.score <= 19) {
_root.score = 19;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(18);
_root.win.meter.gotoAndStop(19);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l12");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var18) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l19");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l12");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
totalRestarts = totalRestarts + 1;
if (ball_movement) {
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (smallkey1_is_attached_to_crate1 == true) {
smallkey1._x = crate1._x;
smallkey1._y = crate1._y;
}
ballx = ball1._x;
bally = ball1._y;
if (greenwall_movement) {
greenwall._y = greenwall._y - 1;
}
if (greenwall._y < 107.8) {
greenwall_movement = false;
soundstart = true;
greenwall._y = 107.8;
}
if (aquawall_movement) {
aquawall._y = aquawall._y - 1;
}
if (aquawall._y < 107.8) {
aquawall_movement = false;
soundstart = true;
aquawall._y = 107.8;
}
if (orangewall_movement) {
orangewall._x = orangewall._x + 1;
}
if (orangewall._x > 550.2) {
orangewall_movement = false;
soundstart = true;
orangewall._x = 550.2;
}
if (yellowwall_movement) {
yellowwall._y = yellowwall._y - 1;
}
if (lgreenwall_movement) {
lgreenwall._x = lgreenwall._x - 1;
}
if (lgreenwall._x < 450) {
lgreenwall_movement = false;
soundstart = true;
lgreenwall._x = 450;
}
if (redwall_movement) {
redwall._x = redwall._x - 1;
}
if (redwall._x < 200.6) {
redwall_movement = false;
soundstart = true;
redwall._x = 200.6;
}
if (pinkwall_movement) {
pinkwall._x = pinkwall._x + 1;
}
if (pinkwall._x > 239.8) {
pinkwall_movement = false;
soundstart = true;
pinkwall._x = 239.7;
}
if (bluewall_movement) {
bluewall._y = bluewall._y + 1;
}
if (lredwall_movement) {
lredwall._y = lredwall._y + 1;
}
distance_between_middlewall_and_ball = Math.abs(((ball1._x - middlewall._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_middlewall_and_ball2 = Math.abs(((ball2._x - middlewall._x) - (middlewall._width / 2)) - (ball2._width / 2));
differencelgreen = ((lgreenwall._x - (lgreenwall._width / 2)) - (ball1._width / 2)) - ball1._x;
differencelgreen2 = ((lgreenwall._x - (lgreenwall._width / 2)) - (ball2._width / 2)) - ball2._x;
distance_y_between_lgreenwall_and_ball = Math.abs(lgreenwall._y - ball1._y);
distance_y_between_lgreenwall_and_ball2 = Math.abs(lgreenwall._y - ball2._y);
if ((((lgreenwall_movement == true) and (differencelgreen <= 0.2)) and (differencelgreen >= -8)) and (distance_y_between_lgreenwall_and_ball < ((ball1._height / 2) + (lgreenwall._height / 2)))) {
ball1._x = ((lgreenwall._x - (lgreenwall._width / 2)) - (ball1._width / 2)) - 0.2;
}
if ((((lgreenwall_movement == true) and (differencelgreen2 <= 0.2)) and (differencelgreen2 >= -8)) and (distance_y_between_lgreenwall_and_ball2 < ((ball2._height / 2) + (lgreenwall._height / 2)))) {
ball2._x = ((lgreenwall._x - (lgreenwall._width / 2)) - (ball2._width / 2)) - 0.2;
}
if (((((differencelgreen <= 1) && (differencelgreen >= -2)) && (distance_between_middlewall_and_ball <= 2)) && (distance_y_between_lgreenwall_and_ball < ((ball1._height / 2) + (lgreenwall._height / 2)))) or ((((differencelgreen2 <= 0.5) && (differencelgreen2 >= -1)) && (distance_between_middlewall_and_ball2 <= 0.5)) && (distance_y_between_lgreenwall_and_ball2 < ((ball2._height / 2) + (lgreenwall._height / 2))))) {
lgreen_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differencered = ((redwall._x - (redwall._width / 2)) - (ball1._width / 2)) - ball1._x;
differencered2 = ((redwall._x - (redwall._width / 2)) - (ball2._width / 2)) - ball2._x;
distance_between_leftwall_and_ball = Math.abs(((ball1._x - leftwall._x) - (leftwall._width / 2)) - (ball1._width / 2));
distance_between_leftwall_and_ball2 = Math.abs(((ball2._x - leftwall._x) - (leftwall._width / 2)) - (ball2._width / 2));
distance_y_between_redwall_and_ball = Math.abs(redwall._y - ball1._y);
distance_y_between_redwall_and_ball2 = Math.abs(redwall._y - ball2._y);
if ((((redwall_movement == true) and (differencered <= 1)) and (differencered >= -8)) and (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) {
ball1._x = ((redwall._x - (redwall._width / 2)) - (ball1._width / 2)) - 0.2;
ball1_is_pushed_by_red_wall = true;
} else {
ball1_is_pushed_by_red_wall = false;
}
if ((((redwall_movement == true) and (differencered2 <= 1)) and (differencered2 >= -8)) and (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2)))) {
ball2._x = ((redwall._x - (redwall._width / 2)) - (ball2._width / 2)) - 0.2;
ball2_is_pushed_by_red_wall = true;
} else {
ball2_is_pushed_by_red_wall = false;
}
if (((((differencered <= 0.5) && (differencered >= -1)) && (distance_between_leftwall_and_ball <= 0.5)) && (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) or ((((differencered2 <= 0.5) && (differencered2 >= -1)) && (distance_between_leftwall_and_ball2 <= 0.5)) && (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2))))) {
red_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differencepink = ((ball1._x - pinkwall._x) - (pinkwall._width / 2)) - (ball1._width / 2);
differencepink2 = ((ball2._x - pinkwall._x) - (pinkwall._width / 2)) - (ball2._width / 2);
distance_between_leftmiddlewall_and_ball = Math.abs(((middlewall._x - ball1._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_leftmiddlewall_and_ball2 = Math.abs(((middlewall._x - ball2._x) - (middlewall._width / 2)) - (ball2._width / 2));
distance_y_between_pinkwall_and_ball = Math.abs(pinkwall._y - ball1._y);
distance_y_between_pinkwall_and_ball2 = Math.abs(pinkwall._y - ball2._y);
if ((((pinkwall_movement == true) and (differencepink <= 0.2)) and (differencepink >= -8)) and (distance_y_between_pinkwall_and_ball < ((ball1._height / 2) + (pinkwall._height / 2)))) {
ball1._x = ((pinkwall._x + (pinkwall._width / 2)) + (ball1._width / 2)) + 0.2;
}
if ((((pinkwall_movement == true) and (differencepink2 <= 0.2)) and (differencepink2 >= -8)) and (distance_y_between_pinkwall_and_ball2 < ((ball2._height / 2) + (pinkwall._height / 2)))) {
ball2._x = ((pinkwall._x + (pinkwall._width / 2)) + (ball2._width / 2)) + 0.2;
}
if (((((differencepink <= 0.5) && (differencepink >= -1)) && (distance_between_leftmiddlewall_and_ball <= 0.5)) && (distance_y_between_pinkwall_and_ball < ((ball1._height / 2) + (pinkwall._height / 2)))) or ((((differencepink2 <= 0.5) && (differencepink2 >= -1)) && (distance_between_leftmiddlewall_and_ball2 <= 0.5)) && (distance_y_between_pinkwall_and_ball2 < ((ball2._height / 2) + (pinkwall._height / 2))))) {
pink_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (lgreen_hit == true) {
gray_is_hit_lgreen = true;
}
if ((red_hit == true) or (pink_hit == true)) {
black_is_hit_red = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (lgreen_hit == true) {
black_is_hit_lgreen = true;
}
if ((red_hit == true) or (pink_hit == true)) {
gray_is_hit_red = true;
}
}
ball_locator();
}
};
Instance of Symbol 1071 MovieClip "crate1" in Frame 25
onClipEvent (load) {
_root.hit_crate1 = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_right_against_l1 = false;
_root.cant_move_crate1_right_against_l2 = false;
_root.cant_move_crate1_right_against_l3 = false;
_root.cant_move_crate1_right_against_lred_wall = false;
_root.cant_move_crate1_left_against_left_wall = false;
_root.cant_move_crate1_down_against_bottom_wall = false;
_root.cant_move_crate1_down_against_l1 = false;
_root.cant_move_crate1_up_against_pink_wall = false;
_root.cant_move_crate1_up_against_l3 = false;
_root.red_wall_and_crate1_rightside_touching = false;
_root.crate1_against_red_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_red_wall = false;
}
onClipEvent (enterFrame) {
_root.distance_y_between_ball1_and_crate1 = Math.abs(_root.ball1._y - _y);
_root.difference_x_ball1_with_crate1_rightside = ((_root.ball1._x - _x) - (_width / 2)) - (_root.ball1._width / 2);
_root.difference_x_ball1_with_crate1_leftside = ((_x - _root.ball1._x) - (_width / 2)) - (_root.ball1._width / 2);
_root.distance_y_between_ball2_and_crate1 = Math.abs(_root.ball2._y - _y);
_root.difference_x_ball2_with_crate1_rightside = ((_root.ball2._x - _x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_ball2_with_crate1_leftside = ((_x - _root.ball2._x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_red_with_crate1_left = ((_x - (_width / 2)) - _root.redwall._x) - (_root.redwall._width / 2);
_root.difference_x_red_with_crate1_right = ((_root.redwall._x - (_root.redwall._width / 2)) - _x) - (_width / 2);
_root.difference_y_red_with_crate1_up = ((_y - (_height / 2)) - _root.redwall._y) - (_root.redwall._height / 2);
_root.difference_y_red_with_crate1_down = ((_root.redwall._y - (_root.redwall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_redwall_and_crate1 = Math.abs(_root.redwall._x - _x);
_root.distance_y_between_redwall_and_crate1 = Math.abs(_root.redwall._y - _y);
_root.difference_x_crate1_leftside_with_leftwall = ((_x - (_width / 2)) - (_root.leftwall._width / 2)) - _root.leftwall._x;
if (hitTest(_root.leftwall)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate2_left_against_left_wall = true;
}
if ((((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate2_left_against_left_wall = true;
} else {
_root.cant_move_crate2_left_against_left_wall = false;
}
if (hitTest(_root.l3) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.l3.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_l3 = true;
}
if (((Math.abs(((_root.l3._x - _x) - (_root.l3._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.l3._y + (_root.l3._height / 2)) + (_height / 2)))) and (_y > ((_root.l3._y - (_root.l3._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_l3 = true;
} else {
_root.cant_move_crate1_right_against_l3 = false;
}
if (hitTest(_root.l2) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.l2.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_l2 = true;
}
if (((Math.abs(((_root.l2._x - _x) - (_root.l2._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.l2._y + (_root.l2._height / 2)) + (_height / 2)))) and (_y > ((_root.l2._y - (_root.l2._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_l2 = true;
} else {
_root.cant_move_crate1_right_against_l2 = false;
}
if (hitTest(_root.l1) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.l1.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_l1 = true;
}
if (((Math.abs(((_root.l1._x - _x) - (_root.l1._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.l1._y + (_root.l1._height / 2)) + (_height / 2)))) and (_y > ((_root.l1._y - (_root.l1._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_l1 = true;
} else {
_root.cant_move_crate1_right_against_l1 = false;
}
if (hitTest(_root.lredwall) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.lredwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_lred_wall = true;
}
if (((Math.abs(((_root.lredwall._x - _x) - (_root.lredwall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.lredwall._y + (_root.lredwall._height / 2)) + (_height / 2)))) and (_y > ((_root.lredwall._y - (_root.lredwall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_lred_wall = true;
} else {
_root.cant_move_crate1_right_against_lred_wall = false;
}
if (hitTest(_root.pinkwall)) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_pink_wall = true;
}
if ((((_y - _root.pinkwall._y) - (_root.pinkwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate1_up_against_pink_wall = true;
} else {
_root.cant_move_crate1_up_against_pink_wall = false;
}
if (hitTest(_root.l3) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.l3.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_l3 = true;
}
if (((Math.abs(((_y - _root.l3._y) - (_root.l3._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l3._x + (_root.l3._width / 2)) + (_width / 2)))) and (_x > ((_root.l3._x - (_root.l3._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_l3 = true;
} else {
_root.cant_move_crate1_up_against_l3 = false;
}
if (hitTest(_root.bottomwall)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_bottom_wall = true;
}
if ((((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate1_down_against_bottom_wall = true;
} else {
_root.cant_move_crate1_down_against_bottom_wall = false;
}
if (hitTest(_root.l1) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.l1.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_l1 = true;
}
if (((Math.abs(((_root.l1._y - _y) - (_root.l1._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l1._x + (_root.l1._width / 2)) + (_width / 2)))) and (_x > ((_root.l1._x - (_root.l1._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_l1 = true;
} else {
_root.cant_move_crate1_down_against_l1 = false;
}
if (hitTest(_root.redwall)) {
_root.redwall_crate1_hit = true;
if ((_root.hit_crate1 == true) and (_root.moveright == true)) {
if ((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_red_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.moveleft == true)) {
if ((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_red_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.movedown == true)) {
if (((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) and (_root.crate1_is_pushed_by_red_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_red_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.moveup == true)) {
if (((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) and (_root.crate1_is_pushed_by_red_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_red_wall = true;
}
}
} else {
_root.redwall_crate1_hit = false;
}
if (((_root.difference_x_red_with_crate1_right <= 1) && (_root.difference_x_red_with_crate1_right >= -8)) && (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) {
_root.cant_move_crate1_right_against_red_wall = true;
_root.red_wall_and_crate1_rightside_touching = true;
} else {
_root.cant_move_crate1_right_against_red_wall = false;
_root.red_wall_and_crate1_rightside_touching = false;
}
if ((((_root.redwall_movement == true) and (_root.red_wall_and_crate1_rightside_touching == true)) and (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.redwall._x - (_root.redwall._width / 2)) - (_width / 2)) - 0.7);
_root.crate1_is_pushed_by_red_wall = true;
}
if (((_root.difference_x_ball1_with_crate1_leftside <= 0.3) && (_root.difference_x_ball1_with_crate1_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate1_leftside_touching = true;
} else {
_root.ball1_and_crate1_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate1_leftside <= 0.3) && (_root.difference_x_ball2_with_crate1_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate1_leftside_touching = true;
} else {
_root.ball2_and_crate1_leftside_touching = false;
}
if (((_root.difference_x_ball1_with_crate1_rightside <= 3) && (_root.difference_x_ball1_with_crate1_rightside >= -10)) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate1_rightside_touching = true;
} else {
_root.ball1_and_crate1_rightside_touching = false;
}
if (((_root.difference_x_ball2_with_crate1_rightside <= 0.3) && (_root.difference_x_ball2_with_crate1_rightside >= -8)) && (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate1_rightside_touching = true;
} else {
_root.ball2_and_crate1_rightside_touching = false;
}
if (((((_root.ball1_and_crate1_leftside_touching == true) and (_root.crate1_is_pushed_by_red_wall == true)) and (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.redwall_movement == true)) {
_root.ball1._x = (((_root.redwall._x - (_root.redwall._width / 2)) - _width) - (_root.ball1._width / 2)) - 0.5;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = true;
} else {
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
}
if (((((_root.ball2_and_crate1_leftside_touching == true) and (_root.crate1_is_pushed_by_red_wall == true)) and (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.redwall_movement == true)) {
_root.ball2._x = (((_root.redwall._x - (_root.redwall._width / 2)) - _width) - (_root.ball2._width / 2)) - 0.5;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = true;
} else {
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
}
if (((((_root.ball1_and_crate1_rightside_touching == true) and (_root.ball1_is_pushed_by_red_wall == true)) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and ((_root.moveleft == false) or ((_root.moveleft == true) and (_root.cant_move_crate1_left_against_left_wall == true)))) and (_currentframe == 1)) {
_root.cant_move_crate1_right_against_red_wall = false;
_x = (((_root.ball1._x - (_root.ball1._width / 2)) - (_width / 2)) - 0.5);
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = true;
} else {
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
}
if ((((_root.ball2_and_crate1_rightside_touching == true) and (_root.ball2_is_pushed_by_red_wall == true)) and (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveleft == false)) {
_x = (((_root.ball2._x - (_root.ball2._width / 2)) - (_width / 2)) - 0.5);
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = true;
} else {
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
}
if ((((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) and (_root.redwall_movement == true)) and (_root.difference_x_red_with_crate1_right < 0.5)) and (_root.difference_x_red_with_crate1_right > -3)) {
_root.crate1_against_red_wall_boundaries_prevention = true;
} else {
_root.crate1_against_red_wall_boundaries_prevention = false;
}
if (((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) and (_root.distance_y_between_redwall_and_ball <= ((_root.ball1._height / 2) + (_root.redwall._height / 2)))) and (_root.redwall_movement == true)) {
_root.crate1_against_red_wall_boundaries_prevention2 = true;
} else {
_root.crate1_against_red_wall_boundaries_prevention2 = false;
}
if (((_root.difference_x_red_with_crate1_left <= 0.3) && (_root.difference_x_red_with_crate1_left >= -8)) && (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) {
_root.cant_move_crate1_left_against_red_wall = true;
_root.cant_move_crate1_left_against_left_wall = true;
} else {
_root.cant_move_crate1_left_against_red_wall = false;
}
if (_root.crate1_against_red_wall_boundaries_prevention == false) {
if (((_root.difference_y_red_with_crate1_up <= 0.3) && (_root.difference_y_red_with_crate1_up >= -8)) && (_root.distance_x_between_redwall_and_crate1 < ((_width / 2) + (_root.redwall._width / 2)))) {
_root.cant_move_crate1_up_against_red_wall = true;
_root.cant_move_crate1_up_against_l3 = true;
_root.cant_move_crate1_up_against_pink_wall = true;
} else {
_root.cant_move_crate1_up_against_red_wall = false;
}
if (((_root.difference_y_red_with_crate1_down <= 0.3) && (_root.difference_y_red_with_crate1_down >= -8)) && (_root.distance_x_between_redwall_and_crate1 < ((_width / 2) + (_root.redwall._width / 2)))) {
_root.cant_move_crate1_down_against_l1 = true;
_root.cant_move_crate1_down_against_bottom_wall = true;
} else {
_root.cant_move_crate1_down_against_red_wall = false;
}
} else if ((((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate1_leftside <= 0.3)) && (_root.difference_x_ball1_with_crate1_leftside >= -8)) {
_root.cant_move_crate1_down_against_red_wall = true;
_root.cant_move_crate1_up_against_red_wall = true;
_root.cant_move_crate1_left_against_red_wall = true;
_root.cant_move_crate1_right_against_red_wall = true;
} else {
_root.cant_move_crate1_down_against_red_wall = false;
_root.cant_move_crate1_up_against_red_wall = false;
}
if (((_root.redwall_movement == true) and ((((_root.difference_x_ball1_with_crate1_leftside <= 1) && (_root.difference_x_ball1_with_crate1_leftside >= -6)) && (_root.distance_between_leftwall_and_ball <= 1)) && (_root.distance_y_between_ball1_and_crate1 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate1_leftside <= 0.7) && (_root.difference_x_ball2_with_crate1_leftside >= -6)) && (_root.distance_between_leftwall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate1 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.red_hit = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate1_up_against_red_wall = false;
_root.cant_move_crate1_down_against_red_wall = false;
}
if ((((_root.difference_x_crate1_leftside_with_leftwall <= 1) && (_root.difference_x_crate1_leftside_with_leftwall >= -8)) && ((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) or ((_root.distance_y_between_redwall_and_ball < ((_root.ball1._height / 2) + (_root.redwall._height / 2))) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))))) and (((_root.crate1_is_pushed_by_red_wall == true) or ((_root.ball1_and_crate1_rightside_touching == true) and (_root.ball1_is_pushed_by_red_wall == true))) or (_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall == true))) {
_root.smallkey1_is_attached_to_crate1 = false;
_root.decoy_crate.inside.gotoAndPlay(1);
_root.redwall_movement = false;
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 20002;
}
}
Instance of Symbol 1257 MovieClip "ball1" in Frame 25
onClipEvent (load) {
_root.hit_crate1 = false;
}
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l4)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l4.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l4.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l4.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l4.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lgreenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lgreenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lgreenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lgreenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lgreenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lredwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lredwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lredwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lredwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lredwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.aquawall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.aquawall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.aquawall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.aquawall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.aquawall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.yellowwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.yellowwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.yellowwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.yellowwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.yellowwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.crate1)) {
if (_root.crate1._currentframe == 1) {
_root.hit_crate1 = true;
if (xmove > 0) {
if ((_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate1.getBounds(_root).xMin) + 0.1));
if (((((_root.cant_move_crate1_right_against_red_wall == false) and (_root.cant_move_crate1_right_against_l3 == false)) and (_root.cant_move_crate1_right_against_l2 == false)) and (_root.cant_move_crate1_right_against_l1 == false)) and (_root.cant_move_crate1_right_against_lred_wall == false)) {
_root.cratespeed_xright = 1;
_root.crate1._x = _root.crate1._x + _root.cratespeed_xright;
_root.moveright = true;
}
}
} else {
_root.moveright = false;
}
if (xmove < 0) {
if (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false) {
_x = (_x - ((getBounds(_root).xMin - _root.crate1.getBounds(_root).xMax) - 0.1));
if ((_root.cant_move_crate1_left_against_red_wall == false) and (_root.cant_move_crate1_left_against_left_wall == false)) {
_root.cratespeed_xleft = 1;
_root.crate1._x = _root.crate1._x - _root.cratespeed_xleft;
_root.moveleft = true;
}
}
} else {
_root.moveleft = false;
}
if (ymove > 0) {
if ((((_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false) && (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false)) and (_root.difference_x_ball1_with_crate1_leftside <= -1)) and (_root.difference_x_ball1_with_crate1_rightside <= -1)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate1.getBounds(_root).yMin) + 0.1));
if (((_root.cant_move_crate1_down_against_red_wall == false) and (_root.cant_move_crate1_down_against_bottom_wall == false)) and (_root.cant_move_crate1_down_against_l1 == false)) {
_root.cratespeed_ydown = 1;
_root.crate1._y = _root.crate1._y + _root.cratespeed_ydown;
_root.movedown = true;
}
}
} else {
_root.movedown = false;
}
if (ymove < 0) {
if ((((_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false) && (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false)) and (_root.difference_x_ball1_with_crate1_leftside <= -1)) and (_root.difference_x_ball1_with_crate1_rightside <= -1)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate1.getBounds(_root).yMax) - 0.1));
if (((_root.cant_move_crate1_up_against_red_wall == false) and (_root.cant_move_crate1_up_against_l3 == false)) and (_root.cant_move_crate1_up_against_pink_wall == false)) {
_root.cratespeed_yup = 1;
_root.crate1._y = _root.crate1._y - _root.cratespeed_yup;
_root.moveup = true;
}
}
} else {
_root.moveup = false;
}
}
}
}
if ((((!Key.isDown(37)) and (!Key.isDown(39))) and (!Key.isDown(38))) and (!Key.isDown(40))) {
_root.moveup = false;
_root.movedown = false;
_root.moveright = false;
_root.moveleft = false;
move(0, 0);
_root.hit_crate1 = false;
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
if ((_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false) and (_root.ball1_is_pushed_by_red_wall == false)) {
move(5, 0);
}
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 26
function restartLevel() {
_root.scoresubmit9 = savefile.data.scoresubmit9;
savefile.flush();
soundstart = false;
small = false;
if (((((((((((((((((((((var10 != true) and (var11 != true)) and (var12 != true)) and (var13 != true)) and (var14 != true)) and (var15 != true)) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var9 = true;
}
var8 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
redwall_movement = false;
bluewall_movement = false;
bluestart = false;
blue_count = 0;
_root.ball1.scan.bluemove.gotoAndStop(1);
ball_location = true;
blue_count = 0;
gray_is_hit_red = false;
black_is_hit_red = false;
red_hit = false;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
ball_movement = true;
finisher = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
redkey._x = 544.9;
redkey._y = 484.4;
bluekey1._x = 581.6;
bluekey1._y = 457.9;
bluekey2._x = 581.6;
bluekey2._y = 416.4;
bluekey3._x = 460.4;
bluekey3._y = 416.4;
bluekey4._x = 460.4;
bluekey4._y = 460.4;
bluekey5._x = 416.4;
bluekey5._y = 457.9;
bluekey6._x = 442.4;
bluekey6._y = 347.4;
bluekey7._x = 581.6;
bluekey7._y = 348.4;
bluekey8._x = 581.6;
bluekey8._y = 287;
bluekey9._x = 442.4;
bluekey9._y = 289.4;
bluekey10._x = 533.5;
bluekey10._y = 289.4;
bluekey11._x = 416.4;
bluekey11._y = 221.4;
bluekey12._x = 581.6;
bluekey12._y = 221.4;
bluekey13._x = 581.6;
bluekey13._y = 62.5;
bluewall._x = 550.4;
bluewall._y = 68.8;
redwall._x = 200.1;
redwall._y = -141.6;
ball1._x = 200;
ball1._y = 474.9;
ball2._x = 509.6;
ball2._y = 484.4;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 467.5;
finish._y = 106.9;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_red == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_red == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(9);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l8");
};
ball1.onEnterFrame = function () {
if (this.hitTest(bluekey1)) {
keystart = true;
if (bluestart == true) {
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 5);
} else {
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndStop(2);
bluestart = true;
}
bluekey1._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
}
if (this.hitTest(bluekey2)) {
keystart = true;
bluekey2._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 5);
}
if (this.hitTest(bluekey3)) {
keystart = true;
bluekey3._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 5);
}
if (this.hitTest(bluekey4)) {
keystart = true;
bluekey4._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 5);
}
if (this.hitTest(bluekey5)) {
keystart = true;
bluekey5._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 5);
}
if (this.hitTest(bluekey6)) {
keystart = true;
bluekey6._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 5);
}
if (this.hitTest(bluekey7)) {
keystart = true;
bluekey7._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 5);
}
if (this.hitTest(bluekey8)) {
keystart = true;
bluekey8._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 5);
}
if (this.hitTest(bluekey9)) {
keystart = true;
bluekey9._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 5);
}
if (this.hitTest(bluekey10)) {
keystart = true;
bluekey10._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 5);
}
if (this.hitTest(bluekey11)) {
keystart = true;
bluekey11._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 6);
}
if (this.hitTest(bluekey12)) {
keystart = true;
bluekey12._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 5);
}
if (this.hitTest(bluekey13)) {
keystart = true;
bluekey13._x = 100000 /* 0x0186A0 */;
blue_count = blue_count + 1;
_root.ball1.scan.bluemove.gotoAndStop(_root.ball1.scan.bluemove._currentframe + 6);
}
if (_root.ball1.scan.bluemove._currentframe == 64) {
_root.ball1.scan.bluemove.gotoAndPlay(65);
}
if (this.hitTest(redkey)) {
keystart = true;
redkey._x = 10000;
redwall_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if (blue_count >= 13) {
bluewall_movement = true;
}
if (scoresubmit9) {
scoresubmit = false;
} else if (scoresubmit9 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 9) or scoresubmit) {
level9_best_time = seconds;
scoresubmit9 = true;
savefile.data.scoresubmit9 = _root.scoresubmit9;
savefile.flush();
}
if (seconds < level9_best_time) {
level9_best_time = seconds;
}
savefile.data.level9_best_time = _root.level9_best_time;
savefile.flush();
if (_root.score <= 10) {
_root.score = 10;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(9);
_root.win.meter.gotoAndStop(10);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l8");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var9) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l10");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l8");
}
w_is_DOWN = false;
}
}
staticframe = _root.ball1.scan.bluemove._currentframe;
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (bluewall_movement) {
bluewall._y = bluewall._y - 2;
}
if (bluewall._y < 25.4) {
bluewall_movement = false;
}
if (redwall_movement) {
redwall._y = redwall._y + 0.5;
}
if (redwall._y > 212.9) {
redwall_movement = false;
soundstart = true;
redwall._y = 212.9;
}
differencered = ((ball1._y - redwall._y) - (redwall._height / 2)) - (ball1._height / 2);
differencered2 = ((ball2._y - redwall._y) - (redwall._height / 2)) - (ball2._height / 2);
distance_between_bottomwall_and_ball = Math.abs(((bottomwall._y - ball1._y) - (bottomwall._height / 2)) - (ball1._height / 2));
distance_between_bottomwall_and_ball2 = Math.abs(((bottomwall._y - ball2._y) - (bottomwall._height / 2)) - (ball2._height / 2));
distance_x_between_redwall_and_ball = Math.abs(redwall._x - ball1._x);
distance_x_between_redwall_and_ball2 = Math.abs(redwall._x - ball2._x);
if ((((redwall_movement == true) and (differencered <= 0.2)) and (differencered >= -8)) and (distance_x_between_redwall_and_ball < ((ball1._width / 2) + (redwall._width / 2)))) {
ball1._y = ((redwall._y + (redwall._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((redwall_movement == true) and (differencered2 <= 0.2)) and (differencered2 >= -8)) and (distance_x_between_redwall_and_ball2 < ((ball2._width / 2) + (redwall._width / 2)))) {
ball2._y = ((redwall._y + (redwall._height / 2)) + (ball2._height / 2)) + 0.2;
}
if (((((differencered <= 0.5) && (differencered >= -1)) && (distance_between_bottomwall_and_ball <= 1)) && (distance_x_between_redwall_and_ball < ((ball1._width / 2) + (redwall._width / 2)))) or ((((differencered2 <= 0.5) && (differencered2 >= -1)) && (distance_between_bottomwall_and_ball2 <= 0.5)) && (distance_x_between_redwall_and_ball2 < ((ball2._width / 2) + (redwall._width / 2))))) {
red_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (red_hit == true) {
black_is_hit_red = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (red_hit == true) {
gray_is_hit_red = true;
}
}
ball_locator();
}
};
Instance of Symbol 2077 MovieClip "ball1" in Frame 26
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.b1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.b1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.b1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.b1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.b1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.b2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.b2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.b2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.b2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.b2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.b3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.b3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.b3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.b3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.b3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.b4)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.b4.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.b4.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.b4.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.b4.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.b5)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.b5.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.b5.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.b5.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.b5.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.b6)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.b6.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.b6.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.b6.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.b6.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.b7)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.b7.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.b7.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.b7.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.b7.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.b8)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.b8.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.b8.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.b8.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.b8.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.b9)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.b9.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.b9.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.b9.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.b9.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.b10)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.b10.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.b10.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.b10.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.b10.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.b11)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.b11.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.b11.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.b11.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.b11.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.b12)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.b12.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.b12.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.b12.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.b12.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 27
function restartLevel() {
_root.scoresubmit3 = savefile.data.scoresubmit3;
savefile.flush();
soundstart = false;
small = false;
if (((((((((((((((((((((((((((var4 != true) and (var5 != true)) and (var6 != true)) and (var7 != true)) and (var8 != true)) and (var9 != true)) and (var10 != true)) and (var11 != true)) and (var12 != true)) and (var13 != true)) and (var14 != true)) and (var15 != true)) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var3 = true;
}
var2 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
greenwall_movement = false;
bluewall_movement = false;
ball_location = true;
gray_is_hit_blue = false;
black_is_hit_blue = false;
blue_hit = false;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
ball_movement = true;
finisher = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
bluekey._x = 200;
bluekey._y = 430.6;
greenkey._x = 500;
greenkey._y = 100;
bluewall._x = 199.9;
bluewall._y = 223.8;
greenwall._x = 199.9;
greenwall._y = 176.1;
ball1._x = 200;
ball1._y = 474.9;
ball2._x = 500;
ball2._y = 474.9;
lr._x = 291.9;
lr._y = 419.4;
ll._x = 108;
ll._y = 419.4;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 200;
finish._y = 99;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_blue == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_blue == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(3);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l6");
};
ball1.onEnterFrame = function () {
if (this.hitTest(bluekey)) {
keystart = true;
bluekey._x = 10000;
bluewall_movement = true;
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndPlay(1);
}
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 10000;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (scoresubmit3) {
scoresubmit = false;
} else if (scoresubmit3 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 3) or scoresubmit) {
level3_best_time = seconds;
scoresubmit3 = true;
savefile.data.scoresubmit3 = _root.scoresubmit3;
savefile.flush();
}
if (seconds < level3_best_time) {
level3_best_time = seconds;
}
savefile.data.level3_best_time = _root.level3_best_time;
savefile.flush();
if (_root.score <= 4) {
_root.score = 4;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(3);
_root.win.meter.gotoAndStop(4);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 100000 /* 0x0186A0 */;
gotoAndStop ("l6");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var3) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l3");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l6");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (bluewall_movement) {
bluewall._x = bluewall._x + 6;
}
if (bluewall._x > 500) {
bluewall_movement = false;
bluewall._x = 500;
soundstart = true;
}
if (greenwall_movement) {
greenwall._x = greenwall._x - 2;
}
if (greenwall._x < -5) {
greenwall_movement = false;
}
differenceblue = ((ball1._x - bluewall._x) - (bluewall._width / 2)) - (ball1._width / 2);
differenceblue2 = ((ball2._x - bluewall._x) - (bluewall._width / 2)) - (ball2._width / 2);
distance_between_rightwall_and_ball = Math.abs(((rightwall._x - ball1._x) - (rightwall._width / 2)) - (ball1._width / 2));
distance_between_rightwall_and_ball2 = Math.abs(((rightwall._x - ball2._x) - (rightwall._width / 2)) - (ball2._width / 2));
distance_y_between_bluewall_and_ball = Math.abs(bluewall._y - ball1._y);
distance_y_between_bluewall_and_ball2 = Math.abs(bluewall._y - ball2._y);
if ((((bluewall_movement == true) and (differenceblue <= 1)) and (differenceblue >= -8)) and (distance_y_between_bluewall_and_ball < ((ball1._height / 2) + (bluewall._height / 2)))) {
ball1._x = ((bluewall._x + (bluewall._width / 2)) + (ball1._width / 2)) + 1;
}
if ((((bluewall_movement == true) and (differenceblue2 <= 1)) and (differenceblue2 >= -8)) and (distance_y_between_bluewall_and_ball2 < ((ball2._height / 2) + (bluewall._height / 2)))) {
ball2._x = ((bluewall._x + (bluewall._width / 2)) + (ball2._width / 2)) + 1;
}
if (((((differenceblue <= 2) && (differenceblue >= -20)) && (distance_between_rightwall_and_ball <= 10)) && (distance_y_between_bluewall_and_ball < ((ball1._height / 2) + (bluewall._height / 2)))) or ((((differenceblue2 <= 2) && (differenceblue2 >= -8)) && (distance_between_rightwall_and_ball2 <= 5)) && (distance_y_between_bluewall_and_ball2 < ((ball2._height / 2) + (bluewall._height / 2))))) {
blue_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (blue_hit == true) {
gray_is_hit_blue = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (blue_hit == true) {
black_is_hit_blue = true;
}
}
ball_locator();
}
};
Instance of Symbol 2172 MovieClip "ball1" in Frame 27
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.ll)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.ll.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.ll.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.ll.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.ll.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lr)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lr.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lr.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lr.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lr.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 28
function restartLevel() {
_root.scoresubmit13 = savefile.data.scoresubmit13;
savefile.flush();
soundstart = false;
small = false;
if (((((((((((((((((var14 != true) and (var15 != true)) and (var16 != true)) and (var17 != true)) and (var18 != true)) and (var19 != true)) and (var20 != true)) and (var21 != true)) and (var22 != true)) and (var23 != true)) and (var24 != true)) and (var25 != true)) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var13 = true;
}
var12 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
greenwall_movement = false;
pinkwall_movement = false;
orangewall_movement = false;
redwall_movement = false;
ball_location = true;
black_is_hit_green = false;
gray_is_hit_green = false;
green_hit = false;
ball1_is_pushed_by_green_wall = false;
ball2_is_pushed_by_green_wall = false;
pink_is_attached_to_crate1 = true;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.crate1.gotoAndStop(1);
_root.crate2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
ball_movement = true;
finisher = false;
_root.hit_crate1 = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_right_against_right_wall = false;
_root.cant_move_crate1_right_against_green_wall = false;
_root.cant_move_crate1_right_against_rr = false;
_root.cant_move_crate1_right_against_rbr = false;
_root.cant_move_crate1_right_against_pink_wall = false;
_root.cant_move_crate1_left_against_middle_wall = false;
_root.cant_move_crate1_left_against_green_wall = false;
_root.cant_move_crate1_left_against_rl = false;
_root.cant_move_crate1_down_against_green_wall = false;
_root.cant_move_crate1_down_against_bottom_wall = false;
_root.cant_move_crate1_down_against_rl = false;
_root.cant_move_crate1_down_against_rr = false;
_root.cant_move_crate1_down_against_orange_wall = false;
_root.cant_move_crate1_down_against_rbr = false;
_root.cant_move_crate1_up_against_green_wall = false;
_root.cant_move_crate1_up_against_top_wall = false;
_root.cant_move_crate1_up_against_rl = false;
_root.cant_move_crate1_up_against_rr = false;
_root.green_wall_and_crate1_rightside_touching = false;
_root.crate1_against_green_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_green_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_greenwall = false;
_root.crate1_is_pushed_by_green_wall = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
crate1._x = 540.6;
crate1._y = 97.5;
crate2._x = 200;
crate2._y = 323.4;
greenkey._x = 200;
greenkey._y = 96.3;
orangekey._x = 200;
orangekey._y = 250;
pinkkey._x = 500;
pinkkey._y = 168.6;
pinkkey._width = 23.1;
pinkkey._height = 21.1;
pinkwall._x = 496.4;
pinkwall._y = 463.2;
redkey._x = 574;
redkey._y = 255;
redwall._x = 200.1;
redwall._y = 172.7;
orangewall._x = 500.1;
orangewall._y = 208.4;
ball1._x = 200;
ball1._y = 466.9;
ball2._x = 456.6;
ball2._y = 96.3;
greenwall._x = 642.2;
greenwall._y = 301.6;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 560.6;
finish._y = 462.9;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_green == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
}
if (gray_is_hit_green == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(13);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l21");
};
ball1.onEnterFrame = function () {
if (this.hitTest(pinkkey)) {
keystart = true;
pinkkey._x = 100000 /* 0x0186A0 */;
pinkwall_movement = true;
_root.ball1.scan.gotoAndStop(5);
}
if (this.hitTest(redkey)) {
keystart = true;
redkey._x = 100000 /* 0x0186A0 */;
redwall_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 100000 /* 0x0186A0 */;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (this.hitTest(orangekey)) {
keystart = true;
orangekey._x = 100000 /* 0x0186A0 */;
orangewall_movement = true;
_root.ball1.scan.gotoAndStop(6);
}
if (scoresubmit13) {
scoresubmit = false;
} else if (scoresubmit13 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 13) or scoresubmit) {
level13_best_time = seconds;
scoresubmit13 = true;
savefile.data.scoresubmit13 = _root.scoresubmit13;
savefile.flush();
}
if (seconds < level13_best_time) {
level13_best_time = seconds;
}
savefile.data.level13_best_time = _root.level13_best_time;
savefile.flush();
if (_root.score <= 14) {
_root.score = 14;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(13);
_root.win.meter.gotoAndStop(14);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l21");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var13) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l13");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l21");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (pink_is_attached_to_crate1 == true) {
pinkkey._x = crate1._x;
pinkkey._y = crate1._y;
}
ballx = ball1._x;
bally = ball1._y;
if (greenwall_movement) {
greenwall._x = greenwall._x - 0.5;
}
if (greenwall._x < 500) {
greenwall_movement = false;
soundstart = true;
greenwall._x = 500;
}
if (pinkwall_movement) {
pinkwall._y = pinkwall._y + 1;
}
if (pinkwall._y > 560) {
pinkwall_movement = false;
}
if (orangewall_movement) {
orangewall._x = orangewall._x + 2;
}
if (orangewall._x > 700) {
orangewall_movement = false;
}
if (redwall_movement) {
redwall._x = redwall._x - 1;
}
differencegreen = ((greenwall._x - (greenwall._width / 2)) - (ball1._width / 2)) - ball1._x;
differencegreen2 = ((greenwall._x - (greenwall._width / 2)) - (ball2._width / 2)) - ball2._x;
distance_between_rightmiddlewall_and_ball = Math.abs(((ball1._x - middlewall._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_rightmiddlewall_and_ball2 = Math.abs(((ball2._x - middlewall._x) - (middlewall._width / 2)) - (ball2._width / 2));
distance_y_between_greenwall_and_ball = Math.abs(greenwall._y - ball1._y);
distance_y_between_greenwall_and_ball2 = Math.abs(greenwall._y - ball2._y);
if ((((greenwall_movement == true) and (differencegreen <= 1)) and (differencegreen >= -8)) and (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) {
ball1._x = ((greenwall._x - (greenwall._width / 2)) - (ball1._width / 2)) - 0.2;
ball1_is_pushed_by_green_wall = true;
} else {
ball1_is_pushed_by_green_wall = false;
}
if ((((greenwall_movement == true) and (differencegreen2 <= 0.2)) and (differencegreen2 >= -8)) and (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2)))) {
ball2._x = ((greenwall._x - (greenwall._width / 2)) - (ball2._width / 2)) - 0.2;
ball2_is_pushed_by_green_wall = true;
} else {
ball2_is_pushed_by_green_wall = false;
}
if ((((differencegreen <= 0.5) && (distance_between_rightmiddlewall_and_ball <= 0.5)) && (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) or (((differencegreen2 <= 0.5) && (distance_between_rightmiddlewall_and_ball2 <= 0.5)) && (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2))))) {
green_hit = true;
cant_move_crate1_up_against_green_wall = false;
cant_move_crate1_down_against_green_wall = false;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if ((((((ball1._y > Stage.height) and (ball1._y < 1000)) or ((ball1._y < 0) and (ball1._y > -1000))) or ((ball1._x > Stage.width) and (ball1._x < 1000))) or ((ball1._x < 0) and (ball1._x > -1000))) and (greenwall._x >= ((Stage.width / 2) + (greenwall._width / 2)))) {
ball_location = false;
cant_move_crate1_up_against_green_wall = false;
cant_move_crate1_down_against_green_wall = false;
green_hit = true;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (green_hit == true) {
gray_is_hit_green = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (green_hit == true) {
black_is_hit_green = true;
}
}
ball_locator();
}
};
Instance of Symbol 1071 MovieClip "crate2" in Frame 28
onClipEvent (load) {
_root.cant_move_crate2_down_against_bottom_wall = false;
_root.cant_move_crate2_down_against_ll = false;
_root.cant_move_crate2_down_against_lr = false;
_root.cant_move_crate2_up_against_top_wall = false;
_root.cant_move_crate2_up_against_red_wall = false;
_root.cant_move_crate2_up_against_ll = false;
_root.cant_move_crate2_up_against_lr = false;
_root.cant_move_crate2_left_against_left_wall = false;
_root.cant_move_crate2_left_against_ll = false;
_root.cant_move_crate2_right_against_middle_wall = false;
_root.cant_move_crate2_right_against_lr = false;
}
onClipEvent (enterFrame) {
if (hitTest(_root.leftwall)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate2_left_against_left_wall = true;
}
if ((((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate2_left_against_left_wall = true;
} else {
_root.cant_move_crate2_left_against_left_wall = false;
}
if (hitTest(_root.ll) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.ll.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_ll = true;
}
if (((Math.abs(((_x - _root.ll._x) - (_root.ll._width / 2)) - (_width / 2)) <= 0.5) and (_y < ((_root.ll._y + (_root.ll._height / 2)) + (_height / 2)))) and (_y > ((_root.ll._y - (_root.ll._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_left_against_ll = true;
} else {
_root.cant_move_crate1_left_against_ll = false;
}
if (hitTest(_root.middlewall)) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate2_right_against_middle_wall = true;
}
if ((((_root.middlewall._x - _x) - (_root.middlewall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate2_right_against_middle_wall = true;
} else {
_root.cant_move_crate2_right_against_middle_wall = false;
}
if (hitTest(_root.lr) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.lr.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_lr = true;
}
if (((Math.abs(((_root.lr._x - _x) - (_root.lr._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.lr._y + (_root.lr._height / 2)) + (_height / 2)))) and (_y > ((_root.lr._y - (_root.lr._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_lr = true;
} else {
_root.cant_move_crate1_right_against_lr = false;
}
if (hitTest(_root.topwall)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate2_up_against_top_wall = true;
}
if ((((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate2_up_against_top_wall = true;
} else {
_root.cant_move_crate2_up_against_top_wall = false;
}
if (hitTest(_root.redwall)) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate2_up_against_red_wall = true;
}
if ((((((_y - _root.redwall._y) - (_root.redwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.redwall._x + (_root.redwall._width / 2)) + (_width / 2)))) and (_x > ((_root.redwall._x - (_root.redwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_up_against_red_wall = true;
} else {
_root.cant_move_crate2_up_against_red_wall = false;
}
if (hitTest(_root.ll) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.ll.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_ll = true;
}
if (((Math.abs(((_y - _root.ll._y) - (_root.ll._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.ll._x + (_root.ll._width / 2)) + (_width / 2)))) and (_x > ((_root.ll._x - (_root.ll._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_ll = true;
} else {
_root.cant_move_crate1_up_against_ll = false;
}
if (hitTest(_root.lr) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.lr.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_lr = true;
}
if (((Math.abs(((_y - _root.lr._y) - (_root.lr._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.lr._x + (_root.lr._width / 2)) + (_width / 2)))) and (_x > ((_root.lr._x - (_root.lr._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_lr = true;
} else {
_root.cant_move_crate1_up_against_lr = false;
}
if (hitTest(_root.bottomwall)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate2_down_against_bottom_wall = true;
}
if ((((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate2_down_against_bottom_wall = true;
} else {
_root.cant_move_crate2_down_against_bottom_wall = false;
}
if (hitTest(_root.ll) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.ll.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_ll = true;
}
if (((Math.abs(((_root.ll._y - _y) - (_root.ll._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.ll._x + (_root.ll._width / 2)) + (_width / 2)))) and (_x > ((_root.ll._x - (_root.ll._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_ll = true;
} else {
_root.cant_move_crate1_down_against_ll = false;
}
if (hitTest(_root.lr) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.lr.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_lr = true;
}
if (((Math.abs(((_root.lr._y - _y) - (_root.lr._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.lr._x + (_root.lr._width / 2)) + (_width / 2)))) and (_x > ((_root.lr._x - (_root.lr._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_lr = true;
} else {
_root.cant_move_crate1_down_against_lr = false;
}
}
Instance of Symbol 1071 MovieClip "crate1" in Frame 28
onClipEvent (load) {
_root.hit_crate1 = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_right_against_right_wall = false;
_root.cant_move_crate1_right_against_green_wall = false;
_root.cant_move_crate1_right_against_rr = false;
_root.cant_move_crate1_right_against_rbr = false;
_root.cant_move_crate1_right_against_pink_wall = false;
_root.cant_move_crate1_left_against_middle_wall = false;
_root.cant_move_crate1_left_against_green_wall = false;
_root.cant_move_crate1_left_against_rl = false;
_root.cant_move_crate1_down_against_green_wall = false;
_root.cant_move_crate1_down_against_bottom_wall = false;
_root.cant_move_crate1_down_against_rl = false;
_root.cant_move_crate1_down_against_rr = false;
_root.cant_move_crate1_down_against_orange_wall = false;
_root.cant_move_crate1_down_against_rbr = false;
_root.cant_move_crate1_up_against_green_wall = false;
_root.cant_move_crate1_up_against_top_wall = false;
_root.cant_move_crate1_up_against_rl = false;
_root.cant_move_crate1_up_against_rr = false;
_root.green_wall_and_crate1_rightside_touching = false;
_root.crate1_against_green_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_green_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_greenwall = false;
_root.crate1_is_pushed_by_green_wall = false;
}
onClipEvent (enterFrame) {
_root.distance_y_between_ball1_and_crate1 = Math.abs(_root.ball1._y - _y);
_root.difference_x_ball1_with_crate1_rightside = ((_root.ball1._x - _x) - (_width / 2)) - (_root.ball1._width / 2);
_root.difference_x_ball1_with_crate1_leftside = ((_x - _root.ball1._x) - (_width / 2)) - (_root.ball1._width / 2);
_root.distance_y_between_ball2_and_crate1 = Math.abs(_root.ball2._y - _y);
_root.difference_x_ball2_with_crate1_rightside = ((_root.ball2._x - _x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_ball2_with_crate1_leftside = ((_x - _root.ball2._x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_green_with_crate1_left = ((_x - (_width / 2)) - _root.greenwall._x) - (_root.greenwall._width / 2);
_root.difference_x_green_with_crate1_right = ((_root.greenwall._x - (_root.greenwall._width / 2)) - _x) - (_width / 2);
_root.difference_y_green_with_crate1_up = ((_y - (_height / 2)) - _root.greenwall._y) - (_root.greenwall._height / 2);
_root.difference_y_green_with_crate1_down = ((_root.greenwall._y - (_root.greenwall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_greenwall_and_crate1 = Math.abs(_root.greenwall._x - _x);
_root.distance_y_between_greenwall_and_crate1 = Math.abs(_root.greenwall._y - _y);
_root.difference_x_crate1_leftside_with_middlewall = ((_x - (_width / 2)) - (_root.middlewall._width / 2)) - _root.middlewall._x;
_root.difference_x_crate1_leftside_with_bluewall2 = ((_x - (_width / 2)) - (_root.bluewall2._width / 2)) - _root.bluewall2._x;
_root.distance_x_between_middlewall_and_crate1 = Math.abs(_root.middlewall._x - _x);
_root.difference_y_middlewall_insidebottom_with_crate1_down = ((423.8 - (_root.middlewall.middlewall_insidebottom._height / 2)) - (_height / 2)) - _y;
_root.difference_y_middlewall_insidetop_with_crate1_up = ((_y - 125.8) - (_root.middlewall.middlewall_insidetop._height / 2)) - (_height / 2);
if (hitTest(_root.middlewall)) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate2_left_against_middle_wall = true;
}
if ((((_x - _root.middlewall._x) - (_root.middlewall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate2_left_against_middle_wall = true;
} else {
_root.cant_move_crate2_left_against_middle_wall = false;
}
if (hitTest(_root.rl) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.rl.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_rl = true;
}
if (((Math.abs(((_x - _root.rl._x) - (_root.rl._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.rl._y + (_root.rl._height / 2)) + (_height / 2)))) and (_y > ((_root.rl._y - (_root.rl._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_left_against_rl = true;
} else {
_root.cant_move_crate1_left_against_rl = false;
}
if (hitTest(_root.rightwall)) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_right_wall = true;
}
if ((((_root.rightwall._x - _x) - (_root.rightwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate1_right_against_right_wall = true;
} else {
_root.cant_move_crate1_right_against_right_wall = false;
}
if (hitTest(_root.rbr) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.rbr.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_rbr = true;
}
if (((Math.abs(((_root.rbr._x - _x) - (_root.rbr._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.rbr._y + (_root.rbr._height / 2)) + (_height / 2)))) and (_y > ((_root.rbr._y - (_root.rbr._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_rbr = true;
} else {
_root.cant_move_crate1_right_against_rbr = false;
}
if (hitTest(_root.rr) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.rr.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_rr = true;
}
if (((Math.abs(((_root.rr._x - _x) - (_root.rr._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.rr._y + (_root.rr._height / 2)) + (_height / 2)))) and (_y > ((_root.rr._y - (_root.rr._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_rr = true;
} else {
_root.cant_move_crate1_right_against_rr = false;
}
if (hitTest(_root.pinkwall) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_pink_wall = true;
}
if (((Math.abs(((_root.pinkwall._x - _x) - (_root.pinkwall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.pinkwall._y + (_root.pinkwall._height / 2)) + (_height / 2)))) and (_y > ((_root.pinkwall._y - (_root.pinkwall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_pink_wall = true;
} else {
_root.cant_move_crate1_right_against_pink_wall = false;
}
if (hitTest(_root.topwall)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_top_wall = true;
}
if ((((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate1_up_against_top_wall = true;
} else {
_root.cant_move_crate1_up_against_top_wall = false;
}
if (hitTest(_root.rr) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.rr.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_rr = true;
}
if (((Math.abs(((_y - _root.rr._y) - (_root.rr._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.rr._x + (_root.rr._width / 2)) + (_width / 2)))) and (_x > ((_root.rr._x - (_root.rr._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_rr = true;
} else {
_root.cant_move_crate1_up_against_rr = false;
}
if (hitTest(_root.rl) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.rl.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_rl = true;
}
if (((Math.abs(((_y - _root.rl._y) - (_root.rl._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.rl._x + (_root.rl._width / 2)) + (_width / 2)))) and (_x > ((_root.rl._x - (_root.rl._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_rl = true;
} else {
_root.cant_move_crate1_up_against_rl = false;
}
if (hitTest(_root.bottomwall)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_bottom_wall = true;
}
if ((((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate1_down_against_bottom_wall = true;
} else {
_root.cant_move_crate1_down_against_bottom_wall = false;
}
if (hitTest(_root.rl) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.rl.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_rl = true;
}
if (((Math.abs(((_root.rl._y - _y) - (_root.rl._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.rl._x + (_root.rl._width / 2)) + (_width / 2)))) and (_x > ((_root.rl._x - (_root.rl._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_rl = true;
} else {
_root.cant_move_crate1_down_against_rl = false;
}
if (hitTest(_root.rr) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.rr.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_rr = true;
}
if (((Math.abs(((_root.rr._y - _y) - (_root.rr._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.rr._x + (_root.rr._width / 2)) + (_width / 2)))) and (_x > ((_root.rr._x - (_root.rr._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_rr = true;
} else {
_root.cant_move_crate1_down_against_rr = false;
}
if (hitTest(_root.rbr) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.rbr.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_rbr = true;
}
if (((Math.abs(((_root.rbr._y - _y) - (_root.rbr._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.rbr._x + (_root.rbr._width / 2)) + (_width / 2)))) and (_x > ((_root.rbr._x - (_root.rbr._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_rbr = true;
} else {
_root.cant_move_crate1_down_against_rbr = false;
}
if (hitTest(_root.orangewall) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_orange_wall = true;
}
if (((Math.abs(((_root.orangewall._y - _y) - (_root.orangewall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.orangewall._x + (_root.orangewall._width / 2)) + (_width / 2)))) and (_x > ((_root.orangewall._x - (_root.orangewall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_orange_wall = true;
} else {
_root.cant_move_crate1_down_against_orange_wall = false;
}
if (hitTest(_root.greenwall)) {
_root.greenwall_crate1_hit = true;
if ((_root.hit_crate1 == true) and (_root.moveright == true)) {
if ((_root.crate1_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_green_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.moveleft == true)) {
if ((_root.crate1_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_green_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.movedown == true)) {
if (((_root.crate1_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false)) and (_root.crate1_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_green_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.moveup == true)) {
if (((_root.crate1_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false)) and (_root.crate1_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_green_wall = true;
}
}
} else {
_root.greenwall_crate1_hit = false;
}
if (((_root.difference_x_green_with_crate1_right <= 1) && (_root.difference_x_green_with_crate1_right >= -8)) && (_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate1_right_against_green_wall = true;
_root.green_wall_and_crate1_rightside_touching = true;
} else {
_root.cant_move_crate1_right_against_green_wall = false;
_root.green_wall_and_crate1_rightside_touching = false;
}
if ((((_root.greenwall_movement == true) and (_root.green_wall_and_crate1_rightside_touching == true)) and (_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - (_width / 2)) - 0.7);
_root.crate1_is_pushed_by_green_wall = true;
}
if (((_root.difference_x_ball1_with_crate1_leftside <= 0.3) && (_root.difference_x_ball1_with_crate1_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate1_leftside_touching = true;
} else {
_root.ball1_and_crate1_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate1_leftside <= 0.3) && (_root.difference_x_ball2_with_crate1_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate1_leftside_touching = true;
} else {
_root.ball2_and_crate1_leftside_touching = false;
}
if (((_root.difference_x_ball1_with_crate1_rightside <= 2) && (_root.difference_x_ball1_with_crate1_rightside >= -8)) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate1_rightside_touching = true;
} else {
_root.ball1_and_crate1_rightside_touching = false;
}
if (((_root.difference_x_ball2_with_crate1_rightside <= 0.3) && (_root.difference_x_ball2_with_crate1_rightside >= -8)) && (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate1_rightside_touching = true;
} else {
_root.ball2_and_crate1_rightside_touching = false;
}
if (((((_root.ball1_and_crate1_leftside_touching == true) and (_root.crate1_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.greenwall_movement == true)) {
_root.ball1._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball1._width / 2)) - 0.5;
_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall = true;
} else {
_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall = false;
}
if (((((_root.ball2_and_crate1_leftside_touching == true) and (_root.crate1_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.greenwall_movement == true)) {
_root.ball2._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball2._width / 2)) - 0.5;
_root.ball2_is_pushed_by_crate1_is_pushed_by_green_wall = true;
} else {
_root.ball2_is_pushed_by_crate1_is_pushed_by_green_wall = false;
}
if (((((_root.ball1_and_crate1_rightside_touching == true) and (_root.ball1_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and ((_root.moveleft == false) or ((_root.moveleft == true) and (_root.cant_move_crate1_left_against_middle_wall == true)))) and (_currentframe == 1)) {
_root.cant_move_crate1_right_against_green_wall = false;
_x = (((_root.ball1._x - (_root.ball1._width / 2)) - (_width / 2)) - 0.5);
_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall = true;
} else {
_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall = false;
}
if ((((_root.ball2_and_crate1_rightside_touching == true) and (_root.ball2_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveleft == false)) {
_x = (((_root.ball2._x - (_root.ball2._width / 2)) - (_width / 2)) - 0.5);
_root.crate1_is_pushed_by_ball2_is_pushed_by_greenwall = true;
} else {
_root.crate1_is_pushed_by_ball2_is_pushed_by_greenwall = false;
}
if ((((_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.greenwall_movement == true)) and (difference_x_green_with_crate1_right < 0.3)) and (difference_x_green_with_crate1_right > -3)) {
_root.crate1_against_green_wall_boundaries_prevention = true;
} else {
_root.crate1_against_green_wall_boundaries_prevention = false;
}
if (((_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.distance_y_between_greenwall_and_ball <= ((_root.ball1._height / 2) + (_root.greenwall._height / 2)))) and (_root.greenwall_movement == true)) {
_root.crate1_against_green_wall_boundaries_prevention2 = true;
} else {
_root.crate1_against_green_wall_boundaries_prevention2 = false;
}
if (((_root.difference_x_green_with_crate1_left <= 0.3) && (_root.difference_x_green_with_crate1_left >= -8)) && (_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate1_left_against_green_wall = true;
_root.cant_move_crate1_left_against_middlewall = true;
_root.cant_move_crate1_left_against_orange_wall = true;
_root.cant_move_crate1_left_against_left_wall = true;
} else {
_root.cant_move_crate1_left_against_green_wall = false;
}
if (_root.crate1_against_green_wall_boundaries_prevention == false) {
if (((_root.difference_y_green_with_crate1_up <= 0.3) && (_root.difference_y_green_with_crate1_up >= -8)) && (_root.distance_x_between_greenwall_and_crate1 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate1_up_against_green_wall = true;
_root.cant_move_crate1_up_against_top_wall = true;
_root.cant_move_crate1_up_against_orange_wall = true;
_root.cant_move_crate1_up_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate1_up_against_green_wall = false;
}
if (((_root.difference_y_green_with_crate1_down <= 0.3) && (_root.difference_y_green_with_crate1_down >= -8)) && (_root.distance_x_between_greenwall_and_crate1 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate1_down_against_green_wall = true;
_root.cant_move_crate1_down_against_bottom_wall = true;
_root.cant_move_crate1_down_against_orange_wall = true;
_root.cant_move_crate1_down_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate1_down_against_green_wall = false;
}
} else if ((((_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2))) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate1_leftside <= 0.3)) && (_root.difference_x_ball1_with_crate1_leftside >= -8)) {
_root.cant_move_crate1_down_against_green_wall = true;
_root.cant_move_crate1_up_against_green_wall = true;
_root.cant_move_crate1_left_against_green_wall = true;
_root.cant_move_crate1_right_against_green_wall = true;
} else {
_root.cant_move_crate1_down_against_green_wall = false;
_root.cant_move_crate1_up_against_green_wall = false;
}
if (((_root.greenwall_movement == true) and ((((_root.difference_x_ball1_with_crate1_leftside <= 0.7) && (_root.difference_x_ball1_with_crate1_leftside >= -6)) && (_root.distance_between_rightmiddlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate1 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate1_leftside <= 0.7) && (_root.difference_x_ball2_with_crate1_leftside >= -6)) && (_root.distance_between_rightmiddlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate1 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.green_hit = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate1_up_against_green_wall = false;
_root.cant_move_crate1_down_against_green_wall = false;
}
if (((((_root.difference_x_crate1_leftside_with_middlewall <= 1) && (_root.difference_x_crate1_leftside_with_middlewall >= -8)) && (_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2)))) and ((_root.distance_y_between_greenwall_and_crate1 < ((_height / 2) + (_root.greenwall._height / 2))) or ((_root.distance_y_between_greenwall_and_ball < ((_root.ball1._height / 2) + (_root.greenwall._height / 2))) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))))) and (((_root.crate1_is_pushed_by_green_wall == true) or ((_root.ball1_and_crate1_rightside_touching == true) and (_root.ball1_is_pushed_by_green_wall == true))) or (_root.crate1_is_pushed_by_ball2_is_pushed_by_greenwall == true))) {
_root.pink_is_attached_to_crate1 = false;
_root.decoy_crate.inside.gotoAndPlay(1);
_root.greenwall_movement = false;
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 20002;
}
}
Instance of Symbol 2182 MovieClip "ball1" in Frame 28
onClipEvent (load) {
_root.hit_crate1 = false;
}
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall) and (_root.ball1_is_pushed_by_green_wall == false)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.ll)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.ll.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.ll.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.ll.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.ll.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lr)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lr.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lr.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lr.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lr.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rl)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rl.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rl.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rl.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rl.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rr)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rr.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rr.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rr.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rr.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rbr)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rbr.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rbr.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rbr.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rbr.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.crate1)) {
if (_root.crate1._currentframe == 1) {
_root.hit_crate1 = true;
if (xmove > 0) {
if ((_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate1.getBounds(_root).xMin) + 0.1));
if (((((_root.cant_move_crate1_right_against_green_wall == false) and (_root.cant_move_crate1_right_against_right_wall == false)) and (_root.cant_move_crate1_right_against_rbr == false)) and (_root.cant_move_crate1_right_against_rr == false)) and (_root.cant_move_crate1_right_against_pink_wall == false)) {
_root.cratespeed_xright = 1;
_root.crate1._x = _root.crate1._x + _root.cratespeed_xright;
_root.moveright = true;
}
}
} else {
_root.moveright = false;
}
if (xmove < 0) {
if (_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall == false) {
_x = (_x - ((getBounds(_root).xMin - _root.crate1.getBounds(_root).xMax) - 0.1));
if (((_root.cant_move_crate1_left_against_green_wall == false) and (_root.cant_move_crate1_left_against_middle_wall == false)) and (_root.cant_move_crate1_left_against_rl == false)) {
_root.cratespeed_xleft = 1;
_root.crate1._x = _root.crate1._x - _root.cratespeed_xleft;
_root.moveleft = true;
}
}
} else {
_root.moveleft = false;
}
if (ymove > 0) {
if ((((_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false) && (_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall == false)) and (_root.difference_x_ball1_with_crate1_leftside <= -1)) and (_root.difference_x_ball1_with_crate1_rightside <= -1)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate1.getBounds(_root).yMin) + 0.1));
if ((((((_root.cant_move_crate1_down_against_green_wall == false) and (_root.cant_move_crate1_down_against_bottom_wall == false)) and (_root.cant_move_crate1_down_against_orange_wall == false)) and (_root.cant_move_crate1_down_against_rl == false)) and (_root.cant_move_crate1_down_against_rr == false)) and (_root.cant_move_crate1_down_against_rbr == false)) {
_root.cratespeed_ydown = 1;
_root.crate1._y = _root.crate1._y + _root.cratespeed_ydown;
_root.movedown = true;
}
}
} else {
_root.movedown = false;
}
if (ymove < 0) {
if ((((_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false) && (_root.crate1_is_pushed_by_ball1_is_pushed_by_greenwall == false)) and (_root.difference_x_ball1_with_crate1_leftside <= -1)) and (_root.difference_x_ball1_with_crate1_rightside <= -1)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate1.getBounds(_root).yMax) - 0.1));
if ((((_root.cant_move_crate1_up_against_green_wall == false) and (_root.cant_move_crate1_up_against_rl == false)) and (_root.cant_move_crate1_up_against_top_wall == false)) and (_root.cant_move_crate1_up_against_rr == false)) {
_root.cratespeed_yup = 1;
_root.crate1._y = _root.crate1._y - _root.cratespeed_yup;
_root.moveup = true;
}
}
} else {
_root.moveup = false;
}
}
} else {
_root.cratespeed_xright = 0;
_root.cratespeed_xleft = 0;
_root.cratespeed_ydown = 0;
_root.cratespeed_yup = 0;
}
if (hitTest(_root.crate2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.crate2.getBounds(_root).xMin) + 0.1));
if ((_root.cant_move_crate2_right_against_middle_wall == false) and (_root.cant_move_crate2_right_against_lr == false)) {
_root.cratespeed_xright = 1;
_root.crate2._x = _root.crate2._x + _root.cratespeed_xright;
_root.moveright = true;
}
} else {
_root.moveright = false;
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.crate2.getBounds(_root).xMax) - 0.1));
if ((_root.cant_move_crate2_left_against_left_wall == false) and (_root.cant_move_crate2_left_against_ll == false)) {
_root.cratespeed_xleft = 1;
_root.crate2._x = _root.crate2._x - _root.cratespeed_xleft;
_root.moveleft = true;
}
} else {
_root.moveleft = false;
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.crate2.getBounds(_root).yMin) + 0.1));
if (((_root.cant_move_crate2_down_against_ll == false) and (_root.cant_move_crate2_down_against_lr == false)) and (_root.cant_move_crate2_down_against_bottom_wall == false)) {
_root.cratespeed_ydown = 1;
_root.crate2._y = _root.crate2._y + _root.cratespeed_ydown;
_root.movedown = true;
}
} else {
_root.movedown = false;
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.crate2.getBounds(_root).yMax) - 0.1));
if ((((_root.cant_move_crate2_up_against_red_wall == false) and (_root.cant_move_crate2_up_against_ll == false)) and (_root.cant_move_crate2_up_against_lr == false)) and (_root.cant_move_crate2_up_against_top_wall == false)) {
_root.cratespeed_yup = 1;
_root.crate2._y = _root.crate2._y - _root.cratespeed_yup;
_root.moveup = true;
}
} else {
_root.moveup = false;
}
} else {
_root.cratespeed_xright = 0;
_root.cratespeed_xleft = 0;
_root.cratespeed_ydown = 0;
_root.cratespeed_yup = 0;
}
}
if ((((!Key.isDown(37)) and (!Key.isDown(39))) and (!Key.isDown(38))) and (!Key.isDown(40))) {
_root.moveup = false;
_root.movedown = false;
_root.moveright = false;
_root.moveleft = false;
move(0, 0);
_root.hit_crate1 = false;
_root.hit_crate2 = false;
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
if ((_root.ball1_is_pushed_by_crate1_is_pushed_by_green_wall == false) and (_root.ball1_is_pushed_by_green_wall == false)) {
move(5, 0);
}
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 29
function restartLevel() {
_root.scoresubmit30 = savefile.data.scoresubmit30;
savefile.flush();
soundstart = false;
small = false;
var30 = true;
var29 = false;
submitScreen = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
bluewall_movement = false;
pinkwall1_movement = false;
pinkwall2_movement = false;
pinkwall3_movement = false;
pinkwall4_movement = false;
orangewall_movement = false;
aquawall1_movement = false;
aquawall2_movement = false;
aquatransparent_movement = false;
greenwall_movement = false;
pinkkey._width = 32.1;
pinkkey._height = 28.1;
ball_location = true;
gray_is_hit_pink1 = false;
black_is_hit_pink1 = false;
pink1_hit = false;
gray_is_hit_pink4 = false;
black_is_hit_pink4 = false;
pink4_hit = false;
gray_is_hit_aqua1 = false;
black_is_hit_aqua1 = false;
aqua1_hit = false;
gray_is_hit_aqua2 = false;
black_is_hit_aqua2 = false;
aqua2_hit = false;
gray_is_hit_green = false;
black_is_hit_green = false;
green_hit = false;
gray_is_hit_blue = false;
black_is_hit_blue = false;
blue_hit = false;
ball_movement = true;
finisher = false;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
bluekey._x = 280.6;
bluekey._y = 481.5;
orangekey._x = 420.1;
orangekey._y = 382.4;
greenkey._x = 262.6;
greenkey._y = 80.7;
aquakey._x = 280.6;
aquakey._y = 438.4;
pinkkey._x = 484;
pinkkey._y = 275;
bluewall._x = 157.2;
bluewall._y = 104.2;
pinkwall1._x = 500.2;
pinkwall1._y = 12;
pinkwall2._x = 202.4;
pinkwall2._y = 120;
pinkwall3._x = 202.8;
pinkwall3._y = 414.1;
pinkwall4._x = 500.2;
pinkwall4._y = 537.2;
orangewall._x = 273.8;
orangewall._y = 133.8;
aquawall1._x = 263.5;
aquawall1._y = 313.5;
aquawall2._x = 263.5;
aquawall2._y = 235.9;
aquatransparent._x = 262.6;
aquatransparent._y = 275;
greenwall._x = 442.6;
greenwall._y = 274.8;
bluewall1._x = 263.3;
bluewall1._y = 275.1;
blue_transparent._x = 263.3;
blue_transparent._y = 274.9;
ball1._x = 121.1;
ball1._y = 481.8;
ball2._x = 576.2;
ball2._y = 275;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 273.3;
finish._y = 172.8;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_pink1 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_pink1 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_pink4 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_pink4 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_aqua1 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_aqua1 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_aqua2 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_aqua2 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_green == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_green == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_blue == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_blue == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
if (savefile.data.firsttime == undefined) {
_root.firsttime = true;
} else {
_root.firsttime = savefile.data.firsttime;
}
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(30);
restartLevel();
youwin.onPress = function () {
nextFrame();
gotoAndStop;
};
_root.option9.submitScore.onRelease = function () {
if (submitPossible) {
trace("Score Submitted");
scoresubmit = true;
scoresubmit1 = false;
scoresubmit2 = false;
scoresubmit3 = false;
scoresubmit4 = false;
scoresubmit5 = false;
scoresubmit6 = false;
scoresubmit7 = false;
scoresubmit8 = false;
scoresubmit9 = false;
scoresubmit10 = false;
scoresubmit11 = false;
scoresubmit12 = false;
scoresubmit13 = false;
scoresubmit14 = false;
scoresubmit15 = false;
scoresubmit16 = false;
scoresubmit17 = false;
scoresubmit18 = false;
scoresubmit19 = false;
scoresubmit20 = false;
scoresubmit21 = false;
scoresubmit22 = false;
scoresubmit23 = false;
scoresubmit24 = false;
scoresubmit25 = false;
scoresubmit26 = false;
scoresubmit27 = false;
scoresubmit28 = false;
scoresubmit29 = false;
scoresubmit30 = false;
_root.level1_best_time = 0;
_root.level2_best_time = 0;
_root.level3_best_time = 0;
_root.level4_best_time = 0;
_root.level5_best_time = 0;
_root.level6_best_time = 0;
_root.level7_best_time = 0;
_root.level8_best_time = 0;
_root.level9_best_time = 0;
_root.level10_best_time = 0;
_root.level11_best_time = 0;
_root.level12_best_time = 0;
_root.level13_best_time = 0;
_root.level14_best_time = 0;
_root.level15_best_time = 0;
_root.level16_best_time = 0;
_root.level17_best_time = 0;
_root.level18_best_time = 0;
_root.level19_best_time = 0;
_root.level20_best_time = 0;
_root.level21_best_time = 0;
_root.level22_best_time = 0;
_root.level23_best_time = 0;
_root.level24_best_time = 0;
_root.level25_best_time = 0;
_root.level26_best_time = 0;
_root.level27_best_time = 0;
_root.level28_best_time = 0;
_root.level29_best_time = 0;
_root.level30_best_time = 0;
savefile.data.level1_best_time = _root.level1_best_time;
savefile.data.level2_best_time = _root.level2_best_time;
savefile.data.level3_best_time = _root.level3_best_time;
savefile.data.level4_best_time = _root.level4_best_time;
savefile.data.level5_best_time = _root.level5_best_time;
savefile.data.level6_best_time = _root.level6_best_time;
savefile.data.level7_best_time = _root.level7_best_time;
savefile.data.level8_best_time = _root.level8_best_time;
savefile.data.level9_best_time = _root.level9_best_time;
savefile.data.level10_best_time = _root.level10_best_time;
savefile.data.level11_best_time = _root.level11_best_time;
savefile.data.level12_best_time = _root.level12_best_time;
savefile.data.level13_best_time = _root.level13_best_time;
savefile.data.level14_best_time = _root.level14_best_time;
savefile.data.level15_best_time = _root.level15_best_time;
savefile.data.level16_best_time = _root.level16_best_time;
savefile.data.level17_best_time = _root.level17_best_time;
savefile.data.level18_best_time = _root.level18_best_time;
savefile.data.level19_best_time = _root.level19_best_time;
savefile.data.level20_best_time = _root.level20_best_time;
savefile.data.level21_best_time = _root.level21_best_time;
savefile.data.level22_best_time = _root.level22_best_time;
savefile.data.level23_best_time = _root.level23_best_time;
savefile.data.level24_best_time = _root.level24_best_time;
savefile.data.level25_best_time = _root.level25_best_time;
savefile.data.level26_best_time = _root.level26_best_time;
savefile.data.level27_best_time = _root.level27_best_time;
savefile.data.level28_best_time = _root.level28_best_time;
savefile.data.level29_best_time = _root.level29_best_time;
savefile.data.level30_best_time = _root.level30_best_time;
savefile.data.level30_best_time = _root.level30_best_time;
savefile.data.scoresubmit1 = _root.scoresubmit1;
savefile.data.scoresubmit2 = _root.scoresubmit2;
savefile.data.scoresubmit3 = _root.scoresubmit3;
savefile.data.scoresubmit4 = _root.scoresubmit4;
savefile.data.scoresubmit5 = _root.scoresubmit5;
savefile.data.scoresubmit6 = _root.scoresubmit6;
savefile.data.scoresubmit7 = _root.scoresubmit7;
savefile.data.scoresubmit8 = _root.scoresubmit8;
savefile.data.scoresubmit9 = _root.scoresubmit9;
savefile.data.scoresubmit10 = _root.scoresubmit10;
savefile.data.scoresubmit11 = _root.scoresubmit11;
savefile.data.scoresubmit12 = _root.scoresubmit12;
savefile.data.scoresubmit13 = _root.scoresubmit13;
savefile.data.scoresubmit14 = _root.scoresubmit14;
savefile.data.scoresubmit15 = _root.scoresubmit15;
savefile.data.scoresubmit16 = _root.scoresubmit16;
savefile.data.scoresubmit17 = _root.scoresubmit17;
savefile.data.scoresubmit18 = _root.scoresubmit18;
savefile.data.scoresubmit19 = _root.scoresubmit19;
savefile.data.scoresubmit20 = _root.scoresubmit20;
savefile.data.scoresubmit21 = _root.scoresubmit21;
savefile.data.scoresubmit22 = _root.scoresubmit22;
savefile.data.scoresubmit23 = _root.scoresubmit23;
savefile.data.scoresubmit24 = _root.scoresubmit24;
savefile.data.scoresubmit25 = _root.scoresubmit25;
savefile.data.scoresubmit26 = _root.scoresubmit26;
savefile.data.scoresubmit27 = _root.scoresubmit27;
savefile.data.scoresubmit28 = _root.scoresubmit28;
savefile.data.scoresubmit29 = _root.scoresubmit29;
savefile.data.scoresubmit30 = _root.scoresubmit30;
savefile.flush();
gotoAndStop (37);
_root.option9._x = 5000;
_root.option9._y = 5000;
_root.win._x = 5000;
_root.win._y = 5000;
gotoAndStop (3);
} else {
trace("Score cant be submitted");
}
};
_root.option9.exit.onRelease = function () {
_root.option9._x = 5000;
_root.option9._y = 5000;
_root.win._x = Stage.width / 2;
_root.win._y = Stage.height / 2;
};
ball1.onEnterFrame = function () {
if (this.hitTest(bluekey)) {
keystart = true;
bluekey._x = 100000 /* 0x0186A0 */;
bluewall_movement = true;
_root.ball1.scan.gotoAndStop(8);
}
if (this.hitTest(orangekey)) {
keystart = true;
orangekey._x = 100000 /* 0x0186A0 */;
orangewall_movement = true;
_root.ball1.scan.gotoAndStop(6);
}
if (this.hitTest(aquakey)) {
keystart = true;
aquakey._x = 100000 /* 0x0186A0 */;
aquawall1_movement = true;
aquawall2_movement = true;
aquatransparent_movement = true;
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndPlay(1);
}
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 100000 /* 0x0186A0 */;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if (this.hitTest(pinkkey)) {
keystart = true;
pinkkey._x = 10000;
_root.ball1.scan.gotoAndStop(5);
pinkwall1_movement = true;
pinkwall2_movement = true;
pinkwall3_movement = true;
pinkwall4_movement = true;
}
if (pinkwall1.hitTest(pinkwall4)) {
soundstart = true;
pinkwall1_movement = false;
pinkwall4_movement = false;
pinkwall1._y = ((pinkwall4._y - (pinkwall4._height / 2)) - (pinkwall1._height / 2)) - 0.1;
}
if (pinkwall1.hitTest(aquawall2)) {
soundstart = true;
pinkwall1_movement = false;
aquawall2_movement = false;
aquawall1_movement = false;
aquatransparent_movement = false;
if ((((pinkwall1._x - (pinkwall1._width / 2)) - aquawall2._x) - (aquawall2._width / 2)) < -1) {
pinkwall1._y = ((aquawall2._y - (aquawall2._height / 2)) - (pinkwall1._height / 2)) - 0.1;
} else {
aquawall2._x = ((pinkwall1._x - (pinkwall1._width / 2)) - (aquawall2._width / 2)) - 0.1;
aquawall1._x = ((pinkwall1._x - (pinkwall1._width / 2)) - (aquawall2._width / 2)) - 0.1;
pinkwall4_movement = false;
}
}
if (pinkwall4.hitTest(aquawall1)) {
aquawall2_movement = false;
aquawall1_movement = false;
aquatransparent_movement = false;
pinkwall4_movement = false;
if ((((pinkwall4._x - (pinkwall4._width / 2)) - aquawall1._x) - (aquawall1._width / 2)) < -1) {
pinkwall4._y = ((aquawall1._y + (aquawall1._height / 2)) + (pinkwall4._height / 2)) + 0.1;
soundstart = true;
} else {
aquawall2._x = ((pinkwall1._x - (pinkwall1._width / 2)) - (aquawall2._width / 2)) - 0.1;
aquawall1._x = ((pinkwall1._x - (pinkwall1._width / 2)) - (aquawall2._width / 2)) - 0.1;
pinkwall1_movement = false;
}
}
if (pinkwall1.hitTest(greenwall)) {
pinkwall1_movement = false;
greenwall_movement = false;
}
if (pinkwall4.hitTest(greenwall)) {
greenwall_movement = false;
pinkwall4_movement = false;
}
if (scoresubmit30) {
scoresubmit = false;
} else if (scoresubmit30 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (firsttime) {
level30_best_time = seconds;
firsttime = false;
savefile.data.firsttime = _root.firsttime;
savefile.flush();
}
if (scoresubmit) {
level30_best_time = seconds;
scoresubmit30 = true;
savefile.data.scoresubmit30 = _root.scoresubmit30;
savefile.flush();
}
if (seconds < level30_best_time) {
level30_best_time = seconds;
}
savefile.data.level30_best_time = _root.level30_best_time;
savefile.flush();
totaltime = ((((((((((((((((((((((((((((_root.level1_best_time + _root.level2_best_time) + _root.level3_best_time) + _root.level4_best_time) + _root.level5_best_time) + _root.level6_best_time) + _root.level7_best_time) + _root.level8_best_time) + _root.level9_best_time) + _root.level10_best_time) + _root.level11_best_time) + _root.level12_best_time) + _root.level13_best_time) + _root.level14_best_time) + _root.level15_best_time) + _root.level16_best_time) + _root.level17_best_time) + _root.level18_best_time) + _root.level19_best_time) + _root.level20_best_time) + _root.level21_best_time) + _root.level22_best_time) + _root.level23_best_time) + _root.level24_best_time) + _root.level25_best_time) + _root.level26_best_time) + _root.level27_best_time) + _root.level28_best_time) + _root.level29_best_time) + _root.level30_best_time;
SPACE_possible = false;
ball_movement = false;
if (!submitScreen) {
win._x = Stage.width / 2;
win._y = Stage.height / 2;
}
_root.win.instructions.gotoAndStop(30);
_root.win.meter.gotoAndStop(31);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop (3);
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var30) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
witcher = true;
gotoAndStop ("l28");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
gotoAndStop ("l2");
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (bluewall_movement) {
bluewall._y = bluewall._y + 1;
}
if (bluewall._y > 420) {
bluewall_movement = false;
soundstart = true;
bluewall._y = 420;
}
if (orangewall_movement) {
orangewall._x = orangewall._x + 1;
}
if (orangewall._x > 338.5) {
orangewall_movement = false;
orangewall._x = 338.5;
}
if (greenwall_movement) {
greenwall._x = greenwall._x + 1;
}
if (greenwall._x > 583.5) {
soundstart = true;
greenwall_movement = false;
greenwall._x = 583.5;
}
if (greenwall._x > ((rb._x + (rb._width / 2)) + (greenwall._width / 2))) {
rb._x = 450;
rt._x = 449.8;
}
if (pinkwall1_movement) {
pinkwall1._y = pinkwall1._y + 0.24;
}
if (pinkwall2_movement) {
pinkwall2._y = pinkwall2._y - 2;
}
if (pinkwall3_movement) {
pinkwall3._y = pinkwall3._y + 2;
}
if (pinkwall4_movement) {
pinkwall4._y = pinkwall4._y - 0.2;
}
if (aquawall1_movement) {
aquawall1._x = aquawall1._x + 1;
bluewall1._x = bluewall1._x + 1;
blue_transparent._x = blue_transparent._x + 1;
}
if (aquawall1._x > 562) {
soundstart = true;
aquawall1_movement = false;
aquawall2_movement = false;
aquatransparent_movement = false;
aquawall1._x = 562;
aquawall2._x = 562;
aquatransparent._x = 562;
}
if (aquawall2_movement) {
aquawall2._x = aquawall2._x + 1;
}
if (aquatransparent_movement) {
aquatransparent._x = aquatransparent._x + 1;
}
if ((((((((((((((((((((((((((((((_root.level1_best_time > 0) and (_root.level2_best_time > 0)) and (_root.level3_best_time > 0)) and (_root.level4_best_time > 0)) and (_root.level5_best_time > 0)) and (_root.level6_best_time > 0)) and (_root.level7_best_time > 0)) and (_root.level8_best_time > 0)) and (_root.level9_best_time > 0)) and (_root.level10_best_time > 0)) and (_root.level11_best_time > 0)) and (_root.level12_best_time > 0)) and (_root.level13_best_time > 0)) and (_root.level14_best_time > 0)) and (_root.level15_best_time > 0)) and (_root.level16_best_time > 0)) and (_root.level17_best_time > 0)) and (_root.level18_best_time > 0)) and (_root.level19_best_time > 0)) and (_root.level20_best_time > 0)) and (_root.level21_best_time > 0)) and (_root.level22_best_time > 0)) and (_root.level23_best_time > 0)) and (_root.level24_best_time > 0)) and (_root.level25_best_time > 0)) and (_root.level26_best_time > 0)) and (_root.level27_best_time > 0)) and (_root.level28_best_time > 0)) and (_root.level29_best_time > 0)) and (_root.level30_best_time > 0)) {
submitPossible = true;
} else {
submitPossible = false;
}
if (!submitPossible) {
_root.option9.warning._alpha = 100;
_root.option9.submitScore._alpha = 100;
} else {
_root.option9.warning._alpha = 0;
_root.option9.submitScore._alpha = 100;
}
differenceblue = ((ball1._y - bluewall._y) - (bluewall._height / 2)) - (ball1._height / 2);
differenceblue2 = ((ball2._y - bluewall._y) - (bluewall._height / 2)) - (ball2._height / 2);
distance_between_bottomwall_and_ball = Math.abs(((bottomwall._y - ball1._y) - (bottomwall._height / 2)) - (ball1._height / 2));
distance_between_bottomwall_and_ball2 = Math.abs(((bottomwall._y - ball2._y) - (bottomwall._height / 2)) - (ball2._height / 2));
distance_x_between_bluewall_and_ball = Math.abs(bluewall._x - ball1._x);
distance_x_between_bluewall_and_ball2 = Math.abs(bluewall._x - ball2._x);
if ((((bluewall_movement == true) and (differenceblue <= 0.2)) and (differenceblue >= -8)) and (distance_x_between_bluewall_and_ball < ((ball1._width / 2) + (bluewall._width / 2)))) {
ball1._y = ((bluewall._y + (bluewall._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((bluewall_movement == true) and (differenceblue2 <= 0.2)) and (differenceblue2 >= -8)) and (distance_x_between_bluewall_and_ball2 < ((ball2._width / 2) + (bluewall._width / 2)))) {
ball2._y = ((bluewall._y + (bluewall._height / 2)) + (ball2._height / 2)) + 0.2;
}
if (((((differenceblue <= 0.5) && (differenceblue >= -1)) && (distance_between_bottomwall_and_ball <= 0.5)) && (distance_x_between_bluewall_and_ball < ((ball1._width / 2) + (bluewall._width / 2)))) or ((((differenceblue2 <= 0.5) && (differenceblue2 >= -1)) && (distance_between_bottomwall_and_ball2 <= 0.5)) && (distance_x_between_bluewall_and_ball2 < ((ball2._width / 2) + (bluewall._width / 2))))) {
blue_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differencegreen = ((ball1._x - greenwall._x) - (greenwall._width / 2)) - (ball1._width / 2);
differencegreen2 = ((ball2._x - greenwall._x) - (greenwall._width / 2)) - (ball2._width / 2);
distance_between_rightwall_and_ball = Math.abs(((rightwall._x - ball1._x) - (rightwall._width / 2)) - (ball1._width / 2));
distance_between_rightwall_and_ball2 = Math.abs(((rightwall._x - ball2._x) - (rightwall._width / 2)) - (ball2._width / 2));
distance_y_between_greenwall_and_ball = Math.abs(greenwall._y - ball1._y);
distance_y_between_greenwall_and_ball2 = Math.abs(greenwall._y - ball2._y);
if ((((greenwall_movement == true) and (differencegreen <= 0.2)) and (differencegreen >= -8)) and (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) {
ball1._x = ((greenwall._x + (greenwall._width / 2)) + (ball1._width / 2)) + 0.2;
}
if ((((greenwall_movement == true) and (differencegreen2 <= 0.2)) and (differencegreen2 >= -8)) and (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2)))) {
ball2._x = ((greenwall._x + (greenwall._width / 2)) + (ball2._width / 2)) + 0.2;
}
if (((((differencegreen <= 0.5) && (differencegreen >= -2)) && (distance_between_rightwall_and_ball <= 1)) && (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) or ((((differencegreen2 <= 0.5) && (differencegreen2 >= -2)) && (distance_between_rightwall_and_ball2 <= 1)) && (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2))))) {
green_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differenceaqua1 = ((ball1._x - aquawall1._x) - (aquawall1._width / 2)) - (ball1._width / 2);
differenceaqua12 = ((ball2._x - aquawall1._x) - (aquawall1._width / 2)) - (ball2._width / 2);
distance_y_between_aquawall1_and_ball = Math.abs(aquawall1._y - ball1._y);
distance_y_between_aquawall1_and_ball2 = Math.abs(aquawall1._y - ball2._y);
if ((((aquawall1_movement == true) and (differenceaqua1 <= 0.2)) and (differenceaqua1 >= -8)) and (distance_y_between_aquawall1_and_ball < ((ball1._height / 2) + (aquawall1._height / 2)))) {
ball1._x = ((aquawall1._x + (aquawall1._width / 2)) + (ball1._width / 2)) + 0.2;
}
if ((((aquawall1_movement == true) and (differenceaqua12 <= 0.2)) and (differenceaqua12 >= -8)) and (distance_y_between_aquawall1_and_ball2 < ((ball2._height / 2) + (aquawall1._height / 2)))) {
ball2._x = ((aquawall1._x + (aquawall1._width / 2)) + (ball2._width / 2)) + 0.2;
}
if (((((differenceaqua1 <= 0.5) && (differenceaqua1 >= -2)) && (distance_between_rightwall_and_ball <= 1)) && (distance_y_between_aquawall1_and_ball < ((ball1._height / 2) + (aquawall1._height / 2)))) or ((((differenceaqua12 <= 0.5) && (differenceaqua12 >= -2)) && (distance_between_rightwall_and_ball2 <= 1)) && (distance_y_between_aquawall1_and_ball2 < ((ball2._height / 2) + (aquawall1._height / 2))))) {
aqua1_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differenceaqua2 = ((ball1._x - aquawall2._x) - (aquawall2._width / 2)) - (ball1._width / 2);
differenceaqua22 = ((ball2._x - aquawall2._x) - (aquawall2._width / 2)) - (ball2._width / 2);
distance_y_between_aquawall2_and_ball = Math.abs(aquawall2._y - ball1._y);
distance_y_between_aquawall2_and_ball2 = Math.abs(aquawall2._y - ball2._y);
if ((((aquawall2_movement == true) and (differenceaqua2 <= 0.2)) and (differenceaqua2 >= -8)) and (distance_y_between_aquawall2_and_ball < ((ball1._height / 2) + (aquawall2._height / 2)))) {
ball1._x = ((aquawall2._x + (aquawall2._width / 2)) + (ball1._width / 2)) + 0.2;
}
if ((((aquawall2_movement == true) and (differenceaqua22 <= 0.2)) and (differenceaqua22 >= -8)) and (distance_y_between_aquawall2_and_ball2 < ((ball2._height / 2) + (aquawall2._height / 2)))) {
ball2._x = ((aquawall2._x + (aquawall2._width / 2)) + (ball2._width / 2)) + 0.2;
}
if (((((differenceaqua2 <= 0.5) && (differenceaqua2 >= -2)) && (distance_between_rightwall_and_ball <= 1)) && (distance_y_between_aquawall2_and_ball < ((ball1._height / 2) + (aquawall2._height / 2)))) or ((((differenceaqua22 <= 0.5) && (differenceaqua22 >= -2)) && (distance_between_rightwall_and_ball2 <= 1)) && (distance_y_between_aquawall2_and_ball2 < ((ball2._height / 2) + (aquawall2._height / 2))))) {
aqua2_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differencepink1 = ((ball1._y - pinkwall1._y) - (pinkwall1._height / 2)) - (ball1._height / 2);
differencepink12 = ((ball2._y - pinkwall1._y) - (pinkwall1._height / 2)) - (ball2._height / 2);
distance_between_pinkwall4_and_ball = Math.abs(((pinkwall4._y - ball1._y) - (pinkwall4._height / 2)) - (ball1._height / 2));
distance_between_pinkwall4_and_ball2 = Math.abs(((pinkwall4._y - ball2._y) - (pinkwall4._height / 2)) - (ball2._height / 2));
distance_between_aquawall2y_and_ball = Math.abs(((aquawall2._y - ball1._y) - (aquawall2._height / 2)) - (ball1._height / 2));
distance_between_aquawall2y_and_ball2 = Math.abs(((aquawall2._y - ball2._y) - (aquawall2._height / 2)) - (ball2._height / 2));
distance_x_between_pinkwall1_and_ball = Math.abs(pinkwall1._x - ball1._x);
distance_x_between_pinkwall1_and_ball2 = Math.abs(pinkwall1._x - ball2._x);
if ((((pinkwall1_movement == true) and (differencepink1 <= 0.2)) and (differencepink1 >= -8)) and (distance_x_between_pinkwall1_and_ball < ((ball1._width / 2) + (pinkwall1._width / 2)))) {
ball1._y = ((pinkwall1._y + (pinkwall1._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((pinkwall1_movement == true) and (differencepink12 <= 0.2)) and (differencepink12 >= -8)) and (distance_x_between_pinkwall1_and_ball2 < ((ball2._width / 2) + (pinkwall1._width / 2)))) {
ball2._y = ((pinkwall1._y + (pinkwall1._height / 2)) + (ball2._height / 2)) + 0.2;
}
if (((((differencepink1 <= 0.5) && (differencepink1 >= -2)) && (distance_between_pinkwall4_and_ball <= 1)) && (distance_x_between_pinkwall1_and_ball < ((ball1._width / 2) + (pinkwall1._width / 2)))) or ((((differencepink12 <= 0.5) && (differencepink12 >= -2)) && (distance_between_pinkwall4_and_ball2 <= 1)) && (distance_x_between_pinkwall1_and_ball2 < ((ball2._width / 2) + (pinkwall1._width / 2))))) {
pink1_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if (((((((differencepink1 <= 0.5) && (differencepink1 >= -2)) && (distance_between_aquawall2y_and_ball <= 1)) && (ball1._x > ((aquawall2._x - (aquawall2._width / 2)) - (ball1._width / 2)))) && (ball1._x < ((aquawall2._x + (aquawall2._width / 2)) + (ball1._width / 2)))) && (distance_x_between_pinkwall1_and_ball < ((ball1._width / 2) + (pinkwall1._width / 2)))) or ((((((differencepink12 <= 0.5) && (differencepink12 >= -2)) && (distance_between_aquawall2y_and_ball2 <= 1)) && (ball2._x > ((aquawall2._x - (aquawall2._width / 2)) - (ball2._width / 2)))) && (ball2._x < ((aquawall2._x + (aquawall2._width / 2)) + (ball2._width / 2)))) && (distance_x_between_pinkwall1_and_ball2 < ((ball2._width / 2) + (pinkwall1._width / 2))))) {
pink1_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differencepink4 = ((pinkwall4._y - ball1._y) - (pinkwall4._height / 2)) - (ball1._height / 2);
differencepink42 = ((pinkwall4._y - ball2._y) - (pinkwall4._height / 2)) - (ball2._height / 2);
distance_between_aquawall1y_and_ball = Math.abs(((ball1._y - aquawall1._y) - (aquawall2._height / 2)) - (ball1._height / 2));
distance_between_aquawall1y_and_ball2 = Math.abs(((ball2._y - aquawall1._y) - (aquawall2._height / 2)) - (ball2._height / 2));
distance_x_between_pinkwall4_and_ball = Math.abs(pinkwall4._x - ball1._x);
distance_x_between_pinkwall4_and_ball2 = Math.abs(pinkwall4._x - ball2._x);
if ((((pinkwall4_movement == true) and (differencepink4 <= 0.2)) and (differencepink4 >= -8)) and (distance_x_between_pinkwall4_and_ball < ((ball1._width / 2) + (pinkwall4._width / 2)))) {
ball1._y = ((pinkwall4._y - (pinkwall4._height / 2)) - (ball1._height / 2)) - 0.2;
}
if ((((pinkwall4_movement == true) and (differencepink42 <= 0.2)) and (differencepink42 >= -8)) and (distance_x_between_pinkwall4_and_ball2 < ((ball2._width / 2) + (pinkwall4._width / 2)))) {
ball2._y = ((pinkwall4._y - (pinkwall4._height / 2)) - (ball2._height / 2)) - 0.2;
}
if (((((((differencepink4 <= 0.5) && (differencepink4 >= -2)) && (distance_between_aquawall1y_and_ball <= 1)) && (ball1._x > ((aquawall1._x - (aquawall1._width / 2)) - (ball1._width / 2)))) && (ball1._x < ((aquawall1._x + (aquawall1._width / 2)) + (ball1._width / 2)))) && (distance_x_between_pinkwall4_and_ball < ((ball1._width / 2) + (pinkwall4._width / 2)))) or ((((((differencepink42 <= 0.5) && (differencepink42 >= -2)) && (distance_between_aquawall1y_and_ball2 <= 1)) && (ball2._x > ((aquawall1._x - (aquawall1._width / 2)) - (ball2._width / 2)))) && (ball2._x < ((aquawall1._x + (aquawall1._width / 2)) + (ball2._width / 2)))) && (distance_x_between_pinkwall4_and_ball2 < ((ball2._width / 2) + (pinkwall4._width / 2))))) {
pink4_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
distance_between_aquawall1x_and_ball = Math.abs(((aquawall1._x - ball1._x) - (aquawall1._width / 2)) - (ball1._width / 2));
distance_between_aquawall1x_and_ball2 = Math.abs(((aquawall1._x - ball2._x) - (aquawall1._width / 2)) - (ball2._width / 2));
distance_between_aquawall2x_and_ball = Math.abs(((aquawall2._x - ball1._x) - (aquawall2._width / 2)) - (ball1._width / 2));
distance_between_aquawall2x_and_ball2 = Math.abs(((aquawall2._x - ball2._x) - (aquawall2._width / 2)) - (ball2._width / 2));
if (((((((differencegreen <= 0.5) && (greenwall_movement)) and (differencegreen >= -2)) && (distance_between_aquawall1x_and_ball <= 1)) && (ball1._y > ((aquawall1._y - (aquawall1._height / 2)) - (ball1._height / 2)))) && (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) or ((((((differencegreen2 <= 0.5) && (differencegreen2 >= -2)) and greenwall_movement) && (distance_between_aquawall1x_and_ball2 <= 1)) && (ball2._y > ((aquawall1._y - (aquawall1._height / 2)) - (ball2._height / 2)))) && (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2))))) {
green_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (((((((differencegreen <= 0.5) && (greenwall_movement)) and (differencegreen >= -2)) && (distance_between_aquawall2x_and_ball <= 1)) && (ball1._y < ((aquawall2._y + (aquawall2._height / 2)) + (ball1._height / 2)))) && (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) or ((((((differencegreen2 <= 0.5) && (greenwall_movement)) and (differencegreen2 >= -2)) && (distance_between_aquawall2x_and_ball2 <= 1)) && (ball2._y < ((aquawall2._y + (aquawall2._height / 2)) + (ball2._height / 2)))) && (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2))))) {
green_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation > (Stage.width / 2)) {
if (blue_hit == true) {
gray_is_hit_blue = true;
}
if (green_hit == true) {
black_is_hit_green = true;
}
if (pink1_hit == true) {
black_is_hit_pink1 = true;
}
if (pink4_hit == true) {
black_is_hit_pink4 = true;
}
if (aqua1_hit == true) {
black_is_hit_aqua1 = true;
}
if (aqua2_hit == true) {
black_is_hit_aqua2 = true;
}
} else if (ball1_xlocation < (Stage.width / 2)) {
if (blue_hit == true) {
black_is_hit_blue = true;
}
if (green_hit == true) {
gray_is_hit_green = true;
}
if (pink1_hit == true) {
gray_is_hit_pink1 = true;
}
if (pink4_hit == true) {
gray_is_hit_pink4 = true;
}
if (aqua1_hit == true) {
gray_is_hit_aqua1 = true;
}
if (aqua2_hit == true) {
gray_is_hit_aqua2 = true;
}
}
ball_locator();
}
};
Instance of Symbol 2195 MovieClip "ball1" in Frame 29
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightup)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightup.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightup.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightup.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightup.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightdown)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightdown.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightdown.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightdown.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightdown.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.midleft)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.midleft.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.midleft.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.midleft.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.midleft.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.midbottom)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.midbottom.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.midbottom.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.midbottom.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.midbottom.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r4)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r4.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r4.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r4.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r4.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rb)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rb.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rb.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rb.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rb.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rt)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rt.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rt.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rt.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rt.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.m1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.m1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.m1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.m1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.m1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.m2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.m2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.m2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.m2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.m2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.m3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.m3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.m3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.m3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.m3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.m4)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.m4.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.m4.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.m4.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.m4.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.m5)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.m5.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.m5.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.m5.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.m5.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.clubchicken)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.clubchicken.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.clubchicken.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.clubchicken.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.clubchicken.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall4)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall4.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall4.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall4.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall4.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.aquawall1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.aquawall1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.aquawall1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.aquawall1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.aquawall1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.aquawall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.aquawall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.aquawall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.aquawall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.aquawall2.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 30
function restartLevel() {
_root.scoresubmit28 = savefile.data.scoresubmit28;
savefile.flush();
soundstart = false;
small = false;
decoydone = false;
if (witcher) {
gotoAndStop ("l31");
witcher = false;
}
if ((var29 != true) and (var30 != true)) {
var28 = true;
}
var27 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
transporter2._alpha = 100;
transporter1._alpha = 100;
greenwall_movement = false;
pinkwall_movement = false;
orangewall1_movement = false;
orangewall_movement = false;
redwall_movement = false;
bluewall_movement = false;
pinkswitch.gotoAndStop(1);
greenswitch.gotoAndStop(1);
orangeswitch.gotoAndStop(1);
blueswitch.gotoAndStop(1);
transporter = false;
ball_location = true;
black_is_hit_green = false;
gray_is_hit_green = false;
green_hit = false;
black_is_hit_pink = false;
gray_is_hit_pink = false;
pink_hit = false;
black_is_hit_red = false;
gray_is_hit_red = false;
red_hit = false;
black_is_hit_orange1 = false;
gray_is_hit_orange1 = false;
orange1_hit = false;
black_is_hit_red = false;
gray_is_hit_red = false;
red_hit = false;
ball1_is_pushed_by_red_wall = false;
ball2_is_pushed_by_red_wall = false;
black_is_hit_orange2 = false;
gray_is_hit_orange2 = false;
orange2_hit = false;
ball1_is_pushed_by_orange2_wall = false;
ball2_is_pushed_by_orange2_wall = false;
black_is_hit_blue = false;
gray_is_hit_blue = false;
blue_hit = false;
ball1_is_pushed_by_blue_wall = false;
ball2_is_pushed_by_blue_wall = false;
greenswitch_is_attached_to_crate4 = true;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.crate1.gotoAndStop(1);
_root.crate2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
ball_movement = true;
finisher = false;
decoydone = false;
_root.hit_crate1 = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_right_against_r5 = false;
_root.cant_move_crate1_left_against_r6 = false;
_root.cant_move_crate1_left_against_insidebottom = false;
_root.cant_move_crate1_left_against_r2 = false;
_root.cant_move_crate1_down_against_r6 = false;
_root.cant_move_crate1_down_against_bottomwall = false;
_root.cant_move_crate1_down_against_insidebottom = false;
_root.cant_move_crate1_up_against_orangewall2 = false;
_root.cant_move_crate1_up_against_r1 = false;
_root.cant_move_crate1_up_against_r2 = false;
_root.red_wall_and_crate1_rightside_touching = false;
_root.crate1_against_red_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_red_wall = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
crate1._x = 476.1;
crate1._y = 388.2;
crate2._x = 163.8;
crate2._y = 216.2;
crate3._x = 163.8;
crate3._y = 331;
crate4._x = 428.8;
crate4._y = 76.3;
orangeswitch._x = 421.7;
orangeswitch._y = 151.5;
pinkswitch._x = 577.2;
pinkswitch._y = 77.6;
blueswitch._x = 278.3;
blueswitch._y = 234.6;
redkey._x = 419.4;
redkey._y = 234.6;
pinkwall._x = 229.2;
pinkwall._y = 152.7;
redwall._x = 580.4;
redwall._y = 235.4;
orangewall1._x = 118.5;
orangewall1._y = 672.4;
orangewall._x = 499.1;
orangewall._y = 76.6;
bluewall._x = 577.1;
bluewall._y = 672.4;
greenwall._x = 192.1;
greenwall._y = 270;
ball1._x = 278.3;
ball1._y = 153.9;
ball2._x = 477.3;
ball2._y = 483.6;
transporter1._x = 277.5;
transporter1._y = 313.8;
transporter2._x = 577.1;
transporter2._y = 391.8;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 219.1;
finish._y = 270;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_green == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
}
if (gray_is_hit_green == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_pink == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
}
if (gray_is_hit_pink == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_orange1 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
}
if (gray_is_hit_orange1 == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_red == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy.gotoAndStop(2);
_root.decoy2.gotoAndStop(3);
}
if (gray_is_hit_red == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(28);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l31");
};
ball1.onEnterFrame = function () {
if ((crate3.hitTest(transporter2) or crate2.hitTest(transporter2)) or bluewall.hitTest(transporter2)) {
transporter1._alpha = 67;
transporter2._alpha = 67;
transporter = true;
}
if (!transporter) {
if (crate2.hitTest(transporter1)) {
_root.transstart = true;
crate2._x = transporter2._x;
crate2._y = transporter2._y;
}
if (crate3.hitTest(transporter1)) {
_root.transstart = true;
crate3._x = transporter2._x;
crate3._y = transporter2._y;
}
}
if (!greenswitch_is_attached_to_crate4) {
orangewall_movement = false;
}
if (orangewall1.hitTest(_root.greenswitch.button) and (_root.greenswitch._currentframe == 1)) {
switchstart = true;
_root.greenswitch.gotoAndStop(2);
if (greenwall._y >= 425.1) {
greenwall_movement = false;
} else {
greenwall_movement = true;
}
}
if (this.hitTest(redkey)) {
keystart = true;
redkey._x = 100000 /* 0x0186A0 */;
redwall_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if ((crate2.hitTest(_root.orangeswitch.button) or crate3.hitTest(_root.orangeswitch.button)) and (_root.orangeswitch._currentframe == 1)) {
switchstart = true;
_root.orangeswitch.gotoAndStop(2);
if (orangewall1._y <= 279.4) {
orangewall1_movement = false;
} else if (greenswitch_is_attached_to_crate4 == true) {
orangewall_movement = true;
orangewall1_movement = true;
}
}
if ((crate2.hitTest(_root.pinkswitch.button) or crate3.hitTest(_root.pinkswitch.button)) and (_root.pinkswitch._currentframe == 1)) {
switchstart = true;
_root.pinkswitch.gotoAndStop(2);
if (pinkwall._x >= (((blacktip4._x - (blacktip4._width / 2)) - (pinkwall._width / 2)) - 0.1)) {
pinkwall_movement = false;
} else if (decoydone == false) {
pinkwall_movement = true;
}
}
if (crate1.hitTest(_root.blueswitch.button) and (_root.blueswitch._currentframe == 1)) {
switchstart = true;
_root.blueswitch.gotoAndStop(2);
if (bluewall._y <= 342.8) {
bluewall_movement = false;
} else {
bluewall_movement = true;
}
}
if (greenwall._y > 425.1) {
greenwall_movement = false;
soundstart = true;
greenwall._y = 425.1;
}
if (pinkwall.hitTest(blacktip4)) {
pinkwall_movement = false;
soundstart = true;
pinkwall._x = ((blacktip4._x - (blacktip4._width / 2)) - (pinkwall._width / 2)) - 0.1;
}
if (bluewall._y < 342.8) {
bluewall_movement = false;
soundstart = true;
bluewall._y = 342.8;
}
if (orangewall1._y < 279.4) {
orangewall1_movement = false;
soundstart = true;
orangewall1._y = 279.4;
}
if (redwall.hitTest(blacktip1)) {
redwall_movement = false;
soundstart = true;
redwall._x = ((blacktip1._x + (blacktip1._width / 2)) + (redwall._width / 2)) + 0.1;
}
if (scoresubmit28) {
scoresubmit = false;
} else if (scoresubmit28 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 28) or scoresubmit) {
level28_best_time = seconds;
scoresubmit28 = true;
savefile.data.scoresubmit28 = _root.scoresubmit28;
savefile.flush();
}
if (seconds < level28_best_time) {
level28_best_time = seconds;
}
savefile.data.level28_best_time = _root.level28_best_time;
savefile.flush();
if (_root.score <= 29) {
_root.score = 29;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(28);
_root.win.meter.gotoAndStop(29);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l31");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var28) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l34");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l31");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
cratey = crate1._y;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (greenswitch_is_attached_to_crate4 == true) {
greenswitch._x = crate4._x;
greenswitch._y = crate4._y;
}
ballx = ball1._x;
bally = ball1._y;
if (greenwall_movement) {
greenwall._y = greenwall._y + 1;
}
if (pinkwall_movement) {
pinkwall._x = pinkwall._x + 0.5;
}
if (orangewall1_movement) {
orangewall1._y = orangewall1._y - 0.45;
}
if (orangewall_movement) {
orangewall._x = orangewall._x - 0.5;
}
if (redwall_movement) {
redwall._x = redwall._x - 0.5;
}
if (bluewall_movement) {
bluewall._y = bluewall._y - 0.7;
}
differencegreen = ((ball1._y - greenwall._y) - (greenwall._height / 2)) - (ball1._height / 2);
differencegreen2 = ((ball2._y - greenwall._y) - (greenwall._height / 2)) - (ball2._height / 2);
distance_between_bottomwall_and_ball = Math.abs(((bottomwall._y - ball1._y) - (bottomwall._height / 2)) - (ball1._height / 2));
distance_between_bottomwall_and_ball2 = Math.abs(((bottomwall._y - ball2._y) - (bottomwall._height / 2)) - (ball2._height / 2));
distance_x_between_greenwall_and_ball = Math.abs(greenwall._x - ball1._x);
distance_x_between_greenwall_and_ball2 = Math.abs(greenwall._x - ball2._x);
if ((((greenwall_movement == true) and (differencegreen <= 0.2)) and (differencegreen >= -8)) and (distance_x_between_greenwall_and_ball < ((ball1._width / 2) + (greenwall._width / 2)))) {
ball1._y = ((greenwall._y + (greenwall._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((greenwall_movement == true) and (differencegreen2 <= 0.2)) and (differencegreen2 >= -8)) and (distance_x_between_greenwall_and_ball2 < ((ball2._width / 2) + (greenwall._width / 2)))) {
ball2._y = ((greenwall._y + (greenwall._height / 2)) + (ball2._height / 2)) + 0.2;
}
if (((((differencegreen <= 1) && (differencegreen > -2)) && (distance_between_bottomwall_and_ball <= 2)) && (distance_x_between_greenwall_and_ball < ((ball1._width / 2) + (greenwall._width / 2)))) or ((((differencegreen2 <= 0.5) && (differencegreen2 > -1)) && (distance_between_bottomwall_and_ball2 <= 0.5)) && (distance_x_between_greenwall_and_ball2 < ((ball2._width / 2) + (greenwall._width / 2))))) {
green_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differencepink = ((ball1._x - pinkwall._x) - (pinkwall._width / 2)) - (ball1._width / 2);
differencepink2 = ((ball2._x - pinkwall._x) - (pinkwall._width / 2)) - (ball2._width / 2);
distance_between_leftmiddlewall_and_ball = Math.abs(((middlewall._x - ball1._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_leftmiddlewall_and_ball2 = Math.abs(((middlewall._x - ball2._x) - (middlewall._width / 2)) - (ball2._width / 2));
distance_y_between_pinkwall_and_ball = Math.abs(pinkwall._y - ball1._y);
distance_y_between_pinkwall_and_ball2 = Math.abs(pinkwall._y - ball2._y);
if ((((pinkwall_movement == true) and (differencepink <= 0.2)) and (differencepink >= -8)) and (distance_y_between_pinkwall_and_ball < ((ball1._height / 2) + (pinkwall._height / 2)))) {
ball1._x = ((pinkwall._x + (pinkwall._width / 2)) + (ball1._width / 2)) + 0.2;
}
if ((((pinkwall_movement == true) and (differencepink2 <= 0.2)) and (differencepink2 >= -8)) and (distance_y_between_pinkwall_and_ball2 < ((ball2._height / 2) + (pinkwall._height / 2)))) {
ball2._x = ((pinkwall._x + (pinkwall._width / 2)) + (ball2._width / 2)) + 0.2;
}
if (((((differencepink <= 0.5) && (differencepink >= -1)) && (distance_between_leftmiddlewall_and_ball <= 0.5)) && (distance_y_between_pinkwall_and_ball < ((ball1._height / 2) + (pinkwall._height / 2)))) or ((((differencepink2 <= 0.5) && (differencepink2 >= -1)) && (distance_between_leftmiddlewall_and_ball2 <= 0.5)) && (distance_y_between_pinkwall_and_ball2 < ((ball2._height / 2) + (pinkwall._height / 2))))) {
pink_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differenceorange1 = ((orangewall1._y - ball1._y) - (orangewall1._height / 2)) - (ball1._height / 2);
differenceorange12 = ((orangewall1._y - (orangewall1._height / 2)) - ball2._y) - (ball2._height / 2);
distance_between_topwall_and_ball = Math.abs(((ball1._y - topwall._y) - (topwall._height / 2)) - (ball1._height / 2));
distance_between_topwall_and_ball2 = Math.abs(((ball2._y - topwall._y) - (topwall._height / 2)) - (ball2._height / 2));
distance_between_orangewall_and_ball = Math.abs(((ball1._y - orangewall._y) - (orangewall._height / 2)) - (ball1._height / 2));
distance_between_orangewall_and_ball2 = Math.abs(((ball2._y - orangewall._y) - (orangewall._height / 2)) - (ball2._height / 2));
distance_x_between_orangewall1_and_ball = Math.abs(orangewall1._x - ball1._x);
distance_x_between_orangewall1_and_ball2 = Math.abs(orangewall1._x - ball2._x);
distance_x_between_orangewall_and_ball = Math.abs(orangewall._x - ball1._x);
distance_x_between_orangewall_and_ball2 = Math.abs(orangewall._x - ball2._x);
if ((((orangewall1_movement == true) and (differenceorange1 <= 0.2)) and (differenceorange1 >= -8)) and (distance_x_between_orangewall1_and_ball < ((ball1._width / 2) + (orangewall1._width / 2)))) {
ball1._y = ((orangewall1._y - (orangewall1._height / 2)) - (ball1._height / 2)) - 0.2;
}
if ((((orangewall1_movement == true) and (differenceorange12 <= 0.2)) and (differenceorange12 >= -8)) and (distance_x_between_orangewall1_and_ball2 < ((ball2._width / 2) + (orangewall1._width / 2)))) {
ball2._y = ((orangewall1._y - (orangewall1._height / 2)) - (ball2._height / 2)) - 0.2;
}
if (((((differenceorange1 <= 0.5) && (differenceorange1 > -1)) && (distance_between_topwall_and_ball <= 0.5)) && (distance_x_between_orangewall1_and_ball < ((ball1._width / 2) + (orangewall1._width / 2)))) or ((((differenceorange12 <= 0.5) && (differenceorange12 > -1)) && (distance_between_topwall_and_ball2 <= 0.5)) && (distance_x_between_orangewall1_and_ball2 < ((ball2._width / 2) + (orangewall1._width / 2))))) {
orange1_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differenceorange1 <= 0.5) && (differenceorange1 > -1)) && (distance_between_orangewall_and_ball <= 0.5)) && (distance_x_between_orangewall1_and_ball < ((ball1._width / 2) + (orangewall1._width / 2)))) and (distance_x_between_orangewall_and_ball < ((ball1._width / 2) + (orangewall._width / 2)))) or (((((differenceorange12 <= 0.5) && (differenceorange12 > -1)) && (distance_between_orangewall_and_ball2 <= 0.5)) && (distance_x_between_orangewall1_and_ball2 < ((ball2._width / 2) + (orangewall1._width / 2)))) and (distance_x_between_orangewall_and_ball2 < ((ball2._width / 2) + (orangewall._width / 2))))) {
orange1_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differencered = ((redwall._x - (redwall._width / 2)) - (ball1._width / 2)) - ball1._x;
differencered2 = ((redwall._x - (redwall._width / 2)) - (ball2._width / 2)) - ball2._x;
distance_between_r2_and_ball = Math.abs(((ball1._x - r2._x) - (r2._width / 2)) - (ball1._width / 2));
distance_between_r2_and_ball2 = Math.abs(((ball2._x - r2._x) - (r2._width / 2)) - (ball2._width / 2));
distance_between_insidebottom_and_ball = Math.abs(((ball1._x - middlewall._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_insidebottom_and_ball2 = Math.abs(((ball2._x - middlewall._x) - (middlewall._width / 2)) - (ball2._width / 2));
distance_y_between_redwall_and_ball = Math.abs(redwall._y - ball1._y);
distance_y_between_redwall_and_ball2 = Math.abs(redwall._y - ball2._y);
if ((((redwall_movement == true) and (differencered <= 1)) and (differencered >= -8)) and (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) {
ball1._x = ((redwall._x - (redwall._width / 2)) - (ball1._width / 2)) - 0.2;
ball1_is_pushed_by_red_wall = true;
} else {
ball1_is_pushed_by_red_wall = false;
}
if ((((redwall_movement == true) and (differencered2 <= 0.2)) and (differencered2 >= -8)) and (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2)))) {
ball2._x = ((redwall._x - (redwall._width / 2)) - (ball2._width / 2)) - 0.2;
ball2_is_pushed_by_red_wall = true;
} else {
ball2_is_pushed_by_red_wall = false;
}
if (((((differencered <= 0.5) && (differencered >= -1)) && (((_root.distance_between_r2_and_ball <= 0.5) and (_root.y_in_position_with_r2 == true)) or ((_root.distance_between_insidebottom_and_ball <= 0.5) and (_root.y_in_position_with_insidebottom == true)))) && (distance_y_between_redwall_and_ball < ((ball1._height / 2) + (redwall._height / 2)))) or ((((differencered2 <= 0.5) && (differencered2 >= -1)) && (((_root.distance_between_r2_and_ball2 <= 0.5) and (_root.y_in_position_with_r22 == true)) or ((_root.distance_between_insidebottom_and_ball2 <= 0.5) and (_root.y_in_position_with_insidebottom2 == true)))) && (distance_y_between_redwall_and_ball2 < ((ball2._height / 2) + (redwall._height / 2))))) {
red_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differenceorange = ((orangewall._x - (orangewall._width / 2)) - (ball1._width / 2)) - ball1._x;
differenceorange2 = ((orangewall._x - (orangewall._width / 2)) - (ball2._width / 2)) - ball2._x;
distance_between_leftwall_and_ball = Math.abs(((ball1._x - leftwall._x) - (leftwall._width / 2)) - (ball1._width / 2));
distance_between_leftwall_and_ball2 = Math.abs(((ball2._x - leftwall._x) - (leftwall._width / 2)) - (ball2._width / 2));
distance_y_between_orangewall_and_ball = Math.abs(orangewall._y - ball1._y);
distance_y_between_orangewall_and_ball2 = Math.abs(orangewall._y - ball2._y);
if ((((orangewall_movement == true) and (differenceorange <= 0.2)) and (differenceorange >= -8)) and (distance_y_between_orangewall_and_ball < ((ball1._height / 2) + (orangewall._height / 2)))) {
ball1._x = ((orangewall._x - (orangewall._width / 2)) - (ball1._width / 2)) - 0.2;
ball1_is_pushed_by_orange_wall = true;
} else {
ball1_is_pushed_by_orange_wall = false;
}
if ((((orangewall_movement == true) and (differenceorange2 <= 0.2)) and (differenceorange2 >= -8)) and (distance_y_between_orangewall_and_ball2 < ((ball2._height / 2) + (orangewall._height / 2)))) {
ball2._x = ((orangewall._x - (orangewall._width / 2)) - (ball2._width / 2)) - 0.2;
ball2_is_pushed_by_orange_wall = true;
} else {
ball2_is_pushed_by_orange_wall = false;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (green_hit == true) {
black_is_hit_green = true;
}
if (pink_hit == true) {
black_is_hit_green = true;
}
if (orange1_hit == true) {
black_is_hit_orange1 = true;
}
if (red_hit == true) {
gray_is_hit_red = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (green_hit == true) {
gray_is_hit_green = true;
}
if (pink_hit == true) {
gray_is_hit_green = true;
}
if (orange1_hit == true) {
gray_is_hit_orange1 = true;
}
if (red_hit == true) {
black_is_hit_red = true;
}
}
ball_locator();
}
};
Instance of Symbol 1071 MovieClip "crate4" in Frame 30
onClipEvent (load) {
_root.hit_crate4 = false;
_root.ball1_and_crate4_rightside_touching = false;
_root.ball1_and_crate4_leftside_touching = false;
_root.ball2_and_crate4_rightside_touching = false;
_root.ball2_and_crate4_leftside_touching = false;
_root.cant_move_crate4_up_against_topwall = false;
_root.orange_wall_and_crate4_rightside_touching = false;
_root.crate4_against_orange_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
_root.ball2_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
_root.crate4_is_pushed_by_ball1_is_pushed_by_orangewall = false;
_root.crate4_is_pushed_by_ball2_is_pushed_by_orangewall = false;
_root.crate4_is_pushed_by_orange_wall = false;
}
onClipEvent (enterFrame) {
_root.distance_y_between_ball1_and_crate4 = Math.abs(_root.ball1._y - _y);
_root.difference_x_ball1_with_crate4_rightside = ((_root.ball1._x - _x) - (_width / 2)) - (_root.ball1._width / 2);
_root.difference_x_ball1_with_crate4_leftside = ((_x - _root.ball1._x) - (_width / 2)) - (_root.ball1._width / 2);
_root.distance_y_between_ball2_and_crate4 = Math.abs(_root.ball2._y - _y);
_root.difference_x_ball2_with_crate4_rightside = ((_root.ball2._x - _x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_ball2_with_crate4_leftside = ((_x - _root.ball2._x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_orange_with_crate4_left = ((_x - (_width / 2)) - _root.orangewall._x) - (_root.orangewall._width / 2);
_root.difference_x_orange_with_crate4_right = ((_root.orangewall._x - (_root.orangewall._width / 2)) - _x) - (_width / 2);
_root.difference_y_orange_with_crate4_up = ((_y - (_height / 2)) - _root.orangewall._y) - (_root.orangewall._height / 2);
_root.difference_y_orange_with_crate4_down = ((_root.orangewall._y - (_root.orangewall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_orangewall_and_crate4 = Math.abs(_root.orangewall._x - _x);
_root.distance_y_between_orangewall_and_crate4 = Math.abs(_root.orangewall._y - _y);
_root.difference_x_crate4_leftside_with_leftwall = ((_x - (_width / 2)) - (_root.leftwall._width / 2)) - _root.leftwall._x;
if (hitTest(_root.topwall) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_topwall = true;
}
if (((Math.abs(((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.topwall._x + (_root.topwall._width / 2)) + (_width / 2)))) and (_x > ((_root.topwall._x - (_root.topwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate4_up_against_topwall = true;
} else {
_root.cant_move_crate4_up_against_topwall = false;
}
if (hitTest(_root.orangewall)) {
_root.orangewall_crate4_hit = true;
if ((_root.hit_crate4 == true) and (_root.moveright == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_orange_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.moveleft == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_orange_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.movedown == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate4_down_against_orange_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.moveup == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_orange_wall = true;
}
}
} else {
_root.orangewall_crate4_hit = false;
}
if (((_root.difference_x_orange_with_crate4_right <= 0.3) && (_root.difference_x_orange_with_crate4_right >= -8)) && (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) {
_root.cant_move_crate4_right_against_orange_wall = true;
_root.orange_wall_and_crate4_rightside_touching = true;
} else {
_root.cant_move_crate4_right_against_orange_wall = false;
_root.orange_wall_and_crate4_rightside_touching = false;
}
if ((((_root.orangewall_movement == true) and (_root.orange_wall_and_crate4_rightside_touching == true)) and (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.orangewall._x - (_root.orangewall._width / 2)) - (_width / 2)) - 0.7);
_root.crate4_is_pushed_by_orange_wall = true;
}
if (((_root.difference_x_ball1_with_crate4_leftside <= 0.5) && (_root.difference_x_ball1_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate4_leftside_touching = true;
} else {
_root.ball1_and_crate4_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate4_leftside <= 0.3) && (_root.difference_x_ball2_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate4_leftside_touching = true;
} else {
_root.ball2_and_crate4_leftside_touching = false;
}
if (((_root.difference_x_ball1_with_crate4_rightside <= 0.3) && (_root.difference_x_ball1_with_crate4_rightside >= -8)) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate4_rightside_touching = true;
} else {
_root.ball1_and_crate4_rightside_touching = false;
}
if (((_root.difference_x_ball2_with_crate4_rightside <= 0.3) && (_root.difference_x_ball2_with_crate4_rightside >= -8)) && (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate4_rightside_touching = true;
} else {
_root.ball2_and_crate4_rightside_touching = false;
}
if (((((_root.ball1_and_crate4_leftside_touching == true) and (_root.crate4_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.orangewall_movement == true)) {
_root.ball1._x = (((_root.orangewall._x - (_root.orangewall._width / 2)) - _width) - (_root.ball1._width / 2)) - 0.5;
_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall = true;
} else {
_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
}
if (((((_root.ball2_and_crate4_leftside_touching == true) and (_root.crate4_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.orangewall_movement == true)) {
_root.ball2._x = (((_root.orangewall._x - (_root.orangewall._width / 2)) - _width) - (_root.ball2._width / 2)) - 0.5;
_root.ball2_is_pushed_by_crate4_is_pushed_by_orange_wall = true;
} else {
_root.ball2_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
}
if (((((_root.ball1_and_crate4_rightside_touching == true) and (_root.ball1_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveleft == false)) and (_currentframe == 1)) {
_root.cant_move_crate4_right_against_orange_wall = false;
_x = (((_root.ball1._x - (_root.ball1._width / 2)) - (_width / 2)) - 0.5);
_root.crate4_is_pushed_by_ball1_is_pushed_by_orangewall = true;
} else {
_root.crate4_is_pushed_by_ball1_is_pushed_by_orangewall = false;
}
if ((((_root.ball2_and_crate4_rightside_touching == true) and (_root.ball2_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveleft == false)) {
_x = (((_root.ball2._x - (_root.ball2._width / 2)) - (_width / 2)) - 0.5);
_root.crate4_is_pushed_by_ball2_is_pushed_by_orangewall = true;
} else {
_root.crate4_is_pushed_by_ball2_is_pushed_by_orangewall = false;
}
if ((((_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2))) and (_root.orangewall_movement == true)) and (_root.difference_x_orange_with_crate4_right < 0.5)) and (_root.difference_x_orange_with_crate4_right > -3)) {
_root.crate4_against_orange_wall_boundaries_prevention = true;
} else {
_root.crate4_against_orange_wall_boundaries_prevention = false;
}
if (((_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2))) and (_root.distance_y_between_orangewall_and_ball <= ((_root.ball1._height / 2) + (_root.orangewall._height / 2)))) and (_root.orangewall_movement == true)) {
_root.crate4_against_orange_wall_boundaries_prevention2 = true;
} else {
_root.crate4_against_orange_wall_boundaries_prevention2 = false;
}
if (((_root.difference_x_orange_with_crate4_left <= 0.3) && (_root.difference_x_orange_with_crate4_left >= -8)) && (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) {
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_left_wall = true;
} else {
_root.cant_move_crate4_left_against_orange_wall = false;
}
if (_root.crate4_against_orange_wall_boundaries_prevention == false) {
if (((_root.difference_y_orange_with_crate4_up <= 0.3) && (_root.difference_y_orange_with_crate4_up >= -8)) && (_root.distance_x_between_orangewall_and_crate4 < ((_width / 2) + (_root.orangewall._width / 2)))) {
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_topwall = true;
_root.cant_move_crate4_up_against_r1 = true;
_root.cant_move_crate4_up_against_r2 = true;
} else {
_root.cant_move_crate4_up_against_orange_wall = false;
}
if (((_root.difference_y_orange_with_crate4_down <= 0.3) && (_root.difference_y_orange_with_crate4_down >= -8)) && (_root.distance_x_between_orangewall_and_crate4 < ((_width / 2) + (_root.orangewall._width / 2)))) {
_root.cant_move_crate4_down_against_r6 = true;
_root.cant_move_crate4_down_against_bottomwall = true;
_root.cant_move_crate4_down_against_insidebottom = true;
} else {
_root.cant_move_crate4_down_against_orange_wall = false;
}
} else if ((((_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2))) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate4_leftside <= 0.3)) && (_root.difference_x_ball1_with_crate4_leftside >= -8)) {
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
} else {
_root.cant_move_crate4_down_against_orange_wall = false;
_root.cant_move_crate4_up_against_orange_wall = false;
}
if (((_root.orangewall_movement == true) and ((((_root.difference_x_ball1_with_crate4_leftside <= 0.7) && (_root.difference_x_ball1_with_crate4_leftside >= -6)) && (_root.distance_between_leftwall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate4 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate4_leftside <= 0.7) && (_root.difference_x_ball2_with_crate4_leftside >= -6)) && (_root.distance_between_leftwall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate4 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.orange1_hit = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate4_up_against_orange_wall = false;
_root.cant_move_crate4_down_against_orange_wall = false;
}
if (((_root.difference_x_crate4_leftside_with_leftwall <= 0.3) && (_root.difference_x_crate4_leftside_with_leftwall >= -8)) && (((_root.crate4_is_pushed_by_orange_wall == true) or (_root.crate4_is_pushed_by_ball1_is_pushed_by_orangewall == true)) or (_root.crate4_is_pushed_by_ball2_is_pushed_by_orangewall == true))) {
_root.greenswitch_is_attached_to_crate4 = false;
_root.decoy_crate.inside.gotoAndPlay(1);
_root.orangewall_movement = false;
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 20002;
}
}
Instance of Symbol 1071 MovieClip "crate1" in Frame 30
onClipEvent (load) {
_root.hit_crate1 = false;
_root.ball1_and_crate1_rightside_touching = false;
_root.ball1_and_crate1_leftside_touching = false;
_root.ball2_and_crate1_rightside_touching = false;
_root.ball2_and_crate1_leftside_touching = false;
_root.cant_move_crate1_right_against_r5 = false;
_root.cant_move_crate1_left_against_r6 = false;
_root.cant_move_crate1_left_against_insidebottom = false;
_root.cant_move_crate1_left_against_r2 = false;
_root.cant_move_crate1_down_against_r6 = false;
_root.cant_move_crate1_down_against_bottomwall = false;
_root.cant_move_crate1_down_against_insidebottom = false;
_root.cant_move_crate1_up_against_orangewall2 = false;
_root.cant_move_crate1_up_against_r1 = false;
_root.cant_move_crate1_up_against_r2 = false;
_root.red_wall_and_crate1_rightside_touching = false;
_root.crate1_against_red_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
_root.crate1_is_pushed_by_red_wall = false;
}
onClipEvent (enterFrame) {
_root.distance_y_between_ball1_and_crate1 = Math.abs(_root.ball1._y - _y);
_root.difference_x_ball1_with_crate1_rightside = ((_root.ball1._x - _x) - (_width / 2)) - (_root.ball1._width / 2);
_root.difference_x_ball1_with_crate1_leftside = ((_x - _root.ball1._x) - (_width / 2)) - (_root.ball1._width / 2);
_root.distance_y_between_ball2_and_crate1 = Math.abs(_root.ball2._y - _y);
_root.difference_x_ball2_with_crate1_rightside = ((_root.ball2._x - _x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_ball2_with_crate1_leftside = ((_x - _root.ball2._x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_red_with_crate1_left = ((_x - (_width / 2)) - _root.redwall._x) - (_root.redwall._width / 2);
_root.difference_x_red_with_crate1_right = ((_root.redwall._x - (_root.redwall._width / 2)) - _x) - (_width / 2);
_root.difference_y_red_with_crate1_up = ((_y - (_height / 2)) - _root.redwall._y) - (_root.redwall._height / 2);
_root.difference_y_red_with_crate1_down = ((_root.redwall._y - (_root.redwall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_redwall_and_crate1 = Math.abs(_root.redwall._x - _x);
_root.distance_y_between_redwall_and_crate1 = Math.abs(_root.redwall._y - _y);
_root.difference_x_crate1_leftside_with_blacktip1 = ((_x - (_width / 2)) - (_root.blacktip1._width / 2)) - _root.blacktip1._x;
_root.difference_x_crate1_leftside_with_blacktip2 = ((_x - (_width / 2)) - (_root.blacktip2._width / 2)) - _root.blacktip2._x;
_root.difference_x_crate1_leftside_with_r2 = ((_x - (_width / 2)) - (_root.r2._width / 2)) - _root.r2._x;
_root.difference_x_crate1_leftside_with_insidetop = (_x - (_width / 2)) - 400;
if (hitTest(_root.r6) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.r6.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_r6 = true;
}
if (((Math.abs(((_x - _root.r6._x) - (_root.r6._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.r6._y + (_root.r6._height / 2)) + (_height / 2)))) and (_y > ((_root.r6._y - (_root.r6._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_left_against_r6 = true;
} else {
_root.cant_move_crate1_left_against_r6 = false;
}
if (hitTest(_root.r2) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.r2.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_r2 = true;
}
if (((Math.abs(((_x - _root.r2._x) - (_root.r2._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.r2._y + (_root.r2._height / 2)) + (_height / 2)))) and (_y > ((_root.r2._y - (_root.r2._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_left_against_r2 = true;
} else {
_root.cant_move_crate1_left_against_r2 = false;
}
if (hitTest(_root.middlewall.insidebottom) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.insidebottom.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_insidebottom = true;
}
if (((Math.abs(((_x - _root.middlewall.insidebottom._x) - (_root.middlewall.insidebottom._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.middlewall.insidebottom._y + (_root.middlewall.insidebottom._height / 2)) + (_height / 2)))) and (_y > ((_root.middlewall.insidebottom._y - (_root.middlewall.insidebottom._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_left_against_insidebottom = true;
} else {
_root.cant_move_crate1_left_against_insidebottom = false;
}
if (hitTest(_root.r5) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.r5.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_r5 = true;
}
if (((Math.abs(((_root.r5._x - _x) - (_root.r5._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.r5._y + (_root.r5._height / 2)) + (_height / 2)))) and (_y > ((_root.r5._y - (_root.r5._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_r5 = true;
} else {
_root.cant_move_crate1_right_against_r5 = false;
}
if (hitTest(_root.orangewall) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_orangewall2 = true;
}
if (((Math.abs(((_y - _root.orangewall._y) - (_root.orangewall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.orangewall._x + (_root.orangewall._width / 2)) + (_width / 2)))) and (_x > ((_root.orangewall._x - (_root.orangewall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_orangewall2 = true;
} else {
_root.cant_move_crate1_up_against_orangewall2 = false;
}
if (hitTest(_root.r1) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.r1.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_r1 = true;
}
if (((Math.abs(((_y - _root.r1._y) - (_root.r1._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.r1._x + (_root.r1._width / 2)) + (_width / 2)))) and (_x > ((_root.r1._x - (_root.r1._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_r1 = true;
} else {
_root.cant_move_crate1_up_against_r1 = false;
}
if (hitTest(_root.r2) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.r2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_r2 = true;
}
if (((Math.abs(((_y - _root.r2._y) - (_root.r2._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.r2._x + (_root.r2._width / 2)) + (_width / 2)))) and (_x > ((_root.r2._x - (_root.r2._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_r2 = true;
} else {
_root.cant_move_crate1_up_against_r2 = false;
}
if (hitTest(_root.r6) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.r6.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_r6 = true;
}
if (((Math.abs(((_root.r6._y - _y) - (_root.r6._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.r6._x + (_root.r6._width / 2)) + (_width / 2)))) and (_x > ((_root.r6._x - (_root.r6._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_r6 = true;
} else {
_root.cant_move_crate1_down_against_r6 = false;
}
if (hitTest(_root.bottomwall) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_bottomwall = true;
}
if (((Math.abs(((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.bottomwall._x + (_root.bottomwall._width / 2)) + (_width / 2)))) and (_x > ((_root.bottomwall._x - (_root.bottomwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_bottomwall = true;
} else {
_root.cant_move_crate1_down_against_bottomwall = false;
}
if (hitTest(_root.middlewall.insidebottom) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.insidebottom.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_insidebottom = true;
}
if (((Math.abs(((_root.middlewall.insidebottom._y - _y) - (_root.middlewall.insidebottom._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.middlewall.insidebottom._x + (_root.middlewall.insidebottom._width / 2)) + (_width / 2)))) and (_x > ((_root.middlewall.insidebottom._x - (_root.middlewall.insidebottom._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_insidebottom = true;
} else {
_root.cant_move_crate1_down_against_insidebottom = false;
}
if (hitTest(_root.redwall)) {
_root.redwall_crate1_hit = true;
if ((_root.hit_crate1 == true) and (_root.movedown == true)) {
if ((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_red_wall = true;
}
}
if ((_root.hit_crate1 == true) and (_root.moveup == true)) {
if ((_root.crate1_against_red_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.5));
_root.cant_move_crate1_up_against_red_wall = true;
}
}
} else {
_root.redwall_crate1_hit = false;
}
if (((_root.difference_x_red_with_crate1_right <= 0.3) && (_root.difference_x_red_with_crate1_right >= -8)) && (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) {
_root.cant_move_crate1_right_against_red_wall = true;
_root.red_wall_and_crate1_rightside_touching = true;
} else {
_root.cant_move_crate1_right_against_red_wall = false;
_root.red_wall_and_crate1_rightside_touching = false;
}
if ((((_root.redwall_movement == true) and (_root.red_wall_and_crate1_rightside_touching == true)) and (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.redwall._x - (_root.redwall._width / 2)) - (_width / 2)) - 0.7);
_root.crate1_is_pushed_by_red_wall = true;
}
if (((_root.difference_x_ball1_with_crate1_leftside <= 0.5) && (_root.difference_x_ball1_with_crate1_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate1_leftside_touching = true;
} else {
_root.ball1_and_crate1_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate1_leftside <= 0.3) && (_root.difference_x_ball2_with_crate1_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate1_leftside_touching = true;
} else {
_root.ball2_and_crate1_leftside_touching = false;
}
if (((_root.difference_x_ball1_with_crate1_rightside <= 2) && (_root.difference_x_ball1_with_crate1_rightside >= -8)) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate1_rightside_touching = true;
} else {
_root.ball1_and_crate1_rightside_touching = false;
}
if (((_root.difference_x_ball2_with_crate1_rightside <= 0.3) && (_root.difference_x_ball2_with_crate1_rightside >= -8)) && (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate1_rightside_touching = true;
} else {
_root.ball2_and_crate1_rightside_touching = false;
}
if (((((_root.ball1_and_crate1_leftside_touching == true) and (_root.crate1_is_pushed_by_red_wall == true)) and (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.redwall_movement == true)) {
_root.ball1._x = (((_root.redwall._x - (_root.redwall._width / 2)) - _width) - (_root.ball1._width / 2)) - 0.5;
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = true;
} else {
_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall = false;
}
if (((((_root.ball2_and_crate1_leftside_touching == true) and (_root.crate1_is_pushed_by_red_wall == true)) and (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.redwall_movement == true)) {
_root.ball2._x = (((_root.redwall._x - (_root.redwall._width / 2)) - _width) - (_root.ball2._width / 2)) - 0.5;
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = true;
} else {
_root.ball2_is_pushed_by_crate1_is_pushed_by_red_wall = false;
}
if (((((_root.ball1_and_crate1_rightside_touching == true) and (_root.ball1_is_pushed_by_red_wall == true)) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveleft == false)) and (_currentframe == 1)) {
_root.cant_move_crate1_right_against_red_wall = false;
_x = (((_root.ball1._x - (_root.ball1._width / 2)) - (_width / 2)) - 2);
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = true;
} else {
_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall = false;
}
if ((((_root.ball2_and_crate1_rightside_touching == true) and (_root.ball2_is_pushed_by_red_wall == true)) and (_root.distance_y_between_ball2_and_crate1 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveleft == false)) {
_x = (((_root.ball2._x - (_root.ball2._width / 2)) - (_width / 2)) - 0.5);
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = true;
} else {
_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall = false;
}
if ((((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) and (_root.redwall_movement == true)) and (_root.difference_x_red_with_crate1_right < 0.5)) and (_root.difference_x_red_with_crate1_right > -3)) {
_root.crate1_against_red_wall_boundaries_prevention = true;
} else {
_root.crate1_against_red_wall_boundaries_prevention = false;
}
if (((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) and (_root.distance_y_between_redwall_and_ball <= ((_root.ball1._height / 2) + (_root.redwall._height / 2)))) and (_root.redwall_movement == true)) {
_root.crate1_against_red_wall_boundaries_prevention2 = true;
} else {
_root.crate1_against_red_wall_boundaries_prevention2 = false;
}
if (((_root.difference_x_red_with_crate1_left <= 0.3) && (_root.difference_x_red_with_crate1_left >= -8)) && (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) {
_root.cant_move_crate1_left_against_red_wall = true;
_root.cant_move_crate1_left_against_left_wall = true;
} else {
_root.cant_move_crate1_left_against_red_wall = false;
}
if (_root.crate1_against_red_wall_boundaries_prevention == false) {
if (((_root.difference_y_red_with_crate1_up <= 0.3) && (_root.difference_y_red_with_crate1_up >= -8)) && (_root.distance_x_between_redwall_and_crate1 < ((_width / 2) + (_root.redwall._width / 2)))) {
_root.cant_move_crate1_up_against_red_wall = true;
_root.cant_move_crate1_up_against_orangewall2 = true;
_root.cant_move_crate1_up_against_r1 = true;
_root.cant_move_crate1_up_against_r2 = true;
} else {
_root.cant_move_crate1_up_against_red_wall = false;
}
if (((_root.difference_y_red_with_crate1_down <= 0.3) && (_root.difference_y_red_with_crate1_down >= -8)) && (_root.distance_x_between_redwall_and_crate1 < ((_width / 2) + (_root.redwall._width / 2)))) {
_root.cant_move_crate1_down_against_r6 = true;
_root.cant_move_crate1_down_against_bottomwall = true;
_root.cant_move_crate1_down_against_insidebottom = true;
} else {
_root.cant_move_crate1_down_against_red_wall = false;
}
} else if ((((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) && (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate1_leftside <= 0.3)) && (_root.difference_x_ball1_with_crate1_leftside >= -8)) {
_root.cant_move_crate1_down_against_red_wall = true;
_root.cant_move_crate1_up_against_red_wall = true;
_root.cant_move_crate1_left_against_red_wall = true;
_root.cant_move_crate1_right_against_red_wall = true;
} else {
_root.cant_move_crate1_down_against_red_wall = false;
_root.cant_move_crate1_up_against_red_wall = false;
}
if (_root.ball1._y > (_root.r2._y + (_root.r2._height / 2))) {
_root.y_in_position_with_insidebottom = true;
} else {
_root.y_in_position_with_insidebottom = false;
}
if (_root.ball2._y > 213.6) {
_root.y_in_position_with_insidebottom2 = true;
} else {
_root.y_in_position_with_insidebottom2 = false;
}
if ((_root.ball1._y - (_root.ball1._height / 2)) < (_root.r2._y + (_root.r2._height / 2))) {
_root.y_in_position_with_r2 = true;
} else {
_root.y_in_position_with_r2 = false;
}
if ((_root.ball2._y - (_root.ball2._height / 2)) < (_root.r2._y + (_root.r2._height / 2))) {
_root.y_in_position_with_r22 = true;
} else {
_root.y_in_position_with_r22 = false;
}
if (((_root.redwall_movement == true) and ((((_root.difference_x_ball1_with_crate1_leftside <= 0.7) && (_root.difference_x_ball1_with_crate1_leftside >= -6)) && (((_root.distance_between_r2_and_ball <= 0.5) and (_root.y_in_position_with_r2 == true)) or ((_root.distance_between_insidebottom_and_ball <= 0.5) and (_root.y_in_position_with_insidebottom == true)))) && (_root.distance_y_between_ball1_and_crate1 < ((_root.ball1._height / 2) + (_height / 2))))) or (((((_root.redwall_movement == true) && (_root.difference_x_ball2_with_crate1_leftside <= 0.7)) && (_root.difference_x_ball2_with_crate1_leftside >= -6)) && (((_root.distance_between_r2_and_ball2 <= 0.5) and (_root.y_in_position_with_r22 == true)) or ((_root.distance_between_insidebottom_and_ball2 <= 0.5) and (_root.y_in_position_with_insidebottom2 == true)))) && (_root.distance_y_between_ball2_and_crate1 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.red_hit = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate1_up_against_red_wall = false;
_root.cant_move_crate1_down_against_red_wall = false;
}
if (((((((((_y > 245.6) and (_y < 254.2)) and (_root.difference_x_crate1_leftside_with_blacktip2 <= 0.3)) or (((_y < 223.7) and (_y > 214.8)) and (_root.difference_x_crate1_leftside_with_blacktip1 <= 0.3))) or (((_y < 214.8) and (_root.difference_x_crate1_leftside_with_r2 <= 0.5)) and (_root.redwall_movement == true))) or ((_y > 254.2) and (_root.difference_x_crate1_leftside_with_insidetop <= 0.3))) && (_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2)))) and ((_root.distance_y_between_redwall_and_crate1 < ((_height / 2) + (_root.redwall._height / 2))) or ((_root.distance_y_between_redwall_and_ball < ((_root.ball1._height / 2) + (_root.redwall._height / 2))) and (_root.distance_y_between_ball1_and_crate1 < ((_height / 2) + (_root.ball1._height / 2)))))) and (((_root.crate1_is_pushed_by_red_wall == true) or ((_root.ball1_and_crate1_rightside_touching == true) and (_root.ball1_is_pushed_by_red_wall == true))) or (_root.crate1_is_pushed_by_ball2_is_pushed_by_redwall == true))) {
_root.redkey_is_attached_to_crate1 = false;
_root.decoy_crate.inside.gotoAndPlay(1);
_root.redwall_movement = false;
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 20002;
}
}
Instance of Symbol 1071 MovieClip "crate2" in Frame 30
onClipEvent (load) {
_root.cant_move_crate2_right_against_l6 = false;
_root.cant_move_crate2_right_against_insidetop = false;
_root.cant_move_crate2_right_against_l1 = false;
_root.cant_move_crate2_right_against_insidebottom = false;
_root.cant_move_crate2_right_against_greenwall = false;
_root.cant_move_crate2_left_against_leftwall = false;
_root.cant_move_crate2_left_against_orangewall1 = false;
_root.decoydone = false;
_root.cant_move_crate2_down_against_l6 = false;
_root.cant_move_crate2_down_against_l4 = false;
_root.cant_move_crate2_down_against_bottomwall = false;
_root.cant_move_crate2_down_against_insidetop = false;
_root.cant_move_crate2_down_against_orangewall1 = false;
_root.cant_move_crate2_down_against_pinkwall = false;
_root.cant_move_crate2_up_against_topwall = false;
_root.cant_move_crate2_up_against_l1 = false;
_root.cant_move_crate2_up_against_crate3 = false;
_root.cant_move_crate2_down_against_crate3 = false;
_root.cant_move_crate2_left_against_crate3 = false;
_root.cant_move_crate2_right_against_crate3 = false;
}
onClipEvent (enterFrame) {
if (hitTest(_root.orangewall1) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall1.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate2_left_against_orangewall1 = true;
}
if (((Math.abs(((_x - _root.orangewall1._x) - (_root.orangewall1._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.orangewall1._y + (_root.orangewall1._height / 2)) + (_height / 2)))) and (_y > ((_root.orangewall1._y - (_root.orangewall1._height / 2)) - (_height / 2)))) {
_root.cant_move_crate2_left_against_orangewall1 = true;
} else {
_root.cant_move_crate2_left_against_orangewall1 = false;
}
if (hitTest(_root.leftwall) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate2_left_against_leftwall = true;
}
if (((Math.abs(((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.leftwall._y + (_root.leftwall._height / 2)) + (_height / 2)))) and (_y > ((_root.leftwall._y - (_root.leftwall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate2_left_against_leftwall = true;
} else {
_root.cant_move_crate2_left_against_leftwall = false;
}
if (hitTest(_root.l6) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.l6.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate2_right_against_l6 = true;
}
if (((Math.abs(((_root.l6._x - _x) - (_root.l6._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.l6._y + (_root.l6._height / 2)) + (_height / 2)))) and (_y > ((_root.l6._y - (_root.l6._height / 2)) - (_height / 2)))) {
_root.cant_move_crate2_right_against_l6 = true;
} else {
_root.cant_move_crate2_right_against_l6 = false;
}
if (hitTest(_root.middlewall.insidetop) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.insidetop.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate2_right_against_insidetop = true;
}
if (((Math.abs(((_root.middlewall.insidetop._x - _x) - (_root.middlewall.insidetop._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.middlewall.insidetop._y + (_root.middlewall.insidetop._height / 2)) + (_height / 2)))) and (_y > ((_root.middlewall.insidetop._y - (_root.middlewall.insidetop._height / 2)) - (_height / 2)))) {
_root.cant_move_crate2_right_against_insidetop = true;
} else {
_root.cant_move_crate2_right_against_insidetop = false;
}
if (hitTest(_root.topinside) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.topinside.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate2_right_against_l1 = true;
}
if (((Math.abs(((_root.topinside._x - _x) - (_root.topinside._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.topinside._y + (_root.topinside._height / 2)) + (_height / 2)))) and (_y > ((_root.topinside._y - (_root.topinside._height / 2)) - (_height / 2)))) {
_root.cant_move_crate2_right_against_l1 = true;
} else {
_root.cant_move_crate2_right_against_l1 = false;
}
if (hitTest(_root.middlewall.insidebottom) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.insidebottom.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate2_right_against_insidebottom = true;
}
if (((Math.abs(((_root.middlewall.insidebottom._x - _x) - (_root.middlewall.insidebottom._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.middlewall.insidebottom._y + (_root.middlewall.insidebottom._height / 2)) + (_height / 2)))) and (_y > ((_root.middlewall.insidebottom._y - (_root.middlewall.insidebottom._height / 2)) - (_height / 2)))) {
_root.cant_move_crate2_right_against_insidebottom = true;
} else {
_root.cant_move_crate2_right_against_insidebottom = false;
}
if (hitTest(_root.l1) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.l1.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate2_right_against_l1 = true;
}
if (((Math.abs(((_root.l1._x - _x) - (_root.l1._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.l1._y + (_root.l1._height / 2)) + (_height / 2)))) and (_y > ((_root.l1._y - (_root.l1._height / 2)) - (_height / 2)))) {
_root.cant_move_crate2_right_against_l1 = true;
} else {
_root.cant_move_crate2_right_against_l1 = false;
}
if (hitTest(_root.greenwall) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate2_right_against_greenwall = true;
}
if (((Math.abs(((_root.greenwall._x - _x) - (_root.greenwall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.greenwall._y + (_root.greenwall._height / 2)) + (_height / 2)))) and (_y > ((_root.greenwall._y - (_root.greenwall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate2_right_against_greenwall = true;
} else {
_root.cant_move_crate2_right_against_greenwall = false;
}
if (hitTest(_root.topwall) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate2_up_against_topwall = true;
}
if (((Math.abs(((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.topwall._x + (_root.topwall._width / 2)) + (_width / 2)))) and (_x > ((_root.topwall._x - (_root.topwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_up_against_topwall = true;
} else {
_root.cant_move_crate2_up_against_topwall = false;
}
if (hitTest(_root.l1) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.l1.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate2_up_against_l1 = true;
}
if (((Math.abs(((_y - _root.l1._y) - (_root.l1._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l1._x + (_root.l1._width / 2)) + (_width / 2)))) and (_x > ((_root.l1._x - (_root.l1._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_up_against_l1 = true;
} else {
_root.cant_move_crate2_up_against_l1 = false;
}
if (hitTest(_root.l2) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.l2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate2_up_against_l1 = true;
}
if (((Math.abs(((_y - _root.l2._y) - (_root.l2._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l2._x + (_root.l2._width / 2)) + (_width / 2)))) and (_x > ((_root.l2._x - (_root.l2._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_up_against_l1 = true;
} else {
_root.cant_move_crate2_up_against_l1 = false;
}
if (hitTest(_root.l3) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.l3.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate2_up_against_l1 = true;
}
if (((Math.abs(((_y - _root.l3._y) - (_root.l3._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l3._x + (_root.l3._width / 2)) + (_width / 2)))) and (_x > ((_root.l3._x - (_root.l3._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_up_against_l1 = true;
} else {
_root.cant_move_crate2_up_against_l1 = false;
}
if (hitTest(_root.pinkwall) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate2_down_against_pinkwall = true;
}
if (((Math.abs(((_root.pinkwall._y - _y) - (_root.pinkwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.pinkwall._x + (_root.pinkwall._width / 2)) + (_width / 2)))) and (_x > ((_root.pinkwall._x - (_root.pinkwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_down_against_pinkwall = true;
} else {
_root.cant_move_crate2_down_against_pinkwall = false;
}
if (hitTest(_root.l5) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.l5.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate2_down_against_pinkwall = true;
}
if (((Math.abs(((_root.l5._y - _y) - (_root.l5._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l5._x + (_root.l5._width / 2)) + (_width / 2)))) and (_x > ((_root.l5._x - (_root.l5._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_down_against_pinkwall = true;
} else {
_root.cant_move_crate2_down_against_pinkwall = false;
}
if (hitTest(_root.bottomwall) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate2_down_against_bottomwall = true;
}
if (((Math.abs(((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.bottomwall._x + (_root.bottomwall._width / 2)) + (_width / 2)))) and (_x > ((_root.bottomwall._x - (_root.bottomwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_down_against_bottomwall = true;
} else {
_root.cant_move_crate2_down_against_bottomwall = false;
}
if (hitTest(_root.l6) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.l6.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate2_down_against_l6 = true;
}
if (((Math.abs(((_root.l6._y - _y) - (_root.l6._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l6._x + (_root.l6._width / 2)) + (_width / 2)))) and (_x > ((_root.l6._x - (_root.l6._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_down_against_l6 = true;
} else {
_root.cant_move_crate2_down_against_l6 = false;
}
if (hitTest(_root.l4) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.l4.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate2_down_against_l4 = true;
}
if (((Math.abs(((_root.l4._y - _y) - (_root.l4._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l4._x + (_root.l4._width / 2)) + (_width / 2)))) and (_x > ((_root.l4._x - (_root.l4._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_down_against_l4 = true;
} else {
_root.cant_move_crate2_down_against_l4 = false;
}
if (hitTest(_root.orangewall1) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall1.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate2_down_against_orangewall1 = true;
}
if (((Math.abs(((_root.orangewall1._y - _y) - (_root.orangewall1._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.orangewall1._x + (_root.orangewall1._width / 2)) + (_width / 2)))) and (_x > ((_root.orangewall1._x - (_root.orangewall1._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_down_against_orangewall1 = true;
} else {
_root.cant_move_crate2_down_against_orangewall1 = false;
}
if (_root.hit_crate2) {
if (hitTest(_root.crate3) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate3.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate2_up_against_crate3 = true;
}
if ((((((_y - _root.crate3._y) - (_root.crate3._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate3._y) - (_root.crate3._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate3._x - _x) < ((_width / 2) + (_root.crate3._width / 2)))) {
_root.cant_move_crate2_up_against_crate3 = true;
} else {
_root.cant_move_crate2_up_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate3.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate2_down_against_crate3 = true;
}
if ((((((_root.crate3._y - _y) - (_root.crate3._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate3._y - _y) - (_root.crate3._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate3._x - _x) < ((_width / 2) + (_root.crate3._width / 2)))) {
_root.cant_move_crate2_down_against_crate3 = true;
} else {
_root.cant_move_crate2_down_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate3.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate2_left_against_crate3 = true;
}
if ((((((_x - _root.crate3._x) - (_root.crate3._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate3._x) - (_root.crate3._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate3._y - _y) < ((_height / 2) + (_root.crate3._height / 2)))) {
_root.cant_move_crate2_left_against_crate3 = true;
} else {
_root.cant_move_crate2_left_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate3.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate2_right_against_crate3 = true;
}
if ((((((_root.crate3._x - _x) - (_root.crate3._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate3._x - _x) - (_root.crate3._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate3._y - _y) < ((_height / 2) + (_root.crate3._height / 2)))) {
_root.cant_move_crate2_right_against_crate3 = true;
} else {
_root.cant_move_crate2_right_against_crate3 = false;
}
}
_root.difference_y_blue_with_crate2_bottom = ((_root.bluewall._y - (_root.bluewall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_bluewall_and_crate2 = Math.abs(_root.bluewall._x - _x);
if (((_root.difference_y_blue_with_crate2_bottom <= 0.3) && (_root.difference_y_blue_with_crate2_bottom >= -8)) && (_root.distance_x_between_bluewall_and_crate2 < ((_width / 2) + (_root.bluewall._width / 2)))) {
_root.blue_wall_and_crate2_bottomside_touching = true;
} else {
_root.blue_wall_and_crate2_bottomside_touching = false;
}
if ((((_root.bluewall_movement == true) and (_root.blue_wall_and_crate2_bottomside_touching == true)) and (_root.distance_x_between_bluewall_and_crate2 < ((_width / 2) + (_root.bluewall._width / 2)))) and (_currentframe == 1)) {
_y = (((_root.bluewall._y - (_root.bluewall._height / 2)) - (_height / 2)) - 0.2);
if (((((((_y - _root.crate3._y) - (_root.crate3._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate3._y) - (_root.crate3._height / 2)) - (_height / 2)) >= -2)) and (Math.abs(_root.crate3._x - _x) < ((_width / 2) + (_root.crate3._width / 2)))) and (_root.crate3._x > 500)) {
_root.crate3._y = ((_root.bluewall._y - (_root.bluewall._height / 2)) - _height) - (_root.crate3._height / 2);
if ((((((_root.crate3._y - _root.topwall._y) - (_root.topwall._height / 2)) - (_root.crate3._height / 2)) <= 0.3) and (_root.crate3._x < ((_root.topwall._x + (_root.topwall._width / 2)) + (_root.crate3._width / 2)))) and (_root.crate3._x > ((_root.topwall._x - (_root.topwall._width / 2)) - (_root.crate3._width / 2)))) {
_root.bluewall_movement = false;
_root.crate3.gotoAndStop(2);
}
}
}
_root.difference_x_pink_with_crate2_leftside = ((_x - _root.pinkwall._x) - (_root.pinkwall._width / 2)) - (_width / 2);
_root.distance_y_between_pinkwall_and_crate2 = Math.abs(_root.pinkwall._y - _y);
if (((_root.difference_x_pink_with_crate2_leftside <= 1) && (_root.difference_x_pink_with_crate2_leftside >= -8)) && (_root.distance_y_between_pinkwall_and_crate2 < ((_height / 2) + (_root.pinkwall._height / 2)))) {
_root.pink_wall_and_crate2_leftside_touching = true;
} else {
_root.pink_wall_and_crate2_leftside_touching = false;
}
if ((((_root.pinkwall_movement == true) and (_root.pink_wall_and_crate2_leftside_touching == true)) and (_root.distance_y_between_pinkwall_and_crate2 < ((_height / 2) + (_root.pinkwall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.pinkwall._x + (_root.pinkwall._width / 2)) + (_width / 2)) + 1);
_root.crate2_is_pushed_by_pink_wall = true;
} else {
_root.crate2_is_pushed_by_pink_wall = false;
}
_root.difference_x_crate2_rightside_with_blacktip3 = ((_root.blacktip3._x - _x) - (_width / 2)) - (_root.blacktip3._width / 2);
_root.difference_x_crate2_rightside_with_blacktip4 = ((_root.blacktip4._x - _x) - (_width / 2)) - (_root.blacktip4._width / 2);
_root.difference_x_crate2_rightside_with_insidetop = (300 - _x) - (_width / 2);
if ((((((_y > 143.6) and (_y < 148.6)) and (_root.difference_x_crate2_rightside_with_blacktip3 <= 0.3)) or ((_y < 143.6) and (_root.difference_x_crate2_rightside_with_insidetop <= 0.3))) or ((_y > 156.1) and (_root.difference_x_crate2_rightside_with_blacktip4 <= 0.3))) && (_root.crate2_is_pushed_by_pink_wall == true)) {
_root.decoy_crate.inside.gotoAndPlay(1);
_root.pinkwall_movement = false;
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 20002;
_root.decoydone = true;
}
}
Instance of Symbol 1071 MovieClip "crate3" in Frame 30
onClipEvent (load) {
_root.cant_move_crate3_right_against_l6 = false;
_root.cant_move_crate3_right_against_insidetop = false;
_root.cant_move_crate3_right_against_l1 = false;
_root.cant_move_crate3_right_against_insidebottom = false;
_root.cant_move_crate3_right_against_greenwall = false;
_root.cant_move_crate3_left_against_leftwall = false;
_root.cant_move_crate3_left_against_orangewall1 = false;
_root.cant_move_crate3_down_against_l6 = false;
_root.cant_move_crate3_down_against_l4 = false;
_root.cant_move_crate3_down_against_bottomwall = false;
_root.cant_move_crate3_down_against_insidetop = false;
_root.cant_move_crate3_down_against_orangewall1 = false;
_root.cant_move_crate3_down_against_pinkwall = false;
_root.cant_move_crate3_up_against_topwall = false;
_root.cant_move_crate3_up_against_l1 = false;
_root.cant_move_crate3_up_against_crate2 = false;
_root.cant_move_crate3_down_against_crate2 = false;
_root.cant_move_crate3_left_against_crate2 = false;
_root.cant_move_crate3_right_against_crate2 = false;
}
onClipEvent (enterFrame) {
if (hitTest(_root.orangewall1) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall1.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate3_left_against_orangewall1 = true;
}
if (((Math.abs(((_x - _root.orangewall1._x) - (_root.orangewall1._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.orangewall1._y + (_root.orangewall1._height / 2)) + (_height / 2)))) and (_y > ((_root.orangewall1._y - (_root.orangewall1._height / 2)) - (_height / 2)))) {
_root.cant_move_crate3_left_against_orangewall1 = true;
} else {
_root.cant_move_crate3_left_against_orangewall1 = false;
}
if (hitTest(_root.leftwall) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate3_left_against_leftwall = true;
}
if (((Math.abs(((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.leftwall._y + (_root.leftwall._height / 2)) + (_height / 2)))) and (_y > ((_root.leftwall._y - (_root.leftwall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate3_left_against_leftwall = true;
} else {
_root.cant_move_crate3_left_against_leftwall = false;
}
if (hitTest(_root.l6) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.l6.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate3_right_against_l6 = true;
}
if (((Math.abs(((_root.l6._x - _x) - (_root.l6._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.l6._y + (_root.l6._height / 2)) + (_height / 2)))) and (_y > ((_root.l6._y - (_root.l6._height / 2)) - (_height / 2)))) {
_root.cant_move_crate3_right_against_l6 = true;
} else {
_root.cant_move_crate3_right_against_l6 = false;
}
if (hitTest(_root.middlewall.insidetop) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.insidetop.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate3_right_against_insidetop = true;
}
if (((Math.abs(((_root.middlewall.insidetop._x - _x) - (_root.middlewall.insidetop._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.middlewall.insidetop._y + (_root.middlewall.insidetop._height / 2)) + (_height / 2)))) and (_y > ((_root.middlewall.insidetop._y - (_root.middlewall.insidetop._height / 2)) - (_height / 2)))) {
_root.cant_move_crate3_right_against_insidetop = true;
} else {
_root.cant_move_crate3_right_against_insidetop = false;
}
if (hitTest(_root.topinside) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.topinside.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate3_right_against_l1 = true;
}
if (((Math.abs(((_root.topinside._x - _x) - (_root.topinside._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.topinside._y + (_root.topinside._height / 2)) + (_height / 2)))) and (_y > ((_root.topinside._y - (_root.topinside._height / 2)) - (_height / 2)))) {
_root.cant_move_crate3_right_against_l1 = true;
} else {
_root.cant_move_crate3_right_against_l1 = false;
}
if (hitTest(_root.insidebottom) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.insidebottom.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate3_right_against_insidebottom = true;
}
if (((Math.abs(((_root.insidebottom._x - _x) - (_root.insidebottom._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.insidebottom._y + (_root.insidebottom._height / 2)) + (_height / 2)))) and (_y > ((_root.insidebottom._y - (_root.insidebottom._height / 2)) - (_height / 2)))) {
_root.cant_move_crate3_right_against_insidebottom = true;
} else {
_root.cant_move_crate3_right_against_insidebottom = false;
}
if (hitTest(_root.l1) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.l1.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate3_right_against_l1 = true;
}
if (((Math.abs(((_root.l1._x - _x) - (_root.l1._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.l1._y + (_root.l1._height / 2)) + (_height / 2)))) and (_y > ((_root.l1._y - (_root.l1._height / 2)) - (_height / 2)))) {
_root.cant_move_crate3_right_against_l1 = true;
} else {
_root.cant_move_crate3_right_against_l1 = false;
}
if (hitTest(_root.greenwall) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate3_right_against_greenwall = true;
}
if (((Math.abs(((_root.greenwall._x - _x) - (_root.greenwall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.greenwall._y + (_root.greenwall._height / 2)) + (_height / 2)))) and (_y > ((_root.greenwall._y - (_root.greenwall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate3_right_against_greenwall = true;
} else {
_root.cant_move_crate3_right_against_greenwall = false;
}
if (hitTest(_root.topwall) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate3_up_against_topwall = true;
}
if (((Math.abs(((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.topwall._x + (_root.topwall._width / 2)) + (_width / 2)))) and (_x > ((_root.topwall._x - (_root.topwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate3_up_against_topwall = true;
} else {
_root.cant_move_crate3_up_against_topwall = false;
}
if (hitTest(_root.l2) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.l2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate3_up_against_l1 = true;
}
if (((Math.abs(((_y - _root.l2._y) - (_root.l2._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l2._x + (_root.l2._width / 2)) + (_width / 2)))) and (_x > ((_root.l2._x - (_root.l2._width / 2)) - (_width / 2)))) {
_root.cant_move_crate3_up_against_l1 = true;
} else {
_root.cant_move_crate3_up_against_l1 = false;
}
if (hitTest(_root.l3) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.l3.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate3_up_against_l1 = true;
}
if (((Math.abs(((_y - _root.l3._y) - (_root.l3._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l3._x + (_root.l3._width / 2)) + (_width / 2)))) and (_x > ((_root.l3._x - (_root.l3._width / 2)) - (_width / 2)))) {
_root.cant_move_crate3_up_against_l1 = true;
} else {
_root.cant_move_crate3_up_against_l1 = false;
}
if (hitTest(_root.l1) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.l1.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate3_up_against_l1 = true;
}
if (((Math.abs(((_y - _root.l1._y) - (_root.l1._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l1._x + (_root.l1._width / 2)) + (_width / 2)))) and (_x > ((_root.l1._x - (_root.l1._width / 2)) - (_width / 2)))) {
_root.cant_move_crate3_up_against_l1 = true;
} else {
_root.cant_move_crate3_up_against_l1 = false;
}
if (hitTest(_root.pinkwall) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate3_down_against_pinkwall = true;
}
if (((Math.abs(((_root.pinkwall._y - _y) - (_root.pinkwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.pinkwall._x + (_root.pinkwall._width / 2)) + (_width / 2)))) and (_x > ((_root.pinkwall._x - (_root.pinkwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate3_down_against_pinkwall = true;
} else {
_root.cant_move_crate3_down_against_pinkwall = false;
}
if (hitTest(_root.bottomwall) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate3_down_against_bottomwall = true;
}
if (((Math.abs(((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.bottomwall._x + (_root.bottomwall._width / 2)) + (_width / 2)))) and (_x > ((_root.bottomwall._x - (_root.bottomwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate3_down_against_bottomwall = true;
} else {
_root.cant_move_crate3_down_against_bottomwall = false;
}
if (hitTest(_root.middlewall.insidetop) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.insidetop.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate3_down_against_insidetop = true;
}
if (((Math.abs(((_root.middlewall.insidetop._y - _y) - (_root.middlewall.insidetop._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.middlewall.insidetop._x + (_root.middlewall.insidetop._width / 2)) + (_width / 2)))) and (_x > ((_root.middlewall.insidetop._x - (_root.middlewall.insidetop._width / 2)) - (_width / 2)))) {
_root.cant_move_crate3_down_against_insidetop = true;
} else {
_root.cant_move_crate3_down_against_insidetop = false;
}
if (hitTest(_root.l6) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.l6.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate3_down_against_l6 = true;
}
if (((Math.abs(((_root.l6._y - _y) - (_root.l6._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l6._x + (_root.l6._width / 2)) + (_width / 2)))) and (_x > ((_root.l6._x - (_root.l6._width / 2)) - (_width / 2)))) {
_root.cant_move_crate3_down_against_l6 = true;
} else {
_root.cant_move_crate3_down_against_l6 = false;
}
if (hitTest(_root.l4) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.l4.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate3_down_against_l4 = true;
}
if (((Math.abs(((_root.l4._y - _y) - (_root.l4._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.l4._x + (_root.l4._width / 2)) + (_width / 2)))) and (_x > ((_root.l4._x - (_root.l4._width / 2)) - (_width / 2)))) {
_root.cant_move_crate3_down_against_l4 = true;
} else {
_root.cant_move_crate3_down_against_l4 = false;
}
if (hitTest(_root.orangewall1) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall1.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate3_down_against_orangewall1 = true;
}
if (((Math.abs(((_root.orangewall1._y - _y) - (_root.orangewall1._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.orangewall1._x + (_root.orangewall1._width / 2)) + (_width / 2)))) and (_x > ((_root.orangewall1._x - (_root.orangewall1._width / 2)) - (_width / 2)))) {
_root.cant_move_crate3_down_against_orangewall1 = true;
} else {
_root.cant_move_crate3_down_against_orangewall1 = false;
}
if (_root.hit_crate3) {
if (hitTest(_root.crate2) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate3_up_against_crate2 = true;
}
if ((((((_y - _root.crate2._y) - (_root.crate2._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate2._y) - (_root.crate2._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate2._x - _x) < ((_width / 2) + (_root.crate2._width / 2)))) {
_root.cant_move_crate3_up_against_crate2 = true;
} else {
_root.cant_move_crate3_up_against_crate2 = false;
}
if (hitTest(_root.crate2) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate2.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate3_down_against_crate2 = true;
}
if ((((((_root.crate2._y - _y) - (_root.crate2._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate2._y - _y) - (_root.crate2._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate2._x - _x) < ((_width / 2) + (_root.crate2._width / 2)))) {
_root.cant_move_crate3_down_against_crate2 = true;
} else {
_root.cant_move_crate3_down_against_crate2 = false;
}
if (hitTest(_root.crate2) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate2.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate3_left_against_crate2 = true;
}
if ((((((_x - _root.crate2._x) - (_root.crate2._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate2._x) - (_root.crate2._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate2._y - _y) < ((_height / 2) + (_root.crate2._height / 2)))) {
_root.cant_move_crate3_left_against_crate2 = true;
} else {
_root.cant_move_crate3_left_against_crate2 = false;
}
if (hitTest(_root.crate2) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate2.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate3_right_against_crate2 = true;
}
if ((((((_root.crate2._x - _x) - (_root.crate2._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate2._x - _x) - (_root.crate2._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate2._y - _y) < ((_height / 2) + (_root.crate2._height / 2)))) {
_root.cant_move_crate3_right_against_crate2 = true;
} else {
_root.cant_move_crate3_right_against_crate2 = false;
}
}
_root.difference_y_blue_with_crate3_bottom = ((_root.bluewall._y - (_root.bluewall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_bluewall_and_crate3 = Math.abs(_root.bluewall._x - _x);
if (((_root.difference_y_blue_with_crate3_bottom <= 0.3) && (_root.difference_y_blue_with_crate3_bottom >= -8)) && (_root.distance_x_between_bluewall_and_crate3 < ((_width / 2) + (_root.bluewall._width / 2)))) {
_root.blue_wall_and_crate3_bottomside_touching = true;
} else {
_root.blue_wall_and_crate3_bottomside_touching = false;
}
if ((((_root.bluewall_movement == true) and (_root.blue_wall_and_crate3_bottomside_touching == true)) and (_root.distance_x_between_bluewall_and_crate3 < ((_width / 2) + (_root.bluewall._width / 2)))) and (_currentframe == 1)) {
_y = (((_root.bluewall._y - (_root.bluewall._height / 2)) - (_height / 2)) - 0.2);
if (((((((_y - _root.crate2._y) - (_root.crate2._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate2._y) - (_root.crate2._height / 2)) - (_height / 2)) >= -2)) and (Math.abs(_root.crate2._x - _x) < ((_width / 2) + (_root.crate2._width / 2)))) and (_root.crate2._x > 500)) {
_root.crate2._y = ((_root.bluewall._y - (_root.bluewall._height / 2)) - _height) - (_root.crate2._height / 2);
if (((Math.abs(((_root.crate2._y - _root.topwall._y) - (_root.topwall._height / 2)) - (_root.crate2._height / 2)) <= 0.3) and (_root.crate2._x < ((_root.topwall._x + (_root.topwall._width / 2)) + (_root.crate2._width / 2)))) and (_root.crate2._x > ((_root.topwall._x - (_root.topwall._width / 2)) - (_root.crate2._width / 2)))) {
_root.bluewall_movement = false;
_root.crate2.gotoAndStop(2);
}
}
}
_root.difference_x_pink_with_crate3_leftside = ((_x - _root.pinkwall._x) - (_root.pinkwall._width / 2)) - (_width / 2);
_root.distance_y_between_pinkwall_and_crate3 = Math.abs(_root.pinkwall._y - _y);
if (((_root.difference_x_pink_with_crate3_leftside <= 0.3) && (_root.difference_x_pink_with_crate3_leftside >= -8)) && (_root.distance_y_between_pinkwall_and_crate3 < ((_height / 2) + (_root.pinkwall._height / 2)))) {
_root.pink_wall_and_crate3_leftside_touching = true;
} else {
_root.pink_wall_and_crate3_leftside_touching = false;
}
if ((((_root.pinkwall_movement == true) and (_root.pink_wall_and_crate3_leftside_touching == true)) and (_root.distance_y_between_pinkwall_and_crate3 < ((_height / 2) + (_root.pinkwall._height / 2)))) and (_currentframe == 1)) {
_x = ((_root.pinkwall._x + (_root.pinkwall._width / 2)) + (_width / 2));
_root.crate3_is_pushed_by_pink_wall = true;
} else {
_root.crate3_is_pushed_by_pink_wall = false;
}
_root.difference_x_crate3_rightside_with_blacktip3 = ((_root.blacktip3._x - _x) - (_width / 2)) - (_root.blacktip3._width / 2);
_root.difference_x_crate3_rightside_with_blacktip4 = ((_root.blacktip4._x - _x) - (_width / 2)) - (_root.blacktip4._width / 2);
_root.difference_x_crate3_rightside_with_insidetop = (300 - _x) - (_width / 2);
if ((((((_y > 143.6) and (_y < 148.6)) and (_root.difference_x_crate3_rightside_with_blacktip3 <= 0.3)) or ((_y < 143.6) and (_root.difference_x_crate3_rightside_with_insidetop <= 0.3))) or ((_y > 156.1) and (_root.difference_x_crate3_rightside_with_blacktip4 <= 0.3))) && (_root.crate3_is_pushed_by_pink_wall == true)) {
_root.decoy_crate.inside.gotoAndPlay(1);
_root.pinkwall_movement = false;
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 20002;
_root.decoydone = true;
}
}
Instance of Symbol 2313 MovieClip "ball1" in Frame 30
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l4)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l4.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l4.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l4.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l4.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l5)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l5.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l5.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l5.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l5.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l6)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l6.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l6.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l6.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l6.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r4)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r4.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r4.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r4.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r4.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r5)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r5.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r5.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r5.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r5.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r6)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r6.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r6.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r6.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r6.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r7)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r7.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r7.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r7.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r7.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blacktip1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blacktip1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blacktip1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blacktip1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blacktip1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blacktip2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blacktip2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blacktip2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blacktip2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blacktip2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blacktip3)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blacktip3.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blacktip3.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blacktip3.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blacktip3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blacktip4)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blacktip4.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blacktip4.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blacktip4.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blacktip4.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blacktip5)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blacktip5.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blacktip5.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blacktip5.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blacktip5.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blacktip6)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blacktip6.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blacktip6.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blacktip6.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blacktip6.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if ((xmove < 0) and (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.crate1)) {
if (_root.crate1._currentframe == 1) {
_root.hit_crate1 = true;
if (xmove > 0) {
if (((_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false) and (_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false)) and (_root.ball1_is_pushed_by_red_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate1.getBounds(_root).xMin) + 0.5));
if ((_root.cant_move_crate1_right_against_red_wall == false) and (_root.cant_move_crate1_right_against_r5 == false)) {
_root.cratespeed_xright = 1;
_root.crate1._x = _root.crate1._x + _root.cratespeed_xright;
_root.moveright = true;
}
}
}
if (xmove < 0) {
if (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false) {
_x = (_x - ((getBounds(_root).xMin - _root.crate1.getBounds(_root).xMax) - 0.5));
if ((((_root.cant_move_crate1_left_against_red_wall == false) and (_root.cant_move_crate1_left_against_r6 == false)) and (_root.cant_move_crate1_left_against_insidebottom == false)) and (_root.cant_move_crate1_left_against_r2 == false)) {
_root.cratespeed_xleft = 1;
_root.crate1._x = _root.crate1._x - _root.cratespeed_xleft;
_root.moveleft = true;
}
}
}
if (ymove > 0) {
if ((((_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false) && (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false)) and (_root.difference_x_ball1_with_crate1_leftside <= -1)) and (_root.difference_x_ball1_with_crate1_rightside <= -1)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate1.getBounds(_root).yMin) + 0.5));
if ((((_root.cant_move_crate1_down_against_red_wall == false) and (_root.cant_move_crate1_down_against_bottomwall == false)) and (_root.cant_move_crate1_down_against_r6 == false)) and (_root.cant_move_crate1_down_against_insidebottom == false)) {
_root.cratespeed_ydown = 1;
_root.crate1._y = _root.crate1._y + _root.cratespeed_ydown;
_root.movedown = true;
}
}
}
if (ymove < 0) {
if ((((_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false) && (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false)) and (_root.difference_x_ball1_with_crate1_leftside <= -1)) and (_root.difference_x_ball1_with_crate1_rightside <= -1)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate1.getBounds(_root).yMax) - 0.8));
if ((((_root.cant_move_crate1_up_against_red_wall == false) and (_root.cant_move_crate1_up_against_r1 == false)) and (_root.cant_move_crate1_up_against_orangewall2 == false)) and (_root.cant_move_crate1_up_against_r2 == false)) {
_root.cratespeed_yup = 1;
_root.crate1._y = _root.crate1._y - _root.cratespeed_yup;
_root.moveup = true;
}
}
}
}
}
}
if ((((!Key.isDown(37)) and (!Key.isDown(39))) and (!Key.isDown(38))) and (!Key.isDown(40))) {
_root.moveup = false;
_root.movedown = false;
_root.moveright = false;
_root.moveleft = false;
move(0, 0);
_root.hit_crate1 = false;
_root.hit_crate2 = false;
_root.hit_crate3 = false;
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
move2(-0.1, 0);
_root.moveleft = true;
}
if (Key.isDown(39)) {
if ((_root.ball1_is_pushed_by_crate1_is_pushed_by_red_wall == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
move(5, 0);
move2(0.1, 0);
_root.moveright = true;
}
}
if (Key.isDown(38)) {
move(0, -5);
move2(0, -0.1);
_root.moveup = true;
}
if (Key.isDown(40)) {
move(0, 5);
move2(0, 0.1);
_root.movedown = true;
}
}
}
onClipEvent (enterFrame) {
function move2(xmove2, ymove2) {
_x = (_x + xmove2);
_y = (_y + ymove2);
if (hitTest(_root.leftwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l1)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l1.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l1.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l1.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l2)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l2.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l2.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l2.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l3)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l3.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l3.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l3.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l4)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l4.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l4.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l4.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l4.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l5)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l5.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l5.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l5.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l5.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.l6)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.l6.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.l6.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.l6.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.l6.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r1)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r1.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r1.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r1.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r2)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r2.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r2.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r2.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r3)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r3.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r3.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r3.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r4)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r4.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r4.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r4.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r4.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r5)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r5.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r5.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r5.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r5.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r6)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r6.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r6.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r6.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r6.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.r7)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.r7.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.r7.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.r7.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.r7.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blacktip1)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blacktip1.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blacktip1.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blacktip1.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blacktip1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blacktip2)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blacktip2.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blacktip2.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blacktip2.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blacktip2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blacktip3)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blacktip3.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blacktip3.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blacktip3.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blacktip3.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blacktip4)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blacktip4.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blacktip4.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blacktip4.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blacktip4.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blacktip5)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blacktip5.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blacktip5.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blacktip5.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blacktip5.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.blacktip6)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.blacktip6.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.blacktip6.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.blacktip6.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.blacktip6.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall1)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall1.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall1.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall1.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall) and (_root.crate1_is_pushed_by_ball1_is_pushed_by_redwall == false)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.crate2)) {
_root.hit_crate2 = true;
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.crate2.getBounds(_root).xMin) + 0.2));
if ((((((_root.cant_move_crate2_right_against_l6 == false) and (_root.cant_move_crate2_right_against_insidetop == false)) and (_root.cant_move_crate2_right_against_l1 == false)) and (_root.cant_move_crate2_right_against_insidebottom == false)) and (_root.cant_move_crate2_right_against_greenwall == false)) and (_root.cant_move_crate2_right_against_crate3 == false)) {
_root.cratespeed_xright = 1;
_root.crate2._x = _root.crate2._x + _root.cratespeed_xright;
}
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.crate2.getBounds(_root).xMax) - 0.2));
if (((_root.cant_move_crate2_left_against_leftwall == false) and (_root.cant_move_crate2_left_against_orangewall1 == false)) and (_root.cant_move_crate2_left_against_crate3 == false)) {
_root.cratespeed_xleft = 1;
_root.crate2._x = _root.crate2._x - _root.cratespeed_xleft;
}
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.crate2.getBounds(_root).yMin) + 0.2));
if (((((((_root.cant_move_crate2_down_against_l6 == false) and (_root.cant_move_crate2_down_against_l4 == false)) and (_root.cant_move_crate2_down_against_bottomwall == false)) and (_root.cant_move_crate2_down_against_insidetop == false)) and (_root.cant_move_crate2_down_against_orangewall1 == false)) and (_root.cant_move_crate2_down_against_pinkwall == false)) and (_root.cant_move_crate2_down_against_crate3 == false)) {
_root.cratespeed_ydown = 1;
_root.crate2._y = _root.crate2._y + _root.cratespeed_ydown;
}
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.crate2.getBounds(_root).yMax) - 0.2));
if (((_root.cant_move_crate2_up_against_topwall == false) and (_root.cant_move_crate2_up_against_l1 == false)) and (_root.cant_move_crate2_up_against_crate3 == false)) {
_root.cratespeed_yup = 1;
_root.crate2._y = _root.crate2._y - _root.cratespeed_yup;
}
}
}
if (hitTest(_root.crate3)) {
_root.hit_crate3 = true;
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.crate3.getBounds(_root).xMin) + 0.2));
if ((((((_root.cant_move_crate3_right_against_l6 == false) and (_root.cant_move_crate3_right_against_insidetop == false)) and (_root.cant_move_crate3_right_against_l1 == false)) and (_root.cant_move_crate3_right_against_insidebottom == false)) and (_root.cant_move_crate3_right_against_greenwall == false)) and (_root.cant_move_crate3_right_against_crate2 == false)) {
_root.cratespeed_xright = 1;
_root.crate3._x = _root.crate3._x + _root.cratespeed_xright;
}
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.crate3.getBounds(_root).xMax) - 0.2));
if (((_root.cant_move_crate3_left_against_leftwall == false) and (_root.cant_move_crate3_left_against_orangewall1 == false)) and (_root.cant_move_crate3_left_against_crate2 == false)) {
_root.cratespeed_xleft = 1;
_root.crate3._x = _root.crate3._x - _root.cratespeed_xleft;
}
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.crate3.getBounds(_root).yMin) + 0.2));
if (((((((_root.cant_move_crate3_down_against_l6 == false) and (_root.cant_move_crate3_down_against_l4 == false)) and (_root.cant_move_crate3_down_against_bottomwall == false)) and (_root.cant_move_crate3_down_against_insidetop == false)) and (_root.cant_move_crate3_down_against_orangewall1 == false)) and (_root.cant_move_crate3_down_against_pinkwall == false)) and (_root.cant_move_crate3_down_against_crate2 == false)) {
_root.cratespeed_ydown = 1;
_root.crate3._y = _root.crate3._y + _root.cratespeed_ydown;
}
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.crate3.getBounds(_root).yMax) - 0.2));
if (((_root.cant_move_crate3_up_against_topwall == false) and (_root.cant_move_crate3_up_against_l1 == false)) and (_root.cant_move_crate3_up_against_crate2 == false)) {
_root.cratespeed_yup = 1;
_root.crate3._y = _root.crate3._y - _root.cratespeed_yup;
}
}
}
if (hitTest(_root.crate4)) {
if (_root.crate4._currentframe == 1) {
_root.hit_crate4 = true;
if (ymove2 < 0) {
if (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false) {
_y = (_y - ((getBounds(_root).yMin - _root.crate4.getBounds(_root).yMax) - 0.5));
if ((_root.cant_move_crate4_up_against_orange_wall == false) and (_root.cant_move_crate4_up_against_topwall == false)) {
_root.cratespeed_yup = 1;
_root.crate4._y = _root.crate4._y - _root.cratespeed_yup;
_root.moveup = true;
}
}
}
}
}
}
}
Frame 32
function restartLevel() {
_root.scoresubmit24 = savefile.data.scoresubmit24;
savefile.flush();
soundstart = false;
small = false;
if ((((((var25 != true) and (var26 != true)) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var24 = true;
}
var23 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
small = false;
greenmovement = false;
redwall_movement = false;
bluewall1_movement = false;
bluewall2_movement = false;
bluetransparent_movement = false;
pinkwall_movement = false;
orangewall_movement = false;
lredwall_movement = false;
aquawall_movement = false;
greenwall_movement = false;
yellowwall_movement = false;
pinkswitch.gotoAndStop(1);
ball_location = true;
gray_is_hit_orange = false;
black_is_hit_orange = false;
orange_hit = false;
gray_is_hit_red = false;
black_is_hit_red = false;
red_hit = false;
gray_is_hit_lred = false;
black_is_hit_lred = false;
lred_hit = false;
gray_is_hit_blue2 = false;
black_is_hit_blue2 = false;
blue2_hit = false;
ball_movement = true;
finisher = false;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
decoy._width = 32;
decoy._height = 32;
decoy2._width = 32;
decoy2._height = 32;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
redkey._x = 433.1;
redkey._y = 68;
yellowkey._x = 420.1;
yellowkey._y = 484.9;
bluekey._x = 279.4;
bluekey._y = 145;
lredkey._x = 231.1;
lredkey._y = 330.9;
orangekey._x = 232.3;
orangekey._y = 277;
greenkey._x = 575;
greenkey._y = 133.2;
aquakey._x = 575;
aquakey._y = 76.5;
bluestop._x = 279.4;
bluestop._y = 106;
orangestop._x = 118.1;
orangestop._y = 68;
pinkswitch._x = 185.4;
pinkswitch._y = 145;
smallkey._x = 279.4;
smallkey._y = 68;
bluetransparent._x = 186.5;
bluetransparent._y = 400;
bluewall2._x = 186.4;
bluewall2._y = 323.1;
bluewall1._x = 186.7;
bluewall1._y = 460.4;
bluewall._x = 181.1;
bluewall._y = 327.8;
pinkwall._x = 433.4;
pinkwall._y = 152;
redwall._x = 488.6;
redwall._y = -9;
orangewall._x = 500;
orangewall._y = 590.6;
aquawall._x = 567.1;
aquawall._y = 446.4;
greenwall._x = 398.6;
greenwall._y = 243.4;
yellowwall._x = 566.9;
yellowwall._y = 434.9;
lredwall._x = 453.3;
lredwall._y = 588.2;
ball1._x = 280.1;
ball1._y = 483.9;
ball2._x = 500;
ball2._y = 309;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 566.9;
finish._y = 487;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_orange == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_orange == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_lred == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_lred == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_red == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_red == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_blue2 == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_blue2 == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(26);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l33");
};
ball1.onEnterFrame = function () {
if (this.hitTest(bluekey)) {
keystart = true;
bluekey._x = 100000 /* 0x0186A0 */;
bluewall2_movement = true;
bluewall1_movement = true;
bluetransparent_movement = true;
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndPlay(1);
}
if (this.hitTest(redkey)) {
keystart = true;
redkey._x = 100000 /* 0x0186A0 */;
redwall_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if (this.hitTest(orangekey)) {
keystart = true;
orangekey._x = 100000 /* 0x0186A0 */;
orangewall_movement = true;
_root.ball1.scan.gotoAndStop(6);
}
if (this.hitTest(aquakey)) {
keystart = true;
aquakey._x = 100000 /* 0x0186A0 */;
aquawall_movement = true;
_root.ball1.scan.gotoAndStop(8);
}
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 100000 /* 0x0186A0 */;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (bluewall2.hitTest(_root.pinkswitch.button) and (_root.pinkswitch._currentframe == 1)) {
switchstart = true;
_root.pinkswitch.gotoAndStop(2);
pinkwall_movement = true;
}
if (this.hitTest(orangestop)) {
stopstart = true;
orangestop._x = 10000;
orangewall_movement = false;
_root.ball1.scan.gotoAndStop(11);
}
if (this.hitTest(bluestop)) {
stopstart = true;
bluestop._x = 10000;
bluewall1_movement = false;
bluewall2_movement = false;
bluetransparent_movement = false;
_root.ball1.scan.gotoAndStop(11);
}
if (this.hitTest(smallkey)) {
smallstart = true;
smallkey._x = 10000;
small = true;
ball1.gotoAndStop(2);
ball2.gotoAndStop(2);
}
if (redwall.hitTest(orangewall)) {
redwall_movement = false;
orangewall_movement = false;
soundstart = true;
orangewall._y = ((redwall._y + (redwall._height / 2)) + (orangewall._height / 2)) + 0.1;
}
if (redwall.hitTest(greenwall)) {
soundstart = true;
greenwall_movement = false;
redwall_movement = false;
if ((redwall._y + (redwall._height / 2)) > (greenwall._y - (greenwall._height / 2))) {
if (greenwall._x <= 410) {
greenwall._x = 400.9;
}
}
if ((((redwall._x - (greenwall._width / 2)) - greenwall._x) - (redwall._width / 2)) < -5) {
redwall._y = ((greenwall._y - (greenwall._height / 2)) - (redwall._height / 2)) - 0.1;
something = true;
} else {
greenwall._x = ((redwall._x - (redwall._width / 2)) - (greenwall._width / 2)) - 0.1;
}
}
if ((orangewall.hitTest(greenwall) and (greenmovement == true)) and ((orangewall._y - (orangewall._height / 2)) > ((greenwall._y + (greenwall._height / 2)) - 2))) {
soundstart = true;
greenwall_movement = false;
orangewall_movement = false;
if ((((orangewall._x - (greenwall._width / 2)) - greenwall._x) - (orangewall._width / 2)) < -1) {
orangewall._y = ((greenwall._y + (greenwall._height / 2)) + (orangewall._height / 2)) + 0.1;
}
}
if ((((orangewall._y - (orangewall._height / 2)) + 2) < (greenwall._y + (greenwall._height / 2))) and greenmovement) {
if (greenwall.hitTest(orangewall)) {
soundstart = true;
soundy = true;
}
orangewall_movement = false;
greenwall_movement = false;
greenwall._x = ((orangewall._x - (orangewall._width / 2)) - (greenwall._width / 2)) - 0.1;
}
if (scoresubmit24) {
scoresubmit = false;
} else if (scoresubmit24 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 24) or scoresubmit) {
level24_best_time = seconds;
scoresubmit24 = true;
savefile.data.scoresubmit24 = _root.scoresubmit24;
savefile.flush();
}
if (seconds < level24_best_time) {
level24_best_time = seconds;
}
savefile.data.level24_best_time = _root.level24_best_time;
savefile.flush();
if (_root.score <= 25) {
_root.score = 25;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(24);
_root.win.meter.gotoAndStop(24);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l33");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var24) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l17");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l33");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (bluewall2_movement) {
bluewall2._y = bluewall2._y - 1;
bluewall._y = bluewall._y - 1;
}
if (bluewall2._y < 107.9) {
soundstart = true;
bluewall2_movement = false;
bluewall1_movement = false;
bluetransparent_movement = false;
bluewall2._y = 107.9;
bluetransparent._y = 184;
}
if (bluewall1_movement) {
bluewall1._y = bluewall1._y - 1;
}
if (bluetransparent_movement) {
bluetransparent._y = bluetransparent._y - 1;
}
if (redwall_movement) {
redwall._y = redwall._y + 0.6;
}
if (orangewall_movement) {
orangewall._y = orangewall._y - 0.06;
}
if (greenwall_movement) {
greenwall._x = greenwall._x + 3;
greenmovement = true;
}
if (greenwall._x >= 467.2) {
greenwall_movement = false;
soundstart = true;
greenwall._x = 467.1;
}
if (lredwall_movement) {
lredwall._y = lredwall._y - 1;
}
if (lredwall._y < 479.3) {
lredwall_movement = false;
}
if (pinkwall_movement) {
pinkwall._x = pinkwall._x - 2;
}
if (pinkwall._x <= 361.9) {
pinkwall_movement = false;
pinkwall._x = 361.9;
}
if (aquawall_movement) {
aquawall._x = aquawall._x + 2;
}
if (yellowwall_movement) {
yellowwall._x = yellowwall._x + 2;
}
differenceblue = ((bluewall2._y - ball1._y) - (bluewall2._height / 2)) - (ball1._height / 2);
differenceblue2 = ((bluewall2._y - ball2._y) - (bluewall2._height / 2)) - (ball2._height / 2);
distance_between_topwall_and_ball = Math.abs(((ball1._y - topwall._y) - (topwall._height / 2)) - (ball1._height / 2));
distance_between_topwall_and_ball2 = Math.abs(((ball2._y - topwall._y) - (topwall._height / 2)) - (ball2._height / 2));
distance_between_ll_and_ball = Math.abs(((ball1._y - ll._y) - (ll._height / 2)) - (ball1._height / 2));
distance_between_ll_and_ball2 = Math.abs(((ball2._y - ll._y) - (ll._height / 2)) - (ball2._height / 2));
distance_between_lm_and_ball = Math.abs(((ball1._y - lm._y) - (lm._height / 2)) - (ball1._height / 2));
distance_between_lm_and_ball2 = Math.abs(((ball2._y - lm._y) - (lm._height / 2)) - (ball2._height / 2));
distance_x_between_bluewall2_and_ball = Math.abs(bluewall2._x - ball1._x);
distance_x_between_bluewall2_and_ball2 = Math.abs(bluewall2._x - ball2._x);
if ((((bluewall2_movement == true) and (differenceblue <= 0.2)) and (differenceblue >= -8)) and (distance_x_between_bluewall2_and_ball < ((ball1._width / 2) + (bluewall2._width / 2)))) {
ball1._y = ((bluewall2._y - (bluewall2._height / 2)) - (ball1._height / 2)) - 0.2;
}
if ((((bluewall2_movement == true) and (differenceblue2 <= 0.2)) and (differenceblue2 >= -8)) and (distance_x_between_bluewall2_and_ball2 < ((ball2._width / 2) + (bluewall2._width / 2)))) {
ball2._y = ((bluewall2._y - (bluewall2._height / 2)) - (ball2._height / 2)) - 0.2;
}
if (((((differenceblue <= 1) && (differenceblue >= -2)) && (distance_between_topwall_and_ball <= 2)) && (distance_x_between_bluewall2_and_ball < ((ball1._width / 2) + (bluewall2._width / 2)))) or ((((differenceblue2 <= 0.5) && (differenceblue2 >= -1)) && (distance_between_topwall_and_ball2 <= 0.5)) && (distance_x_between_bluewall2_and_ball2 < ((ball2._width / 2) + (bluewall2._width / 2))))) {
blue2_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differenceblue <= 0.5) && (differenceblue >= -1)) && (distance_between_ll_and_ball <= 1)) && (ball1._x < ((ll._x + (ll._width / 2)) + (ball1._width / 2)))) && (distance_x_between_bluewall2_and_ball < ((ball1._width / 2) + (bluewall2._width / 2)))) or (((((differenceblue2 <= 0.5) && (differenceblue2 >= -1)) && (distance_between_ll_and_ball2 <= 0.5)) && (ball2._x < ((ll._x + (ll._width / 2)) + (ball2._width / 2)))) && (distance_x_between_bluewall2_and_ball2 < ((ball2._width / 2) + (bluewall2._width / 2))))) {
blue2_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differenceblue <= 0.5) && (differenceblue >= -1)) && (distance_between_lm_and_ball <= 1)) && (ball1._x > ((lm._x - (lm._width / 2)) - (ball1._width / 2)))) && (distance_x_between_bluewall2_and_ball < ((ball1._width / 2) + (bluewall2._width / 2)))) or (((((differenceblue2 <= 0.5) && (differenceblue2 >= -1)) && (distance_between_lm_and_ball2 <= 0.5)) && (ball2._x > ((lm._x - (lm._width / 2)) - (ball1._width / 2)))) && (distance_x_between_bluewall2_and_ball2 < ((ball2._width / 2) + (bluewall2._width / 2))))) {
blue2_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differenceorange = ((orangewall._y - ball1._y) - (orangewall._height / 2)) - (ball1._height / 2);
differenceorange2 = ((orangewall._y - ball2._y) - (orangewall._height / 2)) - (ball2._height / 2);
distance_between_redwall_and_ball = Math.abs(((ball1._y - redwall._y) - (redwall._height / 2)) - (ball1._height / 2));
distance_between_redwall_and_ball2 = Math.abs(((ball2._y - redwall._y) - (redwall._height / 2)) - (ball2._height / 2));
distance_between_rl_and_ball = Math.abs(((ball1._y - rl._y) - (rl._height / 2)) - (ball1._height / 2));
distance_between_rl_and_ball2 = Math.abs(((ball2._y - rl._y) - (rl._height / 2)) - (ball2._height / 2));
distance_between_rr_and_ball = Math.abs(((ball1._y - rr._y) - (rr._height / 2)) - (ball1._height / 2));
distance_between_rr_and_ball2 = Math.abs(((ball2._y - rr._y) - (rr._height / 2)) - (ball2._height / 2));
distance_between_rrr_and_ball = Math.abs(((ball1._y - rrr._y) - (rrr._height / 2)) - (ball1._height / 2));
distance_between_rrr_and_ball2 = Math.abs(((ball2._y - rrr._y) - (rrr._height / 2)) - (ball2._height / 2));
distance_x_between_orangewall_and_ball = Math.abs(orangewall._x - ball1._x);
distance_x_between_orangewall_and_ball2 = Math.abs(orangewall._x - ball2._x);
if ((((orangewall_movement == true) and (differenceorange <= 0.2)) and (differenceorange >= -8)) and (distance_x_between_orangewall_and_ball < ((ball1._width / 2) + (orangewall._width / 2)))) {
ball1._y = ((orangewall._y - (orangewall._height / 2)) - (ball1._height / 2)) - 0.2;
}
if ((((orangewall_movement == true) and (differenceorange2 <= 0.2)) and (differenceorange2 >= -8)) and (distance_x_between_orangewall_and_ball2 < ((ball2._width / 2) + (orangewall._width / 2)))) {
ball2._y = ((orangewall._y - (orangewall._height / 2)) - (ball2._height / 2)) - 0.2;
}
if ((((((differenceorange <= 0.5) && (differenceorange >= -1)) && (distance_between_rr_and_ball <= 1)) && (ball1._x > ((rr._x - (rr._width / 2)) - (ball1._width / 2)))) && (distance_x_between_orangewall_and_ball < ((ball1._width / 2) + (orangewall._width / 2)))) or (((((differenceorange2 <= 0.5) && (differenceorange2 >= -1)) && (distance_between_rr_and_ball2 <= 0.5)) && (ball2._x > ((rr._x - (rr._width / 2)) - (ball2._width / 2)))) && (distance_x_between_orangewall_and_ball2 < ((ball2._width / 2) + (orangewall._width / 2))))) {
orange_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differenceorange <= 0.5) && (differenceorange >= -1)) && (distance_between_rrr_and_ball <= 1)) && (ball1._x > ((rrr._x - (rrr._width / 2)) - (ball1._width / 2)))) && (distance_x_between_orangewall_and_ball < ((ball1._width / 2) + (orangewall._width / 2)))) or (((((differenceorange2 <= 0.5) && (differenceorange2 >= -1)) && (distance_between_rrr_and_ball2 <= 0.5)) && (ball2._x > ((rrr._x - (rrr._width / 2)) - (ball2._width / 2)))) && (distance_x_between_orangewall_and_ball2 < ((ball2._width / 2) + (orangewall._width / 2))))) {
orange_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differenceorange <= 0.5) && (differenceorange >= -1)) && (distance_between_rl_and_ball <= 1)) && (ball1._x < ((rl._x + (rl._width / 2)) + (ball1._width / 2)))) && (distance_x_between_orangewall_and_ball < ((ball1._width / 2) + (orangewall._width / 2)))) or (((((differenceorange2 <= 0.5) && (differenceorange2 >= -1)) && (distance_between_rl_and_ball2 <= 0.5)) && (ball2._x < ((rl._x + (rl._width / 2)) + (ball2._width / 2)))) && (distance_x_between_orangewall_and_ball2 < ((ball2._width / 2) + (orangewall._width / 2))))) {
orange_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differenceorange <= 0.5) && (differenceorange >= -1)) && (distance_between_redwall_and_ball <= 1)) && (ball1._x < ((redwall._x + (redwall._width / 2)) + (ball1._width / 2)))) && (distance_x_between_orangewall_and_ball < ((ball1._width / 2) + (orangewall._width / 2)))) or (((((differenceorange2 <= 0.5) && (differenceorange2 >= -1)) && (distance_between_redwall_and_ball2 <= 0.5)) && (ball2._x < ((redwall._x + (redwall._width / 2)) - (ball2._width / 2)))) && (distance_x_between_orangewall_and_ball2 < ((ball2._width / 2) + (orangewall._width / 2))))) {
orange_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differencelred = ((lredwall._y - ball1._y) - (lredwall._height / 2)) - (ball1._height / 2);
differencelred2 = ((lredwall._y - ball2._y) - (lredwall._height / 2)) - (ball2._height / 2);
distance_x_between_lredwall_and_ball = Math.abs(lredwall._x - ball1._x);
distance_x_between_lredwall_and_ball2 = Math.abs(lredwall._x - ball2._x);
if ((((lredwall_movement == true) and (differencelred <= 0.2)) and (differencelred >= -8)) and (distance_x_between_lredwall_and_ball < ((ball1._width / 2) + (lredwall._width / 2)))) {
ball1._y = ((lredwall._y - (lredwall._height / 2)) - (ball1._height / 2)) - 0.2;
}
if ((((lredwall_movement == true) and (differencelred2 <= 0.2)) and (differencelred2 >= -8)) and (distance_x_between_lredwall_and_ball2 < ((ball2._width / 2) + (lredwall._width / 2)))) {
ball2._y = ((lredwall._y - (lredwall._height / 2)) - (ball2._height / 2)) - 0.2;
}
if ((((((differencelred <= 0.5) && (differencelred >= -1)) && (distance_between_rl_and_ball <= 1)) && (ball1._x < ((rl._x + (rl._width / 2)) + (ball1._width / 2)))) && (distance_x_between_lredwall_and_ball < ((ball1._width / 2) + (lredwall._width / 2)))) or (((((differencelred2 <= 0.5) && (differencelred2 >= -1)) && (distance_between_rl_and_ball2 <= 0.5)) && (ball2._x < ((rl._x + (rl._width / 2)) + (ball2._width / 2)))) && (distance_x_between_lredwall_and_ball2 < ((ball2._width / 2) + (lredwall._width / 2))))) {
lred_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differencered = ((ball1._y - redwall._y) - (redwall._height / 2)) - (ball1._height / 2);
differencered2 = ((ball2._y - redwall._y) - (redwall._height / 2)) - (ball2._height / 2);
distance_between_rry_and_ball = Math.abs(((rr._y - ball1._y) - (rr._height / 2)) - (ball1._height / 2));
distance_between_rry_and_ball2 = Math.abs(((rr._y - ball2._y) - (rr._height / 2)) - (ball2._height / 2));
distance_between_rly_and_ball = Math.abs(((rl._y - ball1._y) - (rl._height / 2)) - (ball1._height / 2));
distance_between_rly_and_ball2 = Math.abs(((rl._y - ball2._y) - (rl._height / 2)) - (ball2._height / 2));
distance_between_greenwall_and_ball = Math.abs(((greenwall._y - ball1._y) - (greenwall._height / 2)) - (ball1._height / 2));
distance_between_greenwall_and_ball2 = Math.abs(((greenwall._y - ball2._y) - (greenwall._height / 2)) - (ball2._height / 2));
distance_x_between_redwall_and_ball = Math.abs(redwall._x - ball1._x);
distance_x_between_redwall_and_ball2 = Math.abs(redwall._x - ball2._x);
if ((((redwall_movement == true) and (differencered <= 0.2)) and (differencered >= -8)) and (distance_x_between_redwall_and_ball < ((ball1._width / 2) + (redwall._width / 2)))) {
ball1._y = ((redwall._y + (redwall._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((redwall_movement == true) and (differencered2 <= 0.2)) and (differencered2 >= -8)) and (distance_x_between_redwall_and_ball2 < ((ball2._width / 2) + (redwall._width / 2)))) {
ball2._y = ((redwall._y + (redwall._height / 2)) + (ball2._height / 2)) + 0.2;
}
if ((((((differencered <= 0.5) && (differencered >= -1)) && (distance_between_rry_and_ball <= 1)) && (ball1._x > ((rr._x - (rr._width / 2)) - (ball1._width / 2)))) && (distance_x_between_redwall_and_ball < ((ball1._width / 2) + (redwall._width / 2)))) or (((((differencered2 <= 0.5) && (differencered2 >= -1)) && (distance_between_rry_and_ball2 <= 0.5)) && (ball2._x > ((rr._x - (rr._width / 2)) - (ball2._width / 2)))) && (distance_x_between_redwall_and_ball2 < ((ball2._width / 2) + (redwall._width / 2))))) {
red_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differencered <= 0.5) && (differencered >= -1)) && (distance_between_rly_and_ball <= 1)) && (ball1._x < ((rl._x + (rl._width / 2)) + (ball1._width / 2)))) && (distance_x_between_redwall_and_ball < ((ball1._width / 2) + (redwall._width / 2)))) or (((((differencered2 <= 0.5) && (differencered2 >= -1)) && (distance_between_rly_and_ball2 <= 0.5)) && (ball2._x < ((rl._x + (rl._width / 2)) + (ball2._width / 2)))) && (distance_x_between_redwall_and_ball2 < ((ball2._width / 2) + (redwall._width / 2))))) {
red_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differencered <= 0.5) && (differencered >= -1)) && (distance_between_greenwall_and_ball <= 1)) && (ball1._x < ((greenwall._x + (greenwall._width / 2)) + (ball1._width / 2)))) && (distance_x_between_redwall_and_ball < ((ball1._width / 2) + (redwall._width / 2)))) or (((((differencered2 <= 0.5) && (differencered2 >= -1)) && (distance_between_greenwall_and_ball2 <= 0.5)) && (ball2._x < ((greenwall._x + (greenwall._width / 2)) + (greenwall._width / 2)))) && (distance_x_between_redwall_and_ball2 < ((ball2._width / 2) + (redwall._width / 2))))) {
red_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation > (Stage.width / 2)) {
if (blue2_hit == true) {
gray_is_hit_blue2 = true;
}
if (orange_hit == true) {
black_is_hit_orange = true;
}
if (lred_hit == true) {
black_is_hit_lred = true;
}
if (red_hit == true) {
black_is_hit_red = true;
}
} else if (ball1_xlocation < (Stage.width / 2)) {
if (blue2_hit == true) {
black_is_hit_blue2 = true;
}
if (orange_hit == true) {
gray_is_hit_orange = true;
}
if (lred_hit == true) {
gray_is_hit_lred = true;
}
if (red_hit == true) {
gray_is_hit_red = true;
}
}
ball_locator();
}
};
Instance of Symbol 1541 MovieClip "ball1" in Frame 32
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lll)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lll.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lll.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lll.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lll.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lm)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lm.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lm.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lm.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lm.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.ll)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.ll.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.ll.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.ll.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.ll.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lr)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lr.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lr.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lr.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lr.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rl)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rl.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rl.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rl.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rl.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rr)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rr.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rr.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rr.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rr.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rrr)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rrr.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rrr.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rrr.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rrr.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (_root.greenwall2._x >= (Stage.width / 2)) {
if (hitTest(_root.greenwall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall2.getBounds(_root).yMax) - 0.1));
}
}
}
if (hitTest(_root.yellowwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.yellowwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.yellowwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.yellowwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.yellowwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lredwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lredwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lredwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lredwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lredwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.aquawall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.aquawall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.aquawall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.aquawall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.aquawall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 33
function restartLevel() {
_root.scoresubmit29 = savefile.data.scoresubmit29;
savefile.flush();
soundstart = false;
small = false;
if (var30 != true) {
var29 = true;
}
var28 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
small = false;
redwall1_movement = false;
redwall2_movement = false;
bluewall_movement = false;
bluetransparent_movement = false;
pinkwall_movement = false;
orangewall_movement = false;
lredwall_movement = false;
aquawall_movement = false;
greenwall_movement = false;
yellowwall_movement = false;
_root.pinkswitch.gotoAndStop(1);
pinkswitch.gotoAndStop(1);
yellowswitch.gotoAndStop(1);
orangeswitch.gotoAndStop(1);
greenswitch.gotoAndStop(1);
ball_location = true;
gray_is_hit_aqua = false;
black_is_hit_aqua = false;
aqua_hit = false;
gray_is_hit_red = false;
black_is_hit_red = false;
red_hit = false;
gray_is_hit_lred = false;
black_is_hit_lred = false;
lred_hit = false;
gray_is_hit_pink = false;
black_is_hit_pink = false;
pink_hit = false;
gray_is_hit_green = false;
black_is_hit_green = false;
green_hit = false;
gray_is_hit_blue = false;
black_is_hit_blue = false;
blue_hit = false;
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
ball_movement = true;
finisher = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
redkey._x = 276;
redkey._y = 477.4;
yellowswitch._x = 216.4;
yellowswitch._y = 377.8;
bluekey._x = 156.8;
bluekey._y = 475.4;
lredkey._x = 431.4;
lredkey._y = 477.4;
orangeswitch._x = 405.9;
orangeswitch._y = 300.1;
greenswitch._x = 276;
greenswitch._y = 424.9;
aquakey._x = 276;
aquakey._y = 84.3;
redstop._x = 431.4;
redstop._y = 84.3;
pinkswitch._x = 273.4;
pinkswitch._y = 299.1;
smallkey._x = 544.5;
smallkey._y = 84.3;
bluewall._x = 431.8;
bluewall._y = 425.4;
blue_transparent._x = 442.1;
blue_transparent._y = 425.4;
aqua_transparent._x = 405.3;
aqua_transparent._y = 298.9;
pinkwall._x = 118;
pinkwall._y = 454.1;
redwall1._x = 615.4;
redwall1._y = 366.1;
redwall2._x = 542.3;
redwall2._y = 149.9;
orangewall._x = 442;
orangewall._y = 199.5;
aquawall._x = 446.7;
aquawall._y = 299.3;
aquawall1._x = 428.4;
aquawall1._y = 299.3;
aquawall2._x = 404.3;
aquawall2._y = 299.3;
greenwall._x = 442;
greenwall._y = 251.8;
yellowwall._x = 542;
yellowwall._y = 423.9;
lredwall._x = 216.9;
lredwall._y = -64.3;
ball1._x = 216.8;
ball1._y = 477.4;
ball2._x = 544.5;
ball2._y = 253.1;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 541.7;
finish._y = 475.2;
decoy._width = 32;
decoy._height = 32;
decoy2._width = 32;
decoy2._height = 32;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_aqua == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_aqua == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_lred == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_lred == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_red == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_red == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_pink == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_pink == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_green == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_green == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_blue == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_blue == true) {
if (small) {
decoy._height = 16;
decoy._width = 16;
}
if (small) {
decoy2._height = 16;
decoy2._width = 16;
}
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(29);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l27");
};
ball1.onEnterFrame = function () {
if (this.hitTest(bluekey)) {
keystart = true;
bluekey._x = 100000 /* 0x0186A0 */;
bluewall_movement = true;
bluetransparent_movement = true;
_root.ball1.scan.gotoAndStop(5);
}
if (this.hitTest(redkey)) {
keystart = true;
redkey._x = 100000 /* 0x0186A0 */;
redwall1_movement = true;
redwall2_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if (this.hitTest(lredkey)) {
keystart = true;
lredkey._x = 100000 /* 0x0186A0 */;
lredwall_movement = true;
_root.ball1.scan.gotoAndStop(9);
}
if (pinkwall.hitTest(_root.orangeswitch.button) and (_root.orangeswitch._currentframe == 1)) {
switchstart = true;
_root.orangeswitch.gotoAndStop(2);
orangewall_movement = true;
}
if (this.hitTest(aquakey)) {
keystart = true;
aquakey._x = 100000 /* 0x0186A0 */;
aquawall_movement = true;
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndPlay(1);
}
if (bluewall.hitTest(_root.greenswitch.button) and (_root.greenswitch._currentframe == 1)) {
switchstart = true;
_root.greenswitch.gotoAndStop(2);
if (greenwall._x >= 557.9) {
greenwall_movement = false;
} else {
greenwall_movement = true;
}
}
if (lredwall.hitTest(_root.yellowswitch.button) and (_root.yellowswitch._currentframe == 1)) {
switchstart = true;
_root.yellowswitch.gotoAndStop(2);
yellowwall_movement = true;
}
if (aquawall.hitTest(_root.pinkswitch.button) and (_root.pinkswitch._currentframe == 1)) {
switchstart = true;
_root.pinkswitch.gotoAndStop(2);
if (pinkwall._y <= 96.5) {
pinkwall_movement = false;
} else {
pinkwall_movement = true;
}
}
if (this.hitTest(redstop)) {
stopstart = true;
redstop._x = 10000;
redwall1_movement = false;
_root.ball1.scan.gotoAndStop(11);
}
if (lredwall.hitTest(aquawall) and (aquawall_movement == true)) {
soundstart = true;
lredwall_movement = false;
aquawall_movement = false;
if ((((aquawall._x - (lredwall._width / 2)) - lredwall._x) - (aquawall._width / 2)) < -1) {
lredwall._y = ((aquawall._y - (aquawall._height / 2)) - (lredwall._height / 2)) - 0.1;
} else {
aquawall._x = ((lredwall._x + (lredwall._width / 2)) + (aquawall._width / 2)) + 0.1;
}
}
if (this.hitTest(smallkey)) {
smallstart = true;
smallkey._x = 10000;
small = true;
ball1.gotoAndStop(2);
ball2.gotoAndStop(2);
}
if (scoresubmit29) {
scoresubmit = false;
} else if (scoresubmit29 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 29) or scoresubmit) {
level29_best_time = seconds;
scoresubmit29 = true;
savefile.data.scoresubmit29 = _root.scoresubmit29;
savefile.flush();
}
if (seconds < level29_best_time) {
level29_best_time = seconds;
}
savefile.data.level29_best_time = _root.level29_best_time;
savefile.flush();
if (_root.score <= 30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(29);
_root.win.meter.gotoAndStop(30);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l27");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var29) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l28");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l27");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
if (ball1.hitTest(aquawall)) {
hitblue = true;
} else {
hitblue = false;
}
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (bluewall_movement) {
bluewall._x = bluewall._x - 1;
}
if (bluetransparent_movement) {
blue_transparent._x = blue_transparent._x - 1;
}
if (bluewall._x < 281.7) {
soundstart = true;
bluewall_movement = false;
bluetransparent_movement = false;
bluewall._x = 281.7;
bluewall._y = 425.4;
blue_transparent._x = 292.1;
}
if (redwall1_movement) {
redwall1._x = redwall1._x - 0.06;
}
if (redwall2_movement) {
redwall2._x = redwall2._x + 1;
}
if (redwall1._x < 542.6) {
redwall1_movement = false;
soundstart = true;
redwall1._x = 542.6;
}
if (orangewall_movement) {
orangewall._x = orangewall._x - 1;
}
if (orangewall._x < 352) {
orangewall_movement = false;
orangewall._x = 352;
}
if (greenwall_movement) {
greenwall._x = greenwall._x + 0.5;
}
if (greenwall._x > 557.9) {
soundstart = true;
greenwall_movement = false;
greenwall._x = 557.9;
}
if (lredwall_movement) {
lredwall._y = lredwall._y + 1;
}
if (lredwall._y > 225.5) {
soundstart = true;
lredwall_movement = false;
lredwall._y = 225.5;
}
if (pinkwall_movement) {
pinkwall._y = pinkwall._y - 0.7;
}
if (pinkwall._y < 96.5) {
soundstart = true;
pinkwall_movement = false;
pinkwall._y = 96.5;
}
if (aquawall_movement) {
orangeswitch._x = orangeswitch._x - 1;
aqua_transparent._x = aqua_transparent._x - 1;
aquawall._x = aquawall._x - 1;
aquawall1._x = aquawall1._x - 1;
aquawall2._x = aquawall2._x - 1;
}
if (yellowwall_movement) {
yellowwall._x = yellowwall._x + 1;
}
if (aquawall.hitTest(pinkwall)) {
soundstart = true;
aquawall_movement = false;
pinkwall_movement = false;
pinkwall._y = pinkwall._y + 1;
aquawall1._x = 140.4;
aquawall._x = aquawall._x + 1;
}
differencepink = ((pinkwall._y - ball1._y) - (pinkwall._height / 2)) - (ball1._height / 2);
differencepink2 = ((pinkwall._y - ball2._y) - (pinkwall._height / 2)) - (ball2._height / 2);
distance_between_aquawall_and_ball = Math.abs(((ball1._y - aquawall1._y) - (aquawall1._height / 2)) - (ball1._height / 2));
distance_between_aquawall_and_ball2 = Math.abs(((ball2._y - aquawall1._y) - (aquawall1._height / 2)) - (ball2._height / 2));
distance_between_topwall_and_ball = Math.abs(((ball1._y - topwall._y) - (topwall._height / 2)) - (ball1._height / 2));
distance_between_topwall_and_ball2 = Math.abs(((ball2._y - topwall._y) - (topwall._height / 2)) - (ball2._height / 2));
distance_x_between_pinkwall_and_ball = Math.abs(pinkwall._x - ball1._x);
distance_x_between_pinkwall_and_ball2 = Math.abs(pinkwall._x - ball2._x);
if ((((pinkwall_movement == true) and (differencepink <= 0.2)) and (differencepink >= -8)) and (distance_x_between_pinkwall_and_ball < ((ball1._width / 2) + (pinkwall._width / 2)))) {
ball1._y = ((pinkwall._y - (pinkwall._height / 2)) - (ball1._height / 2)) - 0.2;
}
if ((((pinkwall_movement == true) and (differencepink2 <= 0.2)) and (differencepink2 >= -8)) and (distance_x_between_pinkwall_and_ball2 < ((ball2._width / 2) + (pinkwall._width / 2)))) {
ball2._y = ((pinkwall._y - (pinkwall._height / 2)) - (ball2._height / 2)) - 0.2;
}
if ((((((differencepink <= 0.5) && (differencepink >= -2)) && (distance_between_aquawall_and_ball <= 1)) && (ball1._x > ((aquawall._x - (aquawall._width / 2)) - (ball1._width / 2)))) && (distance_x_between_pinkwall_and_ball < ((ball1._width / 2) + (pinkwall._width / 2)))) or (((((differencepink2 <= 0.5) && (differencepink2 >= -2)) && (distance_between_aquawall_and_ball2 <= 1)) && (ball2._x > ((aquawall._x - (aquawall._width / 2)) - (ball2._width / 2)))) && (distance_x_between_pinkwall_and_ball2 < ((ball2._width / 2) + (pinkwall._width / 2))))) {
pink_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if (((((differencepink <= 0.5) && (differencepink >= -2)) && (distance_between_topwall_and_ball <= 1)) && (distance_x_between_pinkwall_and_ball < ((ball1._width / 2) + (pinkwall._width / 2)))) or ((((differencepink2 <= 0.5) && (differencepink2 >= -2)) && (distance_between_topwall_and_ball2 <= 1)) && (distance_x_between_pinkwall_and_ball2 < ((ball2._width / 2) + (pinkwall._width / 2))))) {
pink_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differenceaqua = ((aquawall._x - ball1._x) - (aquawall._width / 2)) - (ball1._width / 2);
differenceaqua2 = ((aquawall._x - ball2._x) - (aquawall._width / 2)) - (ball2._width / 2);
distance_between_leftwall_and_ball = Math.abs(((ball1._x - pinkwall._x) - (pinkwall._width / 2)) - (ball1._width / 2));
distance_between_leftwall_and_ball2 = Math.abs(((ball2._x - pinkwall._x) - (pinkwall._width / 2)) - (ball2._width / 2));
distance_between_lredwall_and_ball = Math.abs(((ball1._x - lredwall._x) - (lredwall._width / 2)) - (ball1._width / 2));
distance_between_lredwall_and_ball2 = Math.abs(((ball2._x - lredwall._x) - (lredwall._width / 2)) - (ball2._width / 2));
distance_y_between_aquawall_and_ball = Math.abs(aquawall._y - ball1._y);
distance_y_between_aquawall_and_ball2 = Math.abs(aquawall._y - ball2._y);
if ((((aquawall_movement == true) and (differenceaqua <= 0.2)) and (differenceaqua >= -8)) and (distance_y_between_aquawall_and_ball < ((ball1._height / 2) + (aquawall._height / 2)))) {
ball1._x = ((aquawall._x - (aquawall._width / 2)) - (ball1._width / 2)) - 0.2;
}
if ((((aquawall_movement == true) and (differenceaqua2 <= 0.2)) and (differenceaqua2 >= -8)) and (distance_y_between_aquawall_and_ball2 < ((ball2._height / 2) + (aquawall._height / 2)))) {
ball2._x = ((aquawall._x - (aquawall._width / 2)) - (ball2._width / 2)) - 0.2;
}
if ((((((differenceaqua <= 0.5) && (differenceaqua >= -2)) && (distance_between_leftwall_and_ball <= 1)) && (ball1._y > ((pinkwall._y - (pinkwall._height / 2)) - (ball1._height / 2)))) && (distance_y_between_aquawall_and_ball < ((ball1._height / 2) + (aquawall._height / 2)))) or (((((differenceaqua2 <= 0.5) && (differenceaqua2 >= -2)) && (ball2._y > ((pinkwall._y - (pinkwall._height / 2)) - (ball2._height / 2)))) && (distance_between_leftwall_and_ball2 <= 1)) && (distance_y_between_aquawall_and_ball2 < ((ball2._height / 2) + (aquawall._height / 2))))) {
aqua_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if ((((((differenceaqua <= 0.5) && (differenceaqua >= -2)) && (distance_between_lredwall_and_ball <= 1)) && (ball1._y < ((lredwall._y + (lredwall._height / 2)) + (ball1._height / 2)))) && (distance_y_between_aquawall_and_ball < ((ball1._height / 2) + (aquawall._height / 2)))) or (((((differenceaqua2 <= 0.5) && (differenceaqua2 >= -2)) && (ball2._y < ((lredwall._y + (lredwall._height / 2)) + (ball2._height / 2)))) && (distance_between_lredwall_and_ball2 <= 1)) && (distance_y_between_aquawall_and_ball2 < ((ball2._height / 2) + (aquawall._height / 2))))) {
aqua_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differencelred = ((ball1._y - lredwall._y) - (lredwall._height / 2)) - (ball1._height / 2);
differencelred2 = ((ball2._y - lredwall._y) - (lredwall._height / 2)) - (ball2._height / 2);
distance_between_leftside_and_ball = Math.abs(((leftside._y - ball1._y) - (leftside._height / 2)) - (ball1._height / 2));
distance_between_leftside_and_ball2 = Math.abs(((leftside._y - ball2._y) - (leftside._height / 2)) - (ball2._height / 2));
distance_between_aquawally_and_ball = Math.abs(((aquawall._y - ball1._y) - (aquawall._height / 2)) - (ball1._height / 2));
distance_between_aquawally_and_ball2 = Math.abs(((aquawall._y - ball2._y) - (aquawall._height / 2)) - (ball2._height / 2));
distance_x_between_lredwall_and_ball = Math.abs(lredwall._x - ball1._x);
distance_x_between_lredwall_and_ball2 = Math.abs(lredwall._x - ball2._x);
if ((((lredwall_movement == true) and (differencelred <= 0.2)) and (differencelred >= -8)) and (distance_x_between_lredwall_and_ball < ((ball1._width / 2) + (lredwall._width / 2)))) {
ball1._y = ((lredwall._y + (lredwall._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((lredwall_movement == true) and (differencelred2 <= 0.2)) and (differencelred2 >= -8)) and (distance_x_between_lredwall_and_ball2 < ((ball2._width / 2) + (lredwall._width / 2)))) {
ball2._y = ((lredwall._y + (lredwall._height / 2)) + (ball2._height / 2)) + 0.2;
}
if ((((((differencelred <= 0.5) && (differencelred >= -2)) && (distance_between_aquawally_and_ball <= 2)) && (ball1._x < ((aquawall._x + (aquawall._width / 2)) + (ball1._width / 2)))) && (distance_x_between_lredwall_and_ball < ((ball1._width / 2) + (lredwall._width / 2)))) or (((((differencelred2 <= 0.5) && (differencelred2 >= -2)) && (distance_between_aquawally_and_ball2 <= 1)) && (ball2._x < ((aquawall._x + (aquawall._width / 2)) + (ball2._width / 2)))) && (distance_x_between_lredwall_and_ball2 < ((ball2._width / 2) + (lredwall._width / 2))))) {
lred_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differencelred <= 0.5) && (differencelred >= -2)) && (distance_between_leftside_and_ball <= 2)) && (ball1._x < ((leftside._x + (leftside._width / 2)) + (ball1._width / 2)))) && (distance_x_between_lredwall_and_ball < ((ball1._width / 2) + (lredwall._width / 2)))) or (((((differencelred2 <= 0.5) && (differencelred2 >= -2)) && (distance_between_leftside_and_ball2 <= 1)) && (ball2._x < ((leftside._x + (leftside._width / 2)) + (ball2._width / 2)))) && (distance_x_between_lredwall_and_ball2 < ((ball2._width / 2) + (lredwall._width / 2))))) {
lred_hit = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differenceblue = ((bluewall._x - ball1._x) - (bluewall._width / 2)) - (ball1._width / 2);
differenceblue2 = ((bluewall._x - ball2._x) - (bluewall._width / 2)) - (ball2._width / 2);
distance_between_leftsidex_and_ball = Math.abs(((ball1._x - leftside._x) - (leftside._width / 2)) - (ball1._width / 2));
distance_between_leftsidex_and_ball2 = Math.abs(((ball2._x - leftside._x) - (leftside._width / 2)) - (ball2._width / 2));
distance_y_between_bluewall_and_ball = Math.abs(bluewall._y - ball1._y);
distance_y_between_bluewall_and_ball2 = Math.abs(bluewall._y - ball2._y);
if ((((bluewall_movement == true) and (differenceblue <= 0.5)) and (differenceblue >= -8)) and (distance_y_between_bluewall_and_ball < ((ball1._height / 2) + (bluewall._height / 2)))) {
ball1._x = ((bluewall._x - (bluewall._width / 2)) - (ball1._width / 2)) - 0.2;
}
if ((((bluewall_movement == true) and (differenceblue2 <= 0.5)) and (differenceblue2 >= -8)) and (distance_y_between_bluewall_and_ball2 < ((ball2._height / 2) + (bluewall._height / 2)))) {
ball2._x = ((bluewall._x - (bluewall._width / 2)) - (ball2._width / 2)) - 0.2;
}
if (((((((differenceblue <= 1) && (differenceblue >= -2)) && (distance_between_leftsidex_and_ball <= 2)) && (ball1._y < ((leftside._y + (leftside._height / 2)) + (ball1._height / 2)))) && (ball1._y > ((leftside._y - (leftside._height / 2)) - (ball1._height / 2)))) && (distance_y_between_bluewall_and_ball < ((ball1._height / 2) + (bluewall._height / 2)))) or ((((((differenceblue2 <= 0.5) && (differenceblue2 >= -2)) && (distance_between_leftsidex_and_ball2 <= 1)) && (ball2._y < ((leftside._y + (leftside._height / 2)) + (ball2._height / 2)))) && (ball2._y > ((leftside._y - (leftside._height / 2)) - (ball2._height / 2)))) && (distance_y_between_bluewall_and_ball2 < ((ball2._height / 2) + (bluewall._height / 2))))) {
blue_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differencered = ((redwall1._x - ball1._x) - (redwall1._width / 2)) - (ball1._width / 2);
differencered2 = ((redwall1._x - ball2._x) - (redwall1._width / 2)) - (ball2._width / 2);
distance_between_rb_and_ball = Math.abs(((ball1._x - rb._x) - (rb._width / 2)) - (ball1._width / 2));
distance_between_rb_and_ball2 = Math.abs(((ball2._x - rb._x) - (rb._width / 2)) - (ball2._width / 2));
distance_y_between_redwall1_and_ball = Math.abs(redwall1._y - ball1._y);
distance_y_between_redwall1_and_ball2 = Math.abs(redwall1._y - ball2._y);
if ((((redwall1_movement == true) and (differencered <= 0.2)) and (differencered >= -8)) and (distance_y_between_redwall1_and_ball < ((ball1._height / 2) + (redwall1._height / 2)))) {
ball1._x = ((redwall1._x - (redwall1._width / 2)) - (ball1._width / 2)) - 0.2;
}
if ((((redwall1_movement == true) and (differencered2 <= 0.2)) and (differencered2 >= -8)) and (distance_y_between_redwall1_and_ball2 < ((ball2._height / 2) + (redwall1._height / 2)))) {
ball2._x = ((redwall1._x - (redwall1._width / 2)) - (ball2._width / 2)) - 0.2;
}
if (((((differencered <= 0.5) && (differencered >= -2)) && (distance_between_rb_and_ball <= 1)) && (distance_y_between_redwall1_and_ball < ((ball1._height / 2) + (redwall1._height / 2)))) or ((((differencered2 <= 0.5) && (differencered2 >= -2)) && (distance_between_rb_and_ball2 <= 1)) && (distance_y_between_redwall1_and_ball2 < ((ball2._height / 2) + (redwall1._height / 2))))) {
red_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differencegreen = ((ball1._x - greenwall._x) - (greenwall._width / 2)) - (ball1._width / 2);
differencegreen2 = ((ball2._x - greenwall._x) - (greenwall._width / 2)) - (ball2._width / 2);
distance_between_rightwall_and_ball = Math.abs(((rightwall._x - ball1._x) - (rightwall._width / 2)) - (ball1._width / 2));
distance_between_rightwall_and_ball2 = Math.abs(((rightwall._x - ball2._x) - (rightwall._width / 2)) - (ball2._width / 2));
distance_y_between_greenwall_and_ball = Math.abs(greenwall._y - ball1._y);
distance_y_between_greenwall_and_ball2 = Math.abs(greenwall._y - ball2._y);
if ((((greenwall_movement == true) and (differencegreen <= 0.2)) and (differencegreen >= -8)) and (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) {
ball1._x = ((greenwall._x + (greenwall._width / 2)) + (ball1._width / 2)) + 0.2;
}
if ((((greenwall_movement == true) and (differencegreen2 <= 0.2)) and (differencegreen2 >= -8)) and (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2)))) {
ball2._x = ((greenwall._x + (greenwall._width / 2)) + (ball2._width / 2)) + 0.2;
}
if (((((differencegreen <= 0.5) && (differencegreen >= -2)) && (distance_between_rightwall_and_ball <= 1)) && (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) or ((((differencegreen2 <= 0.5) && (differencegreen2 >= -2)) && (distance_between_rightwall_and_ball2 <= 1)) && (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2))))) {
green_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation > (Stage.width / 2)) {
if (blue_hit == true) {
gray_is_hit_blue = true;
}
if (pink_hit == true) {
gray_is_hit_pink = true;
}
if (lred_hit == true) {
gray_is_hit_lred = true;
}
if (red_hit == true) {
black_is_hit_red = true;
}
if (aqua_hit == true) {
gray_is_hit_aqua = true;
}
if (green_hit == true) {
black_is_hit_green = true;
}
} else if (ball1_xlocation < (Stage.width / 2)) {
if (blue_hit == true) {
black_is_hit_blue = true;
}
if (pink_hit == true) {
black_is_hit_pink = true;
}
if (lred_hit == true) {
black_is_hit_lred = true;
}
if (red_hit == true) {
gray_is_hit_red = true;
}
if (aqua_hit == true) {
black_is_hit_aqua = true;
}
if (green_hit == true) {
gray_is_hit_green = true;
}
}
ball_locator();
}
};
Instance of Symbol 1257 MovieClip "ball1" in Frame 33
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftside)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftside.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftside.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftside.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rt)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rt.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rt.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rt.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rt.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rb)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rb.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rb.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rb.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rb.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.yellowwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.yellowwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.yellowwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.yellowwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.yellowwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall.blueinside)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.blueinside.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.blueinside.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.blueinside.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.blueinside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.lredwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.lredwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.lredwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.lredwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.lredwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.aquawall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.aquawall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.aquawall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.aquawall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.aquawall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall2.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 34
function restartLevel() {
_root.scoresubmit26 = savefile.data.scoresubmit26;
savefile.flush();
soundstart = false;
small = false;
if ((((var27 != true) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var26 = true;
}
var25 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
pinkswitch.gotoAndStop(1);
orangeswitch.gotoAndStop(1);
redwall_movement = false;
bluewall_movement = false;
pinkwall_movement = false;
orangewall_movement = false;
aquawall_movement = false;
greenwall_movement = false;
yellowwall_movement = false;
black_is_hit = false;
gray_is_hit = false;
ball_right = false;
ball_left = false;
ball_location = true;
pinkswitch.gotoAndStop(1);
orangeswitch.gotoAndStop(1);
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
ball_movement = true;
finisher = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
ball1._x = 129;
ball1._y = 75;
ball2._x = 567;
ball2._y = 172.3;
redwall._x = 500;
redwall._y = -175.2;
redkey._x = 274.9;
redkey._y = 172.3;
greenwall._x = 500;
greenwall._y = 264;
greenkey._x = 274.9;
greenkey._y = 417;
yellowwall._x = 500;
yellowwall._y = 320;
yellowkey._x = 118.5;
yellowkey._y = 476.8;
bluewall._x = 221.9;
bluewall._y = 218.1;
bluekey._x = 166.9;
bluekey._y = 363;
aquawall._x = 129.3;
aquawall._y = 172.3;
aquakey._x = 274.9;
aquakey._y = 474.6;
pinkwall._x = 144.3;
pinkwall._y = 415.5;
pinkswitch._x = 433;
pinkswitch._y = 172.3;
orangewall._x = 597.9;
orangewall._y = 376;
orangeswitch._x = 500;
orangeswitch._y = 172.3;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 500;
finish._y = 453.8;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(26);
restartLevel();
youwin.onPress = function () {
gotoAndStop ("l34");
};
ball1.onEnterFrame = function () {
if (this.hitTest(bluekey)) {
keystart = true;
bluekey._x = 100000 /* 0x0186A0 */;
bluewall_movement = true;
_root.ball1.scan.gotoAndStop(4);
_root.ball1.scan.bluemove.gotoAndPlay(1);
}
if (this.hitTest(redkey)) {
keystart = true;
redkey._x = 100000 /* 0x0186A0 */;
redwall_movement = true;
_root.ball1.scan.gotoAndStop(3);
}
if (this.hitTest(aquakey)) {
keystart = true;
aquakey._x = 100000 /* 0x0186A0 */;
aquawall_movement = true;
_root.ball1.scan.gotoAndStop(8);
}
if (this.hitTest(yellowkey)) {
keystart = true;
yellowkey._x = 10000;
yellowwall_movement = true;
_root.ball1.scan.gotoAndStop(7);
}
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 10000;
greenwall_movement = true;
_root.ball1.scan.gotoAndStop(2);
}
if (aquawall.hitTest(_root.pinkswitch.button) and (_root.pinkswitch._currentframe == 1)) {
switchstart = true;
pinkswitch.gotoAndStop(2);
pinkwall_movement = true;
}
if (aquawall.hitTest(_root.orangeswitch.button) and (_root.orangeswitch._currentframe == 1)) {
switchstart = true;
orangeswitch.gotoAndStop(2);
if (orangewall._x <= 499.8) {
orangewall_movement = false;
} else {
orangewall_movement = true;
}
}
if (redwall.hitTest(_root.orangeswitch.button) and (_root.orangeswitch._currentframe == 1)) {
switchstart = true;
orangeswitch.gotoAndStop(2);
if (orangewall._x <= 499.8) {
orangewall_movement = false;
} else {
orangewall_movement = true;
}
}
if (redwall.hitTest(_root.pinkswitch.button)) {
pinkswitch.gotoAndStop(2);
pinkwall_movement = true;
}
if (redwall.hitTest(aquawall)) {
soundstart = true;
redwall_movement = false;
aquawall_movement = false;
if ((((redwall._x - (aquawall._width / 2)) - aquawall._x) - (redwall._width / 2)) < -1) {
redwall._y = ((aquawall._y - (redwall._height / 2)) - (aquawall._height / 2)) - 0.1;
} else {
aquawall._x = ((redwall._x - (aquawall._width / 2)) - (redwall._width / 2)) - 0.1;
}
}
if (redwall.hitTest(yellowwall)) {
soundstart = true;
redwall_movement = false;
yellowwall_movement = false;
redwall._y = ((yellowwall._y - (yellowwall._height / 2)) - (redwall._height / 2)) - 0.1;
}
if (redwall.hitTest(greenwall)) {
soundstart = true;
greenwall_movement = false;
redwall_movement = false;
redwall._y = ((greenwall._y - (greenwall._height / 2)) - (redwall._height / 2)) - 0.1;
}
if (aquawall.hitTest(rightwall)) {
soundstart = true;
aquawall_movement = false;
aquawall._x = ((rightwall._x - (rightwall._width / 2)) - (aquawall._width / 2)) - 0.1;
}
if (aquawall.hitTest(bluewall)) {
soundstart = true;
aquawall_movement = false;
bluewall_movement = false;
aquawall._x = ((bluewall._x - (bluewall._width / 2)) - (aquawall._width / 2)) - 0.1;
}
if (greenwall.hitTest(bluewall)) {
greenwall_movement = false;
bluewall_movement = false;
}
if (scoresubmit26) {
scoresubmit = false;
} else if (scoresubmit26 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 26) or scoresubmit) {
level26_best_time = seconds;
scoresubmit26 = true;
savefile.data.scoresubmit26 = _root.scoresubmit26;
savefile.flush();
}
if (seconds < level26_best_time) {
level26_best_time = seconds;
}
savefile.data.level26_best_time = _root.level26_best_time;
savefile.flush();
if (_root.score <= 27) {
_root.score = 27;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(26);
_root.win.meter.gotoAndStop(25);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l34");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var26) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l33");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l34");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (bluewall_movement) {
bluewall._y = bluewall._y - 2;
}
if (redwall_movement) {
redwall._y = redwall._y + 1;
}
if (orangewall_movement) {
orangewall._x = orangewall._x - 2;
}
if (orangewall._x < 499.8) {
soundstart = true;
orangewall_movement = false;
orangewall._x = 499.8;
}
if (greenwall_movement) {
greenwall._x = greenwall._x - 0.3;
}
if (greenwall._x < 200) {
soundstart = true;
greenwall_movement = false;
greenwall._x = 200;
}
if (pinkwall_movement) {
pinkwall._x = pinkwall._x - 1;
}
if (aquawall_movement) {
aquawall._x = aquawall._x + 0.5;
}
if (yellowwall_movement) {
yellowwall._x = yellowwall._x + 0.5;
}
differencered = ((ball1._y - redwall._y) - (redwall._height / 2)) - (ball1._height / 2);
differencered2 = ((ball2._y - redwall._y) - (redwall._height / 2)) - (ball2._height / 2);
distance_between_aquawall_and_ball = Math.abs(((aquawall._y - ball1._y) - (aquawall._height / 2)) - (ball1._height / 2));
distance_between_aquawall_and_ball2 = Math.abs(((aquawall._y - ball2._y) - (aquawall._height / 2)) - (ball2._height / 2));
distance_between_greenwall_and_ball = Math.abs(((greenwall._y - ball1._y) - (greenwall._height / 2)) - (ball1._height / 2));
distance_between_greenwall_and_ball2 = Math.abs(((greenwall._y - ball2._y) - (greenwall._height / 2)) - (ball2._height / 2));
distance_between_yellowwall_and_ball = Math.abs(((yellowwall._y - ball1._y) - (yellowwall._height / 2)) - (ball1._height / 2));
distance_between_yellowwall_and_ball2 = Math.abs(((yellowwall._y - ball2._y) - (yellowwall._height / 2)) - (ball2._height / 2));
distance_x_between_redwall_and_ball = Math.abs(redwall._x - ball1._x);
distance_x_between_redwall_and_ball2 = Math.abs(redwall._x - ball2._x);
if ((((redwall_movement == true) and (differencered <= 0.2)) and (differencered >= -8)) and (distance_x_between_redwall_and_ball < ((ball1._width / 2) + (redwall._width / 2)))) {
ball1._y = ((redwall._y + (redwall._height / 2)) + (ball1._height / 2)) + 0.2;
}
if ((((redwall_movement == true) and (differencered2 <= 0.2)) and (differencered2 >= -8)) and (distance_x_between_redwall_and_ball2 < ((ball2._width / 2) + (redwall._width / 2)))) {
ball2._y = ((redwall._y + (redwall._height / 2)) + (ball2._height / 2)) + 0.2;
}
if (((((((differencered <= 0.5) && (differencered >= -2)) && (distance_between_aquawall_and_ball <= 1)) && (ball1._x > ((aquawall._x - (aquawall._width / 2)) - (ball1._width / 2)))) && (ball1._x < ((aquawall._x + (aquawall._width / 2)) + (ball1._width / 2)))) && (distance_x_between_redwall_and_ball < ((ball1._width / 2) + (redwall._width / 2)))) or ((((((differencered2 <= 0.5) && (differencered2 >= -2)) && (distance_between_aquawall_and_ball2 <= 1)) && (ball2._x > ((aquawall._x - (aquawall._width / 2)) - (ball2._width / 2)))) && (ball2._x < ((aquawall._x + (aquawall._width / 2)) + (ball2._width / 2)))) && (distance_x_between_redwall_and_ball2 < ((ball2._width / 2) + (redwall._width / 2))))) {
ball_right = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if ((((((differencered <= 0.5) && (differencered >= -2)) && (distance_between_greenwall_and_ball <= 1)) && (ball1._x < ((greenwall._x + (greenwall._width / 2)) + (ball1._width / 2)))) && (distance_x_between_redwall_and_ball < ((ball1._width / 2) + (redwall._width / 2)))) or (((((differencered2 <= 0.5) && (differencered2 >= -2)) && (distance_between_greenwall_and_ball2 <= 1)) && (ball2._x < ((greenwall._x + (greenwall._width / 2)) + (ball2._width / 2)))) && (distance_x_between_redwall_and_ball2 < ((ball2._width / 2) + (redwall._width / 2))))) {
ball_right = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
if (((((differencered <= 0.5) && (differencered >= -2)) && (distance_between_yellowwall_and_ball <= 1)) && (distance_x_between_redwall_and_ball < ((ball1._width / 2) + (redwall._width / 2)))) or ((((differencered2 <= 0.5) && (differencered2 >= -2)) && (distance_between_yellowwall_and_ball2 <= 1)) && (distance_x_between_redwall_and_ball2 < ((ball2._width / 2) + (redwall._width / 2))))) {
ball_right = true;
ball_location = false;
ball1._y = 2000;
ball2._y = 2000;
}
differenceaqua = ((ball1._x - aquawall._x) - (aquawall._width / 2)) - (ball1._width / 2);
differenceaqua2 = ((ball2._x - aquawall._x) - (aquawall._width / 2)) - (ball2._width / 2);
distance_between_rightwall_and_ball = Math.abs(((rightwall._x - ball1._x) - (rightwall._width / 2)) - (ball1._width / 2));
distance_between_rightwall_and_ball2 = Math.abs(((rightwall._x - ball2._x) - (rightwall._width / 2)) - (ball2._width / 2));
distance_between_middlewall_and_ball = Math.abs(((middlewall._x - ball1._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_middlewall_and_ball2 = Math.abs(((middlewall._x - ball2._x) - (middlewall._width / 2)) - (ball2._width / 2));
distance_between_rightside_and_ball = Math.abs(((rightside._x - ball1._x) - (rightside._width / 2)) - (ball1._width / 2));
distance_between_rightside_and_ball2 = Math.abs(((rightside._x - ball2._x) - (rightside._width / 2)) - (ball2._width / 2));
distance_y_between_aquawall_and_ball = Math.abs(aquawall._y - ball1._y);
distance_y_between_aquawall_and_ball2 = Math.abs(aquawall._y - ball2._y);
if ((((aquawall_movement == true) and (differenceaqua <= 0.2)) and (differenceaqua >= -8)) and (distance_y_between_aquawall_and_ball < ((ball1._height / 2) + (aquawall._height / 2)))) {
ball1._x = ((aquawall._x + (aquawall._width / 2)) + (ball1._width / 2)) + 0.2;
}
if ((((aquawall_movement == true) and (differenceaqua2 <= 0.2)) and (differenceaqua2 >= -8)) and (distance_y_between_aquawall_and_ball2 < ((ball2._height / 2) + (aquawall._height / 2)))) {
ball2._x = ((aquawall._x + (aquawall._width / 2)) + (ball2._width / 2)) + 0.2;
}
if (((((differenceaqua <= 0.5) && (differenceaqua >= -2)) && (distance_between_rightwall_and_ball <= 1)) && (distance_y_between_aquawall_and_ball < ((ball1._height / 2) + (aquawall._height / 2)))) or ((((differenceaqua2 <= 0.5) && (differenceaqua2 >= -2)) && (distance_between_rightwall_and_ball2 <= 1)) && (distance_y_between_aquawall_and_ball2 < ((ball2._height / 2) + (aquawall._height / 2))))) {
ball_right = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (((((differenceaqua <= 0.5) && (differenceaqua >= -2)) && (distance_between_middlewall_and_ball <= 1)) && (distance_y_between_aquawall_and_ball < ((ball1._height / 2) + (aquawall._height / 2)))) or ((((differenceaqua2 <= 0.5) && (differenceaqua2 >= -2)) && (distance_between_middlewall_and_ball2 <= 1)) && (distance_y_between_aquawall_and_ball2 < ((ball2._height / 2) + (aquawall._height / 2))))) {
ball_left = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if ((((((differenceaqua <= 0.5) && (differenceaqua >= -2)) && (distance_between_rightside_and_ball <= 1)) && (ball1._y < ((rightside._y + (rightside._height / 2)) + (ball1._height / 2)))) && (distance_y_between_aquawall_and_ball < ((ball1._height / 2) + (aquawall._height / 2)))) or (((((differenceaqua2 <= 0.5) && (differenceaqua2 >= -2)) && (distance_between_rightside_and_ball2 <= 1)) && (ball2._y < ((rightside._y + (rightside._height / 2)) + (ball2._height / 2)))) && (distance_y_between_aquawall_and_ball2 < ((ball2._height / 2) + (aquawall._height / 2))))) {
ball_left = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differencegreen = ((greenwall._x - ball1._x) - (greenwall._width / 2)) - (ball1._width / 2);
differencegreen2 = ((greenwall._x - ball2._x) - (greenwall._width / 2)) - (ball2._width / 2);
distance_between_leftwall_and_ball = Math.abs(((ball1._x - leftwall._x) - (leftwall._width / 2)) - (ball1._width / 2));
distance_between_leftwall_and_ball2 = Math.abs(((ball2._x - leftwall._x) - (leftwall._width / 2)) - (ball2._width / 2));
distance_between_bluewall_and_ball = Math.abs(((ball1._x - bluewall._x) - (bluewall._width / 2)) - (ball1._width / 2));
distance_between_bluewall_and_ball2 = Math.abs(((ball2._x - bluewall._x) - (bluewall._width / 2)) - (ball2._width / 2));
distance_y_between_greenwall_and_ball = Math.abs(greenwall._y - ball1._y);
distance_y_between_greenwall_and_ball2 = Math.abs(greenwall._y - ball2._y);
if ((((greenwall_movement == true) and (differencegreen <= 0.5)) and (differencegreen >= -8)) and (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) {
ball1._x = ((greenwall._x - (greenwall._width / 2)) - (ball1._width / 2)) - 0.2;
}
if ((((greenwall_movement == true) and (differencegreen2 <= 0.5)) and (differencegreen2 >= -8)) and (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2)))) {
ball2._x = ((greenwall._x - (greenwall._width / 2)) - (ball2._width / 2)) - 0.2;
}
if (((((differencegreen <= 0.5) && (differencegreen >= -2)) && (distance_between_leftwall_and_ball <= 1)) && (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) or ((((differencegreen2 <= 0.5) && (differencegreen2 >= -2)) && (distance_between_leftwall_and_ball2 <= 1)) && (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2))))) {
ball_left = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if ((((((differencegreen <= 0.5) && (differencegreen >= -2)) && (distance_between_bluewall_and_ball <= 1)) && (ball1._y < ((bluewall._y + (bluewall._height / 2)) + (ball1._height / 2)))) && (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) or (((((differencegreen2 <= 0.5) && (differencegreen2 >= -2)) && (ball2._y < ((bluewall._y + (bluewall._height / 2)) + (ball2._height / 2)))) && (distance_between_bluewall_and_ball2 <= 1)) && (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2))))) {
ball_left = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (ball_left == true) {
black_is_hit = true;
}
if (ball_right == true) {
gray_is_hit = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (ball_left == true) {
gray_is_hit = true;
}
if (ball_right == true) {
black_is_hit = true;
}
}
ball_locator();
}
};
Instance of Symbol 2464 MovieClip "ball1" in Frame 34
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftside)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftside.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftside.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftside.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middleside)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middleside.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middleside.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middleside.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middleside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightside)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightside.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightside.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.greenwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.yellowwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.yellowwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.yellowwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.yellowwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.yellowwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.aquawall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.aquawall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.aquawall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.aquawall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.aquawall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.redwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.redwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.redwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.redwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.redwall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 35
function restartLevel() {
_root.scoresubmit25 = savefile.data.scoresubmit25;
savefile.flush();
soundstart = false;
small = false;
if (((((var26 != true) and (var27 != true)) and (var28 != true)) and (var29 != true)) and (var30 != true)) {
var25 = true;
}
var24 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
pinkwall_movement = false;
yellowwall_movement = false;
ball_movement = true;
finisher = false;
yellowwall._width = 100.9;
ball_location = true;
gray_is_hit_pink = false;
black_is_hit_pink = false;
pink_hit = false;
gray_is_hit_yellow = false;
black_is_hit_yellow = false;
yellow_hit = false;
warp_on = false;
warpkey1.gotoAndStop(1);
warpkey2.gotoAndStop(1);
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
pinkkey._x = 279.2;
pinkkey._y = 382.6;
yellowkey._x = 120.1;
yellowkey._y = 63.9;
warpkey1._x = 279.2;
warpkey1._y = 305.7;
warpkey2._x = 576.1;
warpkey2._y = 376.8;
yellowwall._x = 450.4;
yellowwall._y = 376.8;
pinkwall._x = 484.4;
pinkwall._y = 168;
ball1._x = 279.2;
ball1._y = 481.6;
ball2._x = 576.1;
ball2._y = 481.6;
youwin._x = 10000;
winningscreen._x = 1000;
finish._x = 199.8;
finish._y = 454.8;
finish2._x = 450;
finish2._y = 454.8;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
function ball_locator() {
ball_location = true;
if (black_is_hit_pink == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_pink == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
if (black_is_hit_yellow == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(3);
_root.decoy.gotoAndStop(2);
}
if (gray_is_hit_yellow == true) {
ball1._x = 2000;
ball2._x = 2000;
decoy._x = ball1_xlocation;
decoy._y = ball1_ylocation;
decoy2._x = ball2_xlocation;
decoy2._y = ball2_ylocation;
_root.decoy2.gotoAndStop(2);
_root.decoy.gotoAndStop(3);
}
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(24);
restartLevel();
ball1.onEnterFrame = function () {
if (this.hitTest(pinkkey) or ball2.hitTest(pinkkey)) {
keystart = true;
pinkkey._x = 100000 /* 0x0186A0 */;
pinkwall_movement = true;
_root.ball1.scan.gotoAndStop(5);
}
if (this.hitTest(yellowkey) or ball2.hitTest(yellowkey)) {
keystart = true;
yellowkey._x = 100000 /* 0x0186A0 */;
yellowwall_movement = true;
_root.ball1.scan.gotoAndStop(7);
}
if (this.hitTest(warpkey1)) {
warpkey1._x = 1000;
warp_on = true;
warpkey2.gotoAndStop(2);
}
if (this.hitTest(warpkey2)) {
warpkey2._x = 1000;
_root.reversestart = true;
warp_on = true;
}
if (scoresubmit25) {
scoresubmit = false;
} else if (scoresubmit25 == false) {
scoresubmit = true;
}
if ((this.hitTest(finish) or this.hitTest(finish2)) and (ball2.hitTest(finish) or ball2.hitTest(finish2))) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 25) or scoresubmit) {
level25_best_time = seconds;
scoresubmit25 = true;
savefile.data.scoresubmit25 = _root.scoresubmit25;
savefile.flush();
}
if (seconds < level25_best_time) {
level25_best_time = seconds;
}
savefile.data.level25_best_time = _root.level25_best_time;
savefile.flush();
if (_root.score <= 26) {
_root.score = 26;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(25);
_root.win.meter.gotoAndStop(26);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l32");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var25) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l30");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l32");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
decoyy = decoy._y;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
if (pinkwall_movement) {
pinkwall._x = pinkwall._x - 1;
}
if (pinkwall._x < 450.4) {
pinkwall_movement = false;
soundstart = true;
pinkwall._x = 450.4;
}
if (yellowwall_movement) {
yellowwall._x = yellowwall._x - 1;
yellowwall._width = yellowwall._width - 0.05;
}
if (yellowwall._x < 351.4) {
yellowwall_movement = false;
yellowwall._x = 351.4;
yellowwall._width = 2;
}
differenceyellow = ((yellowwall._x - ball1._x) - (yellowwall._width / 2)) - (ball1._width / 2);
differenceyellow2 = ((yellowwall._x - ball2._x) - (yellowwall._width / 2)) - (ball2._width / 2);
distance_between_leftside_and_ball = Math.abs(((ball1._x - leftside._x) - (leftside._width / 2)) - (ball1._width / 2));
distance_between_leftside_and_ball2 = Math.abs(((ball2._x - leftside._x) - (leftside._width / 2)) - (ball2._width / 2));
distance_y_between_yellowwall_and_ball = Math.abs(yellowwall._y - ball1._y);
distance_y_between_yellowwall_and_ball2 = Math.abs(yellowwall._y - ball2._y);
if ((((yellowwall_movement == true) and (differenceyellow <= 0.2)) and (differenceyellow >= -8)) and (distance_y_between_yellowwall_and_ball < ((ball1._height / 2) + (yellowwall._height / 2)))) {
ball1._x = ((yellowwall._x - (yellowwall._width / 2)) - (ball1._width / 2)) - 0.2;
}
if ((((yellowwall_movement == true) and (differenceyellow2 <= 0.2)) and (differenceyellow2 >= -8)) and (distance_y_between_yellowwall_and_ball2 < ((ball2._height / 2) + (yellowwall._height / 2)))) {
ball2._x = ((yellowwall._x - (yellowwall._width / 2)) - (ball2._width / 2)) - 0.2;
}
if (((((differenceyellow <= 0.5) && (differenceyellow >= -2)) && (distance_between_leftside_and_ball <= 1)) && (distance_y_between_yellowwall_and_ball < ((ball1._height / 2) + (yellowwall._height / 2)))) or ((((differenceyellow2 <= 0.5) && (differenceyellow2 >= -2)) && (distance_between_leftside_and_ball2 <= 1)) && (distance_y_between_yellowwall_and_ball2 < ((ball2._height / 2) + (yellowwall._height / 2))))) {
yellow_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
differencepink = ((pinkwall._x - ball1._x) - (pinkwall._width / 2)) - (ball1._width / 2);
differencepink2 = ((pinkwall._x - ball2._x) - (pinkwall._width / 2)) - (ball2._width / 2);
distance_between_middlewall_and_ball = Math.abs(((ball1._x - middlewall._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_middlewall_and_ball2 = Math.abs(((ball2._x - middlewall._x) - (middlewall._width / 2)) - (ball2._width / 2));
distance_y_between_pinkwall_and_ball = Math.abs(pinkwall._y - ball1._y);
distance_y_between_pinkwall_and_ball2 = Math.abs(pinkwall._y - ball2._y);
if ((((pinkwall_movement == true) and (differencepink <= 0.2)) and (differencepink >= -8)) and (distance_y_between_pinkwall_and_ball < ((ball1._height / 2) + (pinkwall._height / 2)))) {
ball1._x = ((pinkwall._x - (pinkwall._width / 2)) - (ball1._width / 2)) - 0.2;
}
if ((((pinkwall_movement == true) and (differencepink2 <= 0.2)) and (differencepink2 >= -8)) and (distance_y_between_pinkwall_and_ball2 < ((ball2._height / 2) + (pinkwall._height / 2)))) {
ball2._x = ((pinkwall._x - (pinkwall._width / 2)) - (ball2._width / 2)) - 0.2;
}
if (((((differencepink <= 0.5) && (differencepink >= -2)) && (distance_between_middlewall_and_ball <= 1)) && (distance_y_between_pinkwall_and_ball < ((ball1._height / 2) + (pinkwall._height / 2)))) or ((((differencepink2 <= 0.5) && (differencepink2 >= -2)) && (distance_between_middlewall_and_ball2 <= 1)) && (distance_y_between_pinkwall_and_ball2 < ((ball2._height / 2) + (pinkwall._height / 2))))) {
pink_hit = true;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (yellow_hit == true) {
black_is_hit_yellow = true;
}
if (pink_hit == true) {
gray_is_hit_pink = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (yellow_hit == true) {
gray_is_hit_yellow = true;
}
if (pink_hit == true) {
black_is_hit_pink = true;
}
}
ball_locator();
}
};
Instance of Symbol 2517 MovieClip "ball2" in Frame 35
onClipEvent (load) {
xmove2 = 0;
ymove2 = 0;
}
onClipEvent (enterFrame) {
function move2(xmove2, ymove2) {
_x = (_x + xmove2);
_y = (_y + ymove2);
if (hitTest(_root.leftwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.yellowwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.yellowwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.yellowwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.yellowwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.yellowwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftside)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftside.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftside.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftside.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightside)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightside.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightside.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove2 > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove2 < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove2 > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove2 < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.warp_on == true) {
if (_root.ball_movement) {
if (Key.isDown(37)) {
move2(5, 0);
}
if (Key.isDown(39)) {
move2(-5, 0);
}
if (Key.isDown(38)) {
move2(0, 5);
}
if (Key.isDown(40)) {
move2(0, -5);
}
}
}
}
Instance of Symbol 2518 MovieClip "ball1" in Frame 35
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftside)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftside.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftside.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftside.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightside)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightside.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightside.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.yellowwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.yellowwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.yellowwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.yellowwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.yellowwall.getBounds(_root).yMax) - 0.1));
}
}
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Frame 36
function restartLevel() {
_root.scoresubmit27 = savefile.data.scoresubmit27;
savefile.flush();
soundstart = false;
small = false;
if (((var28 != true) and (var29 != true)) and (var30 != true)) {
var27 = true;
}
var26 = false;
if (_root.var1) {
_root.score = 1;
} else if (_root.var2) {
_root.score = 2;
} else if (_root.var3) {
_root.score = 3;
} else if (_root.var4) {
_root.score = 4;
} else if (_root.var5) {
_root.score = 5;
} else if (_root.var6) {
_root.score = 6;
} else if (_root.var71) {
_root.score = 7;
} else if (_root.var8) {
_root.score = 8;
} else if (_root.var9) {
_root.score = 9;
} else if (_root.var10) {
_root.score = 10;
} else if (_root.var11) {
_root.score = 11;
} else if (_root.var12) {
_root.score = 12;
} else if (_root.var13) {
_root.score = 13;
} else if (_root.var14) {
_root.score = 14;
} else if (_root.var15) {
_root.score = 15;
} else if (_root.var16) {
_root.score = 16;
} else if (_root.var17) {
_root.score = 17;
} else if (_root.var18) {
_root.score = 18;
} else if (_root.var19) {
_root.score = 19;
} else if (_root.var20) {
_root.score = 20;
} else if (_root.var21) {
_root.score = 21;
} else if (_root.var22) {
_root.score = 22;
} else if (_root.var23) {
_root.score = 23;
} else if (_root.var24) {
_root.score = 24;
} else if (_root.var25) {
_root.score = 25;
} else if (_root.var26) {
_root.score = 26;
} else if (_root.var27) {
_root.score = 27;
} else if (_root.var28) {
_root.score = 28;
} else if (_root.var29) {
_root.score = 29;
} else if (_root.var30) {
_root.score = 30;
}
savefile.data.score = _root.score;
savefile.flush();
radius = ball1._height / 2;
SPACE_possible = true;
pinkwall_movement = false;
orangewall_movement = false;
yellowwall_movement = false;
bluewall_movement = false;
transporter2._alpha = 100;
transporter1._alpha = 100;
_root.orangeswitch.gotoAndStop(1);
_root.blueswitch.gotoAndStop(1);
crate2_hit_1 = false;
crate2_hit_2 = false;
crate1_hit_1 = false;
crate1_hit_2 = false;
_root.crate2.gotoAndStop(1);
_root.decoy2.gotoAndStop(1);
_root.decoy.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball1.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.ball2.gotoAndStop(1);
_root.crate1.gotoAndStop(1);
_root.crate2.gotoAndStop(1);
decoy._x = -1000;
decoy2._x = -1000;
ball_movement = true;
finisher = false;
yellow_hit = false;
green_hit = false;
timing = true;
elapsedTime = 0;
startTime = getTimer();
seconds = 0;
crate1._x = 540.8;
crate1._y = 192.5;
crate2._x = 183.3;
crate2._y = 137.3;
greenkey._x = 425.1;
greenkey._y = 69.7;
orangeswitch._x = 540.8;
orangeswitch._y = 481.4;
pinkkey._x = 274.1;
pinkkey._y = 248.9;
pinkwall._x = 425.4;
pinkwall._y = 435.3;
orangewall._x = 273.1;
orangewall._y = 300;
ball1._x = 183.2;
ball1._y = 85.3;
ball2._x = 425.1;
ball2._y = 243.2;
greenwallright._x = 584.8;
greenwallright._y = 456.1;
finish._x = 425;
finish._y = 478.4;
transporter1._x = 183.2;
transporter1._y = 196.6;
transporter2._x = 541;
transporter2._y = 321.2;
yellowkey._x = 122.1;
yellowkey._y = 482.9;
blueswitch._x = 229.9;
blueswitch._y = 415.4;
bluewall._x = 425.4;
bluewall._y = 397.9;
yellowwall._x = 540.5;
yellowwall._y = -102.8;
grennwallleft._x = 496.4;
green_transparent._x = 540.9;
greenwall._x = 541.4;
}
function ball1_old_location() {
x_location = ball1._x;
y_location = ball1._y;
}
stop();
_root.options._x = 28.1;
_root.restartbutton._x = 41.9;
_root.QW._x = 73.8;
_root.P._x = 55.6;
_root.BN._x = 66;
totalRestarts = 0;
_root.option.hintbox.gotoAndStop(1);
_root.option.meter.gotoAndStop(25);
restartLevel();
ball1.onEnterFrame = function () {
if (this.hitTest(pinkkey)) {
keystart = true;
pinkkey._x = 100000 /* 0x0186A0 */;
pinkwall_movement = true;
_root.ball1.scan.gotoAndStop(9);
}
if (this.hitTest(greenkey)) {
keystart = true;
greenkey._x = 100000 /* 0x0186A0 */;
greenwallright_movement = true;
}
if ((crate1.hitTest(_root.orangeswitch.button) or crate2.hitTest(_root.orangeswitch.button)) and (_root.orangeswitch._currentframe == 1)) {
switchstart = true;
orangeswitch.gotoAndStop(2);
orangewall_movement = true;
}
if ((crate1.hitTest(_root.blueswitch.button) or crate2.hitTest(_root.blueswitch.button)) and (_root.blueswitch._currentframe == 1)) {
switchstart = true;
blueswitch.gotoAndStop(2);
bluewall_movement = true;
}
if (this.hitTest(yellowkey)) {
keystart = true;
yellowkey._x = 100000 /* 0x0186A0 */;
yellowwall_movement = true;
_root.ball1.scan.gotoAndStop(7);
}
if (scoresubmit27) {
scoresubmit = false;
} else if (scoresubmit27 == false) {
scoresubmit = true;
}
if (this.hitTest(finish)) {
timing = false;
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if ((score == 27) or scoresubmit) {
level27_best_time = seconds;
scoresubmit27 = true;
savefile.data.scoresubmit27 = _root.scoresubmit27;
savefile.flush();
}
if (seconds < level27_best_time) {
level27_best_time = seconds;
}
savefile.data.level27_best_time = _root.level27_best_time;
savefile.flush();
if (_root.score <= 28) {
_root.score = 28;
}
savefile.data.score = _root.score;
savefile.flush();
SPACE_possible = false;
ball_movement = false;
win._x = Stage.width / 2;
win._y = Stage.height / 2;
_root.win.instructions.gotoAndStop(27);
_root.win.meter.gotoAndStop(28);
}
if (Key.isDown(32) && (SPACE_possible == false)) {
finisher = true;
}
if (finisher) {
if (!Key.isDown(32)) {
win._x = 10000;
gotoAndStop ("l28");
finisher = false;
SPACE_possible = true;
}
}
};
_root.onEnterFrame = function () {
seconds = int((elapsedTime / 1000) * 10) / 10;
if (seconds >= 99.9) {
seconds = 99.9;
}
if (!ball_movement) {
timing = false;
startTime = getTimer() - elapsedTime;
} else {
timing = true;
}
if (timing) {
elapsedTime = getTimer() - startTime;
}
if (var27) {
w_works = false;
} else {
w_works = true;
}
if (((option._x != (Stage.width / 2)) and (instruction._x != (Stage.width / 2))) and (win._x != (Stage.width / 2))) {
if (Key.isDown(81)) {
q_is_DOWN = true;
}
if (q_is_DOWN) {
if (!Key.isDown(81)) {
gotoAndStop ("l32");
q_is_DOWN = false;
}
}
if (Key.isDown(87)) {
w_is_DOWN = true;
}
if (w_is_DOWN) {
if (!Key.isDown(87)) {
if (w_works) {
gotoAndStop ("l28");
}
w_is_DOWN = false;
}
}
ballx = ball1._x;
bally = ball1._y;
decoyx = decoy._x;
if (Key.isDown(78)) {
n_is_DOWN = true;
}
if (n_is_DOWN) {
if (!Key.isDown(78)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
n_is_DOWN = false;
}
}
}
if (Key.isDown(66)) {
b_is_DOWN = true;
}
if (b_is_DOWN) {
if (!Key.isDown(66)) {
if (ball_movement) {
totalRestarts = totalRestarts + 1;
restartLevel();
b_is_DOWN = false;
}
}
}
if (SPACE_possible) {
if (Key.isDown(32)) {
SPACE_is_DOWN = true;
}
if (SPACE_is_DOWN) {
if (!Key.isDown(32)) {
ball1_old_location();
ball1._x = ball2._x;
ball1._y = ball2._y;
ball2._x = x_location;
ball2._y = y_location;
SPACE_is_DOWN = false;
}
}
}
}
decoycrate = _root.decoy_crate.inside._currentframe;
ballx = ball1._x;
bally = ball1._y;
if (yellowwall.hitTest(transporter2)) {
yellow_hit = true;
}
if (greenwallright.hitTest(transporter2)) {
green_hit = true;
}
if (((crate1.hitTest(transporter2) or crate2.hitTest(transporter2)) or crate1.hitTest(transporter1)) or (yellowwall._y > 64.3)) {
transporter1._alpha = 67;
transporter2._alpha = 67;
transporter_var1 = true;
} else {
transporter_var1 = false;
}
if (((((crate1.hitTest(transporter1) or crate2.hitTest(transporter1)) or crate2.hitTest(transporter2)) or ball1.hitTest(transporter1)) or ball2.hitTest(transporter1)) or (yellowwall._y > 64.3)) {
transporter2._alpha = 67;
transporter1._alpha = 67;
transporter_var2 = true;
} else {
if (!transporter_var1) {
transporter2._alpha = 100;
transporter1._alpha = 100;
}
transporter_var2 = false;
}
if (!transporter_var1) {
if (crate2.hitTest(transporter1) and ((!crate2_hit_2) or crate2_trans1_activate)) {
transporter_var2 = true;
_root.transstart = true;
crate2._x = transporter2._x;
crate2._y = transporter2._y;
crate2_hit_1 = true;
}
if (crate1.hitTest(transporter1)) {
if ((!crate1_hit_2) or crate1_trans1_activate) {
transporter_var2 = true;
_root.transstart = true;
crate1._x = transporter2._x;
crate1._y = transporter2._y;
crate1_hit_1 = true;
}
}
}
if (!transporter_var2) {
if (crate2.hitTest(transporter2)) {
if ((!crate2_hit_1) or crate2_trans2_activate) {
transporter_var1 = true;
_root.transstart = true;
crate2._x = transporter1._x;
crate2._y = transporter1._y;
crate2_hit_2 = true;
}
}
if (crate1.hitTest(transporter2)) {
if ((!crate1_hit_1) or crate1_trans2_activate) {
transporter_var1 = true;
_root.transstart = true;
crate1._x = transporter1._x;
crate1._y = transporter1._y;
crate1_hit_2 = true;
}
}
}
if (crate1_hit_2 and (!crate1.hitTest(transporter1))) {
crate1_trans1_activate = true;
}
if (crate1_hit_1 and (!crate1.hitTest(transporter2))) {
crate1_trans2_activate = true;
}
if (crate2_hit_2 and (!crate2.hitTest(transporter1))) {
crate2_trans1_activate = true;
}
if (crate2_hit_1 and (!crate2.hitTest(transporter2))) {
crate2_trans2_activate = true;
}
greenwallleft._y = greenwallright._y;
green_transparent._y = greenwallright._y;
greenwall._y = greenwallright._y;
if (greenwallright_movement) {
greenwallright._y = greenwallright._y - 1;
}
if (greenwallright._y <= 109.6) {
greenwallright_movement = false;
greenwallright._y = 109.6;
}
if (pinkwall_movement) {
pinkwall._x = pinkwall._x - 0.5;
}
if (pinkwall._x <= 363.4) {
pinkwall_movement = false;
pinkwall._x = 363.4;
}
if (bluewall_movement) {
bluewall._x = bluewall._x - 0.5;
}
if (bluewall._x <= 363.4) {
bluewall_movement = false;
bluewall._x = 363.4;
}
if (orangewall_movement) {
orangewall._x = orangewall._x + 0.5;
}
if (orangewall._x > 345.1) {
orangewall_movement = false;
orangewall._x = 345.1;
}
if (yellowwall_movement) {
yellowwall._y = yellowwall._y + 1;
}
if (yellowwall._y > 228.7) {
soundstart = true;
yellowwall_movement = false;
yellowwall._y = 228.6;
}
differencegreen = ((greenwall._x - (greenwall._width / 2)) - (ball1._width / 2)) - ball1._x;
differencegreen2 = ((greenwall._x - (greenwall._width / 2)) - (ball2._width / 2)) - ball2._x;
distance_between_rightmiddlewall_and_ball = Math.abs(((ball1._x - middlewall._x) - (middlewall._width / 2)) - (ball1._width / 2));
distance_between_rightmiddlewall_and_ball2 = Math.abs(((ball2._x - middlewall._x) - (middlewall._width / 2)) - (ball2._width / 2));
distance_y_between_greenwall_and_ball = Math.abs(greenwall._y - ball1._y);
distance_y_between_greenwall_and_ball2 = Math.abs(greenwall._y - ball2._y);
if ((((greenwall_movement == true) and (differencegreen <= 1)) and (differencegreen >= -8)) and (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) {
ball1._x = ((greenwall._x - (greenwall._width / 2)) - (ball1._width / 2)) - 0.2;
ball1_is_pushed_by_green_wall = true;
} else {
ball1_is_pushed_by_green_wall = false;
}
if ((((greenwall_movement == true) and (differencegreen2 <= 0.2)) and (differencegreen2 >= -8)) and (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2)))) {
ball2._x = ((greenwall._x - (greenwall._width / 2)) - (ball2._width / 2)) - 0.2;
ball2_is_pushed_by_green_wall = true;
} else {
ball2_is_pushed_by_green_wall = false;
}
if ((((differencegreen <= 0.5) && (distance_between_rightmiddlewall_and_ball <= 0.5)) && (distance_y_between_greenwall_and_ball < ((ball1._height / 2) + (greenwall._height / 2)))) or (((differencegreen2 <= 0.5) && (distance_between_rightmiddlewall_and_ball2 <= 0.5)) && (distance_y_between_greenwall_and_ball2 < ((ball2._height / 2) + (greenwall._height / 2))))) {
green_hit = true;
cant_move_crate1_up_against_green_wall = false;
cant_move_crate1_down_against_green_wall = false;
ball_location = false;
ball1._x = 2000;
ball2._x = 2000;
}
if ((((((ball1._y > Stage.height) and (ball1._y < 1000)) or ((ball1._y < 0) and (ball1._y > -1000))) or ((ball1._x > Stage.width) and (ball1._x < 1000))) or ((ball1._x < 0) and (ball1._x > -1000))) and (greenwall._x >= ((Stage.width / 2) + (greenwall._width / 2)))) {
ball_location = false;
cant_move_crate1_up_against_green_wall = false;
cant_move_crate1_down_against_green_wall = false;
green_hit = true;
}
if (ball_location) {
ball1_xlocation = ball1._x;
ball1_ylocation = ball1._y;
ball2_xlocation = ball2._x;
ball2_ylocation = ball2._y;
} else {
explosionsound2 = true;
if (ball1_xlocation < (Stage.width / 2)) {
if (green_hit == true) {
gray_is_hit_green = true;
}
} else if (ball1_xlocation > (Stage.width / 2)) {
if (green_hit == true) {
black_is_hit_green = true;
}
}
ball_locator();
}
};
Instance of Symbol 2464 MovieClip "ball1" in Frame 36
onClipEvent (load) {
_root.hit_crate1 = false;
}
onClipEvent (enterFrame) {
function move(xmove, ymove) {
_x = (_x + xmove);
_y = (_y + ymove);
if (hitTest(_root.leftwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.middlewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.middlewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.topwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.topwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.topwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.topwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bottomwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bottomwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bottomwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bottomwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.pinkwall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.pinkwall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.pinkwall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.pinkwall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.pinkwall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.orangewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.bluewall)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.bluewall.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.bluewall.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.bluewall.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.leftside)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.leftside.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.leftside.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.leftside.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.leftside.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightside1)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside1.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightside1.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightside1.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside1.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.rightside2)) {
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside2.getBounds(_root).xMin) + 0.1));
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.rightside2.getBounds(_root).xMax) - 0.1));
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.rightside2.getBounds(_root).yMin) + 0.1));
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside2.getBounds(_root).yMax) - 0.1));
}
}
if (hitTest(_root.crate1)) {
_root.hit_crate1 = true;
_root.hit_crate2_2 = false;
_root.hit_crate1_2 = true;
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.crate1.getBounds(_root).xMin) + 0.1));
if (((_root.cant_move_crate1_right_against_rightside2 == false) and (_root.cant_move_crate1_right_against_rightside1 == false)) and (_root.cant_move_crate1_right_against_middlewall == false)) {
_root.cratespeed_xright = 1;
_root.crate1._x = _root.crate1._x + _root.cratespeed_xright;
_root.moveright = true;
}
} else {
_root.moveright = false;
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.crate1.getBounds(_root).xMax) - 0.1));
if (_root.cant_move_crate1_left_against_leftwall == false) {
_root.cratespeed_xleft = 1;
_root.crate1._x = _root.crate1._x - _root.cratespeed_xleft;
_root.moveleft = true;
}
} else {
_root.moveleft = false;
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.crate1.getBounds(_root).yMin) + 0.1));
if (_root.cant_move_crate1_down_against_bottomwall == false) {
_root.cratespeed_ydown = 1;
_root.crate1._y = _root.crate1._y + _root.cratespeed_ydown;
_root.movedown = true;
}
} else {
_root.movedown = false;
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.crate1.getBounds(_root).yMax) - 0.1));
if (((_root.cant_move_crate1_up_against_topwall == false) and (_root.cant_move_crate1_up_against_rightside2 == false)) and (_root.cant_move_crate1_up_against_orangewall == false)) {
_root.cratespeed_yup = 1;
_root.crate1._y = _root.crate1._y - _root.cratespeed_yup;
_root.moveup = true;
}
} else {
_root.moveup = false;
}
} else {
_root.cratespeed_xright = 0;
_root.cratespeed_xleft = 0;
_root.cratespeed_ydown = 0;
_root.cratespeed_yup = 0;
}
if (hitTest(_root.crate2)) {
_root.hit_crate2 = true;
_root.hit_crate2_2 = true;
_root.hit_crate1_2 = false;
if (xmove > 0) {
_x = (_x - ((getBounds(_root).xMax - _root.crate2.getBounds(_root).xMin) + 0.1));
if (((_root.cant_move_crate2_right_against_rightside2 == false) and (_root.cant_move_crate2_right_against_rightside1 == false)) and (_root.cant_move_crate2_right_against_middlewall == false)) {
_root.cratespeed_xright = 1;
_root.crate2._x = _root.crate2._x + _root.cratespeed_xright;
_root.moveright = true;
}
} else {
_root.moveright = false;
}
if (xmove < 0) {
_x = (_x - ((getBounds(_root).xMin - _root.crate2.getBounds(_root).xMax) - 0.5));
if (_root.cant_move_crate2_left_against_leftwall == false) {
_root.cratespeed_xleft = 1;
_root.crate2._x = _root.crate2._x - _root.cratespeed_xleft;
_root.moveleft = true;
}
} else {
_root.moveleft = false;
}
if (ymove > 0) {
_y = (_y - ((getBounds(_root).yMax - _root.crate2.getBounds(_root).yMin) + 0.1));
if (_root.cant_move_crate2_down_against_bottomwall == false) {
_root.cratespeed_ydown = 1;
_root.crate2._y = _root.crate2._y + _root.cratespeed_ydown;
_root.movedown = true;
}
} else {
_root.movedown = false;
}
if (ymove < 0) {
_y = (_y - ((getBounds(_root).yMin - _root.crate2.getBounds(_root).yMax) - 0.1));
if ((((_root.cant_move_crate2_up_against_topwall == false) and (_root.cant_move_crate2_up_against_rightside2 == false)) and (_root.cant_move_crate2_right_against_rightside1 == false)) and (_root.cant_move_crate2_up_against_orangewall == false)) {
_root.cratespeed_yup = 1;
_root.crate2._y = _root.crate2._y - _root.cratespeed_yup;
_root.moveup = true;
}
} else {
_root.moveup = false;
}
} else {
_root.cratespeed_xright = 0;
_root.cratespeed_xleft = 0;
_root.cratespeed_ydown = 0;
_root.cratespeed_yup = 0;
}
}
if ((((!Key.isDown(37)) and (!Key.isDown(39))) and (!Key.isDown(38))) and (!Key.isDown(40))) {
_root.moveup = false;
_root.movedown = false;
_root.moveright = false;
_root.moveleft = false;
move(0, 0);
_root.hit_crate1 = false;
_root.hit_crate2 = false;
}
if (_root.ball_movement == true) {
if (Key.isDown(37)) {
move(-5, 0);
}
if (Key.isDown(39)) {
move(5, 0);
}
if (Key.isDown(38)) {
move(0, -5);
}
if (Key.isDown(40)) {
move(0, 5);
}
}
}
Instance of Symbol 1071 MovieClip "crate1" in Frame 36
onClipEvent (load) {
_root.decoy_crate.inside.gotoAndPlay(1);
_root.cant_move_crate1_right_against_rightside2 = false;
_root.cant_move_crate1_right_against_rightside1 = false;
_root.cant_move_crate1_right_against_middlewall = false;
_root.cant_move_crate1_left_against_leftwall = false;
_root.decoydone = false;
_root.cant_move_crate1_down_against_bottomwall = false;
_root.cant_move_crate1_up_against_topwall = false;
_root.cant_move_crate1_up_against_rightside2 = false;
_root.cant_move_crate1_up_against_orangewall = false;
_root.cant_move_crate1_up_against_crate2 = false;
_root.cant_move_crate1_down_against_crate2 = false;
_root.cant_move_crate1_left_against_crate2 = false;
_root.cant_move_crate1_right_against_crate2 = false;
}
onClipEvent (enterFrame) {
if (hitTest(_root.leftwall) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_leftwall = true;
}
if (((Math.abs(((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.leftwall._y + (_root.leftwall._height / 2)) + (_height / 2)))) and (_y > ((_root.leftwall._y - (_root.leftwall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_left_against_leftwall = true;
} else {
_root.cant_move_crate1_left_against_leftwall = false;
}
if (hitTest(_root.rightside2) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside2.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_rightside2 = true;
}
if (((Math.abs(((_root.rightside2._x - _x) - (_root.rightside2._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.rightside2._y + (_root.rightside2._height / 2)) + (_height / 2)))) and (_y > ((_root.rightside2._y - (_root.rightside2._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_rightside2 = true;
} else {
_root.cant_move_crate1_right_against_rightside2 = false;
}
if (hitTest(_root.rightside1) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside1.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_rightside1 = true;
}
if (((Math.abs(((_root.rightside1._x - _x) - (_root.rightside1._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.rightside1._y + (_root.rightside1._height / 2)) + (_height / 2)))) and (_y > ((_root.rightside1._y - (_root.rightside1._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_rightside1 = true;
} else {
_root.cant_move_crate1_right_against_rightside1 = false;
}
if (hitTest(_root.middlewall) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_middlewall = true;
}
if (((Math.abs(((_root.middlewall._x - _x) - (_root.middlewall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.middlewall._y + (_root.middlewall._height / 2)) + (_height / 2)))) and (_y > ((_root.middlewall._y - (_root.middlewall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate1_right_against_middlewall = true;
} else {
_root.cant_move_crate1_right_against_middlewall = false;
}
if (hitTest(_root.topwall) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_topwall = true;
}
if (((Math.abs(((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.topwall._x + (_root.topwall._width / 2)) + (_width / 2)))) and (_x > ((_root.topwall._x - (_root.topwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_topwall = true;
} else {
_root.cant_move_crate1_up_against_topwall = false;
}
if (hitTest(_root.rightside2) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_rightside2 = true;
}
if (((Math.abs(((_y - _root.rightside2._y) - (_root.rightside2._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.rightside2._x + (_root.rightside2._width / 2)) + (_width / 2)))) and (_x > ((_root.rightside2._x - (_root.rightside2._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_rightside2 = true;
} else {
_root.cant_move_crate1_up_against_rightside2 = false;
}
if (hitTest(_root.orangewall) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_orangewall = true;
}
if (((Math.abs(((_y - _root.orangewall._y) - (_root.orangewall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.orangewall._x + (_root.orangewall._width / 2)) + (_width / 2)))) and (_x > ((_root.orangewall._x - (_root.orangewall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_up_against_orangewall = true;
} else {
_root.cant_move_crate1_up_against_orangewall = false;
}
if (hitTest(_root.bottomwall) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_bottomwall = true;
}
if (((Math.abs(((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.bottomwall._x + (_root.bottomwall._width / 2)) + (_width / 2)))) and (_x > ((_root.bottomwall._x - (_root.bottomwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate1_down_against_bottomwall = true;
} else {
_root.cant_move_crate1_down_against_bottomwall = false;
}
if (_root.hit_crate1) {
if (hitTest(_root.crate2) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate1_up_against_crate2 = true;
}
if ((((((_y - _root.crate2._y) - (_root.crate2._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate2._y) - (_root.crate2._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate2._x - _x) < ((_width / 2) + (_root.crate2._width / 2)))) {
_root.cant_move_crate1_up_against_crate2 = true;
} else {
_root.cant_move_crate1_up_against_crate2 = false;
}
if (hitTest(_root.crate2) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate2.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate1_down_against_crate2 = true;
}
if ((((((_root.crate2._y - _y) - (_root.crate2._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate2._y - _y) - (_root.crate2._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate2._x - _x) < ((_width / 2) + (_root.crate2._width / 2)))) {
_root.cant_move_crate1_down_against_crate2 = true;
} else {
_root.cant_move_crate1_down_against_crate2 = false;
}
if (hitTest(_root.crate2) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate2.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate1_left_against_crate2 = true;
}
if ((((((_x - _root.crate2._x) - (_root.crate2._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate2._x) - (_root.crate2._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate2._y - _y) < ((_height / 2) + (_root.crate2._height / 2)))) {
_root.cant_move_crate1_left_against_crate2 = true;
} else {
_root.cant_move_crate1_left_against_crate2 = false;
}
if (hitTest(_root.crate2) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate2.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate1_right_against_crate2 = true;
}
if ((((((_root.crate2._x - _x) - (_root.crate2._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate2._x - _x) - (_root.crate2._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate2._y - _y) < ((_height / 2) + (_root.crate2._height / 2)))) {
_root.cant_move_crate1_right_against_crate2 = true;
} else {
_root.cant_move_crate1_right_against_crate2 = false;
}
}
_root.difference_y_yellow_with_crate1_top = ((_y - _root.yellowwall._y) - (_root.yellowwall._height / 2)) - (_height / 2);
_root.distance_x_between_yellowwall_and_crate1 = Math.abs(_root.yellowwall._x - _x);
if (((_root.difference_y_yellow_with_crate1_top <= 0.3) && (_root.difference_y_yellow_with_crate1_top >= -8)) && (_root.distance_x_between_yellowwall_and_crate1 < ((_width / 2) + (_root.yellowwall._width / 2)))) {
_root.blue_wall_and_crate1_bottomside_touching = true;
} else {
_root.blue_wall_and_crate1_bottomside_touching = false;
}
if ((((_root.yellowwall_movement == true) and (_root.blue_wall_and_crate1_bottomside_touching == true)) and (_root.distance_x_between_yellowwall_and_crate1 < ((_width / 2) + (_root.yellowwall._width / 2)))) and (_currentframe == 1)) {
_y = (((_root.yellowwall._y + (_root.yellowwall._height / 2)) + (_height / 2)) + 0.2);
}
_root.difference_y_crate1_with_crate2_top = ((_root.crate2._y - (_root.crate2._height / 2)) - (_height / 2)) - _y;
if ((_root.difference_y_crate1_with_crate2_top <= 0.3) && (_root.difference_y_crate1_with_crate2_top >= -8)) {
_root.crate1_and_crate2_bottomside_touching = true;
} else {
_root.crate1_and_crate2_bottomside_touching = false;
}
if (_root.crate1_and_crate2_bottomside_touching == true) {
_root.crate2._y = ((_y + (_height / 2)) + (_root.crate2._height / 2)) + 0.2;
}
if (this._y > 485.5) {
_root.decoy_crate.inside.gotoAndPlay(1);
_root.yellowwall_movement = false;
_root.decoy_crate._x = _x;
_root.decoy_crate._y = _y;
_root.decoy_crate.gotoAndStop(2);
_x = 20002;
}
}
Instance of Symbol 1071 MovieClip "crate2" in Frame 36
onClipEvent (load) {
_root.cant_move_crate2_right_against_rightside2 = false;
_root.cant_move_crate2_right_against_rightside1 = false;
_root.cant_move_crate2_right_against_middlewall = false;
_root.cant_move_crate2_left_against_leftwall = false;
_root.decoy_crate.gotoAndStop(1);
_root.decoydone = false;
_root.cant_move_crate2_down_against_bottomwall = false;
_root.cant_move_crate2_up_against_topwall = false;
_root.cant_move_crate2_up_against_rightside2 = false;
_root.cant_move_crate2_up_against_rightside1 = false;
_root.cant_move_crate2_up_against_orangewall = false;
_root.cant_move_crate2_up_against_crate1 = false;
_root.cant_move_crate2_down_against_crate1 = false;
_root.cant_move_crate2_left_against_crate1 = false;
_root.cant_move_crate2_right_against_crate1 = false;
}
onClipEvent (enterFrame) {
if (hitTest(_root.leftwall) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate2_left_against_leftwall = true;
}
if (((Math.abs(((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.leftwall._y + (_root.leftwall._height / 2)) + (_height / 2)))) and (_y > ((_root.leftwall._y - (_root.leftwall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate2_left_against_leftwall = true;
} else {
_root.cant_move_crate2_left_against_leftwall = false;
}
if (hitTest(_root.rightside2) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside2.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate2_right_against_rightside2 = true;
}
if (((Math.abs(((_root.rightside2._x - _x) - (_root.rightside2._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.rightside2._y + (_root.rightside2._height / 2)) + (_height / 2)))) and (_y > ((_root.rightside2._y - (_root.rightside2._height / 2)) - (_height / 2)))) {
_root.cant_move_crate2_right_against_rightside2 = true;
} else {
_root.cant_move_crate2_right_against_rightside2 = false;
}
if (hitTest(_root.rightside1) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.rightside1.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate2_right_against_rightside1 = true;
}
if (((Math.abs(((_root.rightside1._x - _x) - (_root.rightside1._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.rightside1._y + (_root.rightside1._height / 2)) + (_height / 2)))) and (_y > ((_root.rightside1._y - (_root.rightside1._height / 2)) - (_height / 2)))) {
_root.cant_move_crate2_right_against_rightside1 = true;
} else {
_root.cant_move_crate2_right_against_rightside1 = false;
}
if (hitTest(_root.middlewall) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.middlewall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate2_right_against_middlewall = true;
}
if (((Math.abs(((_root.middlewall._x - _x) - (_root.middlewall._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.middlewall._y + (_root.middlewall._height / 2)) + (_height / 2)))) and (_y > ((_root.middlewall._y - (_root.middlewall._height / 2)) - (_height / 2)))) {
_root.cant_move_crate2_right_against_middlewall = true;
} else {
_root.cant_move_crate2_right_against_middlewall = false;
}
if (hitTest(_root.topwall) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate2_up_against_topwall = true;
}
if (((Math.abs(((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.topwall._x + (_root.topwall._width / 2)) + (_width / 2)))) and (_x > ((_root.topwall._x - (_root.topwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_up_against_topwall = true;
} else {
_root.cant_move_crate2_up_against_topwall = false;
}
if (hitTest(_root.rightside2) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate2_up_against_rightside2 = true;
}
if (((Math.abs(((_y - _root.rightside2._y) - (_root.rightside2._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.rightside2._x + (_root.rightside2._width / 2)) + (_width / 2)))) and (_x > ((_root.rightside2._x - (_root.rightside2._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_up_against_rightside2 = true;
} else {
_root.cant_move_crate2_up_against_rightside2 = false;
}
if (hitTest(_root.rightside1) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.rightside1.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate2_up_against_rightside1 = true;
}
if (((Math.abs(((_y - _root.rightside1._y) - (_root.rightside1._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.rightside1._x + (_root.rightside1._width / 2)) + (_width / 2)))) and (_x > ((_root.rightside1._x - (_root.rightside1._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_up_against_rightside1 = true;
} else {
_root.cant_move_crate2_up_against_rightside1 = false;
}
if (hitTest(_root.orangewall) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate2_up_against_orangewall = true;
}
if (((Math.abs(((_y - _root.orangewall._y) - (_root.orangewall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.orangewall._x + (_root.orangewall._width / 2)) + (_width / 2)))) and (_x > ((_root.orangewall._x - (_root.orangewall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_up_against_orangewall = true;
} else {
_root.cant_move_crate2_up_against_orangewall = false;
}
if (hitTest(_root.bottomwall) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate2_down_against_bottomwall = true;
}
if (((Math.abs(((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.bottomwall._x + (_root.bottomwall._width / 2)) + (_width / 2)))) and (_x > ((_root.bottomwall._x - (_root.bottomwall._width / 2)) - (_width / 2)))) {
_root.cant_move_crate2_down_against_bottomwall = true;
} else {
_root.cant_move_crate2_down_against_bottomwall = false;
}
if (_root.hit_crate2) {
if (hitTest(_root.crate1) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate1.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate2_up_against_crate1 = true;
}
if ((((((_y - _root.crate1._y) - (_root.crate1._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate1._y) - (_root.crate1._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate1._x - _x) < ((_width / 2) + (_root.crate1._width / 2)))) {
_root.cant_move_crate2_up_against_crate1 = true;
} else {
_root.cant_move_crate2_up_against_crate1 = false;
}
if (hitTest(_root.crate1) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate1.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate2_down_against_crate1 = true;
}
if ((((((_root.crate1._y - _y) - (_root.crate1._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate1._y - _y) - (_root.crate1._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate1._x - _x) < ((_width / 2) + (_root.crate1._width / 2)))) {
_root.cant_move_crate2_down_against_crate1 = true;
} else {
_root.cant_move_crate2_down_against_crate1 = false;
}
if (hitTest(_root.crate1) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate1.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate2_left_against_crate1 = true;
}
if ((((((_x - _root.crate1._x) - (_root.crate1._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate1._x) - (_root.crate1._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate1._y - _y) < ((_height / 2) + (_root.crate1._height / 2)))) {
_root.cant_move_crate2_left_against_crate1 = true;
} else {
_root.cant_move_crate2_left_against_crate1 = false;
}
if (hitTest(_root.crate1) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate1.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate2_right_against_crate1 = true;
}
if ((((((_root.crate1._x - _x) - (_root.crate1._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate1._x - _x) - (_root.crate1._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate1._y - _y) < ((_height / 2) + (_root.crate1._height / 2)))) {
_root.cant_move_crate2_right_against_crate1 = true;
} else {
_root.cant_move_crate2_right_against_crate1 = false;
}
}
_root.difference_y_yellow_with_crate2_top = ((_y - _root.yellowwall._y) - (_root.yellowwall._height / 2)) - (_height / 2);
_root.distance_x_between_yellowwall_and_crate2 = Math.abs(_root.yellowwall._x - _x);
if (((_root.difference_y_yellow_with_crate2_top <= 0.3) && (_root.difference_y_yellow_with_crate2_top >= -8)) && (_root.distance_x_between_yellowwall_and_crate2 < ((_width / 2) + (_root.yellowwall._width / 2)))) {
_root.blue_wall_and_crate2_bottomside_touching = true;
} else {
_root.blue_wall_and_crate2_bottomside_touching = false;
}
if ((((_root.yellowwall_movement == true) and (_root.blue_wall_and_crate2_bottomside_touching == true)) and (_root.distance_x_between_yellowwall_and_crate2 < ((_width / 2) + (_root.yellowwall._width / 2)))) and (_currentframe == 1)) {
_y = (((_root.yellowwall._y + (_root.yellowwall._height / 2)) + (_height / 2)) + 0.2);
}
if (this._y > 485.5) {
_root.decoy_crate.gotoAndStop(2);
_root.decoy_crate.inside.gotoAndPlay(1);
_root.yellowwall_movement = false;
_root.decoy_crate._x = _x;
_root.decoy_crate._y = 485.5;
gotoAndStop (2);
_y = -800;
}
}
Frame 37
function __rankz_send__(par1, par2, par3, par4) {
par227 = new LoadVars();
par228 = new LoadVars();
par227.flashkey = par2;
par227.SU0249 = par1;
par227.bmFtZTE = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par3);
par227.c2NvcmUx = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par4 + "j%e%a%n%s");
par227.flashkey = par227.flashkey.split("=").join("");
par227.SU0249 = par227.SU0249.split("=").join("");
par228.onLoad = function (success) {
if (success) {
trace(par228.msg);
} else {
trace(par228.loaded);
}
};
par227.sendAndLoad("http://rankz.armorbot.com/submit/", par228, "POST");
}
bXlnYW1lX25hbWVfdmFyaWFibGU = _root.myname;
bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = _root.totaltime;
__rankz_send__("MzE4M2olZSVhJW4lcw==", "VXZ1aGtacWk=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
getURL ("http://rankz.armorbot.com/tworooms/", "_blank");
gotoAndStop (3);
Instance of Symbol 2550 MovieClip in Frame 38
on (release) {
getURL ("http://lilleydesign.com/", "_blank");
}
Symbol 40 MovieClip Frame 1
function timerHandler() {
if (!loadingComplete) {
var _local4 = _root.getBytesLoaded() / _root.getBytesTotal();
bar._xscale = 100 * _local4;
if (_local4 == 1) {
loadingComplete = true;
if (AUTO_PLAY) {
startMovie();
} else {
gotoAndStop ("loaded");
}
return(undefined);
}
}
dt = getTimer() - time;
time = time + dt;
frameAccum = frameAccum + dt;
var _local3 = 0;
while ((frameAccum >= FRAME_TIME) && (_local3 < MAX_FRAME_SKIP)) {
advanceFrame(tankLogo, true, true);
advanceFrame(loadingText, false, true);
advanceFrame(barGfx, false, true);
if (loadingComplete) {
advanceFrame(this, false, false);
}
(frameAccum = frameAccum - FRAME_TIME);
_local3++;
}
updateAfterEvent();
}
function advanceFrame(clip, recurse, loop) {
if (!clip) {
return(undefined);
}
clip.stop();
if (clip._currentframe == clip._totalframes) {
if (loop) {
clip.gotoAndStop(1);
}
} else {
clip.nextFrame();
}
if (recurse) {
for (childName in clip) {
if (typeof(clip[childName]) == "movieclip") {
advanceFrame(clip[childName], recurse, loop);
}
}
}
}
function startMovie() {
clearInterval(intervalId);
_root.play();
}
_root.stop();
stop();
var FRAME_TIME = 33.3333333333333;
var AUTO_PLAY = false;
var MAX_FRAME_SKIP = 5;
var loadingComplete;
var intervalId;
var time;
var frameAccum;
loadingComplete = false;
intervalId = setInterval(this, "timerHandler", FRAME_TIME / 2);
frameAccum = 0;
time = getTimer();
timerHandler();
Symbol 40 MovieClip Frame 37
playbutton.onRelease = function () {
_root.gotoAndStop(2);
};
Symbol 2554 MovieClip [__Packages.ab3.rankz.Armor_Bot_30_En_AS1] Frame 0
class ab3.rankz.Armor_Bot_30_En_AS1 extends Object
{
static var _CharsReverseLookup;
var _Armor_Bot_30_En_AS1Str, _Armor_Bot_30_En_AS1Count;
function Armor_Bot_30_En_AS1 () {
super();
}
static function Encode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.encodeArmor_Bot_30_En_AS1(str));
}
static function Decode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.decodeArmor_Bot_30_En_AS1(str));
}
static function StringReplaceAll(source, find, replacement) {
return(source.split(find).join(replacement));
}
static function InitReverseChars() {
_CharsReverseLookup = new Array();
var _local1 = 0;
while (_local1 < _Chars.length) {
_CharsReverseLookup[_Chars[_local1]] = _local1;
_local1++;
}
return(true);
}
static function UrlDecode(str) {
str = StringReplaceAll(str, "\\", " ");
str = unescape(str);
return(str);
}
static function UrlEncode(str) {
str = escape(str);
str = StringReplaceAll(str, "\\", "%2B");
str = StringReplaceAll(str, "%20", "+");
return(str);
}
function setArmor_Bot_30_En_AS1Str(str) {
_Armor_Bot_30_En_AS1Str = str;
_Armor_Bot_30_En_AS1Count = 0;
}
function readArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charCodeAt(_Armor_Bot_30_En_AS1Count) & 255;
_Armor_Bot_30_En_AS1Count++;
return(_local2);
}
function encodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(3);
var _local5 = 0;
var _local4 = false;
while ((!_local4) && (((_local2[0] = readArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[1] = readArmor_Bot_30_En_AS1();
_local2[2] = readArmor_Bot_30_En_AS1();
_local3 = _local3 + _Chars[_local2[0] >> 2];
if (_local2[1] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[0] << 4) & 48) | (_local2[1] >> 4)];
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[1] << 2) & 60) | (_local2[2] >> 6)];
_local3 = _local3 + _Chars[_local2[2] & 63];
} else {
_local3 = _local3 + _Chars[(_local2[1] << 2) & 60];
_local3 = _local3 + "=";
_local4 = true;
}
} else {
_local3 = _local3 + _Chars[(_local2[0] << 4) & 48];
_local3 = _local3 + "=";
_local3 = _local3 + "=";
_local4 = true;
}
_local5 = _local5 + 4;
if (_local5 >= 76) {
_local3 = _local3 + newline;
_local5 = 0;
}
}
return(_local3);
}
function readReverseArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
while (true) {
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charAt(_Armor_Bot_30_En_AS1Count);
_Armor_Bot_30_En_AS1Count++;
if (_CharsReverseLookup[_local2]) {
return(_CharsReverseLookup[_local2]);
}
if (_local2 == "A") {
return(0);
}
}
}
function ntos(n) {
var _local1 = n.toString(16);
if (_local1.length == 1) {
_local1 = "0" + _local1;
}
_local1 = "%" + _local1;
return(unescape(_local1));
}
function decodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(4);
var _local4 = false;
while (((!_local4) && (((_local2[0] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) && (((_local2[1] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[2] = readReverseArmor_Bot_30_En_AS1();
_local2[3] = readReverseArmor_Bot_30_En_AS1();
_local3 = _local3 + ntos(((_local2[0] << 2) & 255) | (_local2[1] >> 4));
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[1] << 4) & 255) | (_local2[2] >> 2));
if (_local2[3] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[2] << 6) & 255) | _local2[3]);
} else {
_local4 = true;
}
} else {
_local4 = true;
}
}
return(_local3);
}
function toHex(n) {
var _local4 = "";
var _local3 = true;
var _local1 = 32;
while (_local1 > 0) {
_local1 = _local1 - 4;
var _local2 = (n >> _local1) & 15;
if ((!_local3) || (_local2 != 0)) {
_local3 = false;
_local4 = _local4 + _Digits[_local2];
}
}
return(((_local4 == "") ? "0" : (_local4)));
}
function pad(str, len, pad) {
var _local2 = str;
var _local1 = str.length;
while (_local1 < len) {
_local2 = pad + _local2;
_local1++;
}
return(_local2);
}
function encodeHex(str) {
var _local4 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local4 = _local4 + pad(toHex(str.charCodeAt(_local2) & 255), 2, "0");
_local2++;
}
return(_local4);
}
function decodeHex(str) {
var _local5 = "";
var _local3 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local3 = _local3 + str.charAt(_local2);
if (_local3.length == 2) {
_local5 = _local5 + ntos(parseInt("0x" + _local3));
_local3 = "";
}
_local2++;
}
return(_local5);
}
static var _EndOfInput = -1;
static var _Chars = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/");
static var _CharsReverseLookupInited = InitReverseChars();
static var _Digits = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
}
Symbol 55 Button
on (press) {
getURL ("http://www.armorgames.com", "_blank");
}
Symbol 58 MovieClip Frame 1
_root.stop();
gotoAndPlay (2);
Symbol 58 MovieClip Frame 218
_root.gotoAndStop(38);
Symbol 64 MovieClip Frame 1
_root.alpha_true = true;
Symbol 64 MovieClip Frame 22
_root.alpha_true = true;
Symbol 64 MovieClip Frame 51
stop();
Symbol 65 MovieClip Frame 1
stop();
Symbol 149 MovieClip Frame 80
_root.ball1.scan.gotoAndStop(1);
Symbol 214 MovieClip Frame 80
_root.ball1.scan.gotoAndStop(1);
Symbol 279 MovieClip Frame 80
_root.ball1.scan.gotoAndStop(1);
Symbol 344 MovieClip Frame 80
_root.ball1.scan.gotoAndStop(1);
Symbol 409 MovieClip Frame 80
_root.ball1.scan.gotoAndStop(1);
Symbol 474 MovieClip Frame 80
_root.ball1.scan.gotoAndStop(1);
Symbol 539 MovieClip Frame 80
_root.ball1.scan.gotoAndStop(1);
Symbol 604 MovieClip Frame 80
_root.ball1.scan.gotoAndStop(1);
Symbol 669 MovieClip Frame 80
_root.ball1.scan.gotoAndStop(1);
Symbol 674 MovieClip Frame 44
_root.ball1.scan.gotoAndStop(1);
Symbol 675 MovieClip Frame 1
stop();
Symbol 675 MovieClip Frame 2
keysound = true;
Symbol 675 MovieClip Frame 3
keysound = true;
Symbol 675 MovieClip Frame 4
keysound = true;
Symbol 675 MovieClip Frame 5
keysound = true;
Symbol 675 MovieClip Frame 6
keysound = true;
Symbol 675 MovieClip Frame 7
keysound = true;
Symbol 675 MovieClip Frame 8
keysound = true;
Symbol 675 MovieClip Frame 9
keysound = true;
Symbol 675 MovieClip Frame 10
keysound = true;
Symbol 675 MovieClip Frame 11
stop();
Symbol 700 MovieClip Frame 1
stop();
Symbol 744 MovieClip Frame 1
stop();
Symbol 744 MovieClip Frame 2
stop();
Symbol 759 MovieClip Frame 1
ratio = Math.round((dragger._x * 100) / line._width);
_root.volume = ratio;
this.ratio = 100;
dragger.onPress = function () {
this.startDrag(true, 0, 0, line._width - 3, 0);
this.onEnterFrame = function () {
ratio = Math.round((this._x * 100) / line._width);
_root.volume = ratio;
};
};
dragger.onRelease = (dragger.onReleaseOutside = stopDrag);
Symbol 776 MovieClip Frame 50
stop();
Symbol 777 MovieClip Frame 1
stop();
Symbol 777 MovieClip Frame 2
stop();
Symbol 852 Button
on (release) {
if (_root.score >= 1) {
_root.gotoAndStop(4);
}
}
Symbol 853 Button
on (release) {
if (_root.score >= 2) {
_root.gotoAndStop(5);
}
}
Symbol 854 Button
on (release) {
if (_root.score >= 3) {
_root.gotoAndStop(27);
}
}
Symbol 855 Button
on (release) {
if (_root.score >= 4) {
_root.gotoAndStop(8);
}
}
Symbol 856 Button
on (release) {
if (_root.score >= 5) {
_root.gotoAndStop(9);
}
}
Symbol 857 Button
on (release) {
if (_root.score >= 6) {
_root.gotoAndStop(7);
}
}
Symbol 858 Button
on (release) {
if (_root.score >= 7) {
_root.gotoAndStop(6);
}
}
Symbol 859 Button
on (release) {
if (_root.score >= 8) {
_root.gotoAndStop(12);
}
}
Symbol 860 Button
on (release) {
if (_root.score >= 9) {
_root.gotoAndStop(26);
}
}
Symbol 861 Button
on (release) {
if (_root.score >= 10) {
_root.gotoAndStop(10);
}
}
Symbol 862 Button
on (release) {
if (_root.score >= 11) {
_root.gotoAndStop(20);
}
}
Symbol 863 Button
on (release) {
if (_root.score >= 12) {
_root.gotoAndStop(15);
}
}
Symbol 864 Button
on (release) {
if (_root.score >= 13) {
_root.gotoAndStop(28);
}
}
Symbol 865 Button
on (release) {
if (_root.score >= 14) {
_root.gotoAndStop(23);
}
}
Symbol 866 Button
on (release) {
if (_root.score >= 15) {
_root.gotoAndStop(18);
}
}
Symbol 867 Button
on (release) {
if (_root.score >= 16) {
_root.gotoAndStop(16);
}
}
Symbol 868 Button
on (release) {
if (_root.score >= 17) {
_root.gotoAndStop(21);
}
}
Symbol 869 Button
on (release) {
if (_root.score >= 18) {
_root.gotoAndStop(25);
}
}
Symbol 870 Button
on (release) {
if (_root.score >= 19) {
_root.gotoAndStop(14);
}
}
Symbol 871 Button
on (release) {
if (_root.score >= 20) {
_root.gotoAndStop(22);
}
}
Symbol 872 Button
on (release) {
if (_root.score >= 21) {
_root.gotoAndStop(24);
}
}
Symbol 873 Button
on (release) {
if (_root.score >= 22) {
_root.gotoAndStop(13);
}
}
Symbol 874 Button
on (release) {
if (_root.score >= 23) {
_root.gotoAndStop(19);
}
}
Symbol 875 Button
on (release) {
if (_root.score >= 24) {
_root.gotoAndStop(32);
}
}
Symbol 876 Button
on (release) {
if (_root.score >= 25) {
_root.gotoAndStop(35);
}
}
Symbol 877 Button
on (release) {
if (_root.score >= 26) {
_root.gotoAndStop(34);
}
}
Symbol 878 Button
on (release) {
if (_root.score >= 27) {
_root.gotoAndStop(36);
}
}
Symbol 879 Button
on (release) {
if (_root.score >= 28) {
_root.gotoAndStop(30);
}
}
Symbol 880 Button
on (release) {
if (_root.score >= 29) {
_root.gotoAndStop(33);
}
}
Symbol 881 Button
on (release) {
if (_root.score >= 30) {
_root.gotoAndStop(29);
}
}
Symbol 887 MovieClip Frame 1
stop();
Symbol 887 MovieClip Frame 2
stop();
Symbol 908 MovieClip Frame 1
nextbutton.onRelease = function () {
_root.expander.expander2.gotoAndStop(152);
};
Symbol 917 MovieClip Frame 1
donebutton.onRelease = function () {
_root.expander.expander2.gotoAndPlay(153);
};
Symbol 919 MovieClip Frame 61
stop();
Symbol 919 MovieClip Frame 151
stop();
Symbol 919 MovieClip Frame 152
stop();
Symbol 919 MovieClip Frame 202
_root.you_understand_var = true;
Symbol 919 MovieClip Frame 212
stop();
_root.ball_movement = true;
_root.expander.gotoAndStop(1);
_root.timeactivator2 = true;
Symbol 920 MovieClip Frame 1
stop();
Symbol 936 MovieClip Frame 120
_root.nextFrame1 = true;
stop();
Symbol 937 MovieClip Frame 1
stop();
Symbol 937 MovieClip Frame 2
stop();
Symbol 944 MovieClip Frame 120
stop();
Symbol 945 MovieClip Frame 1
stop();
Symbol 945 MovieClip Frame 2
stop();
Symbol 946 Button
on (release) {
getURL ("http://lilleydesign.com", "_blank");
}
Symbol 948 Button
on (release) {
getURL ("http://www.newgrounds.com/audio/listen/112527", "_blank");
}
Symbol 949 Button
on (release) {
getURL ("http://www.newgrounds.com/audio/listen/174962", "_blank");
}
Symbol 950 Button
on (release) {
getURL ("http://www.newgrounds.com/audio/listen/68241", "_blank");
}
Symbol 951 Button
on (release) {
getURL ("http://www.newgrounds.com/audio/listen/123607", "_blank");
}
Symbol 952 Button
on (release) {
getURL ("http://www.newgrounds.com/audio/listen/123365", "_blank");
}
Symbol 953 Button
on (release) {
getURL ("http://www.newgrounds.com/audio/", "_blank");
}
Symbol 954 Button
on (release) {
getURL ("http://lilleydesign.com/tworooms.html", "_blank");
}
Symbol 955 Button
on (release) {
getURL ("http://www.cgtextures.com/", "_blank");
}
Symbol 956 Button
on (release) {
getURL ("http://www.1001freefonts.com/", "_blank");
}
Symbol 958 Button
on (release) {
getURL ("http://armorgames.com/", "_blank");
}
Symbol 977 Button
on (press) {
if (_root.ball_movement) {
_root.totalRestarts = _root.totalRestarts + 1;
_root.restartLevel();
}
}
Symbol 979 MovieClip Frame 1
stop();
Symbol 979 MovieClip Frame 2
stop();
Symbol 999 Button
on (release) {
getURL ("http://armorgames.com/", "_blank");
}
Symbol 1001 MovieClip Frame 1
stop();
Symbol 1004 MovieClip Frame 1
stop();
Symbol 1013 MovieClip Frame 1
stop();
Symbol 1044 MovieClip Frame 1
stop();
Symbol 1044 MovieClip Frame 2
stop();
Symbol 1071 MovieClip Frame 1
stop();
Symbol 1071 MovieClip Frame 2
stop();
Symbol 1145 Button
on (release) {
_root.submitScreen = true;
_root.win._x = 5000;
_root.win._y = 5000;
_root.option9._x = Stage.width / 2;
_root.option9._y = Stage.height / 2;
}
Symbol 1148 MovieClip Frame 1
stop();
Instance of Symbol 1071 MovieClip "crate4" in Symbol 1148 MovieClip Frame 11
onClipEvent (load) {
_root.cant_move_crate4_right_against_middle_wall = false;
_root.cant_move_crate4_right_against_orange_wall = false;
_root.cant_move_crate4_left_against_orange_wall = false;
_root.cant_move_crate4_down_against_orange_wall = false;
_root.cant_move_crate4_up_against_orange_wall = false;
_root.hit_crate4 = false;
_root.orange_wall_and_crate4_leftside_touching = false;
_root.crate4_against_orange_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
_root.ball1_and_crate4_rightside_touching = false;
_root.ball1_and_crate4_leftside_touching = false;
_root.ball2_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
_root.ball2_and_crate4_rightside_touching = false;
_root.ball2_and_crate4_leftside_touching = false;
_root.cant_move_crate4_right_against_right_wall = false;
_root.cant_move_crate4_left_against_left_wall = false;
_root.cant_move_crate4_left_against_middle_wall = false;
_root.cant_move_crate4_right_against_green_wall = false;
_root.cant_move_crate4_left_against_green_wall = false;
_root.cant_move_crate4_down_against_green_wall = false;
_root.cant_move_crate4_up_against_green_wall = false;
_root.cant_move_crate4_up_against_bluewall2 = false;
_root.cant_move_crate4_up_against_middlewall_insidetop = false;
_root.cant_move_crate4_down_against_middlewall_insidebottom = false;
_root.cant_move_crate4_left_against_midwid = false;
_root.cant_move_crate4_up_against_midwid = false;
_root.cant_move_crate4_up_against_crate3 = false;
_root.cant_move_crate4_left_against_crate3 = false;
_root.cant_move_crate4_down_against_crate3 = false;
_root.cant_move_crate4_right_against_crate3 = false;
_root.cant_move_crate4_up_against_crate5 = false;
_root.cant_move_crate4_left_against_crate5 = false;
_root.cant_move_crate4_down_against_crate5 = false;
_root.cant_move_crate4_right_against_crate5 = false;
_root.green_wall_and_crate4_rightside_touching = false;
_root.crate4_against_green_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall = false;
_root.ball2_is_pushed_by_crate4_is_pushed_by_green_wall = false;
_root.crate4_is_pushed_by_ball1_is_pushed_by_greenwall = false;
_root.crate4_is_pushed_by_ball2_is_pushed_by_greenwall = false;
_root.crate4_is_pushed_by_green_wall = false;
}
onClipEvent (enterFrame) {
_root.difference_x_orange_with_crate4_left = ((_x - (_width / 2)) - _root.orangewall._x) - (_root.orangewall._width / 2);
_root.difference_x_orange_with_crate4_right = ((_root.orangewall._x - (_root.orangewall._width / 2)) - _x) - (_width / 2);
_root.difference_y_orange_with_crate4_up = ((_y - (_height / 2)) - _root.orangewall._y) - (_root.orangewall._height / 2);
_root.difference_y_orange_with_crate4_down = ((_root.orangewall._y - (_root.orangewall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_orangewall_and_crate4 = Math.abs(_root.orangewall._x - _x);
_root.distance_y_between_orangewall_and_crate4 = Math.abs(_root.orangewall._y - _y);
_root.distance_y_between_ball1_and_crate4 = Math.abs(_root.ball1._y - _y);
_root.difference_x_ball1_with_crate4_rightside = ((_root.ball1._x - _x) - (_width / 2)) - (_root.ball1._width / 2);
_root.difference_x_ball1_with_crate4_leftside = ((_x - _root.ball1._x) - (_width / 2)) - (_root.ball1._width / 2);
_root.distance_y_between_ball2_and_crate4 = Math.abs(_root.ball2._y - _y);
_root.difference_x_ball2_with_crate4_rightside = ((_root.ball2._x - _x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_ball2_with_crate4_leftside = ((_x - _root.ball2._x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_green_with_crate4_left = ((_x - (_width / 2)) - _root.greenwall._x) - (_root.greenwall._width / 2);
_root.difference_x_green_with_crate4_right = ((_root.greenwall._x - (_root.greenwall._width / 2)) - _x) - (_width / 2);
_root.difference_y_green_with_crate4_up = ((_y - (_height / 2)) - _root.greenwall._y) - (_root.greenwall._height / 2);
_root.difference_y_green_with_crate4_down = ((_root.greenwall._y - (_root.greenwall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_greenwall_and_crate4 = Math.abs(_root.greenwall._x - _x);
_root.distance_y_between_greenwall_and_crate4 = Math.abs(_root.greenwall._y - _y);
_root.difference_x_crate4_leftside_with_lb = ((_x - (_width / 2)) - (_root.lb._width / 2)) - _root.lb._x;
_root.difference_x_crate4_leftside_with_bluewall2 = ((_x - (_width / 2)) - (_root.bluewall2._width / 2)) - _root.bluewall2._x;
_root.distance_x_between_middlewall_and_crate4 = Math.abs(_root.middlewall._x - _x);
_root.difference_y_middlewall_insidebottom_with_crate4_down = ((423.8 - (_root.middlewall.middlewall_insidebottom._height / 2)) - (_height / 2)) - _y;
_root.difference_y_middlewall_insidetop_with_crate4_up = (_y - 194) - (_height / 2);
if (hitTest(_root.orangewall)) {
_root.orangewall_crate4_hit = true;
if ((_root.hit_crate4 == true) and (_root.moveright == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_orange_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.moveleft == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_orange_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.movedown == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
_root.cant_move_crate4_down_against_orange_wall = true;
}
if ((_root.hit_crate4 == true) and (_root.moveup == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_orange_wall = true;
}
}
} else {
_root.orangewall_crate4_hit = false;
}
if (((_root.difference_x_orange_with_crate4_left <= 0.3) && (_root.difference_x_orange_with_crate4_left >= -8)) && (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) {
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_middle_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_left_wall = true;
_root.orange_wall_and_crate4_leftside_touching = true;
} else {
_root.cant_move_crate4_left_against_orange_wall = false;
_root.orange_wall_and_crate4_leftside_touching = false;
}
if ((((_root.orangewall_movement == true) and (_root.orange_wall_and_crate4_leftside_touching == true)) and (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + (_width / 2)) + 0.7);
_root.crate4_is_pushed_by_orange_wall = true;
}
if (((_root.difference_x_ball1_with_crate4_rightside <= 1.5) && (_root.difference_x_ball1_with_crate4_rightside >= -8)) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate4_rightside_touching = true;
} else {
_root.ball1_and_crate4_rightside_touching = false;
}
if (((_root.difference_x_ball2_with_crate4_rightside <= 0.3) && (_root.difference_x_ball2_with_crate4_rightside >= -8)) && (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate4_rightside_touching = true;
} else {
_root.ball2_and_crate4_rightside_touching = false;
}
if ((((_root.ball1_and_crate4_rightside_touching == true) and (_root.crate4_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1._x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + _width) + (_root.ball1._width / 2)) + 0.5;
_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall = true;
} else {
_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
}
if ((((_root.ball2_and_crate4_rightside_touching == true) and (_root.crate4_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2._x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + _width) + (_root.ball2._width / 2)) + 0.5;
_root.ball2_is_pushed_by_crate4_is_pushed_by_orange_wall = true;
} else {
_root.ball2_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
}
if (((_root.difference_x_ball1_with_crate4_leftside <= 0.3) && (_root.difference_x_ball1_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate4_leftside_touching = true;
} else {
_root.ball1_and_crate4_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate4_leftside <= 0.3) && (_root.difference_x_ball2_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate4_leftside_touching = true;
} else {
_root.ball2_and_crate4_leftside_touching = false;
}
if (((((_root.ball1_and_crate4_leftside_touching == true) and (_root.ball1_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveright == false)) and (_currentframe == 1)) {
_x = (((_root.ball1._x + (_root.ball1._width / 2)) + (_width / 2)) + 0.5);
}
if ((((_root.ball2_and_crate4_leftside_touching == true) and (_root.ball2_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveright == false)) {
_x = (((_root.ball2._x + (_root.ball2._width / 2)) + (_width / 2)) + 0.5);
}
if ((_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2))) && (_root.orangewall_movement == true)) {
_root.crate4_against_orange_wall_boundaries_prevention = true;
} else {
_root.crate4_against_orange_wall_boundaries_prevention = false;
}
if (((_root.difference_x_orange_with_crate4_right <= 0.3) && (_root.difference_x_orange_with_crate4_right >= -8)) && (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) {
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_middlewall = true;
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_right_wall = true;
} else {
_root.cant_move_crate4_right_against_orange_wall = false;
}
if (_root.crate4_against_orange_wall_boundaries_prevention == false) {
if (((_root.difference_y_orange_with_crate4_up <= 0.3) && (_root.difference_y_orange_with_crate4_up >= -8)) && (_root.distance_x_between_orangewall_and_crate4 < ((_width / 2) + (_root.orangewall._width / 2)))) {
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
_root.cant_move_crate4_up_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate4_up_against_orange_wall = false;
}
if (((_root.difference_y_orange_with_crate4_down <= 0.3) && (_root.difference_y_orange_with_crate4_down >= -8)) && (_root.distance_x_between_orangewall_and_crate4 < ((_width / 2) + (_root.orangewall._width / 2)))) {
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_green_wall = true;
_root.cant_move_crate4_down_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate4_down_against_orange_wall = false;
}
} else if ((((_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2))) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate4_rightside <= 0.3)) && (_root.difference_x_ball1_with_crate4_rightside >= -8)) {
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
} else {
_root.cant_move_crate4_down_against_orange_wall = false;
_root.cant_move_crate4_up_against_orange_wall = false;
}
if (((((_root.difference_x_ball1_with_crate4_rightside <= 0.5) && (_root.difference_x_ball1_with_crate4_rightside >= -3)) && (_root.distance_between_leftmiddlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate4 < ((_root.ball1._height / 2) + (_height / 2)))) or ((((_root.difference_x_ball2_with_crate4_rightside <= 0.5) && (_root.difference_x_ball2_with_crate4_rightside >= -3)) && (_root.distance_between_leftmiddlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate4 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.ball_location = false;
_root.ball_locator();
_root.orange_hit = true;
}
if (hitTest(_root.middlewall.middlewall_insidetop) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.middlewall_insidetop.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_middle_wall = true;
}
if (((((_x - _root.middlewall._x) - (_root.middlewall._width / 2)) - (_width / 2)) <= 0.3) and (_y < 209.9)) {
_root.cant_move_crate4_left_against_middle_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_left_wall = true;
} else {
_root.cant_move_crate4_left_against_middle_wall = false;
}
if (hitTest(_root.leftwall)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_left_wall = true;
}
if ((((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate4_left_against_left_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_middle_wall = true;
} else {
_root.cant_move_crate4_left_against_left_wall = false;
}
if (hitTest(_root.midwid) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.midwid.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_midwid = true;
}
if (((Math.abs(((_x - _root.midwid._x) - (_root.midwid._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.midwid._y + (_root.midwid._height / 2)) + (_height / 2)))) and (_y > ((_root.midwid._y - (_root.midwid._height / 2)) - (_height / 2)))) {
_root.cant_move_crate4_left_against_midwid = true;
} else {
_root.cant_move_crate4_left_against_midwid = false;
}
if (hitTest(_root.midwid) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.midwid.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_midwid = true;
}
if (((Math.abs(((_y - _root.midwid._y) - (_root.midwid._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.midwid._x + (_root.midwid._width / 2)) + (_width / 2)))) and (_x > ((_root.midwid._x - (_root.midwid._width / 2)) - (_width / 2)))) {
_root.cant_move_crate4_up_against_midwid = true;
} else {
_root.cant_move_crate4_up_against_midwid = false;
}
if (hitTest(_root.rightwall)) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_right_wall = true;
}
if ((((_root.rightwall._x - _x) - (_root.rightwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate4_right_against_right_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_middle_wall = true;
} else {
_root.cant_move_crate4_right_against_right_wall = false;
}
if (hitTest(_root.topwall)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_top_wall = true;
}
if ((((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
} else {
_root.cant_move_crate4_up_against_top_wall = false;
}
if (hitTest(_root.bluewall2)) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_bluewall2 = true;
}
if ((((_y - _root.bluewall2._y) - (_root.bluewall2._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate4_up_against_bluewall2 = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
} else {
_root.cant_move_crate4_up_against_bluewall2 = false;
}
if (hitTest(_root.bottomwall)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate4_down_against_bottom_wall = true;
}
if ((((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_green_wall = true;
} else {
_root.cant_move_crate4_down_against_bottom_wall = false;
}
if (hitTest(_root.middlewall.middlewall_insidetop) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.middlewall_insidetop.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_middlewall_insidetop = true;
}
if (((_root.difference_y_middlewall_insidetop_with_crate4_up <= 0.3) && (_root.difference_y_middlewall_insidetop_with_crate4_up >= -8)) && (_root.distance_x_between_middlewall_and_crate4 < ((_width / 2) + (_root.middlewall._width / 2)))) {
_root.cant_move_crate4_up_against_middlewall_insidetop = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
_root.cant_move_crate4_up_against_top_wall = true;
} else {
_root.cant_move_crate4_up_against_middlewall_insidetop = false;
}
if (_root.hit_crate4_2) {
if (hitTest(_root.crate3) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate3.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_crate3 = true;
}
if ((((((_y - _root.crate3._y) - (_root.crate3._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate3._y) - (_root.crate3._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate3._x - _x) < ((_width / 2) + (_root.crate3._width / 2)))) {
_root.cant_move_crate4_up_against_crate3 = true;
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
} else {
_root.cant_move_crate4_up_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate3.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate4_down_against_crate3 = true;
}
if ((((((_root.crate3._y - _y) - (_root.crate3._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate3._y - _y) - (_root.crate3._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate3._x - _x) < ((_width / 2) + (_root.crate3._width / 2)))) {
_root.cant_move_crate4_down_against_crate3 = true;
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_green_wall = true;
} else {
_root.cant_move_crate4_down_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate3.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_crate3 = true;
}
if ((((((_x - _root.crate3._x) - (_root.crate3._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate3._x) - (_root.crate3._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate3._y - _y) < ((_height / 2) + (_root.crate3._height / 2)))) {
_root.cant_move_crate4_left_against_crate3 = true;
_root.cant_move_crate4_left_against_left_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_middle_wall = true;
} else {
_root.cant_move_crate4_left_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate3.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_crate3 = true;
}
if ((((((_root.crate3._x - _x) - (_root.crate3._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate3._x - _x) - (_root.crate3._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate3._y - _y) < ((_height / 2) + (_root.crate3._height / 2)))) {
_root.cant_move_crate4_right_against_crate3 = true;
_root.cant_move_crate4_right_against_right_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_middle_wall = true;
} else {
_root.cant_move_crate4_right_against_crate3 = false;
}
if (hitTest(_root.crate5) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate5.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_crate5 = true;
}
if ((((((_y - _root.crate5._y) - (_root.crate5._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate5._y) - (_root.crate5._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate5._x - _x) < ((_width / 2) + (_root.crate5._width / 2)))) {
_root.cant_move_crate4_up_against_crate5 = true;
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
} else {
_root.cant_move_crate4_up_against_crate5 = false;
}
if (hitTest(_root.crate5) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate5.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate4_down_against_crate5 = true;
}
if ((((((_root.crate5._y - _y) - (_root.crate5._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate5._y - _y) - (_root.crate5._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate5._x - _x) < ((_width / 2) + (_root.crate5._width / 2)))) {
_root.cant_move_crate4_down_against_crate5 = true;
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_green_wall = true;
} else {
_root.cant_move_crate4_down_against_crate5 = false;
}
if (hitTest(_root.crate5) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate5.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_crate5 = true;
}
if ((((((_x - _root.crate5._x) - (_root.crate5._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate5._x) - (_root.crate5._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate5._y - _y) < ((_height / 2) + (_root.crate5._height / 2)))) {
_root.cant_move_crate4_left_against_crate5 = true;
_root.cant_move_crate4_left_against_left_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_middle_wall = true;
} else {
_root.cant_move_crate4_left_against_crate5 = false;
}
if (hitTest(_root.crate5) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate5.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_crate5 = true;
}
if ((((((_root.crate5._x - _x) - (_root.crate5._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate5._x - _x) - (_root.crate5._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate5._y - _y) < ((_height / 2) + (_root.crate5._height / 2)))) {
_root.cant_move_crate4_right_against_crate5 = true;
_root.cant_move_crate4_right_against_right_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_middle_wall = true;
} else {
_root.cant_move_crate4_right_against_crate5 = false;
}
}
if (hitTest(_root.greenwall)) {
_root.greenwall_crate4_hit = true;
if ((_root.hit_crate4 == true) and (_root.moveright == true)) {
if ((_root.crate4_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_green_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.moveleft == true)) {
if ((_root.crate4_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_green_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.movedown == true)) {
if ((_root.crate4_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate4_down_against_green_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.moveup == true)) {
if ((_root.crate4_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_green_wall = true;
}
}
} else {
_root.greenwall_crate4_hit = false;
}
if (((_root.difference_x_green_with_crate4_right <= 0.3) && (_root.difference_x_green_with_crate4_right >= -8)) && (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_middle_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_right_wall = true;
_root.green_wall_and_crate4_rightside_touching = true;
} else {
_root.cant_move_crate4_right_against_green_wall = false;
_root.green_wall_and_crate4_rightside_touching = false;
}
if ((((_root.greenwall_movement == true) and (_root.green_wall_and_crate4_rightside_touching == true)) and (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - (_width / 2)) - 0.7);
_root.crate4_is_pushed_by_green_wall = true;
}
if (((_root.difference_x_ball1_with_crate4_leftside <= 0.3) && (_root.difference_x_ball1_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate4_leftside_touching = true;
} else {
_root.ball1_and_crate4_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate4_leftside <= 0.3) && (_root.difference_x_ball2_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate4_leftside_touching = true;
} else {
_root.ball2_and_crate4_leftside_touching = false;
}
if (((((_root.ball1_and_crate4_leftside_touching == true) and (_root.crate4_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.greenwall_movement == true)) {
_root.ball1._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball1._width / 2)) - 0.5;
_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall = true;
} else {
_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall = false;
}
if ((((_root.ball2_and_crate4_leftside_touching == true) and (_root.crate4_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball2._width / 2)) - 0.5;
_root.ball2_is_pushed_by_crate4_is_pushed_by_green_wall = true;
} else {
_root.ball2_is_pushed_by_crate4_is_pushed_by_green_wall = false;
}
if (((((_root.ball1_and_crate4_rightside_touching == true) and (_root.ball1_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveleft == false)) and (_currentframe == 1)) {
_root.cant_move_crate4_right_against_green_wall = false;
_x = (((_root.ball1._x - (_root.ball1._width / 2)) - (_width / 2)) - 0.5);
_root.crate4_is_pushed_by_ball1_is_pushed_by_greenwall = true;
} else {
_root.crate4_is_pushed_by_ball1_is_pushed_by_greenwall = false;
}
if ((((_root.ball2_and_crate4_rightside_touching == true) and (_root.ball2_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveleft == false)) {
_x = (((_root.ball2._x - (_root.ball2._width / 2)) - (_width / 2)) - 0.5);
_root.crate4_is_pushed_by_ball2_is_pushed_by_greenwall = true;
} else {
_root.crate4_is_pushed_by_ball2_is_pushed_by_greenwall = false;
}
if ((_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.greenwall_movement == true)) {
_root.crate4_against_green_wall_boundaries_prevention = true;
} else {
_root.crate4_against_green_wall_boundaries_prevention = false;
}
if (((_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.distance_y_between_greenwall_and_ball <= ((_root.ball1._height / 2) + (_root.greenwall._height / 2)))) and (_root.greenwall_movement == true)) {
_root.crate4_against_green_wall_boundaries_prevention2 = true;
} else {
_root.crate4_against_green_wall_boundaries_prevention2 = false;
}
if (((_root.difference_x_green_with_crate4_left <= 0.3) && (_root.difference_x_green_with_crate4_left >= -8)) && (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_middlewall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_left_wall = true;
} else {
_root.cant_move_crate4_left_against_green_wall = false;
}
if (_root.crate4_against_green_wall_boundaries_prevention == false) {
if (((_root.difference_y_green_with_crate4_up <= 0.3) && (_root.difference_y_green_with_crate4_up >= -8)) && (_root.distance_x_between_greenwall_and_crate4 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate4_up_against_green_wall = true;
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate4_up_against_green_wall = false;
}
if (((_root.difference_y_green_with_crate4_down <= 0.3) && (_root.difference_y_green_with_crate4_down >= -8)) && (_root.distance_x_between_greenwall_and_crate4 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate4_down_against_green_wall = true;
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate4_down_against_green_wall = false;
}
} else if ((((_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2))) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate4_leftside <= 0.3)) && (_root.difference_x_ball1_with_crate4_leftside >= -8)) {
_root.cant_move_crate4_down_against_green_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_right_against_green_wall = true;
} else {
_root.cant_move_crate4_down_against_green_wall = false;
_root.cant_move_crate4_up_against_green_wall = false;
}
if (((_root.greenwall_movement == true) and ((((_root.difference_x_ball1_with_crate4_leftside <= 0.7) && (_root.difference_x_ball1_with_crate4_leftside >= -6)) && (_root.distance_between_rightmiddlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate4 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate4_leftside <= 0.5) && (_root.difference_x_ball2_with_crate4_leftside >= -3)) && (_root.distance_between_rightmiddlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate4 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.green_hit_right = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate4_up_against_green_wall = false;
_root.cant_move_crate4_down_against_green_wall = false;
trace("pooppp");
}
if (((_root.greenwall_movement == true) and ((((_root.difference_x_ball1_with_crate4_leftside <= 0.7) && (_root.difference_x_ball1_with_crate4_leftside >= -6)) && (_root.distance_between_lb_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate4 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate4_leftside <= 0.5) && (_root.difference_x_ball2_with_crate4_leftside >= -3)) && (_root.distance_between_lb_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate4 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.green_hit_left = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate4_up_against_green_wall = false;
_root.cant_move_crate4_down_against_green_wall = false;
trace("pooppp");
}
if ((((_root.difference_x_crate4_leftside_with_lb <= 0.3) && (_root.difference_x_crate4_leftside_with_lb >= -8)) or (((_root.difference_x_crate4_leftside_with_bluewall2 <= 1) && (_root.difference_x_crate4_leftside_with_bluewall2 >= -8)) && (_y < 426.1))) && (((_root.crate4_is_pushed_by_green_wall == true) or (_root.crate4_is_pushed_by_ball1_is_pushed_by_greenwall == true)) or (_root.crate4_is_pushed_by_ball2_is_pushed_by_greenwall == true))) {
gotoAndStop (2);
_root.greenwall_movement = false;
}
}
Symbol 1176 MovieClip Frame 1
stop();
Instance of Symbol 1071 MovieClip "crate4" in Symbol 1176 MovieClip Frame 11
onClipEvent (load) {
_root.cant_move_crate4_right_against_middle_wall = false;
_root.cant_move_crate4_right_against_orange_wall = false;
_root.cant_move_crate4_left_against_orange_wall = false;
_root.cant_move_crate4_down_against_orange_wall = false;
_root.cant_move_crate4_up_against_orange_wall = false;
_root.hit_crate4 = false;
_root.orange_wall_and_crate4_leftside_touching = false;
_root.crate4_against_orange_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
_root.ball1_and_crate4_rightside_touching = false;
_root.ball1_and_crate4_leftside_touching = false;
_root.ball2_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
_root.ball2_and_crate4_rightside_touching = false;
_root.ball2_and_crate4_leftside_touching = false;
_root.cant_move_crate4_right_against_right_wall = false;
_root.cant_move_crate4_left_against_left_wall = false;
_root.cant_move_crate4_left_against_middle_wall = false;
_root.cant_move_crate4_right_against_green_wall = false;
_root.cant_move_crate4_left_against_green_wall = false;
_root.cant_move_crate4_down_against_green_wall = false;
_root.cant_move_crate4_up_against_green_wall = false;
_root.cant_move_crate4_up_against_bluewall2 = false;
_root.cant_move_crate4_up_against_middlewall_insidetop = false;
_root.cant_move_crate4_down_against_middlewall_insidebottom = false;
_root.cant_move_crate4_left_against_midwid = false;
_root.cant_move_crate4_up_against_midwid = false;
_root.cant_move_crate4_up_against_crate3 = false;
_root.cant_move_crate4_left_against_crate3 = false;
_root.cant_move_crate4_down_against_crate3 = false;
_root.cant_move_crate4_right_against_crate3 = false;
_root.cant_move_crate4_up_against_crate5 = false;
_root.cant_move_crate4_left_against_crate5 = false;
_root.cant_move_crate4_down_against_crate5 = false;
_root.cant_move_crate4_right_against_crate5 = false;
_root.green_wall_and_crate4_rightside_touching = false;
_root.crate4_against_green_wall_boundaries_prevention = false;
_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall = false;
_root.ball2_is_pushed_by_crate4_is_pushed_by_green_wall = false;
_root.crate4_is_pushed_by_ball1_is_pushed_by_greenwall = false;
_root.crate4_is_pushed_by_ball2_is_pushed_by_greenwall = false;
_root.crate4_is_pushed_by_green_wall = false;
}
onClipEvent (enterFrame) {
_root.difference_x_orange_with_crate4_left = ((_x - (_width / 2)) - _root.orangewall._x) - (_root.orangewall._width / 2);
_root.difference_x_orange_with_crate4_right = ((_root.orangewall._x - (_root.orangewall._width / 2)) - _x) - (_width / 2);
_root.difference_y_orange_with_crate4_up = ((_y - (_height / 2)) - _root.orangewall._y) - (_root.orangewall._height / 2);
_root.difference_y_orange_with_crate4_down = ((_root.orangewall._y - (_root.orangewall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_orangewall_and_crate4 = Math.abs(_root.orangewall._x - _x);
_root.distance_y_between_orangewall_and_crate4 = Math.abs(_root.orangewall._y - _y);
_root.distance_y_between_ball1_and_crate4 = Math.abs(_root.ball1._y - _y);
_root.difference_x_ball1_with_crate4_rightside = ((_root.ball1._x - _x) - (_width / 2)) - (_root.ball1._width / 2);
_root.difference_x_ball1_with_crate4_leftside = ((_x - _root.ball1._x) - (_width / 2)) - (_root.ball1._width / 2);
_root.distance_y_between_ball2_and_crate4 = Math.abs(_root.ball2._y - _y);
_root.difference_x_ball2_with_crate4_rightside = ((_root.ball2._x - _x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_ball2_with_crate4_leftside = ((_x - _root.ball2._x) - (_width / 2)) - (_root.ball2._width / 2);
_root.difference_x_green_with_crate4_left = ((_x - (_width / 2)) - _root.greenwall._x) - (_root.greenwall._width / 2);
_root.difference_x_green_with_crate4_right = ((_root.greenwall._x - (_root.greenwall._width / 2)) - _x) - (_width / 2);
_root.difference_y_green_with_crate4_up = ((_y - (_height / 2)) - _root.greenwall._y) - (_root.greenwall._height / 2);
_root.difference_y_green_with_crate4_down = ((_root.greenwall._y - (_root.greenwall._height / 2)) - _y) - (_height / 2);
_root.distance_x_between_greenwall_and_crate4 = Math.abs(_root.greenwall._x - _x);
_root.distance_y_between_greenwall_and_crate4 = Math.abs(_root.greenwall._y - _y);
_root.difference_x_crate4_leftside_with_lb = ((_x - (_width / 2)) - (_root.lb._width / 2)) - _root.lb._x;
_root.difference_x_crate4_leftside_with_bluewall2 = ((_x - (_width / 2)) - (_root.bluewall2._width / 2)) - _root.bluewall2._x;
_root.distance_x_between_middlewall_and_crate4 = Math.abs(_root.middlewall._x - _x);
_root.difference_y_middlewall_insidebottom_with_crate4_down = ((423.8 - (_root.middlewall.middlewall_insidebottom._height / 2)) - (_height / 2)) - _y;
_root.difference_y_middlewall_insidetop_with_crate4_up = (_y - 194) - (_height / 2);
if (hitTest(_root.orangewall)) {
_root.orangewall_crate4_hit = true;
if ((_root.hit_crate4 == true) and (_root.moveright == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.orangewall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_orange_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.moveleft == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.orangewall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_orange_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.movedown == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.orangewall.getBounds(_root).yMin) + 0.1));
}
_root.cant_move_crate4_down_against_orange_wall = true;
}
if ((_root.hit_crate4 == true) and (_root.moveup == true)) {
if ((_root.crate4_against_orange_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.orangewall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_orange_wall = true;
}
}
} else {
_root.orangewall_crate4_hit = false;
}
if (((_root.difference_x_orange_with_crate4_left <= 0.3) && (_root.difference_x_orange_with_crate4_left >= -8)) && (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) {
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_middle_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_left_wall = true;
_root.orange_wall_and_crate4_leftside_touching = true;
} else {
_root.cant_move_crate4_left_against_orange_wall = false;
_root.orange_wall_and_crate4_leftside_touching = false;
}
if ((((_root.orangewall_movement == true) and (_root.orange_wall_and_crate4_leftside_touching == true)) and (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + (_width / 2)) + 0.7);
_root.crate4_is_pushed_by_orange_wall = true;
}
if (((_root.difference_x_ball1_with_crate4_rightside <= 1.5) && (_root.difference_x_ball1_with_crate4_rightside >= -8)) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate4_rightside_touching = true;
} else {
_root.ball1_and_crate4_rightside_touching = false;
}
if (((_root.difference_x_ball2_with_crate4_rightside <= 0.3) && (_root.difference_x_ball2_with_crate4_rightside >= -8)) && (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate4_rightside_touching = true;
} else {
_root.ball2_and_crate4_rightside_touching = false;
}
if ((((_root.ball1_and_crate4_rightside_touching == true) and (_root.crate4_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1._x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + _width) + (_root.ball1._width / 2)) + 0.5;
_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall = true;
} else {
_root.ball1_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
}
if ((((_root.ball2_and_crate4_rightside_touching == true) and (_root.crate4_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2._x = (((_root.orangewall._x + (_root.orangewall._width / 2)) + _width) + (_root.ball2._width / 2)) + 0.5;
_root.ball2_is_pushed_by_crate4_is_pushed_by_orange_wall = true;
} else {
_root.ball2_is_pushed_by_crate4_is_pushed_by_orange_wall = false;
}
if (((_root.difference_x_ball1_with_crate4_leftside <= 0.3) && (_root.difference_x_ball1_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate4_leftside_touching = true;
} else {
_root.ball1_and_crate4_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate4_leftside <= 0.3) && (_root.difference_x_ball2_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate4_leftside_touching = true;
} else {
_root.ball2_and_crate4_leftside_touching = false;
}
if (((((_root.ball1_and_crate4_leftside_touching == true) and (_root.ball1_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveright == false)) and (_currentframe == 1)) {
_x = (((_root.ball1._x + (_root.ball1._width / 2)) + (_width / 2)) + 0.5);
}
if ((((_root.ball2_and_crate4_leftside_touching == true) and (_root.ball2_is_pushed_by_orange_wall == true)) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveright == false)) {
_x = (((_root.ball2._x + (_root.ball2._width / 2)) + (_width / 2)) + 0.5);
}
if ((_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2))) && (_root.orangewall_movement == true)) {
_root.crate4_against_orange_wall_boundaries_prevention = true;
} else {
_root.crate4_against_orange_wall_boundaries_prevention = false;
}
if (((_root.difference_x_orange_with_crate4_right <= 0.3) && (_root.difference_x_orange_with_crate4_right >= -8)) && (_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2)))) {
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_middlewall = true;
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_right_wall = true;
} else {
_root.cant_move_crate4_right_against_orange_wall = false;
}
if (_root.crate4_against_orange_wall_boundaries_prevention == false) {
if (((_root.difference_y_orange_with_crate4_up <= 0.3) && (_root.difference_y_orange_with_crate4_up >= -8)) && (_root.distance_x_between_orangewall_and_crate4 < ((_width / 2) + (_root.orangewall._width / 2)))) {
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
_root.cant_move_crate4_up_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate4_up_against_orange_wall = false;
}
if (((_root.difference_y_orange_with_crate4_down <= 0.3) && (_root.difference_y_orange_with_crate4_down >= -8)) && (_root.distance_x_between_orangewall_and_crate4 < ((_width / 2) + (_root.orangewall._width / 2)))) {
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_green_wall = true;
_root.cant_move_crate4_down_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate4_down_against_orange_wall = false;
}
} else if ((((_root.distance_y_between_orangewall_and_crate4 < ((_height / 2) + (_root.orangewall._height / 2))) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate4_rightside <= 0.3)) && (_root.difference_x_ball1_with_crate4_rightside >= -8)) {
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
} else {
_root.cant_move_crate4_down_against_orange_wall = false;
_root.cant_move_crate4_up_against_orange_wall = false;
}
if (((((_root.difference_x_ball1_with_crate4_rightside <= 0.5) && (_root.difference_x_ball1_with_crate4_rightside >= -3)) && (_root.distance_between_leftmiddlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate4 < ((_root.ball1._height / 2) + (_height / 2)))) or ((((_root.difference_x_ball2_with_crate4_rightside <= 0.5) && (_root.difference_x_ball2_with_crate4_rightside >= -3)) && (_root.distance_between_leftmiddlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate4 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.ball_location = false;
_root.ball_locator();
_root.orange_hit = true;
}
if (hitTest(_root.middlewall.middlewall_insidetop) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.middlewall.middlewall_insidetop.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_middle_wall = true;
}
if (((((_x - _root.middlewall._x) - (_root.middlewall._width / 2)) - (_width / 2)) <= 0.3) and (_y < 209.9)) {
_root.cant_move_crate4_left_against_middle_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_left_wall = true;
} else {
_root.cant_move_crate4_left_against_middle_wall = false;
}
if (hitTest(_root.leftwall)) {
_x = (_x - ((getBounds(_root).xMin - _root.leftwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_left_wall = true;
}
if ((((_x - _root.leftwall._x) - (_root.leftwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate4_left_against_left_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_middle_wall = true;
} else {
_root.cant_move_crate4_left_against_left_wall = false;
}
if (hitTest(_root.midwid) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.midwid.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_midwid = true;
}
if (((Math.abs(((_x - _root.midwid._x) - (_root.midwid._width / 2)) - (_width / 2)) <= 0.3) and (_y < ((_root.midwid._y + (_root.midwid._height / 2)) + (_height / 2)))) and (_y > ((_root.midwid._y - (_root.midwid._height / 2)) - (_height / 2)))) {
_root.cant_move_crate4_left_against_midwid = true;
} else {
_root.cant_move_crate4_left_against_midwid = false;
}
if (hitTest(_root.midwid) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.midwid.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_midwid = true;
}
if (((Math.abs(((_y - _root.midwid._y) - (_root.midwid._height / 2)) - (_height / 2)) <= 0.3) and (_x < ((_root.midwid._x + (_root.midwid._width / 2)) + (_width / 2)))) and (_x > ((_root.midwid._x - (_root.midwid._width / 2)) - (_width / 2)))) {
_root.cant_move_crate4_up_against_midwid = true;
} else {
_root.cant_move_crate4_up_against_midwid = false;
}
if (hitTest(_root.rightwall)) {
_x = (_x - ((getBounds(_root).xMax - _root.rightwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_right_wall = true;
}
if ((((_root.rightwall._x - _x) - (_root.rightwall._width / 2)) - (_width / 2)) <= 0.3) {
_root.cant_move_crate4_right_against_right_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_middle_wall = true;
} else {
_root.cant_move_crate4_right_against_right_wall = false;
}
if (hitTest(_root.topwall)) {
_y = (_y - ((getBounds(_root).yMin - _root.topwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_top_wall = true;
}
if ((((_y - _root.topwall._y) - (_root.topwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
} else {
_root.cant_move_crate4_up_against_top_wall = false;
}
if (hitTest(_root.bluewall2)) {
_y = (_y - ((getBounds(_root).yMin - _root.bluewall2.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_bluewall2 = true;
}
if ((((_y - _root.bluewall2._y) - (_root.bluewall2._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate4_up_against_bluewall2 = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
} else {
_root.cant_move_crate4_up_against_bluewall2 = false;
}
if (hitTest(_root.bottomwall)) {
_y = (_y - ((getBounds(_root).yMax - _root.bottomwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate4_down_against_bottom_wall = true;
}
if ((((_root.bottomwall._y - _y) - (_root.bottomwall._height / 2)) - (_height / 2)) <= 0.3) {
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_green_wall = true;
} else {
_root.cant_move_crate4_down_against_bottom_wall = false;
}
if (hitTest(_root.middlewall.middlewall_insidetop) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.middlewall.middlewall_insidetop.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_middlewall_insidetop = true;
}
if (((_root.difference_y_middlewall_insidetop_with_crate4_up <= 0.3) && (_root.difference_y_middlewall_insidetop_with_crate4_up >= -8)) && (_root.distance_x_between_middlewall_and_crate4 < ((_width / 2) + (_root.middlewall._width / 2)))) {
_root.cant_move_crate4_up_against_middlewall_insidetop = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
_root.cant_move_crate4_up_against_top_wall = true;
} else {
_root.cant_move_crate4_up_against_middlewall_insidetop = false;
}
if (_root.hit_crate4_2) {
if (hitTest(_root.crate3) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate3.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_crate3 = true;
}
if ((((((_y - _root.crate3._y) - (_root.crate3._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate3._y) - (_root.crate3._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate3._x - _x) < ((_width / 2) + (_root.crate3._width / 2)))) {
_root.cant_move_crate4_up_against_crate3 = true;
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
} else {
_root.cant_move_crate4_up_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate3.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate4_down_against_crate3 = true;
}
if ((((((_root.crate3._y - _y) - (_root.crate3._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate3._y - _y) - (_root.crate3._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate3._x - _x) < ((_width / 2) + (_root.crate3._width / 2)))) {
_root.cant_move_crate4_down_against_crate3 = true;
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_green_wall = true;
} else {
_root.cant_move_crate4_down_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate3.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_crate3 = true;
}
if ((((((_x - _root.crate3._x) - (_root.crate3._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate3._x) - (_root.crate3._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate3._y - _y) < ((_height / 2) + (_root.crate3._height / 2)))) {
_root.cant_move_crate4_left_against_crate3 = true;
_root.cant_move_crate4_left_against_left_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_middle_wall = true;
} else {
_root.cant_move_crate4_left_against_crate3 = false;
}
if (hitTest(_root.crate3) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate3.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_crate3 = true;
}
if ((((((_root.crate3._x - _x) - (_root.crate3._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate3._x - _x) - (_root.crate3._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate3._y - _y) < ((_height / 2) + (_root.crate3._height / 2)))) {
_root.cant_move_crate4_right_against_crate3 = true;
_root.cant_move_crate4_right_against_right_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_middle_wall = true;
} else {
_root.cant_move_crate4_right_against_crate3 = false;
}
if (hitTest(_root.crate5) and (_root.moveup == true)) {
_y = (_y - ((getBounds(_root).yMin - _root.crate5.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_crate5 = true;
}
if ((((((_y - _root.crate5._y) - (_root.crate5._height / 2)) - (_height / 2)) <= 0.3) and ((((_y - _root.crate5._y) - (_root.crate5._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate5._x - _x) < ((_width / 2) + (_root.crate5._width / 2)))) {
_root.cant_move_crate4_up_against_crate5 = true;
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
} else {
_root.cant_move_crate4_up_against_crate5 = false;
}
if (hitTest(_root.crate5) and (_root.movedown == true)) {
_y = (_y - ((getBounds(_root).yMax - _root.crate5.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate4_down_against_crate5 = true;
}
if ((((((_root.crate5._y - _y) - (_root.crate5._height / 2)) - (_height / 2)) <= 0.3) and ((((_root.crate5._y - _y) - (_root.crate5._height / 2)) - (_height / 2)) >= 0)) and (Math.abs(_root.crate5._x - _x) < ((_width / 2) + (_root.crate5._width / 2)))) {
_root.cant_move_crate4_down_against_crate5 = true;
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_green_wall = true;
} else {
_root.cant_move_crate4_down_against_crate5 = false;
}
if (hitTest(_root.crate5) and (_root.moveleft == true)) {
_x = (_x - ((getBounds(_root).xMin - _root.crate5.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_crate5 = true;
}
if ((((((_x - _root.crate5._x) - (_root.crate5._width / 2)) - (_width / 2)) <= 0.3) and ((((_x - _root.crate5._x) - (_root.crate5._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate5._y - _y) < ((_height / 2) + (_root.crate5._height / 2)))) {
_root.cant_move_crate4_left_against_crate5 = true;
_root.cant_move_crate4_left_against_left_wall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_middle_wall = true;
} else {
_root.cant_move_crate4_left_against_crate5 = false;
}
if (hitTest(_root.crate5) and (_root.moveright == true)) {
_x = (_x - ((getBounds(_root).xMax - _root.crate5.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_crate5 = true;
}
if ((((((_root.crate5._x - _x) - (_root.crate5._width / 2)) - (_width / 2)) <= 0.3) and ((((_root.crate5._x - _x) - (_root.crate5._width / 2)) - (_width / 2)) >= 0)) and (Math.abs(_root.crate5._y - _y) < ((_height / 2) + (_root.crate5._height / 2)))) {
_root.cant_move_crate4_right_against_crate5 = true;
_root.cant_move_crate4_right_against_right_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_middle_wall = true;
} else {
_root.cant_move_crate4_right_against_crate5 = false;
}
}
if (hitTest(_root.greenwall)) {
_root.greenwall_crate4_hit = true;
if ((_root.hit_crate4 == true) and (_root.moveright == true)) {
if ((_root.crate4_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMax - _root.greenwall.getBounds(_root).xMin) + 0.1));
_root.cant_move_crate4_right_against_green_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.moveleft == true)) {
if ((_root.crate4_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall == false)) {
_x = (_x - ((getBounds(_root).xMin - _root.greenwall.getBounds(_root).xMax) - 0.1));
_root.cant_move_crate4_left_against_green_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.movedown == true)) {
if ((_root.crate4_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMax - _root.greenwall.getBounds(_root).yMin) + 0.1));
_root.cant_move_crate4_down_against_green_wall = true;
}
}
if ((_root.hit_crate4 == true) and (_root.moveup == true)) {
if ((_root.crate4_against_green_wall_boundaries_prevention == false) and (_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall == false)) {
_y = (_y - ((getBounds(_root).yMin - _root.greenwall.getBounds(_root).yMax) - 0.1));
_root.cant_move_crate4_up_against_green_wall = true;
}
}
} else {
_root.greenwall_crate4_hit = false;
}
if (((_root.difference_x_green_with_crate4_right <= 0.3) && (_root.difference_x_green_with_crate4_right >= -8)) && (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate4_right_against_green_wall = true;
_root.cant_move_crate4_right_against_middle_wall = true;
_root.cant_move_crate4_right_against_orange_wall = true;
_root.cant_move_crate4_right_against_right_wall = true;
_root.green_wall_and_crate4_rightside_touching = true;
} else {
_root.cant_move_crate4_right_against_green_wall = false;
_root.green_wall_and_crate4_rightside_touching = false;
}
if ((((_root.greenwall_movement == true) and (_root.green_wall_and_crate4_rightside_touching == true)) and (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_currentframe == 1)) {
_x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - (_width / 2)) - 0.7);
_root.crate4_is_pushed_by_green_wall = true;
}
if (((_root.difference_x_ball1_with_crate4_leftside <= 0.3) && (_root.difference_x_ball1_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) {
_root.ball1_and_crate4_leftside_touching = true;
} else {
_root.ball1_and_crate4_leftside_touching = false;
}
if (((_root.difference_x_ball2_with_crate4_leftside <= 0.3) && (_root.difference_x_ball2_with_crate4_leftside >= -8)) && (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2_and_crate4_leftside_touching = true;
} else {
_root.ball2_and_crate4_leftside_touching = false;
}
if (((((_root.ball1_and_crate4_leftside_touching == true) and (_root.crate4_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.greenwall_movement == true)) {
_root.ball1._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball1._width / 2)) - 0.5;
_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall = true;
} else {
_root.ball1_is_pushed_by_crate4_is_pushed_by_green_wall = false;
}
if ((((_root.ball2_and_crate4_leftside_touching == true) and (_root.crate4_is_pushed_by_green_wall == true)) and (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) {
_root.ball2._x = (((_root.greenwall._x - (_root.greenwall._width / 2)) - _width) - (_root.ball2._width / 2)) - 0.5;
_root.ball2_is_pushed_by_crate4_is_pushed_by_green_wall = true;
} else {
_root.ball2_is_pushed_by_crate4_is_pushed_by_green_wall = false;
}
if (((((_root.ball1_and_crate4_rightside_touching == true) and (_root.ball1_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.moveleft == false)) and (_currentframe == 1)) {
_root.cant_move_crate4_right_against_green_wall = false;
_x = (((_root.ball1._x - (_root.ball1._width / 2)) - (_width / 2)) - 0.5);
_root.crate4_is_pushed_by_ball1_is_pushed_by_greenwall = true;
} else {
_root.crate4_is_pushed_by_ball1_is_pushed_by_greenwall = false;
}
if ((((_root.ball2_and_crate4_rightside_touching == true) and (_root.ball2_is_pushed_by_green_wall == true)) and (_root.distance_y_between_ball2_and_crate4 < ((_height / 2) + (_root.ball2._height / 2)))) and (_root.moveleft == false)) {
_x = (((_root.ball2._x - (_root.ball2._width / 2)) - (_width / 2)) - 0.5);
_root.crate4_is_pushed_by_ball2_is_pushed_by_greenwall = true;
} else {
_root.crate4_is_pushed_by_ball2_is_pushed_by_greenwall = false;
}
if ((_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.greenwall_movement == true)) {
_root.crate4_against_green_wall_boundaries_prevention = true;
} else {
_root.crate4_against_green_wall_boundaries_prevention = false;
}
if (((_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2))) and (_root.distance_y_between_greenwall_and_ball <= ((_root.ball1._height / 2) + (_root.greenwall._height / 2)))) and (_root.greenwall_movement == true)) {
_root.crate4_against_green_wall_boundaries_prevention2 = true;
} else {
_root.crate4_against_green_wall_boundaries_prevention2 = false;
}
if (((_root.difference_x_green_with_crate4_left <= 0.3) && (_root.difference_x_green_with_crate4_left >= -8)) && (_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2)))) {
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_left_against_middlewall = true;
_root.cant_move_crate4_left_against_orange_wall = true;
_root.cant_move_crate4_left_against_left_wall = true;
} else {
_root.cant_move_crate4_left_against_green_wall = false;
}
if (_root.crate4_against_green_wall_boundaries_prevention == false) {
if (((_root.difference_y_green_with_crate4_up <= 0.3) && (_root.difference_y_green_with_crate4_up >= -8)) && (_root.distance_x_between_greenwall_and_crate4 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate4_up_against_green_wall = true;
_root.cant_move_crate4_up_against_top_wall = true;
_root.cant_move_crate4_up_against_orange_wall = true;
_root.cant_move_crate4_up_against_middlewall_insidetop = true;
} else {
_root.cant_move_crate4_up_against_green_wall = false;
}
if (((_root.difference_y_green_with_crate4_down <= 0.3) && (_root.difference_y_green_with_crate4_down >= -8)) && (_root.distance_x_between_greenwall_and_crate4 < ((_width / 2) + (_root.greenwall._width / 2)))) {
_root.cant_move_crate4_down_against_green_wall = true;
_root.cant_move_crate4_down_against_bottom_wall = true;
_root.cant_move_crate4_down_against_orange_wall = true;
_root.cant_move_crate4_down_against_middlewall_insidebottom = true;
} else {
_root.cant_move_crate4_down_against_green_wall = false;
}
} else if ((((_root.distance_y_between_greenwall_and_crate4 < ((_height / 2) + (_root.greenwall._height / 2))) && (_root.distance_y_between_ball1_and_crate4 < ((_height / 2) + (_root.ball1._height / 2)))) and (_root.difference_x_ball1_with_crate4_leftside <= 0.3)) && (_root.difference_x_ball1_with_crate4_leftside >= -8)) {
_root.cant_move_crate4_down_against_green_wall = true;
_root.cant_move_crate4_up_against_green_wall = true;
_root.cant_move_crate4_left_against_green_wall = true;
_root.cant_move_crate4_right_against_green_wall = true;
} else {
_root.cant_move_crate4_down_against_green_wall = false;
_root.cant_move_crate4_up_against_green_wall = false;
}
if (((_root.greenwall_movement == true) and ((((_root.difference_x_ball1_with_crate4_leftside <= 0.7) && (_root.difference_x_ball1_with_crate4_leftside >= -6)) && (_root.distance_between_rightmiddlewall_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate4 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate4_leftside <= 0.5) && (_root.difference_x_ball2_with_crate4_leftside >= -3)) && (_root.distance_between_rightmiddlewall_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate4 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.green_hit_right = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate4_up_against_green_wall = false;
_root.cant_move_crate4_down_against_green_wall = false;
trace("pooppp");
}
if (((_root.greenwall_movement == true) and ((((_root.difference_x_ball1_with_crate4_leftside <= 0.7) && (_root.difference_x_ball1_with_crate4_leftside >= -6)) && (_root.distance_between_lb_and_ball <= 0.5)) && (_root.distance_y_between_ball1_and_crate4 < ((_root.ball1._height / 2) + (_height / 2))))) or ((((_root.difference_x_ball2_with_crate4_leftside <= 0.5) && (_root.difference_x_ball2_with_crate4_leftside >= -3)) && (_root.distance_between_lb_and_ball2 <= 0.5)) && (_root.distance_y_between_ball2_and_crate4 < ((_root.ball2._height / 2) + (_height / 2))))) {
_root.ball_location = false;
_root.green_hit_left = true;
_root.ball1._x = 2000;
_root.ball2._x = 2000;
_root.cant_move_crate4_up_against_green_wall = false;
_root.cant_move_crate4_down_against_green_wall = false;
trace("pooppp");
}
if ((((_root.difference_x_crate4_leftside_with_lb <= 0.3) && (_root.difference_x_crate4_leftside_with_lb >= -8)) or (((_root.difference_x_crate4_leftside_with_bluewall2 <= 1) && (_root.difference_x_crate4_leftside_with_bluewall2 >= -8)) && (_y < 426.1))) && (((_root.crate4_is_pushed_by_green_wall == true) or (_root.crate4_is_pushed_by_ball1_is_pushed_by_greenwall == true)) or (_root.crate4_is_pushed_by_ball2_is_pushed_by_greenwall == true))) {
gotoAndStop (2);
_root.greenwall_movement = false;
}
}
Symbol 1206 MovieClip Frame 1
ratio = Math.round((dragger._x * 100) / line._width);
_root.volume = ratio;
this.ratio = 100;
dragger.onPress = function () {
this.startDrag(true, 0, 0, line._width - 3, 0);
this.onEnterFrame = function () {
ratio = Math.round((this._x * 100) / line._width);
_root.volume = ratio;
};
};
dragger.onRelease = (dragger.onReleaseOutside = stopDrag);
Symbol 1208 MovieClip Frame 1
stop();
Symbol 1208 MovieClip Frame 2
stop();
Symbol 1209 MovieClip Frame 1
stop();
Symbol 1209 MovieClip Frame 2
stop();
Symbol 1243 MovieClip Frame 1
stop();
Symbol 1243 MovieClip Frame 4
stop();
Symbol 1248 MovieClip Frame 1
stop();
Symbol 1248 MovieClip Frame 2
stop();
Symbol 1249 MovieClip Frame 1
stop();
Symbol 1249 MovieClip Frame 2
stop();
Symbol 1255 MovieClip Frame 60
stop();
Symbol 1256 MovieClip Frame 1
stop();
Symbol 1256 MovieClip Frame 2
stop();
Symbol 1257 MovieClip Frame 1
stop();
Symbol 1257 MovieClip Frame 2
stop();
Symbol 1259 MovieClip Frame 1
stop();
Symbol 1259 MovieClip Frame 2
stop();
Symbol 1267 MovieClip Frame 291
gotoAndPlay (1);
Symbol 1285 MovieClip Frame 29
stop();
Symbol 1290 MovieClip Frame 29
_root.decoy2._x = -500;
Symbol 1291 MovieClip Frame 1
stop();
Symbol 1291 MovieClip Frame 2
stop();
Symbol 1291 MovieClip Frame 3
stop();
Symbol 1293 MovieClip Frame 29
_root.decoy._x = -500;
Symbol 1294 MovieClip Frame 29
stop();
Symbol 1295 MovieClip Frame 1
stop();
Symbol 1295 MovieClip Frame 2
stop();
_root.explosionsound = true;
Symbol 1295 MovieClip Frame 3
stop();
_root.explosionsound = true;
Symbol 1304 MovieClip Frame 33
stop();
Symbol 1305 MovieClip Frame 33
stop();
Symbol 1306 MovieClip Frame 1
stop();
Symbol 1306 MovieClip Frame 2
stop();
Symbol 1306 MovieClip Frame 3
stop();
Symbol 1306 MovieClip Frame 4
stop();
Symbol 1308 MovieClip Frame 33
stop();
Symbol 1309 MovieClip Frame 33
stop();
Symbol 1310 MovieClip Frame 1
stop();
Symbol 1310 MovieClip Frame 2
stop();
Symbol 1310 MovieClip Frame 3
stop();
Symbol 1310 MovieClip Frame 4
stop();
Symbol 1432 MovieClip Frame 1
stop();
Symbol 1432 MovieClip Frame 2
stop();
Symbol 1437 MovieClip Frame 1
stop();
Symbol 1437 MovieClip Frame 2
stop();
Symbol 1439 MovieClip Frame 1
stop();
Symbol 1439 MovieClip Frame 2
stop();
Symbol 1480 MovieClip Frame 1
stop();
Symbol 1480 MovieClip Frame 2
stop();
Symbol 1512 MovieClip Frame 1
stop();
Symbol 1512 MovieClip Frame 2
stop();
Symbol 1516 MovieClip Frame 1
stop();
Symbol 1516 MovieClip Frame 2
stop();
Symbol 1519 MovieClip Frame 1
stop();
Symbol 1519 MovieClip Frame 2
stop();
Symbol 1527 MovieClip Frame 1
stop();
Symbol 1527 MovieClip Frame 2
stop();
Symbol 1530 MovieClip Frame 1
stop();
Symbol 1530 MovieClip Frame 2
stop();
Symbol 1533 MovieClip Frame 1
stop();
Symbol 1533 MovieClip Frame 2
stop();
Symbol 1541 MovieClip Frame 1
stop();
Symbol 1541 MovieClip Frame 2
stop();
Symbol 1542 MovieClip Frame 1
stop();
Symbol 1542 MovieClip Frame 2
stop();
Symbol 1664 MovieClip Frame 31
_root.decoy_crate._x = -1000;
stop();
Symbol 1665 MovieClip Frame 1
stop();
Symbol 1665 MovieClip Frame 2
stop();
Symbol 1744 MovieClip Frame 60
stop();
Symbol 1745 MovieClip Frame 1
stop();
Symbol 1745 MovieClip Frame 2
stop();
Symbol 1747 MovieClip Frame 1
stop();
Symbol 1747 MovieClip Frame 2
stop();
Symbol 1816 MovieClip Frame 1
stop();
Symbol 1816 MovieClip Frame 2
stop();
Symbol 1842 MovieClip Frame 1
stop();
Symbol 1842 MovieClip Frame 2
stop();
Symbol 1904 MovieClip Frame 291
gotoAndPlay (1);
Symbol 1995 MovieClip Frame 1
stop();
Symbol 1995 MovieClip Frame 2
stop();
Symbol 2048 MovieClip Frame 35
_root.decoy_crate._x = -1000;
stop();
Symbol 2049 MovieClip Frame 1
stop();
Symbol 2049 MovieClip Frame 2
stop();
Symbol 2463 MovieClip Frame 1
stop();
Symbol 2463 MovieClip Frame 2
stop();
Symbol 2550 MovieClip Frame 347
_root.gotoAndStop(3);