Frame 1
minX = 0;
maxX = 772;
minY = -500;
maxY = 432;
gravity = 0.981;
friction = 0.85;
Ykorb1 = 335;
Ykorb = 400;
a = 607;
b = 765;
c = 410;
xkorbrand1 = 590;
xkorbrand1a = 620;
xkorbrand2 = 755;
xkorbrand2a = 790;
Frame 2
if (/:pause ne "ball") {
me = "ball";
Set(me add "/:yspeed", eval (me add "/:yspeed") + /:gravity);
oldypos = getProperty(me, _y);
oldxpos = getProperty(me, _x);
newypos = oldypos + eval (me add "/:yspeed");
newxpos = oldxpos + eval (me add "/:xspeed");
Xtemp = Number(((newxpos - oldxpos) / (newypos - oldypos)) * (ykorb - oldypos)) + Number(oldxpos);
if ((Number(/:maxY) < Number(newypos)) or (Number(newypos) < Number(/:minY))) {
newypos = oldypos;
Set(me add "/:yspeed", (-1 * eval (me add "/:yspeed")) * /:friction);
Set(me add "/:xspeed", eval (me add "/:xspeed") * /:friction);
}
if ((Number(/:maxX) < Number(newxpos)) or (Number(newxpos) < Number(/:minX))) {
Set(me add "/:xspeed", (-1 * eval (me add "/:xspeed")) * /:friction);
newxpos = oldxpos;
}
if ((((Number(xtemp) < Number(xkorbrand2a)) and (Number(xkorbrand2) < Number(xtemp))) and (Number(ykorb1) < Number(newypos))) and (Number(oldypos) < Number(ykorb1))) {
newypos = oldypos;
Set(me add "/:yspeed", (-1 * eval (me add "/:yspeed")) * /:friction);
Set(me add "/:xspeed", (eval (me add "/:xspeed") * /:friction) - 1);
}
if ((((Number(xkorbrand1) < Number(xtemp)) and (Number(xtemp) < Number(xkorbrand1a))) and (Number(ykorb1) < Number(newypos))) and (Number(oldypos) < Number(ykorb1))) {
newypos = oldypos;
Set(me add "/:yspeed", (-1 * eval (me add "/:yspeed")) * /:friction);
Set(me add "/:xspeed", (eval (me add "/:xspeed") * /:friction) + 0.1);
}
if (((Number(a) < Number(newxpos)) and (Number(newxpos) < Number(b))) and (Number(c) < Number(newypos))) {
newypos = oldypos;
Set("/:friction", 0);
points = Number(points) + 1;
Set(me add "/:yspeed", (-1 * eval (me add "/:yspeed")) * /:friction);
Set(me add "/:xspeed", eval (me add "/:xspeed") * /:friction);
} else {
friction = 0.85;
}
if ((((Number(xkorbrand1) < Number(xtemp)) and (Number(xtemp) < Number(xkorbrand2))) and (Number(ykorb) < Number(newypos))) and (Number(oldypos) < Number(ykorb))) {
punkte = Number(punkte) + 1;
}
if ((592 < Number(newxpos)) and (Number(ykorb1) < Number(newypos))) {
Set(me add "/:xspeed", (-1 * eval (me add "/:xspeed")) * /:friction);
newxpos = oldxpos;
}
setProperty(me, _y , newypos);
setProperty(me, _x , newxpos);
}
Frame 3
gotoAndPlay (2);
Symbol 3 Button
on (press) {
startDrag ("", false, 772, /:minY, 12, /:maxY);
tellTarget ("map") {
play();
};
Set("/:pause", _name);
}
on (release, releaseOutside) {
stopDrag();
tellTarget ("map") {
Set("/:pause", "null");
gotoAndStop (1);
};
}
Symbol 4 MovieClip Frame 1
stop();
Symbol 4 MovieClip Frame 2
newX = getProperty("../", _x);
Set("../:xspeed", (newX - oldX) * 0.5);
oldX = newX;
Symbol 4 MovieClip Frame 3
newY = getProperty("../", _y);
Set("../:yspeed", (newY - oldY) * 0.5);
oldY = newY;
gotoAndPlay (2);
Symbol 5 MovieClip Frame 1
xspeed = "0";
yspeed = "0";