Combined Code
frame 1 {
stop();
score = 0;
balls = 4;
time = 0;
}
movieClip 6 {
}
movieClip 7 {
frame 1 {
stop();
speed = 10;
}
}
instance bar of movieClip 7 {
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
this._x -= speed;
}
if (Key.isDown(Key.RIGHT)) {
this._x += speed;
}
}
}
button 14 {
on (release, keyPress '<Enter>') {
gotoAndStop(2);
}
}
frame 2 {
stop();
i = 1;
while (i < balls) {
duplicateMovieClip('ball', 'ball' + i, i);
++i;
}
}
movieClip 24 {
frame 1 {
stop();
bx_speed = 6;
by_speed = 6;
}
frame 2 {
_root.balls -= 1;
stop();
}
}
instance ball of movieClip 24 {
onClipEvent (load) {
this._x = random(221) + 80;
this._y = random(101) + 50;
}
onClipEvent (enterFrame) {
this._x += bx_speed;
this._y += by_speed;
if (this.hitTest(_root.bar.hitter)) {
_root.score += 1;
by_speed = -by_speed;
}
if (this._x < 56 || 302 < this._x) {
bx_speed = -bx_speed;
}
if (this._y < 29) {
by_speed = -by_speed;
}
if (378 < this._y) {
this.nextFrame();
}
}
}
movieClip 25 {
frame 1 {
_root.time += 1;
if (_root.time >= 60) {
_root.gotoAndStop(4);
}
if (_root.balls == 0) {
_root.gotoAndStop(3);
}
}
frame 19 {
gotoAndPlay(1);
}
}
frame 3 {
stop();
finalscore = score * balls + time;
}
button 32 {
on (release) {
gotoAndStop(1);
}
}
button 36 {
on (release) {
getURL('mailto:JohannesP<JohannesP@2-serious.de>?subject=Breakout Variation', '');
}
}
frame 4 {
stop();
finalscore = score * balls + time;
}