Symbol 6 MovieClip Frame 1
startDrag ("", true);
Symbol 14 Button
on (press) {
play();
tellTarget ("../") {
score = Number(score) + 1;
call("kick");
};
}
Symbol 15 MovieClip Frame 1
stop();
Symbol 16 MovieClip Frame 1
g = 80;
kicked = 0;
elastic = 0.8;
score = 0;
bestscore = 0;
BallRadius = Ball._height / 2;
Symbol 16 MovieClip Frame 2
t = Number(t) + 0.1;
oldx = x;
oldy = y;
x = getProperty("Ball", _x);
y = getProperty("Ball", _y);
vy = Number(vy) + Number(g / 10);
x = Number(x) + Number(vx / 10);
y = Number(y) + Number(vy / 10);
if (Number(y) < Number(BallRadius)) {
y = BallRadius;
vx = vx * elastic;
vy = -(vy * elastic);
}
if (Number(300 - BallRadius) < Number(y)) {
if (Number(kicked) == 1) {
kicked = 0;
if (Number(bestscore) < Number(score)) {
bestscore = score;
Set("../score/:my_score", bestscore);
}
lastscore = score;
score = 0;
}
y = 300 - BallRadius;
vx = vx * elastic;
vy = -(vy * elastic);
}
if (Number(x) < Number(BallRadius)) {
x = BallRadius;
vx = -(vx * elastic);
vy = vy * elastic;
}
if (Number(400 - BallRadius) < Number(x)) {
x = 400 - BallRadius;
vx = -(vx * elastic);
vy = vy * elastic;
}
setProperty("Ball", _x , x);
setProperty("Ball", _y , y);
setProperty("Ball", _rotation , x);
setProperty("Ball", _xscale , 100);
setProperty("Ball", _yscale , 100);
Symbol 16 MovieClip Frame 3
gotoAndPlay (2);
Symbol 16 MovieClip Frame 4
kicked = 1;
t = Number(t) + 0.1;
oldx = x;
oldy = y;
x = getProperty("Ball", _x);
y = getProperty("Ball", _y);
vx = Number((getProperty("Ball", _x) - getProperty("mouse", _x)) * 10) + Number((random(3) / 10) - 0.15);
vy = Number(-125) + Number(y - getProperty("mouse", _y));
dx = getProperty("Ball", _x) - getProperty("mouse", _x);
if (0 < Number(dx)) {
vy = Number(vy) + Number(dx);
} else if (Number(dx) < 0) {
vy = vy - dx;
}
if (Number(y) < Number(BallRadius)) {
y = BallRadius;
vx = vx * elastic;
vy = -(vy * elastic);
}
if (Number(300 - BallRadius) < Number(y)) {
if (Number(bestscore) < Number(score)) {
bestscore = score;
}
score = 0;
y = 300 - BallRadius;
vx = vx * elastic;
vy = -(vy * elastic);
}
if (Number(x) < Number(BallRadius)) {
x = BallRadius;
vx = -(vx * elastic);
vy = vy * elastic;
}
if (Number(400 - BallRadius) < Number(x)) {
x = 400 - BallRadius;
vx = -(vx * elastic);
vy = vy * elastic;
}
setProperty("Ball", _x , x);
setProperty("Ball", _y , y);
setProperty("Ball", _rotation , x);
setProperty("Ball", _xscale , 100);
setProperty("Ball", _yscale , 100);
gotoAndPlay (2);