Frame 1 (163 B)
_root.dirx = 0;
_root.diry = 0;
_root.balldx = 10;
_root.balldy = 10;
stop();
_root.score = 0;
_root.fuel = 250;
_root.highscore = 0;
_root.highuser = "";
Instance of Symbol 17 MovieClip "redsquare" in Frame 2 (94 B)
onClipEvent (mouseDown) {
if (hitTest(_root._xmouse, _root._ymouse)) {
startDrag ("");
}
}
Symbol 6 Button (32 B)
on (press) {
gotoAndStop (2);
}
Symbol 11 Button (32 B)
on (press) {
gotoAndStop (4);
}
Symbol 25 MovieClip Frame 1 (1.26 KiB) ●
if (_root.ball.hittest(_root.redsquare)) {
xp = _root.playerdx;
yp = _root.playerdy;
if (xp >= 0) {
_root.balldx = 10;
} else {
_root.balldx = -10;
}
if (yp >= 0) {
_root.balldy = 10;
} else {
_root.balldy = -10;
}
}
if (_root.ball.hittest(_root.doel)) {
_root.balldy = -_root.balldy;
_root.score = _root.score + 1;
}
if (_root.ball.hitTest(_root.floor)) {
_root.balldy = -10;
_root.fuel = _root.fuel + -1;
}
if (_root.ball.hitTest(_root.ceiling)) {
_root.balldy = 10;
_root.fuel = _root.fuel + -1;
}
if (_root.ball.hitTest(_root.leftborder)) {
_root.balldx = 10;
_root.fuel = _root.fuel + -1;
}
if (_root.ball.hitTest(_root.rightborder)) {
_root.balldx = -10;
_root.fuel = _root.fuel + -1;
}
_root.ball._y = _root.ball._y + _root.balldy;
_root.ball._x = _root.ball._x + _root.balldx;
_root.playerdx = _root.redsquare._x - _root.oldplayerx;
_root.playerdy = _root.redsquare._y - _root.oldplayery;
_root.oldplayerx = _root.redsquare._x;
_root.oldplayery = _root.redsquare._y;
if (_root.fuel < 1) {
_root.lastscore = _root.score;
if (_root.lastscore > _root.highscore) {
_root.highscore = _root.lastscore;
_root.highuser = _root.username;
}
_root.fuel = 100;
_root.score = 0;
_root.gotoAndStop(3);
}
Symbol 25 MovieClip Frame 2 (17 B)
gotoAndPlay (1);
Symbol 37 Button (32 B)
on (press) {
gotoAndStop (1);
}