Frame 1
//if(){}
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
if (loaded == total) {
gotoAndPlay (1);
}
Frame 2
//if(){}
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
bar._xscale = (loaded / total) * 100;
if (loaded == total) {
gotoAndPlay (4);
}
Frame 3
//if(){}
gotoAndPlay (2);
Frame 4
//if(){}
function plesk() {
_root.pleskClip.gotoAndPlay(2);
}
function anim_re(hlavni, podmov, pocet) {
if (eval (hlavni add podmov)._currentframe == 1) {
eval (hlavni add podmov).gotoandstop(pocet);
} else {
eval (hlavni add podmov).prevframe();
}
}
function anim_fw(hlavni, podmov, pocet) {
if (eval (hlavni add podmov)._currentframe == pocet) {
eval (hlavni add podmov).gotoandstop(1);
} else {
eval (hlavni add podmov).nextframe();
}
}
function toRad(cislo) {
nuhel = (Math.PI * cislo) / 180;
return(nuhel);
}
function toDeg(cislo) {
nuhel = (180 * cislo) / Math.PI;
return(nuhel);
}
function delka(dx, dy) {
vel = Math.sqrt((dx * dx) + (dy * dy));
return(vel);
}
function uhel(dx, dy, delka) {
uhel_rad = Math.acos(dx / delka);
uhel_pom = _root.toDeg(uhel_rad);
if (dy <= 0) {
uhel_rig = uhel_pom;
} else {
uhel_rig = 360 - uhel_pom;
}
return(uhel_rig);
}
function uhel_kor(uhel) {
if (uhel > 360) {
uhel = uhel - 360;
}
if (uhel < 0) {
uhel = uhel + 360;
}
return(uhel);
}
function nova_x(uhel, delka) {
uhel_pom = _root.toRad(uhel) * -1;
n = delka * Math.cos(uhel_pom);
return(n);
}
function nova_y(uhel, delka) {
uhel_pom = _root.toRad(uhel) * -1;
n = delka * Math.sin(uhel_pom);
return(n);
}
function mark(cis) {
if (cis < 0) {
ma = -1;
} else {
ma = 1;
}
return(ma);
}
compJahodak = true;
compMalinak = true;
jump = true;
comp = true;
malina = 0;
jahoda = 0;
stopAll = false;
doAction = 0;
Instance of Symbol 56 MovieClip "malinak" in Frame 4
onClipEvent (load) {
//if(){}
prava = false;
leva = false;
horni = false;
dist = 30;
posun = 6;
plocha_x = 500;
plocha_y = 375;
old_speed = -25;
wait_t = 250;
speed = old_speed;
friction = 0.98;
poc_y = _y;
waiting = false;
wait_c = 0;
if (amMalinak) {
mkRight = 39;
mkLeft = 37;
mkUp = 38;
} else {
mkRight = 68;
mkLeft = 65;
mkUp = 87;
}
}
onClipEvent (enterFrame) {
//if(){}
if (wait_c == wait_t) {
waiting = true;
} else {
wait_c++;
waiting = false;
}
if (horni) {
if ((walk._visible == true) or (wait._visible == true)) {
walk._visible = false;
jump._visible = true;
wait._visible = false;
}
_root.anim_fw(_target, ".jump", 25);
this._y = this._y + speed;
speed = speed * friction;
if (speed > 0) {
speed = speed * 1.3;
} else if (Math.round(speed) == 0) {
speed = 1;
} else if (speed < 0) {
speed = speed * 0.7;
}
if (_y > poc_y) {
_y = poc_y;
speed = old_speed;
horni = false;
}
if (amMalinak) {
if (prava and (_x < (plocha_x - dist))) {
_x = (_x + posun);
}
if (leva and (_x > ((plocha_x / 2) + dist))) {
_x = (_x - posun);
}
} else {
if (prava and (_x < ((plocha_x / 2) - dist))) {
_x = (_x + posun);
}
if (leva and (_x > dist)) {
_x = (_x - posun);
}
}
} else if (waiting) {
if ((walk._visible == true) or (jump._visible == true)) {
walk._visible = false;
jump._visible = false;
wait._visible = true;
}
_root.anim_fw(_target, ".wait", 9);
} else {
if ((jump._visible == true) or (wait._visible == true)) {
walk._visible = true;
jump._visible = false;
wait._visible = false;
}
if (amMalinak) {
if (prava and (_x < (plocha_x - dist))) {
_x = (_x + posun);
_root.anim_re(_target, ".walk", 12);
}
if (leva and (_x > ((plocha_x / 2) + dist))) {
_x = (_x - posun);
_root.anim_fw(_target, ".walk", 12);
}
} else {
if (prava and (_x < ((plocha_x / 2) - dist))) {
_x = (_x + posun);
_root.anim_fw(_target, ".walk", 12);
}
if (leva and (_x > dist)) {
_x = (_x - posun);
_root.anim_re(_target, ".walk", 12);
}
}
}
if (amMalinak) {
_parent.mfield._x = _x;
_parent.mfield._y = _y;
} else {
_parent.jfield._x = _x;
_parent.jfield._y = _y;
}
}
onClipEvent (keyDown) {
//if(){}
if (!_root.stopAll) {
if (((Key.isDown(39) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(68) and (!_root.compJahodak)) and amJahodak)) {
prava = true;
wait_c = 0;
}
if (((Key.isDown(37) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(65) and (!_root.compJahodak)) and amJahodak)) {
leva = true;
wait_c = 0;
}
if (((Key.isDown(38) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(87) and (!_root.compJahodak)) and amJahodak)) {
horni = true;
wait_c = 0;
}
}
}
onClipEvent (keyUp) {
//if(){}
if (!_root.stopAll) {
if (((Key.isDown(39) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(68) and (!_root.compJahodak)) and amJahodak)) {
prava = true;
} else {
prava = false;
if (_root.stopStep) {
walk.gotoAndStop(1);
}
}
if (((Key.isDown(37) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(65) and (!_root.compJahodak)) and amJahodak)) {
leva = true;
} else {
leva = false;
if (_root.stopStep) {
walk.gotoAndStop(1);
}
}
}
}
Instance of Symbol 91 MovieClip "jahodak" in Frame 4
onClipEvent (load) {
//if(){}
prava = false;
leva = false;
horni = false;
dist = 30;
posun = 6;
plocha_x = 500;
plocha_y = 375;
old_speed = -25;
wait_t = 250;
speed = old_speed;
friction = 0.98;
poc_y = _y;
waiting = false;
wait_c = 0;
if (amMalinak) {
mkRight = 39;
mkLeft = 37;
mkUp = 38;
} else {
mkRight = 68;
mkLeft = 65;
mkUp = 87;
}
}
onClipEvent (enterFrame) {
//if(){}
if (wait_c == wait_t) {
waiting = true;
} else {
wait_c++;
waiting = false;
}
if (horni) {
if ((walk._visible == true) or (wait._visible == true)) {
walk._visible = false;
jump._visible = true;
wait._visible = false;
}
_root.anim_fw(_target, ".jump", 25);
this._y = this._y + speed;
speed = speed * friction;
if (speed > 0) {
speed = speed * 1.3;
} else if (Math.round(speed) == 0) {
speed = 1;
} else if (speed < 0) {
speed = speed * 0.7;
}
if (_y > poc_y) {
_y = poc_y;
speed = old_speed;
horni = false;
}
if (amMalinak) {
if (prava and (_x < (plocha_x - dist))) {
_x = (_x + posun);
}
if (leva and (_x > ((plocha_x / 2) + dist))) {
_x = (_x - posun);
}
} else {
if (prava and (_x < ((plocha_x / 2) - dist))) {
_x = (_x + posun);
}
if (leva and (_x > dist)) {
_x = (_x - posun);
}
}
} else if (waiting) {
if ((walk._visible == true) or (jump._visible == true)) {
walk._visible = false;
jump._visible = false;
wait._visible = true;
}
_root.anim_fw(_target, ".wait", 9);
} else {
if ((jump._visible == true) or (wait._visible == true)) {
walk._visible = true;
jump._visible = false;
wait._visible = false;
}
if (amMalinak) {
if (prava and (_x < (plocha_x - dist))) {
_x = (_x + posun);
_root.anim_re(_target, ".walk", 12);
}
if (leva and (_x > ((plocha_x / 2) + dist))) {
_x = (_x - posun);
_root.anim_fw(_target, ".walk", 12);
}
} else {
if (prava and (_x < ((plocha_x / 2) - dist))) {
_x = (_x + posun);
_root.anim_fw(_target, ".walk", 12);
}
if (leva and (_x > dist)) {
_x = (_x - posun);
_root.anim_re(_target, ".walk", 12);
}
}
}
if (amMalinak) {
_parent.mfield._x = _x;
_parent.mfield._y = _y;
} else {
_parent.jfield._x = _x;
_parent.jfield._y = _y;
}
}
onClipEvent (keyDown) {
//if(){}
if (!_root.stopAll) {
if (((Key.isDown(39) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(68) and (!_root.compJahodak)) and amJahodak)) {
prava = true;
wait_c = 0;
}
if (((Key.isDown(37) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(65) and (!_root.compJahodak)) and amJahodak)) {
leva = true;
wait_c = 0;
}
if (((Key.isDown(38) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(87) and (!_root.compJahodak)) and amJahodak)) {
horni = true;
wait_c = 0;
}
}
}
onClipEvent (keyUp) {
//if(){}
if (!_root.stopAll) {
if (((Key.isDown(39) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(68) and (!_root.compJahodak)) and amJahodak)) {
prava = true;
} else {
prava = false;
if (_root.stopStep) {
walk.gotoAndStop(1);
}
}
if (((Key.isDown(37) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(65) and (!_root.compJahodak)) and amJahodak)) {
leva = true;
} else {
leva = false;
if (_root.stopStep) {
walk.gotoAndStop(1);
}
}
}
}
Instance of Symbol 93 MovieClip "ball" in Frame 4
onClipEvent (load) {
//if(){}
bounds = new Object();
bounds.left = 0;
bounds.right = 500;
bounds.top = _height / 2;
bounds.bottom = 375;
speed = new Object();
speed.x = 0;
speed.y = 0;
ball = new Object();
ball.x = _x;
ball.y = _y;
ball.h = _height;
ball.w = _width;
radius = ((ball.h + ball.w) / 2) / 2;
alfa = 0;
_alpha = alfa;
mizik = "in";
reset = false;
friction = 0.99;
grav = 0.1;
poz_x = (poz_y = (old_poz_x = (old_poz_y = 0)));
pole_x = (pole_y = 0);
kontr = 1;
ccc = 0;
x_sig = 1;
y_sig = 1;
rotace = 0;
d_alfa = 0;
sit_h = _parent.net._height;
max_h = bounds.bottom - sit_h;
hit_ground = 0;
hit_net = 0;
hit_top = 0;
hit_jahoda = 0;
hit_malina = 0;
hit_body = 0;
bod_jahoda = "";
bod_malina = "";
move = false;
zpozdeni = false;
count = 0;
pom = random(2) + 1;
_y = 216;
if (pom == 1) {
_x = 377.2;
} else {
_x = 120.8;
}
}
onClipEvent (enterFrame) {
//if(){}
if (!_root.stopAll) {
old_poz_x = _x;
old_poz_y = _y;
if (move) {
_x = (_x + speed.x);
_y = (_y + speed.y);
}
speed.x = speed.x * friction;
speed.y = speed.y * friction;
rotace = rotace * 0.99;
_rotation = rotace;
if (speed.y > 0) {
speed.y = speed.y * (1 + grav);
} else if (speed.y == 0) {
speed.y = 1;
} else if (speed.y < 0) {
speed.y = speed.y * (1 - grav);
}
if (((speed.y < 2) && (speed.y > -2)) && (_y < (bounds.bottom - 2))) {
speed.y = 2;
}
if ((speed.y == 2) && (_y > (bounds.bottom - 3))) {
speed.y = 0;
_y = bounds.bottom;
}
poz_x = _x;
poz_y = _y;
t_speed_x = speed.x;
t_speed_y = speed.y;
t_x = _x;
t_y = _y;
iterations = 0;
while ((t_y < 170) and (iterations < 50)) {
t_x = t_x + t_speed_x;
t_y = t_y + t_speed_y;
t_speed_x = t_speed_x * friction;
t_speed_y = t_speed_y * friction;
if (t_speed_y > 0) {
t_speed_y = t_speed_y * (1 + grav);
} else {
t_speed_y = t_speed_y * (1 - grav);
}
if (t_x < (ball.w / 2)) {
t_speed_x = t_speed_x * -1;
}
iterations++;
}
if ((mizik != "in") and (mizik != "out")) {
if ((_parent.mfield.hitTest(_x, _y, true) or _parent.jfield.hitTest(_x, _y, true)) and (kontr == 1)) {
kontr = 0;
move = true;
mic_dx = poz_x - old_poz_x;
mic_dy = poz_y - old_poz_y;
loop = 0;
while (loop < 20) {
tx = old_poz_x + ((mic_dx / 20) * loop);
ty = old_poz_y + ((mic_dy / 20) * loop);
if (_parent.mfield.hitTest(tx, ty, true)) {
poz_x = tx;
poz_y = ty;
break;
}
if (_parent.jfield.hitTest(tx, ty, true)) {
poz_x = tx;
pox_y = ty;
break;
}
loop++;
}
_x = poz_x;
_y = poz_y;
mic_dx = poz_x - old_poz_x;
mic_dy = poz_y - old_poz_y;
if (mic_dy == 0) {
mic_dy = 7;
}
mic_vel = _root.delka(mic_dx, mic_dy);
mic_alfa = _root.uhel(mic_dx, mic_dy, mic_vel);
if (_parent.mfield.hitTest(_x, _y, true)) {
hit_malina++;
hit_jahoda = 0;
dop_dx = poz_x - _parent.mfield._x;
dop_dy = poz_y - _parent.mfield._y;
dop_vel = _root.delka(dop_dx, dop_dy);
dop_alfa = _root.uhel(dop_dx, dop_dy, dop_vel);
dop_alfa_ko = _root.uhel_kor(dop_alfa + 180);
_root.changeScore(1, 2);
}
if (_parent.jfield.hitTest(_x, _y, true)) {
hit_jahoda++;
hit_malina = 0;
dop_dx = poz_x - _parent.jfield._x;
dop_dy = poz_y - _parent.jfield._y;
dop_vel = _root.delka(dop_dx, dop_dy);
dop_alfa = _root.uhel(dop_dx, dop_dy, dop_vel);
dop_alfa_ko = _root.uhel_kor(dop_alfa + 180);
_root.changeScore(2, 2);
}
if (((mic_alfa > 0) and (mic_alfa < 180)) or (dop_dy > 0)) {
hit_body = 1;
mizik = "out";
reset_x = _x;
}
d_alfa = dop_alfa_ko - mic_alfa;
n_alfa = dop_alfa + d_alfa;
if (n_alfa < 90) {
n_alfa = 90 - ((90 - n_alfa) * 0.7);
} else {
n_alfa = ((n_alfa - 90) * 0.7) + 90;
}
rotace = (d_alfa * 100) + random(90);
nx = _root.nova_x(n_alfa, dop_vel) + poz_x;
ny = _root.nova_y(n_alfa, dop_vel) + poz_y;
_x = nx;
_y = ny;
old_poz_x = poz_x;
old_poz_y = poz_y;
poz_x = _x;
poz_y = _y;
x_sig = _root.mark(nx - dop_dx);
y_sig = _root.mark(ny - dop_dy);
snx = _root.nova_x(n_alfa, 20);
sny = _root.nova_y(n_alfa, 20);
speed.x = snx * x_sig;
speed.y = sny * y_sig;
_root.plesk();
}
if (kontr == 0) {
ccc++;
if (ccc == 8) {
ccc = 0;
kontr = 1;
}
}
sit_l = (bounds.right / 2) - radius;
sit_r = (bounds.right / 2) + radius;
if (_x < (bounds.left + radius)) {
speed.x = speed.x * -1;
_x = (bounds.left + radius);
rotace = rotace * -1;
_root.plesk();
} else if (_x > (bounds.right - radius)) {
speed.x = speed.x * -1;
_x = (bounds.right - radius);
rotace = rotace * -1;
_root.plesk();
} else if (_y < ((bounds.top + radius) - 200)) {
speed.y = speed.y * -1;
_y = (bounds.top + radius);
rotace = rotace * -1;
_root.plesk();
} else if (_y > (bounds.bottom - radius)) {
speed.y = speed.y * -1;
_y = (bounds.bottom - radius);
rotace = rotace * -1;
hit_ground = 1;
mizik = "out";
reset_x = _x;
_root.plesk();
} else if (((poz_x > sit_l) and (old_poz_x <= sit_l)) and ((poz_y + (ball.h / 2)) > max_h)) {
speed.x = speed.x * -1;
_x = ((bounds.right / 2) - radius);
_root.plesk();
} else if (((poz_x < sit_r) and (old_poz_x >= sit_r)) and ((poz_y + (ball.h / 2)) > max_h)) {
speed.x = speed.x * -1;
_x = ((bounds.right / 2) + radius);
_root.plesk();
} else if (((poz_x > ((bounds.right / 2) - radius)) and (poz_x < ((bounds.right / 2) + radius))) and (poz_y > (max_h - radius))) {
speed.y = speed.y * -1;
_y = (max_h - radius);
_root.plesk();
}
if ((hit_jahoda > 3) or (hit_malina > 3)) {
mizik = "out";
reset_x = _x;
}
}
if (mizik == "in") {
if (alfa < 100) {
alfa = alfa + 10;
_alpha = alfa;
}
if (alfa == 100) {
mizik = "nic";
}
}
if (mizik == "out") {
if (alfa > 0) {
alfa = alfa - 20;
_alpha = alfa;
}
if (alfa == 0) {
mizik = "nic";
reset = true;
}
}
if (reset) {
reset = false;
zpozdeni = true;
_root.jump = false;
speed.x = 0;
speed.y = 0;
move = false;
rotace = 0;
_rotation = rotace;
_y = 100;
_x = reset_x;
if (((hit_jahoda > 3) and (hit_ground == 0)) and (hit_net == 0)) {
_x = 377.2;
_root.changeScore(1, 1);
} else if (((hit_malina > 3) and (hit_ground == 0)) and (hit_net == 0)) {
_x = 120.8;
_root.changeScore(2, 1);
} else if ((((hit_ground == 1) and (hit_jahoda > 0)) and (_x < (bounds.right / 2))) or (((hit_ground == 1) and (hit_malina > 0)) and (_x < (bounds.right / 2)))) {
_x = 377.2;
_root.changeScore(1, 1);
} else if ((((hit_ground == 1) and (hit_malina > 0)) and (_x > (bounds.right / 2))) or (((hit_ground == 1) and (hit_jahoda > 0)) and (_x > (bounds.right / 2)))) {
_x = 120.8;
_root.changeScore(2, 1);
} else if ((((hit_net == 1) and (hit_jahoda > 0)) and (_x < (bounds.right / 2))) or ((((hit_net == 1) and (hit_malina > 0)) and (hit_jahoda == 0)) and (_x < (bounds.right / 2)))) {
_x = 377.2;
_root.changeScore(1, 1);
} else if ((((hit_net == 1) and (hit_malina > 0)) and (_x > (bounds.right / 2))) or ((((hit_net == 1) and (hit_jahoda > 0)) and (hit_malina == 0)) and (_x > (bounds.right / 2)))) {
_x = 120.8;
_root.changeScore(2, 1);
} else if ((hit_top == 1) and (hit_jahoda > 0)) {
_x = 377.2;
_root.changeScore(1, 1);
} else if ((hit_top == 1) and (hit_malina > 0)) {
_x = 120.8;
_root.changeScore(2, 1);
} else if ((hit_body == 1) and (_x < (bounds.right / 2))) {
_x = 377.2;
_root.changeScore(1, 1);
} else if ((hit_body == 1) and (_x > (bounds.right / 2))) {
_x = 120.8;
_root.changeScore(2, 1);
} else {
trace("random...");
pom = random(2) + 1;
if (pom == 1) {
_x = 377.2;
} else {
_x = 120.8;
}
}
hit_ground = 0;
hit_net = 0;
hit_top = 0;
hit_jahoda = 0;
hit_malina = 0;
hit_body = 0;
}
if (zpozdeni) {
if ((!_parent.jahodak.horni) and (!_parent.malinak.horni)) {
count++;
}
if (count == 25) {
mizik = "in";
_y = 216;
count = 0;
zpozdeni = false;
_root.jump = true;
}
}
poz_x = _x;
poz_y = _y;
}
}
Instance of Symbol 97 MovieClip "cml" in Frame 4
onClipEvent (load) {
//if(){}
podani = true;
setPlayer = 1;
}
onClipEvent (enterFrame) {
//if(){}
if (!_root.stopAll) {
targ_x = _parent.ball.t_x;
normalaction = true;
if (setPlayer == 1) {
player = _root.jahodak;
myfield = _parent.ball._x < 250;
myball = targ_x < 250;
odpS = 15;
} else {
player = _root.malinak;
myfield = _parent.ball._x > 250;
myball = targ_x > 250;
odpS = 25;
}
saveLeva = player.leva;
savePrava = player.prava;
if (_parent.ball.zpozdeni or (_parent.ball._alpha < 100)) {
normalaction = false;
}
if ((((_parent.ball._y > 150) and myfield) and (!_parent.ball.move)) and normalaction) {
normalaction = false;
if (!naSel) {
odpal_x = ((((Math.round(Math.random()) * 40) - odpS) + _parent.ball._x) + Math.round(Math.random() * 10)) - 5;
naSel = true;
waitcount = 0;
} else if (Math.round(odpal_x / 6) == Math.round(player._x / 6)) {
player.leva = false;
player.prava = false;
waitcount++;
if (waitcount == 10) {
naSel = false;
player.horni = true;
player.wait_c = 0;
}
} else {
player.leva = odpal_x < player._x;
player.prava = odpal_x > player._x;
player.wait_c = 0;
}
}
if (Math.abs(_parent.ball.speed.x) < 2) {
bDist = 10;
} else if (Math.abs(_parent.ball.speed.x) > 15) {
bDist = _parent.ball.speed.x;
} else {
bDist = 5;
}
if (setPlayer == 2) {
bDist = bDist * -1;
}
if (_root.handicap and (!myfield)) {
normalaction = false;
}
if (normalaction) {
if (((targ_x - bDist) < (player._x - 6)) and myball) {
player.leva = true;
player.wait_c = 0;
} else {
player.leva = false;
}
if (((targ_x - bDist) > (player._x + 6)) and myball) {
player.prava = true;
player.wait_c = 0;
} else {
player.prava = false;
}
if ((_parent.ball._y > 150) and myfield) {
player.horni = true;
player.wait_c = 0;
}
}
if (_root.stopStep) {
if ((saveLeva and (!player.leva)) or (savePrava and (!player.prava))) {
player.walk.gotoAndStop(1);
}
}
}
}
Instance of Symbol 97 MovieClip "cml" in Frame 4
onClipEvent (load) {
//if(){}
setPlayer = 2;
}
onClipEvent (enterFrame) {
//if(){}
if (!_root.stopAll) {
targ_x = _parent.ball.t_x;
normalaction = true;
if (setPlayer == 1) {
player = _root.jahodak;
myfield = _parent.ball._x < 250;
myball = targ_x < 250;
odpS = 15;
} else {
player = _root.malinak;
myfield = _parent.ball._x > 250;
myball = targ_x > 250;
odpS = 25;
}
saveLeva = player.leva;
savePrava = player.prava;
if (_parent.ball.zpozdeni or (_parent.ball._alpha < 100)) {
normalaction = false;
}
if ((((_parent.ball._y > 150) and myfield) and (!_parent.ball.move)) and normalaction) {
normalaction = false;
if (!naSel) {
odpal_x = ((((Math.round(Math.random()) * 40) - odpS) + _parent.ball._x) + Math.round(Math.random() * 10)) - 5;
naSel = true;
waitcount = 0;
} else if (Math.round(odpal_x / 6) == Math.round(player._x / 6)) {
player.leva = false;
player.prava = false;
waitcount++;
if (waitcount == 10) {
naSel = false;
player.horni = true;
player.wait_c = 0;
}
} else {
player.leva = odpal_x < player._x;
player.prava = odpal_x > player._x;
player.wait_c = 0;
}
}
if (Math.abs(_parent.ball.speed.x) < 2) {
bDist = 10;
} else if (Math.abs(_parent.ball.speed.x) > 15) {
bDist = _parent.ball.speed.x;
} else {
bDist = 5;
}
if (setPlayer == 2) {
bDist = bDist * -1;
}
if (_root.handicap and (!myfield)) {
normalaction = false;
}
if (normalaction) {
if (((targ_x - bDist) < (player._x - 6)) and myball) {
player.leva = true;
player.wait_c = 0;
} else {
player.leva = false;
}
if (((targ_x - bDist) > (player._x + 6)) and myball) {
player.prava = true;
player.wait_c = 0;
} else {
player.prava = false;
}
if ((_parent.ball._y > 150) and myfield) {
player.horni = true;
player.wait_c = 0;
}
}
if (_root.stopStep) {
if ((saveLeva and (!player.leva)) or (savePrava and (!player.prava))) {
player.walk.gotoAndStop(1);
}
}
}
}
Frame 5
//if(){}
if (doAction == 1) {
gotoAndPlay (7);
doAction = 0;
}
if (doAction == 2) {
gotoAndPlay (10);
doAction = 0;
}
Frame 6
//if(){}
gotoAndPlay (5);
Frame 7
//if(){}
function plesk() {
_root.pleskClip.gotoAndPlay(2);
}
function anim_re(hlavni, podmov, pocet) {
if (eval (hlavni add podmov)._currentframe == 1) {
eval (hlavni add podmov).gotoandstop(pocet);
} else {
eval (hlavni add podmov).prevframe();
}
}
function anim_fw(hlavni, podmov, pocet) {
if (eval (hlavni add podmov)._currentframe == pocet) {
eval (hlavni add podmov).gotoandstop(1);
} else {
eval (hlavni add podmov).nextframe();
}
}
function toRad(cislo) {
nuhel = (Math.PI * cislo) / 180;
return(nuhel);
}
function toDeg(cislo) {
nuhel = (180 * cislo) / Math.PI;
return(nuhel);
}
function delka(dx, dy) {
vel = Math.sqrt((dx * dx) + (dy * dy));
return(vel);
}
function uhel(dx, dy, delka) {
uhel_rad = Math.acos(dx / delka);
uhel_pom = _root.toDeg(uhel_rad);
if (dy <= 0) {
uhel_rig = uhel_pom;
} else {
uhel_rig = 360 - uhel_pom;
}
return(uhel_rig);
}
function uhel_kor(uhel) {
if (uhel > 360) {
uhel = uhel - 360;
}
if (uhel < 0) {
uhel = uhel + 360;
}
return(uhel);
}
function nova_x(uhel, delka) {
uhel_pom = _root.toRad(uhel) * -1;
n = delka * Math.cos(uhel_pom);
return(n);
}
function nova_y(uhel, delka) {
uhel_pom = _root.toRad(uhel) * -1;
n = delka * Math.sin(uhel_pom);
return(n);
}
function mark(cis) {
if (cis < 0) {
ma = -1;
} else {
ma = 1;
}
return(ma);
}
function changeScore(player, typ) {
if (typ == 1) {
points = scoreLostBall;
} else {
points = scoreHit;
}
if (player == 1) {
malina = malina + points;
} else {
jahoda = jahoda + points;
}
if (malina >= scoreEnd) {
_root.stopAll = true;
gameover.gotoAndStop(2);
}
if (jahoda >= scoreEnd) {
_root.stopAll = true;
gameover.gotoAndStop(3);
}
}
compJahodak = false;
compMalinak = false;
jump = true;
comp = true;
malina = 0;
jahoda = 0;
stopAll = false;
scoreLostBall = 1;
scoreHit = 0;
scoreEnd = 15;
stopStep = true;
Instance of Symbol 56 MovieClip "malinak" in Frame 7
onClipEvent (load) {
//if(){}
prava = false;
leva = false;
horni = false;
dist = 30;
posun = 6;
plocha_x = 500;
plocha_y = 375;
old_speed = -25;
wait_t = 250;
speed = old_speed;
friction = 0.98;
poc_y = _y;
waiting = false;
wait_c = 0;
if (amMalinak) {
mkRight = 39;
mkLeft = 37;
mkUp = 38;
} else {
mkRight = 68;
mkLeft = 65;
mkUp = 87;
}
}
onClipEvent (enterFrame) {
//if(){}
if (wait_c == wait_t) {
waiting = true;
} else {
wait_c++;
waiting = false;
}
if (horni) {
if ((walk._visible == true) or (wait._visible == true)) {
walk._visible = false;
jump._visible = true;
wait._visible = false;
}
_root.anim_fw(_target, ".jump", 25);
this._y = this._y + speed;
speed = speed * friction;
if (speed > 0) {
speed = speed * 1.3;
} else if (Math.round(speed) == 0) {
speed = 1;
} else if (speed < 0) {
speed = speed * 0.7;
}
if (_y > poc_y) {
_y = poc_y;
speed = old_speed;
horni = false;
}
if (amMalinak) {
if (prava and (_x < (plocha_x - dist))) {
_x = (_x + posun);
}
if (leva and (_x > ((plocha_x / 2) + dist))) {
_x = (_x - posun);
}
} else {
if (prava and (_x < ((plocha_x / 2) - dist))) {
_x = (_x + posun);
}
if (leva and (_x > dist)) {
_x = (_x - posun);
}
}
} else if (waiting) {
if ((walk._visible == true) or (jump._visible == true)) {
walk._visible = false;
jump._visible = false;
wait._visible = true;
}
_root.anim_fw(_target, ".wait", 9);
} else {
if ((jump._visible == true) or (wait._visible == true)) {
walk._visible = true;
jump._visible = false;
wait._visible = false;
}
if (amMalinak) {
if (prava and (_x < (plocha_x - dist))) {
_x = (_x + posun);
_root.anim_re(_target, ".walk", 12);
}
if (leva and (_x > ((plocha_x / 2) + dist))) {
_x = (_x - posun);
_root.anim_fw(_target, ".walk", 12);
}
} else {
if (prava and (_x < ((plocha_x / 2) - dist))) {
_x = (_x + posun);
_root.anim_fw(_target, ".walk", 12);
}
if (leva and (_x > dist)) {
_x = (_x - posun);
_root.anim_re(_target, ".walk", 12);
}
}
}
if (amMalinak) {
_parent.mfield._x = _x;
_parent.mfield._y = _y;
} else {
_parent.jfield._x = _x;
_parent.jfield._y = _y;
}
}
onClipEvent (keyDown) {
//if(){}
if (!_root.stopAll) {
if (((Key.isDown(39) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(68) and (!_root.compJahodak)) and amJahodak)) {
prava = true;
wait_c = 0;
}
if (((Key.isDown(37) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(65) and (!_root.compJahodak)) and amJahodak)) {
leva = true;
wait_c = 0;
}
if (((Key.isDown(38) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(87) and (!_root.compJahodak)) and amJahodak)) {
horni = true;
wait_c = 0;
}
}
}
onClipEvent (keyUp) {
//if(){}
if (!_root.stopAll) {
if (((Key.isDown(39) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(68) and (!_root.compJahodak)) and amJahodak)) {
prava = true;
} else {
prava = false;
if (_root.stopStep) {
walk.gotoAndStop(1);
}
}
if (((Key.isDown(37) and (!_root.compMalinak)) and amMalinak) or ((Key.isDown(65) and (!_root.compJahodak)) and amJahodak)) {
leva = true;
} else {
leva = false;
if (_root.stopStep) {
walk.gotoAndStop(1);
}
}
}
}
Instance of Symbol 91 MovieClip "jahodak" in Frame 7
onClipEvent (load) {
!!!ERROR
Instance of Symbol 93 MovieClip "ball" in Frame 7
onClipEvent (load) {
!!!ERROR
Frame 8
!!!ERROR
Frame 9
!!!ERROR
Frame 10
!!!ERROR
Instance of Symbol 56 MovieClip "malinak" in Frame 10
onClipEvent (load) {
!!!ERROR
Instance of Symbol 91 MovieClip "jahodak" in Frame 10
onClipEvent (load) {
!!!ERROR
Instance of Symbol 93 MovieClip "ball" in Frame 10
onClipEvent (load) {
!!!ERROR
Instance of Symbol 97 MovieClip "cml" in Frame 10
onClipEvent (load) {
!!!ERROR
Frame 11
!!!ERROR
Frame 12
!!!ERROR
Symbol 56 MovieClip Frame 1
!!!ERROR
Instance of Symbol 35 MovieClip "walk" in Symbol 56 MovieClip Frame 1
onClipEvent (load) {
!!!ERROR
Instance of Symbol 54 MovieClip "jump" in Symbol 56 MovieClip Frame 1
onClipEvent (load) {
!!!ERROR
Instance of Symbol 55 MovieClip "wait" in Symbol 56 MovieClip Frame 1
onClipEvent (load) {
!!!ERROR
Symbol 91 MovieClip Frame 1
!!!ERROR
Instance of Symbol 71 MovieClip "walk" in Symbol 91 MovieClip Frame 1
onClipEvent (load) {
!!!ERROR
Instance of Symbol 89 MovieClip "jump" in Symbol 91 MovieClip Frame 1
onClipEvent (load) {
!!!ERROR
Instance of Symbol 90 MovieClip "wait" in Symbol 91 MovieClip Frame 1
onClipEvent (load) {
!!!ERROR
Symbol 100 Button
on (press, keyPress "<Enter>") {
!!!ERROR
Symbol 101 Button
on (press, keyPress "<Space>") {
!!!ERROR
Symbol 106 MovieClip Frame 1
!!!ERROR
Symbol 106 MovieClip Frame 2
!!!ERROR
Symbol 114 Button
on (release) {
!!!ERROR
Symbol 115 MovieClip Frame 1
!!!ERROR
Symbol 116 Button
on (keyPress "<Home>") {
!!!ERROR
Symbol 122 MovieClip Frame 1
!!!ERROR
Symbol 122 MovieClip Frame 9
!!!ERROR
Symbol 123 Button
on (release) {
!!!ERROR
Symbol 124 Button
on (release) {
!!!ERROR
Symbol 127 MovieClip Frame 1
!!!ERROR
Symbol 135 MovieClip Frame 1
!!!ERROR
Symbol 158 Button
on (release) {
!!!ERROR
Symbol 162 MovieClip Frame 1
!!!ERROR
Symbol 162 MovieClip Frame 2
!!!ERROR