Frame 1
g = "100";
elastic = "0.7";
BallRadius = getProperty("Ball", _height) / "2";
Frame 2
t = t + "0.1";
xx = Ball:_scale;
zaman = zaman + "1";
tikx = getProperty("tik", _x);
tiky = getProperty("tik", _y);
if ("5" < zaman) {
zaman = "0";
oldtiky = getProperty("tik", _y);
oldtikx = getProperty("tik", _x);
saydir = "0";
}
if (Dragging) {
oldx = x;
oldy = y;
x = getProperty("Ball", _x);
y = getProperty("Ball", _y);
vx = (x - oldx) * "10";
vy = (y - oldy) * "10";
} else {
vy = vy + (g / "10");
x = x + (vx / "10");
y = y + (vy / "10");
if (y < BallRadius) {
y = BallRadius;
vx = vx * elastic;
vy = -(vy * elastic);
}
if (("300" - BallRadius) < y) {
y = "300" - BallRadius;
vx = vx * elastic;
vy = -(vy * elastic);
count = "0";
}
if (x < BallRadius) {
x = BallRadius;
vx = -(vx * elastic);
vy = vy * elastic;
count = "0";
}
if (("400" - BallRadius) < x) {
x = "400" - BallRadius;
vx = -(vx * elastic);
vy = vy * elastic;
}
if (((((tiky - BallRadius) < y) and (y < (tiky + BallRadius))) and (x < (tikx + (getProperty("tik", _width) / "2")))) and ((tikx - (getProperty("tik", _width) / "2")) < x)) {
y = tiky - BallRadius;
vx = (vx * elastic) + ((tikx - oldtikx) * "2");
vy = (-(vy * elastic)) + ((tiky - oldtiky) * "3");
saydir = "1";
tellTarget ("tik") {
play();
};
if ((int(vy) == int(oldvy)) or (int(oldvx) == int(vx))) {
count = "0";
}
oldvy = vy;
oldvx = vx;
}
if (saydir == "1") {
count = count + "1";
saydir = "0";
if (best < count) {
best = count;
}
}
setProperty("Ball", _x , x);
setProperty("Ball", _y , y);
}
Frame 3
gotoAndPlay (2);
Symbol 4 Button
on (press) {
startDrag ("");
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 8 Button
on (press) {
startDrag ("");
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 9 Button
on (press) {
startDrag ("", true);
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 10 MovieClip Frame 1
stop();
Symbol 10 MovieClip Frame 6
gotoAndStop (1);
Symbol 14 Button
on (press) {
startDrag ("/Ball");
}
on (release) {
stopDrag();
}