Frame 1
cstr_gameover = "GAME OVER!";
cstr_scoreis = "Your score is";
cstr_presents = "p r e s e n t s";
cstr_loading = "Loading 220k... please wait";
cstr_howtoplay = "<b>HOW TO PLAY:</b><br><br>The first step in playing the game is setting up your player and the gaming level. You can select the color of your player by clicking the buttons to the left and right of the player, which is depicted in the button on the top right corner of this window. Clicking on the text field underneath the player button enables you to change the gaming level to one of the following values:<br><b>- novice<br>- normal<br>- expert</b><br>Enter your name (nick name) in the input field underneath. This name will be displayed in the high score table.<br><br>The controls for playing the game are very easy and intuitive. You control your player using 'up' (forward) , 'left' (left turn) and 'right' (right turn) arrow keys. The player cannot move backward. To stop the player's motion release the up arrow key.<br><br>To pause the game click the 'pause' button in the left bottom corner, to resume click the 'pause' button again. To return to this menu, click the play button in the left bottom corner. bTo learn more about the game goals, select 'Game Goals' below.<br><br>To start the game, click the start button. And now enjoy!";
cstr_gamegoals = "<b>GAME GOALS</b><br><br>Your player is acting in a field containing several statical and dynamical obstacles (computer controlled players). Your task is to avoid any collisions with those objects. At startup your players energy level - displayed as colorful arc on top of score board (right bottom corner) is 100%. <br><br>Over time and whenever you collide with other objects your energy level is decreased. Once your energy level is reaching a critical level you will hear a warning sound. The energy level can be increased by gathering 'bonus bubbles' (see below). Points are scored by either gathering 'bonus bubbles' (see below) or by stealing computer controlled players the ball and running with the ball as long as possible.<br><br>At random times goals are displayed in the field. Scoring a ball into the goal will increase your score by<br><b>- 300 points (novice)<br>- 450 points (normal)<br>- 600 points (expert)</b><br><br>The speed of gaming increases over time.<br><br>'Bonus bubbles' serve the following functions (depends on the gaming level):";
cstr_howtoplaybtn = "How To Play";
cstr_gamegoalsbtn = "Game Goals";
cstr_submitbtn = "SUBMIT";
cstr_playersetup = "<b>P l a y e r s e t u p</b>";
tempData.diftext = new Array("Novice", "Normal", "Expert");
tempData.player_name = "Anonymous";
url_getstat = "http://www.vr-soccer-2006.com/cgi-bin/getstat.pl";
myData.fileName = "stat.txt";
myData.page = "input";
OnePercent = this.getBytesTotal() / 100;
difficulty = 0;
paused = false;
kicksnd_time = 0;
ADD_ENEMY_INTERVAL = 1200;
ADD_ACCEL_INTERVAL = 600;
ADD_ACCEL_VALUE = 0.5;
myTeam = 7;
teamNumber = 15;
Teams = new Array(teamNumber);
torsColors = new Array(teamNumber);
legColors = new Array(teamNumber);
Teams[0] = "Japan";
torsColors[0] = "-255,-255,90";
legColors[0] = "255,255,255";
Teams[1] = "Korea Republic";
torsColors[1] = "255,255,255";
legColors[1] = "255,-150,-120";
Teams[2] = "England";
torsColors[2] = "180,180,180";
legColors[2] = "180,180,180";
Teams[3] = "Netherlands";
torsColors[3] = "255,30,-120";
legColors[3] = " 255,30,-120";
Teams[4] = "Spain";
torsColors[4] = "-15,-255,-255";
legColors[4] = "-255,-255,-45";
Teams[5] = "Portugal";
torsColors[5] = "-90,-255,-255";
legColors[5] = "-255,-75,-75";
Teams[6] = "Italy";
torsColors[6] = "255,255,255";
legColors[6] = "-255,-30,255";
Teams[7] = "Russia";
torsColors[7] = "-255,-60,30";
legColors[7] = "-255,-60,30";
Teams[8] = "Ukraine";
torsColors[8] = "-255,-75,90";
legColors[8] = "120,160,-255";
Teams[9] = "Brasil";
torsColors[9] = "255,255,-255";
legColors[9] = "-255,-255,135";
Teams[10] = "Turkey";
torsColors[10] = "210,-225,-225";
legColors[10] = "210,-225,-225";
Teams[11] = "Saudi-Arabia";
torsColors[11] = "-165,-15,-30";
legColors[11] = "-165,-15,-30";
Teams[12] = "USA";
torsColors[12] = "255,45,45";
legColors[12] = "-255,-255,-60";
Teams[13] = "Senegal";
torsColors[13] = "-150,-15,-15";
legColors[13] = "255,255,255";
Teams[14] = "Germany";
torsColors[14] = "255,255,255";
legColors[14] = "-255,-255,-255";
borderbannerURL = "http://www.vrtainment.de";
endgameURL = "http://www.vrtainment.de";
coryrightURL = "http://www.vrtainment.de";
stop();
Frame 2
loading_done = false;
Frame 3
clip = loader_clip.progress.preloader1;
clipshadow = loader_clip.progress.preloader2;
var loaded = Math.round(getBytesLoaded() / OnePercent);
clip.gotoAndStop(loaded);
clipshadow.gotoAndStop(loaded);
if (getBytesLoaded() < getBytesTotal()) {
gotoAndPlay ("loader");
}
Frame 4
loader_clip.gotoAndPlay("hide");
stop();
Frame 5
stop();
Frame 6
stop();
Frame 7
stop();
Symbol 256 MovieClip Frame 1
stop();
Symbol 256 MovieClip Frame 2
stop();
Symbol 256 MovieClip Frame 3
stop();
Symbol 256 MovieClip Frame 4
stop();
Symbol 256 MovieClip Frame 5
stop();
Symbol 256 MovieClip Frame 6
stop();
Symbol 256 MovieClip Frame 7
stop();
Symbol 256 MovieClip Frame 8
stop();
Symbol 256 MovieClip Frame 9
stop();
Symbol 256 MovieClip Frame 10
stop();
Symbol 256 MovieClip Frame 11
stop();
Symbol 256 MovieClip Frame 12
stop();
Symbol 256 MovieClip Frame 13
stop();
Symbol 256 MovieClip Frame 14
stop();
Symbol 256 MovieClip Frame 15
stop();
Symbol 256 MovieClip Frame 16
stop();
Symbol 256 MovieClip Frame 17
stop();
Symbol 259 MovieClip [main_fballer] Frame 1
function Init(isEnemy) {
is_enemy = isEnemy;
run = is_enemy;
closest_ball = 0;
if (is_enemy == true) {
playerCollided = false;
x = random(game.WIDTH);
y = (game.HEIGHT + 30) + random(game.MAX_MARGIN);
accel = (random(4) / 10) + 0.7;
dir_add = random(2);
player = game.player;
ball_num = game.FindFreeBall();
if (-1 < ball_num) {
ball = eval ("game.ball" + ball_num);
ball.x = x;
ball.y = y - 15;
ball.dx = 0;
ball.dy = 0;
ball.is_enabled = true;
ball.owner = this;
}
} else {
x = game.WIDTH / 2;
y = GAME.HEIGHT / 4;
accel = 1;
dir_add = 0;
dir = DIR_UP;
is_immune = false;
}
}
function SetScreenPos() {
_x = x;
_y = (game.HEIGHT - y);
}
function GetNearestBall() {
var dist = 1000;
var num = -1;
i = 0;
while (i < game.b_num) {
var cur_ball = eval ("game.ball" + i);
if (cur_ball.is_enabled) {
cur_dist = cur_ball.GetDistance(x, y);
}
if (cur_dist < dist) {
dist = cur_dist;
num = i;
}
i++;
}
return(num);
}
function CheckCollisions() {
if (!is_immune) {
i = 0;
while (i < game.e_num) {
var enemy = eval ("game.enemy" + i);
if ((enemy.playerCollided == false) && (Math.distance(x, y, enemy.x, enemy.y) < game.CLOSEDIST)) {
blinkStart = getTimer();
blinkTime = game.BLINK_COLLISION;
_root.snd.gotoAndStop("enemy");
gotoAndPlay ("blinking");
enemy.playerCollided = true;
game.control.AddEnergy(game.d_energy);
}
i++;
}
}
}
function IsNearest() {
if ((strategy != ST_RUN_BALL) && (game.active_enemies >= game.max_actives)) {
return(false);
}
if (player.ball_num == -1) {
return(false);
}
if (ball_num != -1) {
return(false);
}
if (player.ball.y >= y) {
return(false);
}
var distance = player.ball.GetDistance(x, y);
var isnearest = true;
i = 0;
while (i < game.e_num) {
var e = eval ("game.enemy" + i);
if (e.ball_num == -1) {
e_dist = player.ball.GetDistance(e.x, e.y);
isnearest = distance < e_dist;
}
i++;
}
return(isnearest);
}
function MakeStrategy() {
if (y < player.y) {
if (strategy == ST_RUN_BALL) {
game.active_enemies = game.active_enemies - 1;
}
if (y < -30) {
strategy = ST_REINIT;
}
} else if (IsNearest()) {
if (strategy != ST_RUN_BALL) {
game.active_enemies = game.active_enemies + 1;
}
strategy = ST_RUN_BALL;
} else if (ball_num == -1) {
if (strategy == ST_RUN_BALL) {
game.active_enemies = game.active_enemies - 1;
}
strategy = ST_RUN_DOWN;
} else {
if (strategy == ST_RUN_BALL) {
game.active_enemies = game.active_enemies - 1;
}
strategy = ST_RUN_AHEAD;
}
}
function IsRunningUpward() {
return(run && (((dir == DIR_UP) || (dir == DIR_LEFT_UP)) || (dir == DIR_RIGHT_UP)));
}
function SelectDirection() {
if (strategy == ST_RUN_BALL) {
var angle = 225;
if (player.ball_num != -1) {
angle = calcAngle(player.ball.x, player.ball.y);
}
dir = Math.floor(angle / game.ASTEP);
} else if (strategy == ST_RUN_DOWN) {
dir = DIR_LEFT_DOWN + dir_add;
} else {
dir = DIR_DOWN;
}
}
function SetSteps() {
var xstep = (is_enemy ? (game.step * accel) : (game.user_step));
var ystep = (is_enemy ? (game.step * accel) : 0);
dx = 0;
dy = 0;
if (!run) {
return(undefined);
}
switch (dir) {
case DIR_RIGHT :
dx = xstep;
break;
case :
dx = xstep * 0.7;
dy = ystep * 0.7;
break;
case :
dy = ystep;
break;
case :
dx = (-xstep) * 0.7;
dy = ystep * 0.7;
break;
case :
dx = -xstep;
break;
case :
dx = (-xstep) * 0.7;
dy = (-ystep) * 0.7;
break;
case :
dy = -ystep;
break;
case :
dx = xstep * 0.7;
dy = (-ystep) * 0.7;
}
if (is_enemy && (game.player.IsRunningUpward())) {
dy = dy - game.user_step;
}
}
function Update() {
if (strategy == ST_REINIT) {
Init(is_enemy);
} else {
if (is_enemy) {
SelectDirection();
}
SetSteps();
if (run == true) {
body.gotoAndStop("run" + dir);
} else {
body.gotoAndStop("stay" + dir);
}
RestoreColors();
x = x + dx;
y = y + dy;
if (game.WIDTH < x) {
x = x - dx;
if (is_enemy) {
dir = DIR_LEFT_DOWN;
dir_add = 0;
}
} else if (x < 0) {
x = x - dx;
if (is_enemy) {
dir = DIR_RIGHT_DOWN;
dir_add = 2;
}
}
if (is_enemy) {
if (ball_num != -1) {
if (ball.GetDistance(x, y) < game.CLOSEDIST) {
ball.Kick(dir);
}
} else if ((strategy == ST_RUN_BALL) && (player.ball.GetDistance(x, y) < game.CLOSEDIST)) {
player.ball.Kick(dir);
ball = player.ball;
ball_num = player.ball.num;
player.ball_num = -1;
ball.owner = this;
ball.gotoAndStop("stay");
}
} else if (ball_num != -1) {
if (ball.GetDistance(x, y) < game.CLOSEDIST) {
cur_time = getTimer();
if (KICKSND_TIME < (cur_time - _root.kicksnd_time)) {
_root.snd.gotoAndPlay("kick");
_root.kicksnd_time = cur_time;
}
ball.Kick(dir);
}
} else {
var nearest = GetNearestBall();
var n_ball = eval ("game.ball" + nearest);
if (n_ball.GetDistance(x, y) < game.CLOSEDIST) {
cur_time = getTimer();
if (KICKSND_TIME < (cur_time - _root.kicksnd_time)) {
_root.snd.gotoAndPlay("kick");
_root.kicksnd_time = cur_time;
}
n_ball.Kick(dir);
ball = n_ball;
ball_num = nearest;
ball.owner.ball_num = -1;
ball.owner = this;
ball.gotoAndStop("player");
}
}
SetScreenPos();
}
}
function ShieldOn() {
shieldStart = getTimer();
shieldTime = game.SHIELD_TIME;
is_immune = true;
gotoAndPlay ("shield");
}
function SpeedOn() {
speedStart = getTimer();
speedTime = game.SPEED_TIME;
game.SetSteps(1);
gotoAndPlay ("speed");
}
function SetColors(index) {
var colorstr = new String(_root.torsColors[index]);
rb = Number(colorstr.substring(0, colorstr.indexOf(",")));
colorstr = colorstr.substring(colorstr.indexOf(",") + 1);
gb = Number(colorstr.substring(0, colorstr.indexOf(",")));
colorstr = colorstr.substring(colorstr.indexOf(",") + 1);
bb = Number(colorstr);
torsColorTransform.ra = 100;
torsColorTransform.ga = 100;
torsColorTransform.ba = 100;
torsColorTransform.rb = rb;
torsColorTransform.gb = gb;
torsColorTransform.bb = bb;
torsColorTransform.aa = 100;
torsColorTransform.ab = 0;
torsColor.setTransform(torsColorTransform);
handsColor.setTransform(torsColorTransform);
colorstr = String(_root.legColors[index]);
rb = Number(colorstr.substring(0, colorstr.indexOf(",")));
colorstr = colorstr.substring(colorstr.indexOf(",") + 1);
gb = Number(colorstr.substring(0, colorstr.indexOf(",")));
colorstr = colorstr.substring(colorstr.indexOf(",") + 1);
bb = Number(colorstr);
handsColorTransform.ra = 100;
handsColorTransform.ga = 100;
handsColorTransform.ba = 100;
handsColorTransform.rb = rb;
handsColorTransform.gb = gb;
handsColorTransform.bb = bb;
handsColorTransform.aa = 100;
handsColorTransform.ab = 0;
legsColor.setTransform(handsColorTransform);
}
function RestoreColors() {
torsColor.setTransform(torsColorTransform);
handsColor.setTransform(torsColorTransform);
legsColor.setTransform(handsColorTransform);
}
ST_STAY = 0;
ST_RUN_AHEAD = 1;
ST_RUN_PLAYER = 2;
ST_RUN_BALL = 3;
ST_RUN_DOWN = 4;
ST_REINIT = 5;
DIR_RIGHT = 0;
DIR_RIGHT_UP = 1;
DIR_UP = 2;
DIR_LEFT_UP = 3;
DIR_LEFT = 4;
DIR_LEFT_DOWN = 5;
DIR_DOWN = 6;
DIR_RIGHT_DOWN = 7;
KICKSND_TIME = 400;
is_enemy = false;
x = 0;
y = 0;
dir = DIR_DOWN;
game = _parent;
playerCollided = false;
is_immune = false;
player = 0;
ball_num = -1;
closest_ball = 0;
accel = 1;
dir_add = 0;
torsColor = new Color(this.body.body.tors);
handsColor = new Color(this.body.body.hands);
legsColor = new Color(this.body.body.legs);
torsColorTransform = new Object();
handsColorTransform = new Object();
Symbol 259 MovieClip [main_fballer] Frame 2
is_immune = false;
stop();
Symbol 259 MovieClip [main_fballer] Frame 5
curTime = getTimer();
if ((curTime - blinkStart) < blinkTime) {
gotoAndPlay ("blinking");
} else {
gotoAndStop ("normal");
}
Symbol 259 MovieClip [main_fballer] Frame 7
curTime = getTimer();
if ((curTime - shieldStart) < shieldTime) {
gotoAndPlay ("shield");
}
Symbol 259 MovieClip [main_fballer] Frame 20
gotoAndStop ("normal");
Symbol 259 MovieClip [main_fballer] Frame 22
curTime = getTimer();
if ((curTime - speedStart) < speedTime) {
gotoAndPlay ("speed");
} else {
game.SetSteps(0);
gotoAndStop ("normal");
}
Symbol 262 MovieClip Frame 1
stop();
Symbol 263 MovieClip [ball] Frame 1
function Reset() {
y = game.HEIGHT + 100;
is_enabled = false;
gotoAndStop ("stay");
owner.ball_num = -1;
}
function GetDistance(xx, yy) {
return(Math.distance(x, y, xx, yy));
}
function Kick(dir) {
var xstep = (game.ball_step * owner.accel);
var ystep = (game.ball_step * owner.accel);
switch (dir) {
case DIR_RIGHT :
dx = xstep;
break;
case :
dx = xstep * 0.8;
dy = ystep * 0.8;
break;
case :
dy = ystep;
break;
case :
dx = (-xstep) * 0.8;
dy = ystep * 0.8;
break;
case :
dx = -xstep;
break;
case :
dx = (-xstep) * 0.8;
dy = (-ystep) * 0.8;
break;
case :
dy = -ystep;
break;
case :
dx = xstep * 0.8;
dy = (-ystep) * 0.8;
}
body.gotoAndPlay("kick");
frame = 1;
}
function Update() {
if (!is_enabled) {
return(undefined);
}
x = x + dx;
y = y + dy;
if (game.player.run) {
if (game.player.dir == DIR_UP) {
y = y - game.user_step;
} else if ((game.player.dir == DIR_LEFT_UP) || (game.player.dir == DIR_RIGHT_UP)) {
y = y - (game.user_step * 0.8);
}
}
if (game.WIDTH < x) {
dx = -dx;
x = game.WIDTH - 5;
}
if (x < 0) {
dx = -dx;
x = 5;
}
if (y < -10) {
Reset();
}
frame++;
if ((frame % 10) == 0) {
frame = 1;
((dx != 0) ? ((dx = dx / 1.5)) : 1);
((dy != 0) ? ((dy = dy / 1.5)) : 1);
}
CheckGates();
SetScreenPos();
}
function CheckGates() {
if (owner.is_enemy) {
return(undefined);
}
if (game.player.y >= game.gates.y) {
return(undefined);
}
if (!game.gates.can_catch) {
return(undefined);
}
var x_dist = (x - game.gates.x);
var y_dist = (y - game.gates.y);
if ((y_dist >= 0) && (x_dist >= 0)) {
if ((y_dist < game.gates.HEIGHT) && (x_dist < game.gates.WIDTH)) {
game.gates.can_catch = false;
game.gates.gotoAndPlay("goal");
control.AddPoints(game.g_points);
Reset();
}
}
}
DIR_RIGHT = 0;
DIR_RIGHT_UP = 1;
DIR_UP = 2;
DIR_LEFT_UP = 3;
DIR_LEFT = 4;
DIR_LEFT_DOWN = 5;
DIR_DOWN = 6;
DIR_RIGHT_DOWN = 7;
game = _parent;
gates = _parent.gates;
control = game.control;
Symbol 263 MovieClip [ball] Frame 2
stop();
Symbol 263 MovieClip [ball] Frame 3
stop();
Symbol 267 MovieClip Frame 1
mainStopTime = _parent.stoppedTime;
pauseTime = 1000 * _parent.pauseTime;
_parent.stop();
if (Number(getTimer()) >= (pauseTime + mainStopTime)) {
_parent.play();
}
Symbol 271 MovieClip [gates] Frame 1
function Init() {
x = random(game.WIDTH - WIDTH);
y = game.HEIGHT - random(DY);
SetScreenPos();
gotoAndStop ("stop");
is_enabled = false;
can_catch = false;
playerCollided = false;
game.gates_time = getTimer();
}
function Update() {
if (!is_enabled) {
return(undefined);
}
if (player.IsRunningUpward()) {
if (-30 < y) {
y = y - game.user_step;
} else {
Init();
}
if ((can_catch && (!playerCollided)) && (!player.is_immune)) {
var x_dist = (player.x - x);
var y_dist = (player.y - y);
if ((y_dist >= 0) && (x_dist >= 0)) {
if ((y_dist < HEIGHT) && (x_dist < WIDTH)) {
playerCollided = true;
_root.snd.gotoAndPlay("stone");
control.AddEnergy(game.d_energy);
}
}
}
SetScreenPos();
}
}
function Enable(value) {
is_enabled = value;
}
game = _parent;
player = _parent.player;
control = game.control;
WIDTH = 86;
HEIGHT = 50;
DY = 80;
MAX_SHOWTIME = 5;
MIN_SHOWTIME = 1;
is_enabled = false;
can_catch = false;
stop();
Symbol 271 MovieClip [gates] Frame 9
can_catch = true;
Symbol 271 MovieClip [gates] Frame 15
stoppedTime = getTimer();
pauseTime = MIN_SHOWTIME + random(MAX_SHOWTIME);
Symbol 271 MovieClip [gates] Frame 25
can_catch = false;
Symbol 271 MovieClip [gates] Frame 30
Init();
stop();
Symbol 271 MovieClip [gates] Frame 71
Init();
gotoAndStop ("stop");
Symbol 278 MovieClip Frame 1
stop();
Symbol 278 MovieClip Frame 13
stop();
Symbol 278 MovieClip Frame 23
stop();
Symbol 287 MovieClip Frame 1
str_submitbtn = _root.cstr_submitbtn;
Symbol 290 Button
on (release) {
trace(_root.tempData.player_name);
trace(_root.tempData.diftext[_root.difficulty]);
_root.myData.getURL(_root.url_getstat, "stat_frame", "POST");
gotoAndStop (2);
}
Symbol 291 MovieClip Frame 1
str_gameover = _root.cstr_gameover;
str_scoreis = _root.cstr_scoreis;
str_score = _parent._parent.points;
stop();
Symbol 292 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 2
infopanel.gotoAndStop(1);
Symbol 292 MovieClip Frame 15
stop();
Symbol 305 Button
on (release) {
_root.gotoAndStop("title");
}
Symbol 310 Button
on (release) {
if (_root.game.paused) {
pause_panel.gotoAndPlay("hide");
_root.game.paused = false;
} else {
pause_panel.gotoAndPlay("show");
_root.game.paused = true;
}
}
Symbol 326 MovieClip Frame 1
stop();
Symbol 328 MovieClip Frame 1
stop();
Symbol 328 MovieClip Frame 15
if (!_root.game.paused) {
gotoAndPlay ("blinking_slow");
} else {
gotoAndPlay ("blinking_slow1");
}
Symbol 328 MovieClip Frame 20
if (!_root.game.paused) {
gotoAndPlay ("blinking");
} else {
gotoAndPlay ("blinking1");
}
Symbol 329 MovieClip [c-panel] Frame 1
function SetEnergy(value) {
energy_ctl.body.gotoAndStop(value + 1);
energy_value = value;
if ((-(_root.game.d_energy * 2)) >= energy_value) {
energy_ctl.gotoAndPlay("blinking");
}
}
function GetEnergy() {
return(energy_value);
}
function AddEnergy(value) {
energy_value = energy_value + value;
if (100 < energy_value) {
energy_value = 100;
}
if (0 >= energy_value) {
energy_ctl.gotoAndStop("normal");
_root.game.is_over = true;
_root.myData.score = points;
_root.myData.visitorName = _root.tempData.player_name;
_root.myData.diffLevel = _root.tempData.diftext[_root.difficulty];
_root.game.player.body.gotoAndStop("stay2");
gameover_panel.gotoAndPlay("show");
} else if ((-_root.game.d_energy) >= energy_value) {
energy_ctl.gotoAndPlay("blinking");
} else if ((5 - _root.game.d_energy) >= energy_value) {
energy_ctl.gotoAndPlay("blinking_slow");
} else {
energy_ctl.gotoAndStop("normal");
}
energy_ctl.body.gotoAndStop(energy_value + 1);
}
function ResetTime() {
time = 0;
start_time = getTimer();
ShowTime();
}
function UpdateTime() {
var dtime = (getTimer() - start_time);
if (1000 < dtime) {
time = Math.round(dtime / 1000);
((9 < (time % 60)) ? ((time_s = time % 60)) : ((time_s = "0" + (time % 60))));
var minutes = Math.floor((time % 3600) / 60);
((9 < minutes) ? ((time_m = minutes)) : ((time_m = "0" + minutes)));
time_m_shadow = time_m;
var hours = Math.floor(time / 3600);
if (hours == 0) {
time_h = "00";
} else if (9 < hours) {
time_h = hours;
} else {
time_h = "0" + hours;
}
time_h_shadow = time_h;
}
}
function ResetPoints() {
points = 0;
}
function AddPoints(value) {
points = points + value;
ShowPoints();
}
function ShowPoints() {
if (99999 < points) {
points_top = 99999 /* 0x01869F */;
} else if (9999 < points) {
points_top = points;
} else if (999 < points) {
points_top = "0" + points;
} else if (99 < points) {
points_top = "00" + points;
} else if (9 < points) {
points_top = "000" + points;
} else if (0 < points) {
points_top = "0000" + points;
} else {
points_top = "00000";
}
points_shadow = points_top;
}
time = 0;
points = 0;
start_time = 0;
energy_value = 100;
Symbol 329 MovieClip [c-panel] Frame 16
AddEnergy(100);
stop();
Symbol 330 MovieClip Frame 1
stop();
Symbol 330 MovieClip Frame 2
stop();
Symbol 330 MovieClip Frame 3
stop();
Symbol 330 MovieClip Frame 4
stop();
Symbol 330 MovieClip Frame 5
stop();
Symbol 330 MovieClip Frame 6
stop();
Symbol 330 MovieClip Frame 7
stop();
Symbol 330 MovieClip Frame 8
stop();
Symbol 330 MovieClip Frame 9
stop();
Symbol 330 MovieClip Frame 10
stop();
Symbol 330 MovieClip Frame 11
stop();
Symbol 330 MovieClip Frame 12
stop();
Symbol 330 MovieClip Frame 13
stop();
Symbol 330 MovieClip Frame 14
stop();
Symbol 330 MovieClip Frame 15
stop();
Symbol 330 MovieClip Frame 16
stop();
Symbol 330 MovieClip Frame 17
stop();
Symbol 331 MovieClip [fballer] Frame 1
function Init(isEnemy) {
is_enemy = isEnemy;
run = is_enemy;
closest_ball = 0;
if (is_enemy == true) {
playerCollided = false;
x = random(game.WIDTH);
y = (game.HEIGHT + 30) + random(game.MAX_MARGIN);
accel = (random(4) / 10) + 0.7;
dir_add = random(2);
player = game.player;
ball_num = game.FindFreeBall();
if (-1 < ball_num) {
ball = eval ("game.ball" + ball_num);
ball.x = x;
ball.y = y - 15;
ball.dx = 0;
ball.dy = 0;
ball.is_enabled = true;
ball.owner = this;
}
} else {
x = game.WIDTH / 2;
y = GAME.HEIGHT / 4;
accel = 1;
dir_add = 0;
dir = DIR_UP;
is_immune = false;
}
}
function SetScreenPos() {
_x = x;
_y = (game.HEIGHT - y);
}
function GetNearestBall() {
var dist = 1000;
var num = -1;
i = 0;
while (i < game.b_num) {
var cur_ball = eval ("game.ball" + i);
if (cur_ball.is_enabled) {
cur_dist = cur_ball.GetDistance(x, y);
}
if (cur_dist < dist) {
dist = cur_dist;
num = i;
}
i++;
}
return(num);
}
function CheckCollisions() {
if (!is_immune) {
i = 0;
while (i < game.e_num) {
var enemy = eval ("game.enemy" + i);
if ((enemy.playerCollided == false) && (Math.distance(x, y, enemy.x, enemy.y) < game.CLOSEDIST)) {
blinkStart = getTimer();
blinkTime = game.BLINK_COLLISION;
_root.snd.gotoAndStop("enemy");
gotoAndPlay ("blinking");
enemy.playerCollided = true;
game.control.AddEnergy(game.d_energy);
}
i++;
}
}
}
function IsNearest() {
if ((strategy != ST_RUN_BALL) && (game.active_enemies >= game.max_actives)) {
return(false);
}
if (player.ball_num == -1) {
return(false);
}
if (ball_num != -1) {
return(false);
}
if (player.ball.y >= y) {
return(false);
}
var distance = player.ball.GetDistance(x, y);
var isnearest = true;
i = 0;
while (i < game.e_num) {
var e = eval ("game.enemy" + i);
if (e.ball_num == -1) {
e_dist = player.ball.GetDistance(e.x, e.y);
isnearest = distance < e_dist;
}
i++;
}
return(isnearest);
}
function MakeStrategy() {
if (y < player.y) {
if (strategy == ST_RUN_BALL) {
game.active_enemies = game.active_enemies - 1;
}
if (y < -30) {
strategy = ST_REINIT;
}
} else if (IsNearest()) {
if (strategy != ST_RUN_BALL) {
game.active_enemies = game.active_enemies + 1;
}
strategy = ST_RUN_BALL;
} else if (ball_num == -1) {
if (strategy == ST_RUN_BALL) {
game.active_enemies = game.active_enemies - 1;
}
strategy = ST_RUN_DOWN;
} else {
if (strategy == ST_RUN_BALL) {
game.active_enemies = game.active_enemies - 1;
}
strategy = ST_RUN_AHEAD;
}
}
function IsRunningUpward() {
return(run && (((dir == DIR_UP) || (dir == DIR_LEFT_UP)) || (dir == DIR_RIGHT_UP)));
}
function SelectDirection() {
if (strategy == ST_RUN_BALL) {
var angle = 225;
if (player.ball_num != -1) {
angle = calcAngle(player.ball.x, player.ball.y);
}
dir = Math.floor(angle / game.ASTEP);
} else if (strategy == ST_RUN_DOWN) {
dir = DIR_LEFT_DOWN + dir_add;
} else {
dir = DIR_DOWN;
}
}
function SetSteps() {
var xstep = (is_enemy ? (game.step * accel) : (game.user_step));
var ystep = (is_enemy ? (game.step * accel) : 0);
dx = 0;
dy = 0;
if (!run) {
return(undefined);
}
switch (dir) {
case DIR_RIGHT :
dx = xstep;
break;
case :
dx = xstep * 0.7;
dy = ystep * 0.7;
break;
case :
dy = ystep;
break;
case :
dx = (-xstep) * 0.7;
dy = ystep * 0.7;
break;
case :
dx = -xstep;
break;
case :
dx = (-xstep) * 0.7;
dy = (-ystep) * 0.7;
break;
case :
dy = -ystep;
break;
case :
dx = xstep * 0.7;
dy = (-ystep) * 0.7;
}
if (is_enemy && (game.player.IsRunningUpward())) {
dy = dy - game.user_step;
}
}
function Update() {
if (strategy == ST_REINIT) {
Init(is_enemy);
} else {
if (is_enemy) {
SelectDirection();
}
SetSteps();
if (run == true) {
body.gotoAndStop("run" + dir);
} else {
body.gotoAndStop("stay" + dir);
}
RestoreColors();
x = x + dx;
y = y + dy;
if (game.WIDTH < x) {
x = x - dx;
if (is_enemy) {
dir = DIR_LEFT_DOWN;
dir_add = 0;
}
} else if (x < 0) {
x = x - dx;
if (is_enemy) {
dir = DIR_RIGHT_DOWN;
dir_add = 2;
}
}
if (is_enemy) {
if (ball_num != -1) {
if (ball.GetDistance(x, y) < game.CLOSEDIST) {
ball.Kick(dir);
}
} else if ((strategy == ST_RUN_BALL) && (player.ball.GetDistance(x, y) < game.CLOSEDIST)) {
player.ball.Kick(dir);
ball = player.ball;
ball_num = player.ball.num;
player.ball_num = -1;
ball.owner = this;
ball.gotoAndStop("stay");
}
} else if (ball_num != -1) {
if (ball.GetDistance(x, y) < game.CLOSEDIST) {
cur_time = getTimer();
if (KICKSND_TIME < (cur_time - _root.kicksnd_time)) {
_root.snd.gotoAndPlay("kick");
_root.kicksnd_time = cur_time;
}
ball.Kick(dir);
}
} else {
var nearest = GetNearestBall();
var n_ball = eval ("game.ball" + nearest);
if (n_ball.GetDistance(x, y) < game.CLOSEDIST) {
cur_time = getTimer();
if (KICKSND_TIME < (cur_time - _root.kicksnd_time)) {
_root.snd.gotoAndPlay("kick");
_root.kicksnd_time = cur_time;
}
n_ball.Kick(dir);
ball = n_ball;
ball_num = nearest;
ball.owner.ball_num = -1;
ball.owner = this;
ball.gotoAndStop("player");
}
}
SetScreenPos();
}
}
function ShieldOn() {
shieldStart = getTimer();
shieldTime = game.SHIELD_TIME;
is_immune = true;
gotoAndPlay ("shield");
}
function SpeedOn() {
speedStart = getTimer();
speedTime = game.SPEED_TIME;
game.SetSteps(1);
gotoAndPlay ("speed");
}
function SetColors(index) {
var colorstr = new String(_root.torsColors[index]);
rb = Number(colorstr.substring(0, colorstr.indexOf(",")));
colorstr = colorstr.substring(colorstr.indexOf(",") + 1);
gb = Number(colorstr.substring(0, colorstr.indexOf(",")));
colorstr = colorstr.substring(colorstr.indexOf(",") + 1);
bb = Number(colorstr);
torsColorTransform.ra = 100;
torsColorTransform.ga = 100;
torsColorTransform.ba = 100;
torsColorTransform.rb = rb;
torsColorTransform.gb = gb;
torsColorTransform.bb = bb;
torsColorTransform.aa = 100;
torsColorTransform.ab = 0;
torsColor.setTransform(torsColorTransform);
handsColor.setTransform(torsColorTransform);
colorstr = String(_root.legColors[index]);
rb = Number(colorstr.substring(0, colorstr.indexOf(",")));
colorstr = colorstr.substring(colorstr.indexOf(",") + 1);
gb = Number(colorstr.substring(0, colorstr.indexOf(",")));
colorstr = colorstr.substring(colorstr.indexOf(",") + 1);
bb = Number(colorstr);
handsColorTransform.ra = 100;
handsColorTransform.ga = 100;
handsColorTransform.ba = 100;
handsColorTransform.rb = rb;
handsColorTransform.gb = gb;
handsColorTransform.bb = bb;
handsColorTransform.aa = 100;
handsColorTransform.ab = 0;
legsColor.setTransform(handsColorTransform);
}
function RestoreColors() {
torsColor.setTransform(torsColorTransform);
handsColor.setTransform(torsColorTransform);
legsColor.setTransform(handsColorTransform);
}
ST_STAY = 0;
ST_RUN_AHEAD = 1;
ST_RUN_PLAYER = 2;
ST_RUN_BALL = 3;
ST_RUN_DOWN = 4;
ST_REINIT = 5;
DIR_RIGHT = 0;
DIR_RIGHT_UP = 1;
DIR_UP = 2;
DIR_LEFT_UP = 3;
DIR_LEFT = 4;
DIR_LEFT_DOWN = 5;
DIR_DOWN = 6;
DIR_RIGHT_DOWN = 7;
KICKSND_TIME = 400;
is_enemy = false;
x = 0;
y = 0;
dir = DIR_DOWN;
game = _parent;
playerCollided = false;
is_immune = false;
player = 0;
ball_num = -1;
closest_ball = 0;
accel = 1;
dir_add = 0;
torsColor = new Color(this.body.body.tors);
handsColor = new Color(this.body.body.hands);
legsColor = new Color(this.body.body.legs);
torsColorTransform = new Object();
handsColorTransform = new Object();
Symbol 331 MovieClip [fballer] Frame 2
is_immune = false;
stop();
Symbol 331 MovieClip [fballer] Frame 5
curTime = getTimer();
if ((curTime - blinkStart) < blinkTime) {
gotoAndPlay ("blinking");
} else {
gotoAndStop ("normal");
}
Symbol 331 MovieClip [fballer] Frame 7
curTime = getTimer();
if ((curTime - shieldStart) < shieldTime) {
gotoAndPlay ("shield");
}
Symbol 331 MovieClip [fballer] Frame 20
gotoAndStop ("normal");
Symbol 331 MovieClip [fballer] Frame 22
curTime = getTimer();
if ((curTime - speedStart) < speedTime) {
gotoAndPlay ("speed");
} else {
game.SetSteps(0);
gotoAndStop ("normal");
}
Symbol 368 MovieClip Frame 1
Symbol 381 MovieClip Frame 1
obj.gotoAndPlay(random(10));
stop();
Symbol 381 MovieClip Frame 2
obj.gotoAndPlay(random(10));
stop();
Symbol 381 MovieClip Frame 3
obj.gotoAndPlay(random(10));
stop();
Symbol 381 MovieClip Frame 4
obj.gotoAndPlay(random(10));
stop();
Symbol 381 MovieClip Frame 5
stop();
Symbol 381 MovieClip Frame 6
stop();
Symbol 383 MovieClip [bonus] Frame 1
function Init() {
playerCollided = false;
x = random(game.WIDTH - 20) + 10;
y = (game.HEIGHT + 30) + random(game.MAX_MARGIN);
SetScreenPos();
}
function InitType() {
switch (obj_type) {
case game.OBJ_ENERGY :
animation.gotoAndStop("energy");
return;
case :
animation.gotoAndStop("points");
return;
case :
animation.gotoAndStop("shield");
return;
case :
animation.gotoAndStop("speed");
return;
case :
animation.gotoAndStop("stone");
return;
default :
animation.gotoAndStop("undefined");
}
}
function IsPlayerClose() {
if (Math.distance(x, y + 10, player.x, player.y) < game.CLOSEDIST) {
return(true);
}
if (Math.distance(x, y - 10, player.x, player.y) < game.CLOSEDIST) {
return(true);
}
return(false);
}
function Update() {
if (player.IsRunningUpward()) {
if (-30 < y) {
y = y - game.user_step;
} else {
Init();
}
}
if ((!playerCollided) && (IsPlayerClose())) {
ProcessCollision();
}
SetScreenPos();
}
function ProcessCollision() {
playerCollided = true;
switch (obj_type) {
case game.OBJ_ENERGY :
control.AddEnergy(game.r_energy);
_root.snd.gotoAndPlay("energy");
gotoAndPlay ("flash");
return;
case :
control.AddPoints(game.r_points);
_root.snd.gotoAndPlay("points");
gotoAndPlay ("flash");
return;
case :
player.ShieldOn();
_root.snd.gotoAndPlay("shield");
gotoAndPlay ("flash");
return;
case :
player.SpeedOn();
_root.snd.gotoAndPlay("speed");
gotoAndPlay ("flash");
return;
case :
if (player.is_immune) {
break;
}
control.AddEnergy(game.d_energy);
_root.snd.gotoAndPlay("stone");
}
}
game = _parent;
player = _parent.player;
ball = _parent.ball;
control = _parent.control;
x = 0;
y = 0;
playerCollided = false;
Symbol 383 MovieClip [bonus] Frame 2
stop();
Symbol 383 MovieClip [bonus] Frame 8
Init();
InitType();
gotoAndStop ("normal");
Symbol 390 MovieClip Frame 1
str_presents = _root.cstr_presents;
str_presents_shadow = _root.cstr_presents;
Symbol 391 MovieClip Frame 1
Symbol 391 MovieClip Frame 77
stoppedTime = getTimer();
pauseTime = 3;
stop();
Symbol 391 MovieClip Frame 149
stoppedTime = getTimer();
pauseTime = 2;
stop();
Symbol 391 MovieClip Frame 150
_parent.play();
stop();
Symbol 426 MovieClip Frame 1
Symbol 429 MovieClip Frame 1
str_loading = _root.cstr_loading;
Symbol 430 MovieClip Frame 50
stop();
Symbol 430 MovieClip Frame 91
_parent.play();
stop();
Symbol 438 MovieClip Frame 1
stoppedTime = getTimer();
pauseTime = random(4) + 1;
Symbol 438 MovieClip Frame 16
gotoAndPlay (1);
Symbol 440 MovieClip Frame 49
stop();
Symbol 440 MovieClip Frame 59
stop();
Symbol 440 MovieClip Frame 60
Symbol 440 MovieClip Frame 83
stop();
Symbol 441 MovieClip Frame 1
function startLines() {
lines_dy = _parent.user_step;
}
function stopLines() {
lines_dy = 0;
}
function updateLines() {
if (lines._y < ((FIELD_LINEHEIGHT * 2) - _parent.user_step)) {
lines._y = lines._y + lines_dy;
} else {
lines._y = 0;
}
}
FIELD_LINEHEIGHT = 50;
lines_dy = 0;
lines._y = 0;
Symbol 441 MovieClip Frame 3
updateLines();
gotoAndPlay ("loop");
Symbol 444 MovieClip Frame 1
stoppedTime = getTimer();
Symbol 444 MovieClip Frame 34
if (this._name == "bg1") {
_root.title.gotoAndPlay("moveLeft");
}
Symbol 444 MovieClip Frame 43
if (this._name == "bg3") {
_parent.btns.gotoAndPlay("show");
}
stop();
Symbol 444 MovieClip Frame 76
if (this._name == "bg1") {
_root.gotoAndStop("game");
}
stop();
Symbol 446 Button
on (release) {
gotoAndStop (2);
}
Symbol 451 Button
on (rollOver) {
scrolling = 1;
}
on (rollOut) {
scrolling = 0;
}
Symbol 452 MovieClip Frame 1
if (_parent.scrolling == -1) {
_parent.text.scroll--;
} else if (_parent.scrolling == 1) {
_parent.text.scroll++;
}
Symbol 452 MovieClip Frame 3
gotoAndPlay (1);
Symbol 453 Button
on (rollOver) {
scrolling = -1;
}
on (rollOut) {
scrolling = 0;
}
Symbol 455 Button
on (release) {
gotoAndStop (1);
}
Symbol 465 MovieClip Frame 1
text = _root.cstr_howtoplay;
str_gamegoalsbtn = _root.cstr_gamegoalsbtn;
text.scroll = 0;
stop();
Symbol 465 MovieClip Frame 2
text = _root.cstr_gamegoals;
str_howtoplaybtn = _root.cstr_howtoplaybtn;
text.scroll = 0;
b1.animation.gotoAndStop("energy");
b2.animation.gotoAndStop("points");
b3.animation.gotoAndStop("shield");
b4.animation.gotoAndStop("speed");
stop();
Symbol 466 MovieClip Frame 1
stoppedTime = getTimer();
Symbol 466 MovieClip Frame 10
stop();
Symbol 466 MovieClip Frame 20
stop();
Symbol 501 Button
on (rollOver) {
i_level._alpha = 100;
}
on (rollOut) {
i_level._alpha = 70;
}
on (release) {
_root.difficulty = (_root.difficulty + 1) % 3;
i_level.str_level = _root.tempData.diftext[_root.difficulty];
}
Symbol 502 Button
on (release) {
_root.myTeam = (_root.myTeam - 1) % 15;
if (_root.myTeam < 0) {
_root.myTeam = 14;
}
man.SetColors(_root.myTeam);
}
Symbol 503 Button
on (release) {
_root.myTeam = (_root.myTeam + 1) % 15;
man.SetColors(_root.myTeam);
}
Symbol 504 MovieClip Frame 1
str_playersetup = _root.cstr_playersetup;
str_name = _root.tempData.player_name;
trace("DIFFICULTY: " + _root.difficulty);
i_level.str_level = _root.tempData.diftext[_root.difficulty];
Symbol 504 MovieClip Frame 2
man.SetColors(_root.myTeam);
stop();
Symbol 505 Button
on (release) {
_root.tempData.player_name = player_setup.str_name;
_parent.Hide();
}
Symbol 506 MovieClip Frame 1
stop();
Symbol 506 MovieClip Frame 25
stop();
Symbol 506 MovieClip Frame 35
_root.player_name = player.setup.str_name;
Symbol 506 MovieClip Frame 36
stop();
Symbol 507 MovieClip Frame 1
function Hide() {
bg1.play();
bg2.play();
bg3.play();
text.play();
btns.play();
_root.title.gotoAndPlay("hide");
}
bg1.pauseTime = 0.5;
bg2.pauseTime = 1;
bg3.pauseTime = 1.5;
text.pauseTime = 3;
Symbol 507 MovieClip Frame 2
user_step = 3;
field.startLines();
Symbol 507 MovieClip Frame 45
stop();
Symbol 516 MovieClip Frame 1
stop();
Symbol 516 MovieClip Frame 3
trace("SND ENERGY");
Symbol 516 MovieClip Frame 7
stop();
Symbol 516 MovieClip Frame 8
trace("SND POINTS");
Symbol 516 MovieClip Frame 12
stop();
Symbol 516 MovieClip Frame 13
trace("SND SHIELD");
Symbol 516 MovieClip Frame 18
stop();
Symbol 516 MovieClip Frame 23
stop();
Symbol 516 MovieClip Frame 35
stop();
Symbol 516 MovieClip Frame 40
stop();
Symbol 516 MovieClip Frame 44
gotoAndStop ("nothing");
Symbol 516 MovieClip Frame 51
stop();
Symbol 518 MovieClip Frame 1
function startLines() {
lines_dy = _parent.user_step;
}
function stopLines() {
lines_dy = 0;
}
function updateLines() {
if (lines._y < ((FIELD_LINEHEIGHT * 2) - _parent.user_step)) {
lines._y = lines._y + lines_dy;
} else {
lines._y = 0;
}
}
FIELD_LINEHEIGHT = 50;
lines_dy = 0;
lines._y = 0;
Symbol 518 MovieClip Frame 3
if (!_parent.paused) {
updateLines();
}
gotoAndPlay ("loop");
Symbol 519 MovieClip Frame 1
function CheckKeys() {
if (_parent.paused || (_parent.is_over)) {
return(undefined);
}
var footballer = _parent.player;
if (Key.isDown(37)) {
if (footballer.dir != DIR_LEFT) {
footballer.dir = (footballer.dir + 1) % 8;
}
}
if (Key.isDown(39)) {
if (footballer.dir != DIR_RIGHT) {
footballer.dir = footballer.dir - 1;
((footballer.dir < 0) ? ((footballer.dir = 7)) : ((footballer.dir = footballer.dir)));
}
}
if (Key.isDown(38)) {
footballer.run = true;
downJustPressed = false;
} else {
footballer.run = false;
}
}
DIR_RIGHT = 0;
DIR_RIGHT_UP = 1;
DIR_UP = 2;
DIR_LEFT_UP = 3;
DIR_LEFT = 4;
DIR_LEFT_DOWN = 5;
DIR_DOWN = 6;
DIR_RIGHT_DOWN = 7;
downJustPressed = false;
lastTimePaused = getTimer();
lastTimeSwitched = getTimer();
Symbol 519 MovieClip Frame 2
CheckKeys();
Symbol 519 MovieClip Frame 4
gotoAndPlay ("check");
Symbol 520 MovieClip Frame 2
tick = 0;
max_tick = _root.ADD_ENEMY_INTERVAL;
game = _root.game;
Symbol 520 MovieClip Frame 3
tick++;
Symbol 520 MovieClip Frame 4
if (tick < max_tick) {
gotoAndPlay ("loop");
} else {
game.attachMovie("fballer", "enemy" + game.e_num, game.e_num + game.ENEMY_LEVEL);
}
Symbol 520 MovieClip Frame 5
var enemy = eval ("_root.game.enemy" + game.e_num);
trace("GENERATOR: " + enemy);
enemy.Init(true);
do {
clr = random(15);
} while (clr == _root.myTeam);
enemy.SetColors(clr);
tick = 0;
game.e_num++;
gotoAndPlay ("loop");
Symbol 521 MovieClip Frame 2
tick = 0;
max_tick = _root.ADD_ACCEL_INTERVAL;
game = _root.game;
Symbol 521 MovieClip Frame 3
if (!_root.game.paused) {
tick++;
}
Symbol 521 MovieClip Frame 4
if (max_tick < tick) {
tick = 0;
game.acceleration = game.acceleration + _root.ADD_ACCEL_VALUE;
game.SetSteps(0);
trace("+++++++++++++++");
trace("acceleration = " + game.acceleration);
}
gotoAndPlay ("loop");
Symbol 522 MovieClip Frame 1
if ((!_parent.paused) && (!_parent.is_over)) {
if (!_parent.gates.is_enabled) {
var time_since = ((getTimer() - _parent.gates_time) / 1000);
if ((random(_parent.GATE_RND) + _parent.GATE_INTERVAL[_parent.diff]) < time_since) {
_parent.gates.is_enabled = true;
_parent.gates.gotoAndPlay("show");
_parent.gates_time = getTimer();
}
}
}
Symbol 522 MovieClip Frame 20
gotoAndPlay ("loop");
Symbol 523 MovieClip Frame 1
function SetSteps(add_value) {
user_step = (DIFF_USERSTEP[diff] + add_value) + acceleration;
step = DIFF_STEP[diff] + acceleration;
ball_step = (BALLFIRSTSTEP[diff] + add_value) + acceleration;
CLOSEDIST = (ball_step * 2) + (add_value * 2);
}
function Init() {
diff = _root.difficulty;
e_num = DIFF_ENEMY[diff];
max_actives = DIFF_ACTIVES[diff];
b_num = BALLS[diff];
d_energy = DIFF_DENERGY[diff];
r_energy = DIFF_RENERGY[diff];
r_points = DIFF_RPOINTS[diff];
s_points = DIFF_SPOINTS[diff];
g_points = DIFF_GPOINTS[diff];
energy_bnum = BON_ENERGY[diff];
points_bnum = BON_POINTS[diff];
shield_bnum = BON_SHIELD[diff];
speed_bnum = BON_SPEED[diff];
stone_num = BON_STONE[diff];
freeballs = b_num;
paused = false;
is_over = false;
active_enemies = 0;
acceleration = 0;
SetSteps(0);
control = _parent.control;
control.SetEnergy(100);
control.ResetTime();
control.ResetPoints();
attachMovie("main_fballer", "player", PLAYER_LEVEL);
attachMovie("gates", "gates", GATES_LEVEL);
i = 0;
while (i < e_num) {
attachMovie("fballer", "enemy" + i, i + ENEMY_LEVEL);
i++;
}
i = 0;
while (i < b_num) {
attachMovie("ball", "ball" + i, i + BALL_LEVEL);
obj = eval ("ball" + i);
obj._y = -30;
obj._x = WIDTH / 2;
obj.num = i;
i++;
}
j = 0;
i = 0;
while (i < energy_bnum) {
attachMovie("bonus", "bonus" + j, j + OBJ_LEVEL);
obj = eval ("bonus" + j);
obj.obj_type = OBJ_ENERGY;
j++;
i++;
}
i = 0;
while (i < points_bnum) {
attachMovie("bonus", "bonus" + j, j + OBJ_LEVEL);
obj = eval ("bonus" + j);
obj.obj_type = OBJ_POINTS;
j++;
i++;
}
i = 0;
while (i < shield_bnum) {
attachMovie("bonus", "bonus" + j, j + OBJ_LEVEL);
obj = eval ("bonus" + j);
obj.obj_type = OBJ_SHIELD;
j++;
i++;
}
i = 0;
while (i < speed_bnum) {
attachMovie("bonus", "bonus" + j, j + OBJ_LEVEL);
obj = eval ("bonus" + j);
obj.obj_type = OBJ_SPEED;
j++;
i++;
}
i = 0;
while (i < stone_num) {
attachMovie("bonus", "bonus" + j, j + STONE_LEVEL);
obj = eval ("bonus" + j);
obj.obj_type = OBJ_STONE;
j++;
i++;
}
}
function Init2() {
player.Init(false);
player.SetColors(_root.myTeam);
gates.Init();
gates_time = getTimer();
i = 0;
while (i < b_num) {
var ball = eval ("ball" + i);
ball.x = random(WIDTH - 30) + 15;
ball.y = HEIGHT + 15;
ball.is_enabled = false;
i++;
}
i = 0;
while (i < e_num) {
var enemy = eval ("enemy" + i);
enemy.Init(true);
do {
clr = random(15);
} while (clr == _root.myTeam);
enemy.SetColors(clr);
i++;
}
i = 0;
while (i < ((((energy_bnum + points_bnum) + shield_bnum) + speed_bnum) + stone_num)) {
var obj = eval ("bonus" + i);
obj.Init();
obj.InitType();
i++;
}
gates.Init();
control.ShowPoints();
}
function UpdateScene() {
player.Update();
player.CheckCollisions();
i = 0;
while (i < e_num) {
var enemy = eval ("enemy" + i);
enemy.Update();
i++;
}
i = 0;
while (i < ((((energy_bnum + points_bnum) + shield_bnum) + speed_bnum) + stone_num)) {
var obj = eval ("bonus" + i);
obj.Update();
i++;
}
i = 0;
while (i < b_num) {
var ball = eval ("ball" + i);
if (ball.is_enabled) {
ball.Update();
}
i++;
}
gates.Update();
control.UpdateTime();
if (player.ball_num != -1) {
if (player.y < player.ball.y) {
control.AddPoints(s_points);
}
}
}
function UpdateInPause() {
player.Update();
player.CheckCollisions();
i = 0;
while (i < e_num) {
var enemy = eval ("enemy" + i);
enemy.body.gotoAndStop("stay" + enemy.dir);
enemy.RestoreColors();
i++;
}
}
function MakeStrategy() {
i = 0;
while (i < e_num) {
var enemy = eval ("enemy" + i);
enemy.MakeStrategy();
i++;
}
}
function FindFreeBall() {
var i = 0;
cur_ball = eval ("ball" + i);
while ((i < b_num) && (cur_ball.is_enabled == true)) {
i++;
cur_ball = eval ("ball" + i);
}
if (i < b_num) {
return(i);
}
return(-1);
}
function Pause() {
}
WIDTH = 570;
HEIGHT = 400;
TOP = 0;
LEFT = 15;
MAXHIT = 400;
CLOSEDIST = 12;
DX = 1;
DY = 1;
ASTEP = 45;
GATE = 150;
MAX_MARGIN = 800;
GATES_LEVEL = 700;
PLAYER_LEVEL = 600;
ENEMY_LEVEL = 500;
STONE_LEVEL = 100;
BALL_LEVEL = 200;
OBJ_LEVEL = 400;
BLINK_START = 900;
BLINK_COLLISION = 1000;
SHIELD_TIME = 5000;
SPEED_TIME = 5000;
OBJ_ENERGY = 0;
OBJ_POINTS = 1;
OBJ_SHIELD = 2;
OBJ_SPEED = 3;
OBJ_STONE = 4;
DIFF_ENEMY = new Array(5, 7, 8);
DIFF_ACTIVES = new Array(2, 3, 3);
DIFF_STEP = new Array(3, 4, 5);
DIFF_USERSTEP = new Array(4, 4, 5);
BALLFIRSTSTEP = new Array(7, 7, 8);
DIFF_DENERGY = new Array(-10, -15, -15);
DIFF_RENERGY = new Array(15, 10, 10);
DIFF_RPOINTS = new Array(10, 20, 30);
DIFF_SPOINTS = new Array(2, 4, 7);
DIFF_GPOINTS = new Array(300, 450, 600);
BALLS = new Array(2, 2, 2);
BON_ENERGY = new Array(2, 1, 1);
BON_POINTS = new Array(3, 3, 3);
BON_SHIELD = new Array(1, 1, 1);
BON_SPEED = new Array(1, 1, 1);
BON_STONE = new Array(2, 3, 4);
GATE_INTERVAL = new Array(5, 5, 5);
GATE_RND = 10;
diff = 0;
e_num = 0;
b_num = 0;
step = 0;
acceleration = 0;
ball_step = 5;
d_energy = 0;
r_energy = 0;
r_points = 0;
s_points = 0;
g_points = 0;
user_step = 0;
energy_bnum = 0;
points_bnum = 0;
shield_bnum = 0;
speed_bnum = 0;
stone_num = 0;
freeballs = 0;
active_enemies = 0;
gates_time = 0;
MovieClip.prototype.SetScreenPos = function () {
this._x = this.x;
this._y = _parent.HEIGHT - this.y;
};
Math.distance = function (x1, y1, x2, y2) {
var deltaX = (x2 - x1);
var deltaY = (y2 - y1);
return(Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)));
};
Math.sign = function (n) {
var result;
((n >= 0) ? ((result = 1)) : ((result = -1)));
return(result);
};
Movieclip.prototype.inArea = function (x1, y1, x2, y2) {
if ((this.x < x1) || (x2 < this.x)) {
return(false);
}
if ((this.y < y1) || (y2 < this.y)) {
return(false);
}
return(true);
};
Movieclip.prototype.calcAngle = function (x1, y1) {
var deltax = (this.x - x1);
var deltay = (this.y - y1);
angle = Math.atan2(deltay, deltax) - (Math.pi / 2);
angle = angle / (Math.pi / 180);
angle = angle - 90;
((angle < 0) ? ((angle = angle + 360)) : ((angle = angle)));
return(angle);
};
Movieclip.prototype.distance = function (targetclip) {
var deltaX = (this.x - targetclip.x);
var deltaY = (this.y - targetclip.y);
return(Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)));
};
Movieclip.prototype.goalAngle = function (isRight) {
var gateY = random(_parent.GATE - (_parent.GATE / 2));
var gateX;
((isRight == true) ? ((gateX = WIDTH / 2)) : ((gateX = (-WIDTH) / 2)));
var deltax = (this.x - gateX);
var deltay = (this.y - gateY);
angle = Math.atan2(deltay, deltax) - (Math.pi / 2);
angle = angle / (Math.pi / 180);
angle = angle - 90;
((angle < 0) ? ((angle = angle + 360)) : ((angle = angle)));
return(angle);
};
Symbol 523 MovieClip Frame 2
Init();
Symbol 523 MovieClip Frame 3
Init2();
Symbol 523 MovieClip Frame 4
if ((!paused) && (!is_over)) {
MakeStrategy();
UpdateScene();
if (player.IsRunningUpward()) {
field.startLines();
} else {
field.stopLines();
}
} else if (!is_over) {
UpdateInPause();
}
Symbol 523 MovieClip Frame 5
gotoAndPlay ("loop");