Frame 2
stop();
Instance of Symbol 73 MovieClip in Frame 2
on (release) {
nextFrame();
}
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, 0, 0, 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!";
}
_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) {
case 1 :
break;
case 2 :
yspeed = yspeed + 0.3;
break;
case 3 :
yspeed = yspeed - 0.3;
break;
case 4 :
xspeed = xspeed - 0.3;
break;
case 5 :
xspeed = 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 = xspeed * 1.05;
yspeed = 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 = 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 = xspeed - power;
}
if (Key.isDown(39)) {
xspeed = xspeed + power;
}
if (Key.isDown(38)) {
yspeed = yspeed - power;
}
if (Key.isDown(40)) {
yspeed = yspeed + power;
}
xspeed = xspeed * friction;
yspeed = yspeed * friction;
if ((xspeed < 0.1) and (xspeed > -0.1)) {
xspeed = 0;
}
if ((yspeed < 0.1) and (yspeed > -0.1)) {
yspeed = 0;
}
bricks._y = bricks._y - yspeed;
bricks._x = bricks._x - xspeed;
starz._x = -20 + ((bricks._x - 240) / 10);
starz._y = -20 + ((bricks._y - 220) / 10);
this.texture._y = this.texture._y + yspeed;
this.texture._x = this.texture._x + xspeed;
if (this.texture._x > 53) {
this.texture._x = this.texture._x - 63;
}
if (this.texture._x < -53) {
this.texture._x = this.texture._x + 63;
}
if (this.texture._y > 53) {
this.texture._y = this.texture._y - 63;
}
if (this.texture._y < -53) {
this.texture._y = this.texture._y + 63;
}
};
Frame 51
gotoAndStop (2);
Symbol 28 MovieClip [brick] Frame 1
stop();
Symbol 28 MovieClip [brick] Frame 2
stop();
Symbol 28 MovieClip [brick] Frame 3
stop();
Symbol 28 MovieClip [brick] Frame 4
stop();
Symbol 28 MovieClip [brick] Frame 5
stop();
Symbol 28 MovieClip [brick] Frame 6
stop();
Symbol 28 MovieClip [brick] Frame 7
stop();
Symbol 28 MovieClip [brick] Frame 8
stop();
Symbol 28 MovieClip [brick] Frame 9
stop();
Symbol 28 MovieClip [brick] Frame 10
stop();
Symbol 28 MovieClip [brick] Frame 11
stop();
Symbol 28 MovieClip [brick] Frame 12
stop();
Symbol 28 MovieClip [brick] Frame 13
stop();
Symbol 28 MovieClip [brick] Frame 14
stop();
Symbol 50 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 50 MovieClip Frame 37
startMovie();
Symbol 65 MovieClip Frame 33
gotoAndPlay (11);
Symbol 73 MovieClip Frame 7
stop();
Symbol 82 MovieClip Frame 8
stop();
Symbol 86 Button
on (release) {
nextFrame();
}
Symbol 94 MovieClip Frame 375
gotoAndPlay (1);
Symbol 95 Button
on (release) {
gotoAndStop (4);
}
Symbol 100 Button
on (release) {
nextFrame();
}
Symbol 110 Button
on (release) {
gotoAndPlay (9);
}