Combined Code
frame 2 {
stop();
/:frame = 2;
/:value = 1;
loadVariables('http://www.kidscom.com/cgi-bin/kidskashgames/specandtra/keep_junkblaster.pl', '', 'GET');
/:Score = 0;
/:sound = 0;
}
movieClip 3 {
}
button 6 {
on (release) {
getURL('http://www.kidscom.com/', '');
}
}
button 21 {
on (release) {
stopAllSounds();
_root.gotoAndPlay('instruction');
}
}
movieClip 22 {
frame 30 {
gotoAndPlay(1);
}
frame 31 {
stop();
}
}
instance loading of movieClip 22 {
onClipEvent (enterFrame) {
/:percent = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
/:FrameLoad = Math.round(/:percent) + '%';
if (/:percent >= 100) {
tellTarget ('_root.loading') {
gotoAndStop(31);
}
}
}
onClipEvent (mouseMove) {
if (/:percent >= 100) {
tellTarget ('_root.loading') {
gotoAndStop(31);
}
}
}
}
button 27 {
on (release) {
nextFrame();
}
}
frame 3 {
dy = 6;
dx = 6;
numBalls = 3;
stop();
/:frame = 3;
loadVariables('http://www.kidscom.com/cgi-bin/kidskashgames/specandtra/keep_junkblaster.pl', '', 'GET');
}
button 33 {
on (release) {
gotoAndPlay(6);
}
}
frame 4 {
stop();
}
button 35 {
on (release) {
if (dy < 0) {
dy *= -1;
}
dy += 2;
gotoAndPlay(6);
}
}
frame 5 {
stop();
}
button 37 {
on (release) {
gotoAndPlay(6);
}
}
movieClip 40 {
}
movieClip 41 {
}
movieClip 42 {
}
frame 6 {
function startBall() {
x = ball._x;
y = ball._y;
Mouse.hide();
rightWall = 800;
leftWall = 0;
topWall = 5;
bottomWall = 183;
ballRadius = ball._width / 2;
paddleTop = paddle._y - paddle._height / 2;
paddleBottom = paddle._y + paddle._height / 2;
}
function movePaddle() {
paddle._x = _xmouse;
if (183 < _ymouse) {
Mouse.show();
} else {
Mouse.hide();
}
}
function moveBall() {
x += dx;
y += dy;
if (rightWall < x + ballRadius) {
overshoot = x + ballRadius - rightWall;
x -= overShoot * 2;
dx *= -1;
}
if (x - ballRadius < leftWall) {
overshoot = leftWall - (x - ballRadius);
x += overShoot * 2;
dx *= -1;
}
if (y - ballRadius < topWall) {
overshoot = topWall - (y - ballRadius);
y += overShoot * 2;
dy *= -1;
}
if (paddleTop < y + ballRadius and y - ballRadius < paddleBottom) {
paddleLeft = paddle._x - paddle._width / 2;
paddleRight = paddle._x + paddle._width / 2;
if (paddleLeft < x + ballRadius and x - ballRadius < paddleRight) {
overshoot = paddleTop - (y + ballRadius);
y += overShoot * 2;
dy *= -1;
dx = (ball._x - paddle._x) / 4;
} else {
passedPaddle = true;
}
}
if (bottomWall < y) {
Mouse.show();
if (numBalls == 0) {
gotoAndPlay(7);
} else {
--numBalls;
gotoAndPlay(5);
}
}
ball._x = x;
ball._y = y;
}
function checkCollisions() {
ballTop = ball._y - ball._height / 2;
ballBottom = ball._y + ball._height / 2;
ballLeft = ball._x - ball._width / 2;
ballRight = ball._x + ball._width / 2;
leveldone = true;
i = 1;
while (55 >= i) {
brick = _root['a' + i];
if (brick._x != -1000) {
if (brickHit(brick)) {
brick._x = -1000;
dy *= -1;
} else {
leveldone = false;
}
}
++i;
}
if (leveldone) {
Mouse.show();
gotoAndPlay(4);
dy += 2;
if (12 < dy) {
dy = 12;
}
}
}
function brickHit(brick) {
if (brick._y + brick._height / 2 >= ballTop) {
if (ballBottom >= brick._y - brick._height / 2) {
if (ballRight >= brick._x - brick._width / 2) {
if (brick._x + brick._width / 2 >= ballLeft) {
return true;
}
}
}
}
return false;
}
stop();
}
movieClip 45 {
}
instance of movieClip 45 {
onClipEvent (load) {
_root.startBall();
}
onClipEvent (enterFrame) {
_root.moveBall();
_root.movePaddle();
_root.checkCollisions();
}
}
movieClip 49 {
}
movieClip 51 {
}
movieClip 53 {
}
frame 7 {
stop();
}
button 55 {
on (release) {
stopAllSounds();
gotoAndPlay(1);
}
}
frame 8 {
stop();
stopped = 0;
totalscore = 0;
score = 0;
/timer:input = 60;
/timer:output = /timer:input;
}
movieClip 73 {
}
button 75 {
on (release) {
gotoAndPlay(14);
going = '1';
}
}
button 78 {
on (release) {
gotoAndPlay(9);
}
}
frame 9 {
stop();
stopped = 0;
totalscore = 0;
score = 0;
/timer:input = 60;
/timer:output = /timer:input;
}
frame 14 {
round = '1';
a = /ball._x;
h = /move_hoop._x;
hit_left = Number(h) - 20;
hit_right = Number(h) + 50;
if (Number(hit_left) < Number(a) and Number(a) < Number(hit_right)) {
hit = 1;
} else {
hit = 0;
}
if (Number(stopped) == 3) {
gotoAndPlay('check_score' add round);
} else {
tellTarget ('/timer') {
gotoAndStop('loopstart');
}
}
}
frame 14 {
net_x = /net_move._x;
}
button 95 {
on (release) {
_root.gotoAndPlay('gametips');
}
}
button 97 {
on (release) {
_root.gotoAndPlay('highscores');
}
}
button 100 {
on (release) {
getURL('http://www.kidscom.com/games/games.html', '');
}
}
movieClip 114 {
frame 1 {
input = 60;
stop();
}
frame 14 {
if (Number(/:going) == 1) {
/timer:zeero = int(getTimer() / 1000);
/:going = 2;
gotoAndStop(15);
} else {
gotoAndStop(15);
}
stop();
}
frame 15 {
output = input;
if (0 < Number(output)) {
display = int(getTimer() / 1000) - zeero;
output = input - display;
percent = (output / input) * 100;
}
if (0 >= Number(output)) {
gotoAndPlay(23);
}
stop();
}
frame 15 {
stop();
}
frame 23 {
/:stopped = 3;
tellTarget ('/ball') {
gotoAndStop('times_up');
}
}
frame 42 {
stop();
}
}
movieClip 117 {
}
movieClip 119 {
}
movieClip 120 {
frame 1 {
stop();
}
frame 16 {
gotoAndStop(1);
}
}
movieClip 123 {
}
movieClip 127 {
}
movieClip 129 {
frame 1 {
stop();
}
frame 1 {
stop();
}
frame 27 {
gotoAndStop(1);
}
frame 27 {
gotoAndStop(1);
}
}
button 130 {
on (press) {
startDrag('', true, 50, 550, 750, 550);
}
on (release) {
stopDrag();
x = /ball._x;
/shoot._x = /ball._x;
tellTarget ('/shoot') {
gotoAndPlay('shoot');
}
}
}
movieClip 131 {
frame 5 {
rand1 = random(11);
/ball._x = rand1 * 50;
if (Number(rand1) == 0) {
/ball._x = 500;
}
}
}
movieClip 134 {
}
movieClip 136 {
frame 1 {
call(/:rand_ball_place);
tellTarget ('/ball') {
gotoAndStop('hold');
}
if (Number(/:stopped) == 3) {
gotoAndStop(96);
}
stop();
}
frame 17 {
tellTarget ('/ball') {
gotoAndStop('off');
}
tellTarget ('/timer') {
if (Number(/timer:output) == 0) {
gotoAndStop('times_up');
}
}
}
frame 32 {
if (Number(/:hit) == 1) {
gotoAndPlay(75);
} else {
gotoAndPlay(33);
}
}
frame 33 {
tellTarget ('/timer') {
if (Number(/timer:output) == 0) {
gotoAndStop('times_up');
}
}
}
frame 54 {
gotoAndStop(1);
}
frame 75 {
tellTarget ('/net_move') {
gotoAndPlay('hit');
}
/:score = Number(/:score) + 2;
/:totalscore = Number(/:totalscore) + 2;
tellTarget ('/timer') {
if (Number(/timer:output) == 0) {
gotoAndStop('times_up');
}
}
}
frame 95 {
gotoAndPlay(1);
}
frame 96 {
stop();
}
}
movieClip 137 {
frame 19 {
stop();
}
}
frame 15 {
gotoAndPlay(14);
}
frame 16 {
if (Number(score) >= 10) {
gotoAndPlay(73);
round_move = 'next';
} else {
gotoAndPlay(62);
round_move = 'replay';
}
}
frame 24 {
stopped = 0;
score = 0;
going = '1';
/timer:input = 60;
/timer:output = /timer:input;
moving_left = 1;
moving_right = 0;
}
frame 31 {
round = '2';
a = /ball._x;
h = /move_hoop._x;
hit_left = Number(h) - 20;
hit_right = Number(h) + 50;
if (Number(hit_left) < Number(a) and Number(a) < Number(hit_right)) {
hit = 1;
} else {
hit = 0;
}
if (Number(stopped) == 3) {
gotoAndPlay('check_score' add round);
} else {
tellTarget ('/timer') {
gotoAndStop('loopstart');
}
}
}
frame 32 {
gotoAndPlay(31);
}
frame 32 {
if (Number(moving_right) == 1 and Number(h) < 700) {
/move_hoop._x = Number(h) + 5;
/net_move._x = Number(h) + 5;
} else {
moving_left = 1;
moving_right = 0;
/move_hoop._x = h - 5;
/net_move._x = h - 5;
}
if (Number(moving_left) == 1 and 100 < Number(h)) {
/move_hoop._x = h - 5;
/net_move._x = h - 5;
} else {
moving_right = 1;
moving_left = 0;
/move_hoop._x = Number(h) + 5;
/net_move._x = Number(h) + 5;
}
}
frame 35 {
if (Number(score) >= 10) {
gotoAndPlay(95);
round_move = 'next';
} else {
gotoAndPlay(62);
round_move = 'replay';
}
}
frame 44 {
stopped = 0;
score = 0;
going = '1';
/timer:input = 60;
/timer:output = /timer:input;
moving_left = 1;
moving_right = 0;
}
frame 50 {
round = '3';
a = /ball._x;
h = /move_hoop._x;
hit_left = Number(h) - 20;
hit_right = Number(h) + 50;
if (Number(hit_left) < Number(a) and Number(a) < Number(hit_right)) {
hit = 1;
} else {
hit = 0;
}
if (Number(stopped) == 3) {
gotoAndPlay('check_score' add round);
} else {
tellTarget ('/timer') {
gotoAndStop('loopstart');
}
}
}
frame 51 {
gotoAndPlay(50);
}
frame 51 {
if (Number(moving_right) == 1 and Number(h) < 700) {
/move_hoop._x = Number(h) + 10;
/net_move._x = Number(h) + 10;
} else {
moving_left = 1;
moving_right = 0;
/move_hoop._x = h - 10;
/net_move._x = h - 10;
}
if (Number(moving_left) == 1 and 100 < Number(h)) {
/move_hoop._x = h - 10;
/net_move._x = h - 10;
} else {
moving_right = 1;
moving_left = 0;
/move_hoop._x = Number(h) + 10;
/net_move._x = Number(h) + 10;
}
}
frame 52 {
if (Number(score) >= 10) {
gotoAndPlay(117);
round_move = 'replay';
} else {
gotoAndPlay(62);
round_move = 'replay';
}
}
frame 72 {
stop();
}
button 141 {
on (release) {
gotoAndPlay(138);
}
}
button 142 {
on (release) {
gotoAndPlay(9);
}
}
button 146 {
on (release) {
stopAllSounds();
gotoAndPlay(8);
going = '1';
}
}
movieClip 148 {
}
frame 94 {
stop();
}
button 151 {
on (release) {
gotoAndPlay(24);
}
}
frame 116 {
stop();
}
button 154 {
on (release) {
gotoAndPlay(44);
}
}
frame 137 {
stop();
}
frame 138 {
Score = totalscore;
Name = /:Name;
loadVariables('http://www.kidscom.com/cgi-bin/highscores/score_rileyhoop.pl', '_root', 'POST');
}
frame 144 {
if (Number(eof) == Number('true')) {
eof = '';
stop();
if (/:sound == 0) {
stopAllSounds();
_root.bg_sounds.gotoAndStop('intermission');
}
}
stop();
}