Frame 1
stop();
Frame 2
stop();
Symbol 26 Button
on (release) {
getURL ("http://www.minijuegos.com", "_blank");
}
Symbol 28 MovieClip Frame 40
stop();
Symbol 34 MovieClip Frame 1
function onEnterFrame() {
if (!loaded) {
var _local3 = _root.getBytesLoaded() / _root.getBytesTotal();
if (_local3 >= 1) {
play();
bar._x = initX;
loaded = true;
} else {
bar._x = initX + ((_local3 - 1) * bar._width);
}
}
var _local4 = getTimer() - time;
timeAccum = timeAccum + _local4;
while (timeAccum >= FRAME_TIME) {
var _local2 = 0;
while (_local2 < timeClips.length) {
if (timeClips[_local2]._currentframe < timeClips[_local2]._totalframes) {
timeClips[_local2].nextFrame();
} else {
timeClips[_local2].gotoAndStop(1);
}
_local2++;
}
if (loaded && (_currentframe < _totalframes)) {
nextFrame();
}
timeAccum = timeAccum - FRAME_TIME;
}
time = time + _local4;
}
stop();
_root.stop();
var initX = bar._x;
var time = getTimer();
var FRAME_TIME = 33.3333333333333;
var timeAccum = 0;
var loaded = false;
timeClips = [bargfx, tank.mc0, tank.mc1, tank.mc2, tank.mc3, tank.mc4, tank.mc4.mc0, tank.mc4.mc1, tank.mc4.mc0.mc0, tank.mc4.mc0.mc0.mc0.mc0, tank.mc4.mc0.mc0.mc0.mc1, tank.mc4.mc0.mc0.mc0.mc2, tank.mc4.mc0.mc0.mc0.mc3, tank.mc4.mc0.mc0.mc1, tank.mc4.mc0.mc0.mc2, tank.mc5.mc0];
var i = 0;
while (i < timeClips.length) {
timeClips[i].stop();
i++;
}
Symbol 34 MovieClip Frame 51
_root.play();
Symbol 41 MovieClip Frame 1
stop();
Symbol 41 MovieClip Frame 2
stop();
Symbol 41 MovieClip Frame 7
stop();
Symbol 41 MovieClip Frame 14
stop();
Symbol 41 MovieClip Frame 19
stop();
Symbol 41 MovieClip Frame 27
stop();
Symbol 41 MovieClip Frame 32
stop();
Symbol 53 Button
on (release) {
getURL ("http://www.minijuegos.com/?id=boxtennis");
}
Symbol 70 Button
on (release) {
easy_mode();
after_space();
}
on (rollOver) {
ninios.gotoAndStop("easy");
mu._x = 70;
}
Symbol 73 Button
on (release) {
hard_mode();
after_space();
}
on (rollOver) {
ninios.gotoAndStop("hard");
mu._x = 375.9;
}
Symbol 75 Button
on (release) {
medium_mode();
after_space();
}
on (rollOver) {
ninios.gotoAndStop("medium");
mu._x = 216.9;
}
Symbol 83 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 2
stop();
Symbol 83 MovieClip Frame 3
stop();
Symbol 84 MovieClip Frame 1
_parent.mcBGM.gotoAndStop("title");
Symbol 84 MovieClip Frame 2
stop();
_parent.mcBGM.gotoAndStop("title_end");
_parent.gotoAndStop("edit");
Symbol 89 MovieClip Frame 1
function update() {
mcBar._xscale = (num + 1) * 10;
num_txt = num + 1;
}
stop();
update();
if (_parent.edit_ok == 1) {
onPress = function () {
var _local1 = Math.floor(_xmouse / 20);
if (_local1 < 0) {
_local1 = 0;
}
if (_local1 > 9) {
_local1 = 9;
}
num = _local1;
update();
};
}
Symbol 91 Button
on (release) {
getURL ("http://www.minijuegos.com");
}
Symbol 93 MovieClip Frame 1
function after_space() {
_parent.pname[0] = "BOX-BOY";
_parent.pname[1] = "BOX-GIRL";
i = 0;
while (i < 2) {
j = 0;
while (j < 4) {
mc = eval (("mcNum" + i) + j);
_parent.player_data[i][j] = mc.num;
j++;
}
i++;
}
_parent.mcBGM.gotoAndStop("start_end");
_parent.gotoAndStop("play");
}
function easy_mode() {
j = 0;
while (j < 4) {
_parent.player_data[0][j] = 9;
mc = eval ("mcNum0" + j);
mc.num = _parent.player_data[0][j];
mc.update();
_parent.player_data[1][j] = 1;
mc = eval ("mcNum1" + j);
mc.num = _parent.player_data[1][j];
mc.update();
j++;
}
trace("easymode");
trace(_parent.player_data[1][j]);
trace(_parent.player_data[0][j]);
}
function medium_mode() {
i = 0;
while (i < 2) {
j = 0;
while (j < 4) {
_parent.player_data[i][j] = Math.floor((((Math.random() * 10) + (Math.random() * 10)) + (Math.random() * 10)) / 3);
mc = eval (("mcNum" + i) + j);
mc.num = _parent.player_data[i][j];
mc.update();
j++;
}
i++;
}
trace("medium");
trace(_parent.player_data[1][j]);
trace(_parent.player_data[0][j]);
}
function hard_mode() {
j = 0;
while (j < 4) {
_parent.player_data[1][j] = 9;
mc = eval ("mcNum1" + j);
mc.num = _parent.player_data[1][j];
mc.update();
j++;
}
trace("hard");
trace(_parent.player_data[1][j]);
}
edit_ok = 1;
i = 0;
while (i < 2) {
j = 0;
while (j < 4) {
_parent.player_data[i][j] = Math.floor((((Math.random() * 10) + (Math.random() * 10)) + (Math.random() * 10)) / 3);
mc = eval (("mcNum" + i) + j);
mc.num = _parent.player_data[i][j];
mc.update();
j++;
}
i++;
}
_parent.mcBGM.gotoAndStop("start");
Symbol 95 MovieClip Frame 1
stop();
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt < 8) {
return(undefined);
}
cnt = 0;
if (_visible) {
_visible = false;
} else {
_visible = true;
}
};
Symbol 177 MovieClip Frame 21
_parent._parent.start_wait(1);
Symbol 193 MovieClip Frame 17
_parent._parent.start_wait(1);
Symbol 214 MovieClip Frame 11
_parent._parent.start_wait(1);
Symbol 233 MovieClip Frame 8
stop();
Symbol 240 MovieClip Frame 1
stop();
Symbol 243 MovieClip Frame 1
stop();
Symbol 243 MovieClip Frame 2
_alpha = 100;
onEnterFrame = function () {
_alpha = (_alpha - 10);
if (_alpha <= 0) {
delete onEnterFrame;
gotoAndStop (1);
}
};
Symbol 341 MovieClip Frame 21
_parent._parent.start_wait(0);
Symbol 360 MovieClip Frame 21
_parent._parent.start_wait(0);
Symbol 387 MovieClip Frame 12
_parent._parent.start_wait(0);
Symbol 406 MovieClip Frame 8
stop();
Symbol 411 MovieClip Frame 1
stop();
Symbol 422 MovieClip Frame 1
pname0 = _parent._parent.pname[0];
pname1 = _parent._parent.pname[1];
gpoint0 = _parent._parent.gpoint[0];
gpoint1 = _parent._parent.gpoint[1];
Symbol 425 Button
on (release) {
after_space();
}
Symbol 430 MovieClip Frame 21
stop();
Symbol 435 MovieClip Frame 21
stop();
Symbol 437 MovieClip Frame 2
stop();
Symbol 437 MovieClip Frame 8
stop();
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt < 30) {
return(undefined);
}
delete onEnterFrame;
_parent.start_score();
};
Symbol 437 MovieClip Frame 13
stop();
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt < 30) {
return(undefined);
}
delete onEnterFrame;
gotoAndStop ("inplay");
_parent.after_score();
};
Symbol 437 MovieClip Frame 19
function after_space() {
_parent.after_game_winner();
}
stop();
Symbol 437 MovieClip Frame 25
function after_space() {
_parent.after_match();
}
stop();
mcSpace.gotoAndStop(1);
Symbol 437 MovieClip Frame 30
function after_space() {
_parent.after_match();
}
Symbol 437 MovieClip Frame 40
stop();
Symbol 447 Button
on (release) {
end_match_quit();
}
Symbol 448 MovieClip Frame 1
function init_game() {
serve_pos = 1;
play_winner = -1;
fault_cnt = 0;
point = [0, 0];
score_txt = (pname[server] + " 0 - 0 ") + pname[receiver];
init_play();
}
function init_play() {
rally_cnt = 0;
play_result = 0;
mcMes.gotoAndStop("inplay");
var i = 0;
while (i < 2) {
var mc = eval ("mcPlayer" + i);
mc.vy = COURT_H + 20;
if (i == 1) {
mc.vy = mc.vy * -1;
}
if (server == i) {
mc.vx = serve_pos * 20;
start_serve(i);
} else {
mc.vx = ((serve_pos * (-COURT_W)) * 2) / 3;
mc.stat = PS_WAIT;
mc.gotoAndStop("wait");
mc.wm = WM_WAIT;
}
if (server == 1) {
mc.vx = mc.vx * -1;
}
player_position(i);
mc.net_flg = 0;
i++;
}
init_ball();
debug_txt = "";
}
function user_action() {
mc = mcPlayer0;
switch (mc.stat) {
case PS_SERVE :
check_pad();
if (pad_trig) {
start_toss(0);
}
break;
case PS_TOSS :
check_pad();
mc.cnt++;
if (mc.cnt > 8) {
if (pad_trig) {
start_stroke_user(0);
}
}
if (mc.cnt == 7) {
start_toss_ball(0);
}
break;
case PS_STROKE :
mc.cnt++;
if (mc.cnt == 3) {
if (check_hit(0)) {
set_ball_dest_user();
if (mcPlayer1.stat == PS_WAIT) {
mcPlayer1.stat = PS_FREEZE;
mcPlayer1.cnt = 0;
mcPlayer1.gotoAndStop("wait");
}
}
}
break;
case PS_WAIT :
check_pad();
if ((pad_vart == 0) && (pad_hori == 0)) {
mc.gotoAndStop("wait");
move_cnt = 0;
} else {
var _local1 = mc.footwork;
mc.vx = mc.vx + (pad_hori * _local1);
mc.vy = mc.vy + (pad_vart * _local1);
if (mc.vy <= 20) {
mc.vy = 20;
}
player_position(0);
if (pad_hori < 0) {
mc.gotoAndStop("left");
} else {
mc.gotoAndStop("right");
}
}
if (!pad_trig) {
break;
}
start_stroke_user(0);
}
}
function check_pad() {
pad_vart = 0;
if (Key.isDown(40)) {
pad_vart = 1;
}
if (Key.isDown(38)) {
pad_vart = -1;
}
pad_hori = 0;
if (Key.isDown(37)) {
pad_hori = -1;
}
if (Key.isDown(39)) {
pad_hori = 1;
}
pad_trig = Key.isDown(32);
}
function start_serve(pn) {
var mc = eval ("mcPlayer" + pn);
mc.stat = PS_SERVE;
mc.cnt = 0;
mc.gotoAndStop("serve");
}
function start_toss(pn) {
var mc = eval ("mcPlayer" + pn);
mc.stat = PS_TOSS;
mc.gotoAndStop("toss");
mc.cnt = 0;
}
function start_stroke_user(pn) {
var _local1 = mcPlayer0;
_local1.stat = PS_STROKE;
_local1.cnt = 0;
var _local2 = mcBall.vx + (mcBall.ax * 2);
if (((mcBall.vh > 70) && (_local2 > (_local1.vx + HIT_X1_SMASH))) && (_local2 < (_local1.vx + HIT_X2_SMASH))) {
_local1.stroke_type = ST_SMASH;
_local1.hit_x1 = HIT_X1_SMASH;
_local1.hit_x2 = HIT_X2_SMASH;
_local1.gotoAndStop("smash");
} else if ((mcBall.vx + (mcBall.ax * 3)) < _local1.vx) {
_local1.stroke_type = ST_BACK;
_local1.hit_x1 = HIT_X1_BACK;
_local1.hit_x2 = HIT_X2_BACK;
_local1.gotoAndStop("back");
} else {
_local1.stroke_type = ST_FORE;
_local1.hit_x1 = HIT_X1_FORE;
_local1.hit_x2 = HIT_X2_FORE;
_local1.gotoAndStop("fore");
}
_local1.hit_y1 = HIT_Y1;
_local1.hit_y2 = HIT_Y2;
}
function check_hit(pn) {
var mc = eval ("mcPlayer" + pn);
if (mcBall.vx < (mc.vx + mc.hit_x1)) {
return(0);
}
if (mcBall.vx > (mc.vx + mc.hit_x2)) {
return(0);
}
if (mcBall.vy < (mc.vy + mc.hit_y1)) {
return(0);
}
if (mcBall.vy > (mc.vy + mc.hit_y2)) {
return(0);
}
if (mcBall.vh > HIT_Z) {
return(0);
}
return(1);
}
function set_ball_dest_user() {
if (mcBall.side == 0) {
return(undefined);
}
check_pad();
var _local2 = 1;
if (pad_hori < 0) {
_local2 = 0;
}
if (pad_hori > 0) {
_local2 = 2;
}
var _local3 = 1;
if (pad_vart < 0) {
_local3 = 0;
}
if (pad_vart > 0) {
_local3 = 2;
}
var _local1;
var _local6;
var _local5;
var _local9;
if (rally_cnt == 0) {
if (serve_pos > 0) {
_local1 = -COURT_W;
_local6 = 0;
} else {
_local1 = 0;
_local6 = COURT_W;
}
_local5 = -SERVE_H;
_local9 = (-SERVE_H) / 2;
} else {
_local1 = -COURT_W;
_local6 = COURT_W;
_local5 = -COURT_H;
_local9 = (-COURT_H) / 3;
}
var _local7 = (_local6 - _local1) / 3;
var _local8 = (_local9 - _local5) / 3;
var _local10 = (_local1 + (_local7 * _local2)) + (Math.random() * _local7);
var _local11 = (_local5 + (_local8 * _local3)) + (Math.random() * _local8);
var _local4 = mc.forehand;
if (mcPlayer0.stroke_type == ST_BACK) {
_local4 = mc.backhand;
}
if (mcPlayer0.stroke_type == ST_SMASH) {
_local4 = mc.serve;
}
start_move_ball(_local10, _local11, 0, _local4);
}
function start_wait(pn) {
var mc = eval ("mcPlayer" + pn);
if ((mc.stat == PS_STROKE) && (mc.stroke_type == ST_SMASH)) {
var ay = -20;
if (pn == 1) {
ay = ay * -1;
}
mc.vy = mc.vy + ay;
if ((pn == 0) && (mc.vy < 0)) {
mc.vy = 0;
}
if ((pn == 1) && (mc.vy > 0)) {
mc.vy = 0;
}
player_position(pn);
}
mc.stat = PS_WAIT;
mc.gotoAndStop("wait");
if ((pn == 1) && (mcBall.vy < mc.vy)) {
mc.stat = PS_AFTER;
mc.gotoAndStop("win");
}
if (mc.net_flg == 0) {
if (mc.netplay > (Math.random() * 20)) {
mc.net_flg = 1;
}
}
mc.wm = WM_MOVE;
mc.dest_x = 0;
mc.dest_y = -COURT_H;
if (mc.net_flg) {
mc.dest_x = mcBall.dx / 3;
mc.dest_y = -150;
}
}
function move_enemy() {
var _local1 = mcPlayer1;
switch (_local1.stat) {
case PS_SERVE :
_local1.cnt++;
if (_local1.cnt > 10) {
start_toss(1);
}
break;
case PS_TOSS :
_local1.cnt++;
if (_local1.cnt == 7) {
start_toss_ball(1);
}
if (_local1.cnt > 22) {
start_stroke_com(1);
}
break;
case PS_WAIT :
if (_local1.wm == WM_MOVE) {
var _local3 = _local1.footwork;
var _local4 = 0;
var _local2 = 0;
if (_local1.vy < (_local1.dest_y - 10)) {
_local1.vy = _local1.vy + _local3;
} else if (_local1.vy > (_local1.dest_y + 10)) {
_local1.vy = _local1.vy - _local3;
} else {
_local4++;
}
if (_local4 == 0) {
if (_local1.vx > 0) {
_local2 = 1;
} else {
_local2 = -1;
}
}
if (_local1.vx < (_local1.dest_x - 10)) {
_local1.vx = _local1.vx + _local3;
_local1.gotoAndStop("left");
_local2 = -1;
} else if (_local1.vx > (_local1.dest_x + 10)) {
_local1.vx = _local1.vx - _local3;
_local1.gotoAndStop("right");
_local2 = 1;
} else {
_local4++;
}
if (_local4 == 2) {
_local1.wm = WM_WAIT;
_local1.gotoAndStop("wait");
} else {
if (_local2 < 0) {
_local1.gotoAndStop("left");
}
if (_local2 > 0) {
_local1.gotoAndStop("right");
}
}
player_position(1);
}
if ((mcBall.vy + (mcBall.ay * 4)) < _local1.vy) {
if (Math.abs((mcBall.vx + (mcBall.ax * 4)) - _local1.vx) < 60) {
start_stroke_com(1);
}
}
break;
case PS_STROKE :
_local1.cnt++;
if (_local1.cnt == 3) {
if (check_hit(1)) {
set_ball_dest_com();
}
}
break;
case PS_FREEZE :
_local1.cnt++;
if (_local1.cnt > 10) {
if (_local1.vy > mcBall.dy) {
_local1.dest_x = ((mcBall.ax / mcBall.ay) * (_local1.vy - mcBall.vy)) + mcBall.vx;
_local1.dest_y = _local1.vy;
} else {
_local1.dest_x = mcBall.dx + (mcBall.ax * 5);
_local1.dest_y = mcBall.dy + (mcBall.ay * 5);
}
_local1.stat = PS_WAIT;
_local1.wm = WM_MOVE;
}
break;
}
}
function start_stroke_com(pn) {
var mc = eval ("mcPlayer" + pn);
mc.stat = PS_STROKE;
mc.cnt = 0;
var nx = (mcBall.vx + (mcBall.ax * 2));
if (((mcBall.vh > 70) && (nx > (mc.vx - HIT_X2_SMASH))) && (nx < (mc.vx - HIT_X1_SMASH))) {
mc.stroke_type = ST_SMASH;
mc.hit_x1 = -HIT_X2_SMASH;
mc.hit_x2 = -HIT_X1_SMASH;
mc.gotoAndStop("smash");
} else if ((mcBall.vx + (mcBall.ax * 3)) > mc.vx) {
mc.stroke_type = ST_BACK;
mc.hit_x1 = -HIT_X2_BACK;
mc.hit_x2 = -HIT_X1_BACK;
mc.gotoAndStop("back");
} else {
mc.stroke_type = ST_FORE;
mc.hit_x1 = -HIT_X2_FORE;
mc.hit_x2 = -HIT_X1_FORE;
mc.gotoAndStop("fore");
}
mc.hit_y1 = -HIT_Y2;
mc.hit_y2 = -HIT_Y1;
}
function set_ball_dest_com() {
var _local5 = Math.floor(Math.random() * 3);
var _local9 = Math.floor(Math.random() * 3);
var _local1;
var _local2;
var _local3;
var _local8;
if (rally_cnt == 0) {
if (serve_pos > 0) {
_local1 = -COURT_W;
_local2 = 0;
} else {
_local1 = 0;
_local2 = COURT_W;
}
_local3 = -SERVE_H;
_local8 = (-SERVE_H) / 2;
} else {
if (mcPlayer1.tech > (Math.random() * 10)) {
if (mcPlayer0.vx < 0) {
_local5 = 0;
} else {
_local5 = 2;
}
}
if (mcPlayer1.net_flg) {
_local9 = Math.floor(Math.random() * 2);
}
_local1 = -COURT_W;
_local2 = COURT_W;
_local3 = -COURT_H;
_local8 = (-COURT_H) / 3;
}
var _local11 = (_local2 - _local1) / 3;
var _local10 = (_local8 - _local3) / 3;
var _local7 = (_local1 + (_local11 * _local5)) + (Math.random() * _local11);
var _local6 = (_local3 + (_local10 * _local9)) + (Math.random() * _local10);
_local7 = _local7 * -1;
_local6 = _local6 * -1;
mc = mcPlayer1;
var _local4 = mc.forehand;
if (mcPlayer1.stroke_type == ST_BACK) {
_local4 = mc.backhand;
}
if (mcPlayer1.stroke_type == ST_SMASH) {
_local4 = mc.serve;
}
start_move_ball(_local7, _local6, 1, _local4);
}
function player_position(n) {
var mc = eval ("mcPlayer" + n);
var per = (1 + ((mc.vy / COURT_H) / 10));
var x = (mc.vx * per);
var y = (mc.vy / 2);
mc._x = SCREEN_OX + x;
mc._y = SCREEN_OY + y;
mc._xscale = 60 * per;
mc._yscale = 60 * per;
var mc2 = eval ("mcShadow" + n);
mc2._x = mc._x;
mc2._y = mc._y;
}
function init_ball() {
var mc = eval ("mcPlayer" + server);
mcBall.ax = 0;
mcBall.ay = 0;
mcBall.vx = mc.vx;
mcBall.vy = mc.vy;
mcBall.vh = 0;
mcBall.up = 0;
mcBall.down = 0;
mcBall.side = 0;
if (server == 0) {
mcBall.side = 1;
}
mcBall.area = 0;
if (server == 1) {
mcBall.area = 1;
}
mcBall.moving = 0;
mcBall._visible = false;
mcBallShadow._visible = false;
}
function start_toss_ball(pn) {
var mc = eval ("mcPlayer" + pn);
mcBall.ax = 0;
mcBall.ay = 0;
var ax = 10;
if (pn == 1) {
ax = ax * -1;
}
mcBall.vx = mc.vx + ax;
mcBall.vy = mc.vy;
mcBall.vh = TOSS_H;
mcBall.up = 10;
mcBall.down = 0;
mcBall.side = 0;
if (pn == 0) {
mcBall.side = 1;
}
mcBall.bound = 0;
mcBall.moving = 1;
mcBall._visible = true;
mcBallShadow._visible = true;
}
function start_move_ball(dx, dy, side, max_speed) {
if ((rally_cnt == 1) && (mcBall.bound == 0)) {
set_result(RESULT_VOLLEY);
}
mcBall.side = side;
mcBall.dx = dx;
mcBall.dy = dy;
var _local2 = mcBall.dx - mcBall.vx;
var _local3 = mcBall.dy - mcBall.vy;
var _local4 = Math.sqrt((_local2 * _local2) + (_local3 * _local3));
i = 0;
while (i < 5) {
var _local1 = max_speed - (i * 4);
if (check_hit_net(_local2, _local3, _local1, _local4) == 1) {
break;
}
i++;
}
var _local5 = _local4 / _local1;
var _local7 = ((_local5 * (_local5 - 1)) * GRAVITY) / 2;
mcBall.ax = _local2 / _local5;
mcBall.ay = _local3 / _local5;
mcBall.up = (_local7 - mcBall.vh) / _local5;
mcBall.down = 0;
mcBall.bound = 0;
rally_cnt++;
sndHit.start();
}
function check_hit_net(sx, sy, speed, dt) {
var _local6 = dt / speed;
var _local7 = ((_local6 * (_local6 - 1)) * GRAVITY) / 2;
var _local8 = sx / _local6;
var _local5 = sy / _local6;
var _local4 = (_local7 - mcBall.vh) / _local6;
var _local3 = 0;
var _local2 = mcBall.vy;
var _local1 = mcBall.vh;
while (true) {
_local1 = _local1 + (_local4 - _local3);
_local3 = _local3 + GRAVITY;
_local2 = _local2 + _local5;
if (_local1 < 0) {
return(0);
}
if ((mcBall.side == 0) && (_local2 < 0)) {
if (_local1 > (NET_H + 10)) {
return(1);
}
return(0);
}
if ((mcBall.side == 1) && (_local2 > 0)) {
if (_local1 > (NET_H + 10)) {
return(1);
}
return(0);
}
}
}
function move_ball() {
if (mcBall.moving != 1) {
return(undefined);
}
mcBall.vh = mcBall.vh + (mcBall.up - mcBall.down);
if (mcBall.vh < 0) {
mcBall.up = ((mcBall.down - mcBall.up) * 2) / 3;
if (mcBall.up < 1.3) {
mcBall.vh = 0;
mcBall.moving = 0;
}
mcBall.down = 0;
mcBall.vh = 0;
mcBall.ax = (mcBall.ax * 3) / 5;
mcBall.ay = (mcBall.ay * 3) / 5;
mcBall.bound++;
mcBall.vx = mcBall.vx + mcBall.ax;
mcBall.vy = mcBall.vy + mcBall.ay;
draw_ball();
mcBound._x = mcBall._x;
mcBound._y = mcBall._y;
mcBound.gotoAndStop(2);
if (mcBall.bound == 1) {
if (rally_cnt <= 1) {
if (check_out_serve()) {
set_result(RESULT_FAULT);
}
} else if (check_out()) {
set_result(RESULT_OUT);
}
} else if (mcBall.bound == 2) {
set_result(RESULT_MISS);
}
sndBound.start();
draw_ball();
} else {
mcBall.down = mcBall.down + GRAVITY;
mcBall.vx = mcBall.vx + mcBall.ax;
mcBall.vy = mcBall.vy + mcBall.ay;
draw_ball();
}
}
function draw_ball() {
var _local1 = 1 + ((mcBall.vy / COURT_H) / 10);
var _local2 = mcBall.vx * _local1;
var _local3 = mcBall.vy / 2;
var _local4 = mcBall.vh * _local1;
mcBall._x = SCREEN_OX + _local2;
mcBall._y = (SCREEN_OY + _local3) - _local4;
mcBall._xscale = 100 * _local1;
mcBall._yscale = 100 * _local1;
mcBallShadow._x = SCREEN_OX + _local2;
mcBallShadow._y = SCREEN_OY + _local3;
}
function check_out_serve() {
var _local1;
var _local3;
var _local2;
var _local4;
if (server == 0) {
if (serve_pos > 0) {
_local1 = -COURT_W;
_local2 = 0;
} else {
_local1 = 0;
_local2 = COURT_W;
}
_local3 = -SERVE_H;
_local4 = 0;
} else {
if (serve_pos > 0) {
_local1 = 0;
_local2 = COURT_W;
} else {
_local1 = -COURT_W;
_local2 = 0;
}
_local3 = 0;
_local4 = SERVE_H;
}
if (mcBall.vx < _local1) {
return(1);
}
if (mcBall.vx > _local2) {
return(1);
}
if (mcBall.vy < _local3) {
return(1);
}
if (mcBall.vy > _local4) {
return(1);
}
return(0);
}
function check_out() {
var _local3;
var _local1;
var _local4;
var _local2;
_local3 = -COURT_W;
_local4 = COURT_W;
if (mcBall.side == 0) {
_local1 = -COURT_H;
_local2 = 0;
} else {
_local1 = 0;
_local2 = COURT_H;
}
if (mcBall.vx < _local3) {
return(1);
}
if (mcBall.vx > _local4) {
return(1);
}
if (mcBall.vy < _local1) {
return(1);
}
if (mcBall.vy > _local2) {
return(1);
}
return(0);
}
function set_result(res) {
if (play_result > 0) {
return(undefined);
}
play_result = res;
switch (res) {
case RESULT_FAULT :
fault_cnt++;
if (fault_cnt == 1) {
mcMes.mes_txt = "FAULT";
} else {
mcMes.mes_txt = "DOUBLE FAULT";
play_winner = ((server == 0) ? 1 : 0);
}
mcMes.gotoAndStop("mes");
break;
case RESULT_OUT :
mcMes.mes_txt = "OUT";
play_winner = ((mcBall.side == 0) ? 1 : 0);
mcMes.gotoAndStop("mes");
break;
case RESULT_MISS :
if (_parent.match_mode == 1) {
sndApp.start();
}
play_winner = mcBall.side;
start_score();
break;
case RESULT_VOLLEY :
play_winner = server;
start_score();
}
}
function start_score() {
if (play_winner < 0) {
init_play();
return(undefined);
}
point[play_winner]++;
if (point[play_winner] > 3) {
if (point[0] == point[1]) {
score_txt = "DEUCE";
mcMes.mes_txt = score_txt;
mcMes.gotoAndStop("score");
} else if (Math.abs(point[0] - point[1]) <= 1) {
score_txt = "Advantage " + pname[play_winner];
mcMes.mes_txt = "Advantage " + pname[play_winner];
mcMes.gotoAndStop("score");
} else {
game_winner = play_winner;
gpoint[game_winner]++;
mcMes.mes_txt = "Game won by " + pname[play_winner];
mcMes.gotoAndStop("game");
mcPlayer0.stat = PS_AFTER;
mcPlayer0.gotoAndStop("win");
return(undefined);
}
} else {
var _local2 = point[server];
var _local3 = point[receiver];
var _local1 = [0, 15, 30, 40];
score_txt = (((((pname[server] + " ") + _local1[_local2]) + " - ") + _local1[_local3]) + " ") + pname[receiver];
mcMes.mes_txt = (_local1[_local2] + " - ") + _local1[_local3];
mcMes.gotoAndStop("score");
}
if (play_winner == 1) {
mcPlayer1.gotoAndStop("win");
mcPlayer1.stat = PS_AFTER;
} else {
mcPlayer1.gotoAndStop("lose");
mcPlayer1.stat = PS_AFTER;
}
}
function after_score() {
fault_cnt = 0;
play_winner = -1;
serve_pos = ((serve_pos == 1) ? -1 : 1);
init_play();
}
function after_game_winner() {
if ((gpoint[game_winner] >= 3) && (Math.abs(gpoint[0] - gpoint[1]) > 1)) {
if (_parent.match_mode == 1) {
sndApp2.start();
}
score_txt = "";
if (gpoint[0] > gpoint[1]) {
match_winner = 0;
mcMes.gotoAndStop("win");
} else {
match_winner = 1;
mcMes.gotoAndPlay("lose");
}
} else {
mcMes.gotoAndStop("inplay");
server = ((server == 0) ? 1 : 0);
receiver = ((server == 0) ? 1 : 0);
init_game();
}
}
function after_match() {
if (_parent.match_mode == 0) {
_parent.gotoAndStop("title");
} else if (match_winner == 0) {
_parent.result_txt[_parent.kaisen] = (((((pname[0] + " ") + gpoint[0]) + " - ") + gpoint[1]) + " ") + pname[1];
_parent.after_match();
} else {
_parent.gotoAndStop("title");
}
}
function end_match_quit() {
_parent.gotoAndStop("title");
}
stop();
sndBound = new Sound();
sndBound.attachSound("Bound.wav");
sndHit = new Sound();
sndHit.attachSound("Hit.wav");
sndApp = new Sound();
sndApp.attachSound("app.wav");
sndApp2 = new Sound();
sndApp2.attachSound("app2.wav");
COURT_W = 180;
COURT_H = 360;
SERVE_H = 200;
SCREEN_OX = 300;
SCREEN_OY = 300;
mcNet._y = SCREEN_OY;
NET_H = 40;
TOSS_H = 50;
GRAVITY = 0.8;
PS_WAIT = 1;
PS_MOVE = 2;
PS_STROKE = 3;
PS_SERVE = 4;
PS_TOSS = 5;
PS_FREEZE = 6;
PS_AFTER = 7;
ST_FORE = 1;
ST_BACK = 2;
ST_SMASH = 3;
HIT_X1_FORE = -10;
HIT_X2_FORE = 60;
HIT_X1_BACK = -60;
HIT_X2_BACK = 10;
HIT_X1_SMASH = -30;
HIT_X2_SMASH = 50;
HIT_Y1 = -120;
HIT_Y2 = 80;
HIT_Z = 120;
WM_WAIT = 1;
WM_MOVE = 2;
RESULT_FAULT = 1;
RESULT_OUT = 2;
RESULT_MISS = 3;
RESULT_VOLLEY = 4;
pname = new Array(2);
i = 0;
while (i < 2) {
pname[i] = _parent.pname[i];
mc = eval ("mcPlayer" + i);
mc.forehand = 20 + (1 * _parent.player_data[i][0]);
mc.backhand = 20 + (0.5 * _parent.player_data[i][1]);
mc.serve = 30 + (3 * _parent.player_data[i][2]);
mc.footwork = 6 + (0.3 * _parent.player_data[i][3]);
mc.netplay = _parent.player_data[i][4];
mc.tech = _parent.player_data[i][5];
i++;
}
server = 0;
receiver = 1;
gpoint = [0, 0];
init_game();
onEnterFrame = function () {
user_action();
move_enemy();
move_ball();
};
Symbol 465 MovieClip Frame 1
stop();
onEnterFrame = function () {
if (Key.isDown(32)) {
delete onEnterFrame;
gotoAndPlay (2);
}
};
Symbol 465 MovieClip Frame 13
stop();
_parent.after_space();
Symbol 466 MovieClip Frame 1
stop();
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt > 30) {
delete onEnterFrame;
nextFrame();
}
};
Symbol 466 MovieClip Frame 2
stop();
mcCongra._alpha = 100;
onEnterFrame = function () {
mcCongra._alpha = mcCongra._alpha - 1;
if (mcCongra._alpha <= 0) {
delete onEnterFrame;
nextFrame();
}
};
Symbol 466 MovieClip Frame 3
stop();
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt > 200) {
delete onEnterFrame;
nextFrame();
}
};
Symbol 466 MovieClip Frame 4
stop();
mcCongra._alpha = 0;
onEnterFrame = function () {
mcCongra._alpha = mcCongra._alpha + 2;
if (mcCongra._alpha >= 100) {
delete onEnterFrame;
gotoAndPlay(_currentframe + 1);
}
};
Symbol 466 MovieClip Frame 6
stop();
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt > 30) {
delete onEnterFrame;
nextFrame();
}
};
Symbol 466 MovieClip Frame 7
stop();
cnt = 0;
onEnterFrame = function () {
cnt++;
if (cnt > 30) {
delete onEnterFrame;
nextFrame();
}
};
Symbol 466 MovieClip Frame 8
stop();
mcMes.mes0 = _parent.result_txt[0];
mcMes.mes1 = _parent.result_txt[1];
mcMes.mes2 = _parent.result_txt[2];
mcMes.mes3 = _parent.result_txt[3];
mcMes.mes0 = "1st MATCH";
stat = 0;
lap = 0;
onEnterFrame = function () {
switch (stat) {
case 0 :
switch (lap) {
case 0 :
mcMes.mes0 = "1st MATCH";
mcMes.mes1 = _parent.result_txt[0];
break;
case 1 :
mcMes.mes0 = "2nd MATCH";
mcMes.mes1 = _parent.result_txt[1];
break;
case 2 :
mcMes.mes0 = "SEMI FINAL";
mcMes.mes1 = _parent.result_txt[2];
break;
case 3 :
mcMes.mes0 = "FINAL MATCH";
mcMes.mes1 = _parent.result_txt[3];
break;
case 4 :
mcMes.mes0 = "Thank you";
mcMes.mes1 = "for playing!";
break;
case 5 :
mcMes.mes0 = "Created by";
mcMes.mes1 = "MINIJUEGOS";
}
mcMes._y = 380;
stat = 1;
break;
case 1 :
mcMes._y--;
if (lap == 5) {
if (mcMes._y < 260) {
delete onEnterFrame;
nextFrame();
}
}
if (mcMes._y >= 140) {
break;
}
stat = 0;
lap++;
}
};
Symbol 466 MovieClip Frame 9
function after_space() {
getURL ("http://www.minijuegos.com/");
}
stop();
Instance of Symbol 465 MovieClip in Symbol 466 MovieClip Frame 9
/* no clip actions */
Symbol 467 MovieClip Frame 2
function tdat_shuffle(pn) {
user_player = pn;
var tmp;
if (pn > 0) {
tmp = eval ("tdat" + pn);
this["tdat" + pn] = tdat0;
tdat0 = tmp;
}
i = 1;
while (i < 16) {
r = 1 + Math.floor(Math.random() * 15);
tmp = eval ("tdat" + i);
this["tdat" + i] = eval ("tdat" + r);
this["tdat" + r] = tmp;
i++;
}
}
stop();
pname = ["BOX-BOY", "BOX-GIRL"];
player_data = [[5, 3, 6, 4, 0, 0], [4, 5, 4, 5, 5, 0]];
tdat0 = "LOSPETERSELLERS";
tdat1 = "LOSPETERSELLERS";
tdat2 = "LOSPETERSELLERS";
tdat3 = "LOSPETERSELLERS";
tdat4 = "LOSPETERSELLERS";
tdat5 = "LOSPETERSELLERS";
tdat6 = "LOSPETERSELLERS";
tdat7 = "LOSPETERSELLERS";
tdat8 = "LOSPETERSELLERS";
tdat9 = "LOSPETERSELLERS";
tdat10 = "LOSPETERSELLERS";
tdat11 = "LOSPETERSELLERS";
tdat12 = "LOSPETERSELLERS";
tdat13 = "LOSPETERSELLERS";
tdat14 = "LOSPETERSELLERS";
tdat15 = "LOSPETERSELLERS";
Symbol 467 MovieClip Frame 3
stop();
match_mode = 0;
Symbol 467 MovieClip Frame 12
stop();
Symbol 467 MovieClip Frame 20
stop();