Combined Code
movieClip 6 {
}
movieClip 10 {
}
movieClip 14 {
}
// unknown tag 88 length 84
movieClip 20 {
}
// unknown tag 88 length 52
movieClip 27 {
}
movieClip 28 brick {
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
stop();
}
frame 4 {
stop();
}
frame 5 {
stop();
}
frame 6 {
stop();
}
frame 7 {
stop();
}
frame 8 {
stop();
}
frame 9 {
stop();
}
frame 10 {
stop();
}
frame 11 {
stop();
}
frame 12 {
stop();
}
frame 13 {
stop();
}
frame 14 {
stop();
}
}
movieClip 29 starz {
}
movieClip 31 ball_itself {
}
movieClip 34 texture {
}
movieClip 36 ball {
}
// unknown tag 88 length 79
movieClip 40 info_panel {
}
movieClip 43 {
}
movieClip 47 {
}
// unknown tag 88 length 84
button 59 {
on (release) {
getURL('http://www.funny-games.biz/main.html', '_blank');
}
}
// unknown tag 88 length 143
button 65 {
on (release) {
getURL('http://www.andkon.com/arcade/', '_blank');
}
}
movieClip 66 {
frame 500 {
gotoAndPlay(1);
}
}
button 74 {
on (release) {
_root.play();
}
}
movieClip 75 {
frame 1 {
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
bar._xscale = PercentLoaded;
} else {
gotoAndStop('loaded');
}
}
frame 2 {
gotoAndPlay(1);
}
}
frame 2 {
stop();
}
movieClip 90 {
frame 33 {
gotoAndPlay(11);
}
}
movieClip 99 {
frame 8 {
stop();
}
}
// unknown tag 88 length 93
movieClip 109 {
frame 6 {
stop();
}
}
button 112 {
on (release) {
gotoAndStop(52);
}
}
// unknown tag 88 length 97
movieClip 120 {
frame 375 {
gotoAndPlay(1);
}
}
button 121 {
on (release) {
gotoAndStop(4);
}
}
button 125 {
on (rollOver) {
gotoAndPlay(2);
}
on (release) {
gotoAndPlay(23);
}
}
button 128 {
on (release) {
getURL('http://www.funny-games.biz/main.html', '_blank');
}
}
button 131 {
on (release) {
getURL('http://www.andkon.com/arcade/', '_blank');
}
}
movieClip 134 {
frame 21 {
stop();
}
}
movieClip 135 {
frame 1 {
stop();
}
frame 22 {
stop();
}
frame 42 {
stop();
}
}
frame 3 {
function ball_die() {
bricks._x = 240 - 80 * _root.ball_start_x;
bricks._y = 220 - 80 * _root.ball_start_y;
xspeed = 0;
yspeed = 0;
draw_level(lev);
}
function draw_level(number) {
yspeed = 0;
xspeed = 0;
level = new Array();
messages = new Array();
switch (number) {
case 1:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(12001, 12002, 11, 11, 12003);
level[1] = new Array(0, 0, 0, 0, 1);
level[2] = new Array(0, 0, 0, 0, 12004);
level[3] = new Array(0, 0, 0, 0, 3);
level[4] = new Array(0, 0, 0, 0, 12005);
level[5] = new Array(0, 0, 0, 0, 6);
level[6] = new Array(0, 0, 0, 0, 12006);
level[7] = new Array(0, 0, 0, 0, 7);
level[8] = new Array(0, 0, 0, 0, 12007);
level[9] = new Array(0, 0, 0, 0, 8);
level[10] = new Array(0, 0, 0, 0, 12008);
level[11] = new Array(0, 0, 0, 0, 9);
level[12] = new Array(0, 0, 0, 0, 12009);
level[13] = new Array(0, 0, 0, 0, 13);
level[14] = new Array(0, 0, 0, 0, 12010);
level[15] = new Array(0, 0, 0, 0, 10);
messages[1] = 'Welcome to the game. LEVEL: Tutorial.';
messages[2] = 'This is a reverse tile. Your controls will be reversed while you are on it.';
messages[3] = 'Below is a normal tile.';
messages[4] = 'Direction tiles roll you in whichever direction they point.';
messages[5] = 'Below is a acid tile. When you roll onto it, it will start to fade away.';
messages[6] = 'Below is a speed-up tile. It will make you roll faster.';
messages[7] = 'Below is a slippery tile. You cannot change direction once on it.';
messages[8] = 'Below is an electro tile. Do not touch it when it is BRIGHT blue.';
messages[9] = 'Below is a checkpoint. Touch it and you will respawn there when you die.';
messages[10] = 'Below is the exit tile. Roll over it and proceed to the next level.';
break;
case 2:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
level[0] = new Array(12011, 1, 4, 4, 7, 1, 1, 1);
level[1] = new Array(0, 0, 0, 0, 0, 0, 0, 6);
level[2] = new Array(0, 0, 0, 0, 0, 0, 0, 6);
level[3] = new Array(0, 0, 0, 0, 0, 0, 0, 6);
level[4] = new Array(0, 0, 0, 0, 0, 0, 0, 3);
level[5] = new Array(0, 0, 10, 6, 6, 1, 0, 1);
level[6] = new Array(0, 0, 0, 0, 0, 1, 0, 1);
level[7] = new Array(0, 0, 0, 0, 0, 9, 0, 9);
level[8] = new Array(0, 0, 0, 0, 0, 11, 0, 1);
level[9] = new Array(0, 0, 0, 0, 0, 11, 11, 1);
messages[11] = 'LEVEL: 1.';
break;
case 3:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
level[0] = new Array(12012, 6, 6, 9, 4, 0, 0, 0);
level[1] = new Array(0, 0, 0, 0, 1, 0, 0, 0);
level[2] = new Array(0, 0, 0, 0, 1, 0, 0, 0);
level[3] = new Array(0, 0, 0, 11, 11, 0, 0, 0);
level[4] = new Array(0, 11, 11, 11, 0, 0, 0, 0);
level[5] = new Array(0, 11, 0, 0, 0, 1, 1, 9);
level[6] = new Array(0, 1, 2, 8, 1, 1, 0, 1);
level[7] = new Array(0, 0, 0, 0, 0, 0, 0, 10);
messages[12] = 'LEVEL: 2.';
break;
case 4:
_root.ball_start_x = 2;
_root.ball_start_y = 3;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
level[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
level[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0);
level[3] = new Array(0, 0, 12013, 0, 0, 0, 0, 0, 0);
level[4] = new Array(0, 0, 5, 5, 5, 1, 0, 0, 0);
level[5] = new Array(0, 0, 0, 0, 0, 11, 0, 0, 0);
level[6] = new Array(0, 0, 0, 0, 11, 11, 0, 0, 0);
level[7] = new Array(0, 0, 0, 0, 7, 0, 10, 5, 5);
level[8] = new Array(0, 0, 0, 0, 11, 1, 0, 0, 1);
level[9] = new Array(0, 0, 0, 0, 0, 11, 0, 0, 1);
level[10] = new Array(0, 0, 0, 0, 0, 13, 11, 8, 9);
messages[13] = 'LEVEL: 3.';
break;
case 5:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(12014, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[1] = new Array(5, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4);
level[2] = new Array(0, 0, 0, 0, 9, 9, 0, 0, 0, 0, 0, 0);
level[3] = new Array(0, 0, 0, 0, 9, 0, 0, 6, 6, 6, 6, 6);
level[4] = new Array(0, 0, 0, 0, 9, 11, 0, 13, 0, 6, 6, 6);
level[5] = new Array(1, 8, 2, 10, 0, 11, 9, 11, 0, 6, 6, 0);
level[6] = new Array(1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0);
level[7] = new Array(4, 4, 4, 7, 7, 6, 6, 6, 6, 6, 6, 0);
messages[14] = 'LEVEL: 4.';
break;
case 6:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(12015, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[1] = new Array(3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[2] = new Array(1, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[3] = new Array(0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[4] = new Array(0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[5] = new Array(0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[6] = new Array(0, 6, 9, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[7] = new Array(0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 10, 0);
level[8] = new Array(0, 0, 0, 8, 0, 0, 0, 1, 8, 8, 5, 5, 5, 5);
level[9] = new Array(0, 0, 0, 9, 0, 0, 6, 6, 0, 0, 0, 0, 0, 0);
level[10] = new Array(0, 0, 0, 1, 0, 11, 6, 0, 0, 0, 0, 0, 0, 0);
level[11] = new Array(0, 0, 0, 13, 6, 6, 0, 0, 0, 0, 0, 0, 0, 0);
messages[15] = 'LEVEL: 5.';
break;
case 7:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(12016, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[1] = new Array(1, 2, 0, 0, 0, 0, 0, 0, 6, 6, 6, 0, 0, 0);
level[2] = new Array(0, 11, 4, 0, 0, 0, 0, 0, 6, 0, 6, 0, 0, 0);
level[3] = new Array(10, 0, 11, 2, 0, 0, 0, 0, 2, 0, 6, 0, 0, 0);
level[4] = new Array(9, 0, 0, 1, 7, 4, 6, 5, 13, 4, 6, 0, 0, 0);
level[5] = new Array(2, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0);
level[6] = new Array(13, 0, 0, 0, 0, 0, 0, 0, 8, 0, 13, 5, 1, 2);
level[7] = new Array(3, 11, 5, 11, 4, 9, 9, 0, 8, 0, 3, 0, 0, 2);
level[8] = new Array(0, 0, 0, 0, 0, 0, 3, 0, 8, 0, 1, 0, 2, 1);
level[9] = new Array(0, 0, 0, 0, 0, 0, 8, 0, 8, 1, 3, 0, 2, 0);
level[10] = new Array(0, 0, 0, 0, 0, 0, 7, 0, 6, 0, 0, 2, 1, 0);
level[11] = new Array(0, 0, 0, 0, 0, 0, 8, 0, 0, 2, 4, 4, 0, 0);
level[12] = new Array(0, 0, 0, 0, 0, 0, 3, 4, 4, 13, 0, 0, 0, 0);
messages[16] = 'LEVEL: 6.';
break;
case 8:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(12017, 3, 1, 2, 3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[1] = new Array(0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[2] = new Array(0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[3] = new Array(0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[4] = new Array(0, 0, 0, 0, 0, 3, 0, 0, 0, 5, 5, 5, 5, 6, 6, 13);
level[5] = new Array(0, 0, 0, 0, 0, 13, 6, 6, 0, 6, 0, 0, 0, 0, 0, 9);
level[6] = new Array(0, 0, 0, 0, 0, 0, 0, 6, 0, 6, 0, 0, 0, 0, 0, 9);
level[7] = new Array(0, 0, 0, 0, 0, 0, 0, 9, 0, 6, 0, 0, 0, 0, 0, 9);
level[8] = new Array(0, 0, 0, 0, 0, 0, 0, 9, 0, 6, 8, 8, 6, 6, 0, 6);
level[9] = new Array(0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 6, 0, 6);
level[10] = new Array(0, 0, 0, 0, 0, 0, 0, 6, 9, 0, 0, 0, 0, 6, 0, 6);
level[11] = new Array(0, 0, 0, 0, 0, 0, 0, 9, 13, 8, 8, 8, 4, 1, 0, 1);
level[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1);
level[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 5);
level[14] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 10, 5, 5);
level[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 2, 5, 5);
messages[17] = 'LEVEL: 7.';
break;
case 9:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(12018, 8, 8, 8, 8, 8, 8, 8, 9, 9, 11, 0, 0, 0, 0);
level[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 0);
level[2] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0);
level[3] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0);
level[4] = new Array(0, 0, 0, 0, 0, 0, 2, 13, 11, 0, 0, 0, 0, 0, 0);
level[5] = new Array(0, 0, 0, 0, 0, 0, 8, 0, 0, 0, 0, 4, 3, 3, 0);
level[6] = new Array(0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 4, 10, 5, 0);
level[7] = new Array(0, 0, 0, 0, 0, 0, 8, 0, 6, 6, 6, 4, 2, 2, 0);
level[8] = new Array(0, 4, 6, 5, 6, 4, 3, 0, 6, 0, 6, 6, 0, 0, 0);
level[9] = new Array(0, 13, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0, 0);
level[10] = new Array(0, 7, 7, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0, 0);
level[11] = new Array(0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 11, 11, 0, 0, 0);
level[12] = new Array(0, 0, 0, 7, 7, 0, 0, 0, 0, 0, 0, 13, 0, 0, 0);
level[13] = new Array(0, 0, 0, 0, 3, 12019, 8, 8, 8, 8, 8, 9, 0, 0, 0);
messages[18] = 'LEVEL: 8. Be warned - this level is the hardest yet...';
messages[19] = '... but it is the end.';
break;
case 10:
_root.ball_start_x = 1;
_root.ball_start_y = 1;
level[0] = new Array(14, 0, 0, 0);
level[1] = new Array(0, 12020, 0, 14, 0);
level[2] = new Array(0, 12021, 10, 0);
level[3] = new Array(0, 14, 0, 0);
level[4] = new Array(0, 0, 0, 14);
messages[20] = 'CONGRATULATIONS! YOU WIN! YOU HAVE ESCAPED! (Roll down once)';
messages[21] = 'To try the mega-hard levels, roll right. Otherwise, you are done!';
break;
case 11:
_root.ball_start_x = 2;
_root.ball_start_y = 1;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 5, 5, 2, 0, 5, 1);
level[1] = new Array(0, 0, 12022, 7, 7, 7, 5, 2, 0, 3, 0, 0, 2, 0, 3, 0);
level[2] = new Array(0, 0, 7, 0, 0, 0, 0, 2, 0, 3, 4, 0, 5, 5, 3, 0);
level[3] = new Array(0, 0, 7, 0, 0, 0, 0, 5, 2, 0, 3, 0, 0, 0, 0, 0);
level[4] = new Array(2, 4, 4, 0, 0, 0, 0, 0, 5, 5, 3, 0, 0, 0, 0, 0);
level[5] = new Array(2, 0, 0, 7, 7, 8, 9, 11, 0, 0, 0, 0, 0, 0, 0, 0);
level[6] = new Array(11, 0, 5, 1, 0, 0, 0, 11, 11, 0, 0, 0, 7, 11, 11, 0);
level[7] = new Array(5, 5, 13, 0, 6, 6, 6, 0, 11, 0, 0, 7, 7, 0, 11, 0);
level[8] = new Array(0, 0, 0, 0, 9, 0, 6, 6, 9, 0, 7, 13, 0, 0, 8, 0);
level[9] = new Array(0, 0, 0, 0, 6, 9, 0, 0, 0, 0, 7, 0, 0, 0, 8, 0);
level[10] = new Array(0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 7, 7, 0, 0, 9, 0);
level[11] = new Array(0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 7, 0, 0, 10, 0);
level[12] = new Array(0, 0, 0, 0, 0, 13, 6, 0, 0, 0, 0, 11, 11, 0, 0, 0);
level[13] = new Array(0, 0, 0, 0, 0, 0, 6, 6, 9, 0, 0, 0, 11, 0, 0, 0);
level[14] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 6, 9, 9, 6, 6, 0, 0, 0);
level[15] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
messages[22] = 'MEGA-HARD LEVEL: 1.';
break;
case 12:
_root.ball_start_x = 0;
_root.ball_start_y = 1;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 9, 9);
level[1] = new Array(12023, 2, 2, 1, 8, 8, 9, 1, 0, 0, 0, 9, 0, 6);
level[2] = new Array(0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, 6, 0, 6);
level[3] = new Array(0, 13, 11, 7, 7, 9, 0, 11, 11, 0, 9, 6, 0, 9);
level[4] = new Array(0, 11, 0, 0, 0, 11, 11, 0, 11, 0, 9, 0, 10, 6);
level[5] = new Array(0, 6, 0, 0, 0, 0, 8, 8, 13, 0, 6, 0, 0, 0);
level[6] = new Array(0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 6, 9, 8, 2);
level[7] = new Array(0, 6, 6, 11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2);
level[8] = new Array(0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2);
level[9] = new Array(0, 0, 6, 3, 0, 0, 0, 0, 0, 7, 1, 7, 0, 7);
level[10] = new Array(0, 0, 6, 0, 0, 0, 0, 13, 11, 11, 0, 7, 0, 13);
level[11] = new Array(0, 0, 11, 6, 9, 6, 9, 9, 0, 0, 7, 1, 0, 11);
level[12] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 7);
level[13] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 11, 9, 9);
messages[23] = 'MEGA-HARD LEVEL: 2.';
break;
case 13:
_root.ball_start_x = 1;
_root.ball_start_y = 1;
level[0] = new Array(14, 0, 0, 0);
level[1] = new Array(0, 12020, 0, 14, 0);
level[2] = new Array(0, 12021, 10, 0);
level[3] = new Array(0, 14, 0, 0);
level[4] = new Array(0, 0, 0, 14);
messages[24] = 'CONGRATULATIONS! You have defeated the mega-hard levels!';
}
_root.createEmptyMovieClip('bricks', 2);
bricks._x = 240 - 80 * ball_start_x;
bricks._y = 220 - 80 * ball_start_y;
y = 0;
while (y <= 17) {
x = 0;
while (x <= 17) {
if (level[y][x] > 0) {
depth = y * 12 + x;
place_brick = bricks.attachMovie('brick', 'brick_' + depth, bricks.getNextHighestDepth(), {'_x': x * 80, '_y': y * 80});
frame_to_stop = level[y][x];
if (frame_to_stop > 12000) {
frame_to_stop = 12;
}
place_brick.gotoAndStop(frame_to_stop);
}
++x;
}
++y;
}
}
_root.attachMovie('starz', 'starz', 1, {'_x': -20, '_y': -20});
_root.attachMovie('ball', 'ball', 3, {'_x': 240, '_y': 220});
_root.attachMovie('info_panel', 'info_panel', 4, {'_y': 410, '_alpha': 50, '_visible': false});
ball.texture.setMask(ball.ball_itself);
yspeed = 0;
xspeed = 0;
checkpoint_passed = false;
lev = 1;
draw_level(lev);
ball.onEnterFrame = function () {
info_panel._visible = false;
friction = 0.99;
power = 0.4;
brick_x = Math.floor((bricks._x - 200) / 80) * -1;
brick_y = Math.floor((bricks._y - 180) / 80) * -1;
type_of_tile = level[brick_y][brick_x];
if (type_of_tile > 12000) {
message_to_show = messages[type_of_tile % 12000];
type_of_tile = 12;
}
switch (type_of_tile) {
break;
case 1:
case 2:
yspeed += 0.3;
break;
case 3:
yspeed -= 0.3;
break;
case 4:
xspeed -= 0.3;
break;
case 5:
xspeed += 0.3;
break;
case 6:
depth = brick_y * 12 + brick_x;
--bricks['brick_' + depth]._alpha;
if (bricks['brick_' + depth]._alpha < 1) {
level[brick_y][brick_x] = 0;
}
break;
case 7:
xspeed *= 1.05;
yspeed *= 1.05;
break;
case 8:
friction = 1;
power = 0;
break;
case 9:
depth = brick_y * 12 + brick_x;
if (bricks['brick_' + depth].lava._currentframe > 90) {
ball_die();
}
break;
case 10:
checkpoint_passed = false;
++lev;
_root.removeMovieClip('bricks');
draw_level(lev);
break;
case 11:
power *= -1;
break;
case 12:
info_panel._visible = true;
info_panel.message_text.text = message_to_show;
break;
case 13:
checkpoint_passed = true;
save_x = brick_x;
save_y = brick_y;
break;
break;
case 14:
default:
ball_die();
}
if (Key.isDown(37)) {
xspeed -= power;
}
if (Key.isDown(39)) {
xspeed += power;
}
if (Key.isDown(38)) {
yspeed -= power;
}
if (Key.isDown(40)) {
yspeed += power;
}
xspeed *= friction;
yspeed *= friction;
if (xspeed < 0.1 and xspeed > -0.1) {
xspeed = 0;
}
if (yspeed < 0.1 and yspeed > -0.1) {
yspeed = 0;
}
bricks._y -= yspeed;
bricks._x -= xspeed;
starz._x = -20 + (bricks._x - 240) / 10;
starz._y = -20 + (bricks._y - 220) / 10;
this.texture._y += yspeed;
this.texture._x += xspeed;
if (this.texture._x > 53) {
this.texture._x -= 63;
}
if (this.texture._x < -53) {
this.texture._x += 63;
}
if (this.texture._y > 53) {
this.texture._y -= 63;
}
if (this.texture._y < -53) {
this.texture._y += 63;
}
};
}
button 140 {
on (release) {
nextFrame();
}
}
button 142 {
on (release) {
gotoAndStop(2);
}
}
button 152 {
on (release) {
gotoAndPlay(9);
}
}
frame 51 {
gotoAndStop(2);
}
movieClip 179 {
frame 17 {
stop();
}
}
movieClip 195 {
frame 15 {
stop();
}
}
button 197 {
on (release) {
nextFrame();
}
}
button 198 {
on (release) {
gotoAndStop(3);
}
}
frame 53 {
function ball_die() {
bricks._x = 240 - 80 * _root.ball_start_x;
bricks._y = 220 - 80 * _root.ball_start_y;
xspeed = 0;
yspeed = 0;
draw_level(lev);
}
function draw_level(number) {
yspeed = 0;
xspeed = 0;
level = new Array();
messages = new Array();
switch (number) {
case 1:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(12001, 12002, 11, 11, 12003);
level[1] = new Array(0, 0, 0, 0, 1);
level[2] = new Array(0, 0, 0, 0, 12004);
level[3] = new Array(0, 0, 0, 0, 3);
level[4] = new Array(0, 0, 0, 0, 12005);
level[5] = new Array(0, 0, 0, 0, 6);
level[6] = new Array(0, 0, 0, 0, 12006);
level[7] = new Array(0, 0, 0, 0, 7);
level[8] = new Array(0, 0, 0, 0, 12007);
level[9] = new Array(0, 0, 0, 0, 8);
level[10] = new Array(0, 0, 0, 0, 12008);
level[11] = new Array(0, 0, 0, 0, 9);
level[12] = new Array(0, 0, 0, 0, 12009);
level[13] = new Array(0, 0, 0, 0, 13);
level[14] = new Array(0, 0, 0, 0, 12010);
level[15] = new Array(0, 0, 0, 0, 10);
messages[1] = 'Welcome to the game. LEVEL: Tutorial.';
messages[2] = 'This is a reverse tile. Your controls will be reversed while you are on it.';
messages[3] = 'Below is a normal tile.';
messages[4] = 'Direction tiles roll you in whichever direction they point.';
messages[5] = 'Below is a acid tile. When you roll onto it, it will start to fade away.';
messages[6] = 'Below is a speed-up tile. It will make you roll faster.';
messages[7] = 'Below is a slippery tile. You cannot change direction once on it.';
messages[8] = 'Below is an electro tile. Do not touch it when it is BRIGHT blue.';
messages[9] = 'Below is a checkpoint. Touch it and you will respawn there when you die.';
messages[10] = 'Below is the exit tile. Roll over it and proceed to the next level.';
break;
case 2:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
level[0] = new Array(12011, 1, 1, 1, 3, 0, 0, 0);
level[1] = new Array(0, 0, 0, 0, 1, 0, 0, 0);
level[2] = new Array(0, 0, 0, 0, 1, 0, 0, 0);
level[3] = new Array(0, 4, 1, 1, 2, 0, 0, 0);
level[4] = new Array(0, 1, 0, 0, 0, 0, 0, 0);
level[5] = new Array(0, 1, 1, 1, 0, 0, 0, 0);
level[6] = new Array(0, 0, 0, 1, 0, 0, 0, 0);
level[7] = new Array(10, 1, 1, 5, 0, 0, 0, 0);
level[8] = new Array(0, 0, 0, 0, 0, 0, 0, 0);
level[9] = new Array(0, 0, 0, 0, 0, 0, 0, 0);
messages[11] = 'LEVEL: 1. Testing your ability with directional tiles.';
break;
case 3:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
level[0] = new Array(12012, 6, 0, 0, 0, 0, 6, 10);
level[1] = new Array(0, 6, 6, 0, 0, 6, 6, 0);
level[2] = new Array(0, 0, 6, 6, 0, 6, 0, 0);
level[3] = new Array(0, 0, 0, 6, 0, 6, 6, 0);
level[4] = new Array(0, 6, 6, 6, 0, 0, 6, 0);
level[5] = new Array(0, 6, 0, 0, 6, 6, 6, 0);
level[6] = new Array(0, 6, 6, 6, 6, 0, 0, 0);
level[7] = new Array(0, 0, 0, 0, 0, 0, 0, 0);
messages[12] = 'LEVEL: 2. Testing your ability with acid tiles.';
break;
case 4:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(12013, 6, 0, 0, 0, 0, 0, 0);
level[1] = new Array(0, 6, 0, 0, 0, 0, 0, 0, 0);
level[2] = new Array(0, 6, 6, 0, 0, 0, 0, 0, 0);
level[3] = new Array(0, 0, 9, 0, 0, 0, 0, 0, 0);
level[4] = new Array(0, 0, 6, 0, 0, 0, 0, 0, 0);
level[5] = new Array(0, 0, 6, 0, 0, 0, 0, 0, 0);
level[6] = new Array(0, 0, 9, 0, 0, 0, 0, 0, 0);
level[7] = new Array(0, 0, 7, 0, 0, 0, 0, 0, 0);
level[8] = new Array(0, 0, 3, 0, 0, 0, 0, 0, 0);
level[9] = new Array(0, 0, 11, 8, 8, 8, 8, 8, 9);
level[10] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 10);
messages[13] = 'LEVEL: 3. We realise that the previous level was too easy.';
break;
case 5:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(12014, 11, 0, 0, 11, 11, 11, 11, 11, 11, 0, 0);
level[1] = new Array(0, 11, 11, 0, 11, 0, 0, 0, 0, 11, 11, 0);
level[2] = new Array(0, 0, 11, 0, 11, 11, 11, 11, 0, 0, 11, 0);
level[3] = new Array(0, 0, 11, 11, 0, 0, 0, 11, 0, 11, 11, 0);
level[4] = new Array(0, 0, 0, 11, 0, 0, 11, 11, 0, 11, 0, 0);
level[5] = new Array(0, 0, 11, 11, 0, 11, 11, 0, 11, 11, 0, 0);
level[6] = new Array(0, 0, 11, 0, 0, 11, 0, 0, 0, 11, 0, 10);
level[7] = new Array(0, 0, 11, 11, 11, 11, 0, 0, 0, 11, 11, 11);
messages[14] = 'LEVEL: 4. I suppose we\'re even now. Testing your knowledge of reverse tiles.';
break;
case 6:
_root.ball_start_x = 0;
_root.ball_start_y = 0;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(12015, 1, 8, 8, 4, 1, 1, 0, 0, 0, 0, 0, 0, 0);
level[1] = new Array(0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0);
level[2] = new Array(0, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0);
level[3] = new Array(0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0);
level[4] = new Array(0, 0, 0, 0, 10, 0, 2, 0, 0, 0, 0, 0, 0, 0);
level[5] = new Array(0, 0, 1, 9, 8, 0, 2, 0, 0, 0, 0, 0, 0, 0);
level[6] = new Array(0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0);
level[7] = new Array(0, 0, 11, 11, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0);
level[8] = new Array(0, 0, 0, 11, 9, 0, 1, 0, 0, 0, 0, 0, 0, 0);
level[9] = new Array(0, 0, 0, 0, 11, 11, 1, 0, 0, 0, 0, 0, 0, 0);
level[10] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[11] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
messages[15] = 'LEVEL: 5. Your testing is over. Can you complete these 4 challenging levels?';
break;
case 7:
_root.ball_start_x = 2;
_root.ball_start_y = 0;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(4, 5, 12016, 0, 1, 8, 9, 1, 0, 0, 11, 11, 11);
level[1] = new Array(7, 0, 3, 0, 2, 0, 0, 11, 0, 11, 11, 0, 11);
level[2] = new Array(8, 0, 1, 5, 1, 0, 0, 11, 11, 11, 0, 11, 11);
level[3] = new Array(8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0);
level[4] = new Array(7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 9, 0);
level[5] = new Array(7, 0, 0, 0, 0, 0, 6, 6, 6, 0, 0, 9, 0);
level[6] = new Array(2, 0, 10, 6, 6, 0, 6, 0, 6, 6, 0, 7, 0);
level[7] = new Array(2, 0, 9, 0, 6, 0, 6, 6, 0, 6, 0, 1, 0);
level[8] = new Array(2, 0, 3, 0, 6, 6, 0, 6, 0, 6, 6, 1, 0);
level[9] = new Array(2, 0, 5, 0, 0, 6, 6, 6, 0, 0, 0, 0, 0);
level[10] = new Array(2, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[11] = new Array(2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[12] = new Array(2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
level[13] = new Array(2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
messages[16] = 'LEVEL: 6.';
break;
case 8:
_root.ball_start_x = 1;
_root.ball_start_y = 0;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[0] = new Array(0, 12017, 8, 8, 5, 5, 5, 1, 1);
level[1] = new Array(0, 0, 0, 0, 0, 0, 0, 0, 7);
level[2] = new Array(0, 0, 0, 0, 0, 0, 0, 7, 7);
level[3] = new Array(0, 2, 13, 11, 0, 0, 7, 7, 0);
level[4] = new Array(0, 2, 0, 11, 0, 0, 7, 0, 0);
level[5] = new Array(0, 2, 0, 7, 0, 0, 13, 0, 0);
level[6] = new Array(2, 4, 0, 7, 0, 11, 11, 0, 0);
level[7] = new Array(2, 0, 0, 7, 0, 6, 0, 0, 0);
level[8] = new Array(5, 10, 0, 11, 0, 6, 0, 0, 0);
level[9] = new Array(0, 0, 0, 11, 6, 6, 0, 0, 0);
messages[17] = 'LEVEL: 7.';
break;
case 9:
_root.ball_start_x = 5;
_root.ball_start_y = 2;
if (checkpoint_passed) {
_root.ball_start_x = save_x;
_root.ball_start_y = save_y;
}
level[1] = new Array(0, 0, 0, 0, 9, 9, 9, 0, 0, 0, 0, 0, 0);
level[2] = new Array(0, 0, 7, 7, 9, 12018, 9, 12019, 8, 8, 9, 1, 1);
level[3] = new Array(0, 1, 7, 0, 9, 9, 9, 0, 0, 0, 0, 0, 6);
level[4] = new Array(0, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 6);
level[5] = new Array(0, 7, 0, 0, 0, 0, 0, 9, 6, 6, 0, 6, 0);
level[6] = new Array(0, 2, 0, 0, 0, 0, 6, 9, 0, 6, 0, 6, 6);
level[7] = new Array(0, 2, 0, 0, 0, 0, 6, 0, 0, 13, 6, 0, 9);
level[8] = new Array(0, 2, 0, 0, 0, 0, 6, 9, 6, 0, 6, 6, 9);
level[9] = new Array(0, 1, 0, 11, 10, 9, 0, 0, 6, 0, 0, 0, 0);
level[10] = new Array(0, 11, 0, 8, 0, 9, 6, 6, 6, 0, 0, 0, 0);
level[11] = new Array(11, 11, 0, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0);
level[12] = new Array(11, 0, 0, 0, 8, 6, 0, 0, 0, 0, 0, 0, 0);
level[13] = new Array(11, 8, 8, 8, 8, 0, 0, 0, 0, 0, 0, 0, 0);
messages[18] = 'LEVEL: 8. Congratulations, you\'ve done very well...';
messages[19] = '... be sure to try the hard levels after you are done here.';
break;
case 10:
_root.ball_start_x = 1;
_root.ball_start_y = 1;
level[0] = new Array(14, 0, 0, 0);
level[1] = new Array(0, 12020, 0, 14, 0);
level[2] = new Array(0, 0, 0, 0);
level[3] = new Array(0, 14, 0, 0);
level[4] = new Array(0, 0, 0, 14);
messages[20] = 'CONGRATULATIONS! YOU WIN! Use your experience and try the hard levels.';
}
_root.createEmptyMovieClip('bricks', 2);
bricks._x = 240 - 80 * ball_start_x;
bricks._y = 220 - 80 * ball_start_y;
y = 0;
while (y <= 17) {
x = 0;
while (x <= 17) {
if (level[y][x] > 0) {
depth = y * 12 + x;
place_brick = bricks.attachMovie('brick', 'brick_' + depth, bricks.getNextHighestDepth(), {'_x': x * 80, '_y': y * 80});
frame_to_stop = level[y][x];
if (frame_to_stop > 12000) {
frame_to_stop = 12;
}
place_brick.gotoAndStop(frame_to_stop);
}
++x;
}
++y;
}
}
_root.attachMovie('starz', 'starz', 1, {'_x': -20, '_y': -20});
_root.attachMovie('ball', 'ball', 3, {'_x': 240, '_y': 220});
_root.attachMovie('info_panel', 'info_panel', 4, {'_y': 410, '_alpha': 50, '_visible': false});
ball.texture.setMask(ball.ball_itself);
yspeed = 0;
xspeed = 0;
checkpoint_passed = false;
lev = 1;
draw_level(lev);
ball.onEnterFrame = function () {
info_panel._visible = false;
friction = 0.99;
power = 0.4;
brick_x = Math.floor((bricks._x - 200) / 80) * -1;
brick_y = Math.floor((bricks._y - 180) / 80) * -1;
type_of_tile = level[brick_y][brick_x];
if (type_of_tile > 12000) {
message_to_show = messages[type_of_tile % 12000];
type_of_tile = 12;
}
switch (type_of_tile) {
break;
case 1:
case 2:
yspeed += 0.3;
break;
case 3:
yspeed -= 0.3;
break;
case 4:
xspeed -= 0.3;
break;
case 5:
xspeed += 0.3;
break;
case 6:
depth = brick_y * 12 + brick_x;
--bricks['brick_' + depth]._alpha;
if (bricks['brick_' + depth]._alpha < 1) {
level[brick_y][brick_x] = 0;
}
break;
case 7:
xspeed *= 1.05;
yspeed *= 1.05;
break;
case 8:
friction = 1;
power = 0;
break;
case 9:
depth = brick_y * 12 + brick_x;
if (bricks['brick_' + depth].lava._currentframe > 90) {
ball_die();
}
break;
case 10:
checkpoint_passed = false;
++lev;
_root.removeMovieClip('bricks');
draw_level(lev);
break;
case 11:
power *= -1;
break;
case 12:
info_panel._visible = true;
info_panel.message_text.text = message_to_show;
break;
case 13:
checkpoint_passed = true;
save_x = brick_x;
save_y = brick_y;
break;
case 14:
break;
default:
ball_die();
}
if (Key.isDown(37)) {
xspeed -= power;
}
if (Key.isDown(39)) {
xspeed += power;
}
if (Key.isDown(38)) {
yspeed -= power;
}
if (Key.isDown(40)) {
yspeed += power;
}
xspeed *= friction;
yspeed *= friction;
if (xspeed < 0.1 and xspeed > -0.1) {
xspeed = 0;
}
if (yspeed < 0.1 and yspeed > -0.1) {
yspeed = 0;
}
bricks._y -= yspeed;
bricks._x -= xspeed;
starz._x = -20 + (bricks._x - 240) / 10;
starz._y = -20 + (bricks._y - 220) / 10;
this.texture._y += yspeed;
this.texture._x += xspeed;
if (this.texture._x > 53) {
this.texture._x -= 63;
}
if (this.texture._x < -53) {
this.texture._x += 63;
}
if (this.texture._y > 53) {
this.texture._y -= 63;
}
if (this.texture._y < -53) {
this.texture._y += 63;
}
};
}