Frame 14
ifFrameLoaded (43) {
gotoAndStop (31);
}
Frame 30
gotoAndPlay (11);
Frame 31
currentspeed = 25;
levelArray = [0, 25, 28, 30];
_root.level = 1;
stop();
Frame 32
stop();
Frame 33
function playerFire() {
playery = getProperty(player, _y);
playerx = getProperty(player, _x);
setProperty(_root.mybullet, _y , playery);
setProperty(_root.mybullet, _x , playerx);
_root.mybullet.play();
}
function enemyFire() {
computery = getProperty(computer, _y);
computerx = getProperty(computer, _x);
setProperty(_root.enemybullet, _y , computery);
setProperty(_root.enemybullet, _x , computerx);
_root.enemybullet.play();
}
function hitComputer() {
if (mybullet.hitTest(computer)) {
_root.cscore = _root.cscore - 500;
if (_root.cscore < 0) {
_root.cscore = 0;
}
var computer_y = getProperty("/computer", _y);
var computer_x = getProperty("/computer", _x);
setProperty("/deathblast", _y , computer_y);
setProperty("/deathblast", _x , computer_x);
with (_root.deathblast) {
play();
}
}
}
function hitPlayer() {
if (enemybullet.hitTest(player)) {
_root.pscore = _root.pscore - 500;
if (_root.pscore < 0) {
_root.pscore = 0;
}
var player_y = getProperty("/player", _y);
var player_x = getProperty("/player", _x);
setProperty("/deathblast", _y , player_y);
setProperty("/deathblast", _x , player_x);
with (_root.deathblast) {
play();
}
}
}
function hotZoneTest() {
if ((_root.horz == 1) && (_root.ball.hitTest(hotZone1))) {
_root.hotzone1.play();
_root.cscore = cscore + 1000;
} else if ((_root.horz == -1) && (_root.ball.hitTest(hotZone1))) {
_root.hotzone1.play();
_root.pscore = pscore + 1000;
} else if ((_root.horz == 1) && (_root.ball.hitTest(hotZone2))) {
_root.hotzone2.play();
_root.cscore = cscore + 1000;
} else if ((_root.horz == -1) && (_root.ball.hitTest(hotZone2))) {
_root.hotzone2.play();
_root.pscore = pscore + 1000;
}
if (_root.pscore >= 10000) {
gotoAndStop (43);
}
if (_root.cscore >= 10000) {
gotoAndStop (42);
}
}
cballscore = 3;
pballscore = 3;
pscore = 0;
cscore = 0;
Frame 35
horz = -1;
vert = random(2);
if (vert == 0) {
vert = -1;
}
speed = currentspeed;
Set("/trig:angle", random(70));
cspeed = 0;
call("/trig:cos");
call("/trig:sin");
xspeed = speed * /trig:cos;
yspeed = speed * /trig:sin;
ballx = 275;
bally = 166;
setProperty("/ball", _x , ballx);
setProperty("/ball", _y , bally);
setProperty("/computer", _x , 40);
setProperty("/computer", _y , 166);
setProperty("/player", _x , 510);
setProperty("/player", _y , 166);
setProperty("_root.hotzone1", _x , random(370) + 70);
setProperty("_root.hotzone2", _x , random(370) + 70);
startDrag ("/player", true, 510, 50, 510, 295);
tellTarget ("_root.playerball" + [pballscore]) {
_visible = false;
};
tellTarget ("_root.enemyball" + [cballscore]) {
_visible = false;
};
stop();
Frame 42
stop();
Frame 43
stop();
Symbol 2 MovieClip Frame 21
gotoAndPlay (1);
Symbol 5 MovieClip Frame 30
gotoAndPlay (1);
Symbol 21 Button
on (release) {
gotoAndPlay (33);
}
Symbol 23 Button
on (release) {
gotoAndStop (32);
}
Symbol 44 MovieClip Frame 1
_root.firestatus = false;
stop();
Symbol 44 MovieClip Frame 3
var bulletx = this._x;
var speed = 25;
_root.firestatus = true;
Symbol 44 MovieClip Frame 4
setProperty(this, _x , bulletx - speed);
if (this._x < 53) {
_root.hitComputer();
setProperty(this, _y , 410);
gotoAndStop (1);
} else {
gotoAndPlay (3);
}
Symbol 46 MovieClip Frame 1
_root.enemyfirestatus = false;
stop();
Symbol 46 MovieClip Frame 3
var bulletx = this._x;
var speed = 25;
_root.enemyfirestatus = true;
Symbol 46 MovieClip Frame 4
setProperty(this, _x , bulletx + speed);
if (510 < this._x) {
_root.hitPlayer();
setProperty(this, _y , 410);
gotoAndStop (1);
} else {
gotoAndPlay (3);
}
Symbol 58 MovieClip Frame 1
stop();
Symbol 58 MovieClip Frame 9
gotoAndStop (1);
Symbol 59 MovieClip Frame 1
stop();
Symbol 59 MovieClip Frame 9
gotoAndStop (1);
Symbol 64 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 10
gotoAndStop (1);
Symbol 66 Button
on (keyPress "<Space>") {
if (_root.firestatus == false) {
_root.playerFire();
}
}
Symbol 67 MovieClip Frame 1
stop();
sin0 = 0;
cos0 = 1;
sin1 = 0.0175;
cos1 = 0.9998;
sin2 = 0.0349;
cos2 = 0.9994;
sin3 = 0.0523;
cos3 = 0.9986;
sin4 = 0.0698;
cos4 = 0.9976;
sin5 = 0.0872;
cos5 = 0.9962;
sin6 = 0.1045;
cos6 = 0.9945;
sin7 = 0.1219;
cos7 = 0.9925;
sin8 = 0.1392;
cos8 = 0.9903;
sin9 = 0.1564;
cos9 = 0.9877;
sin10 = 0.1736;
cos10 = 0.9848;
sin11 = 0.1908;
cos11 = 0.9816;
sin12 = 0.2079;
cos12 = 0.9781;
sin13 = 0.225;
cos13 = 0.9744;
sin14 = 0.2419;
cos14 = 0.9703;
sin15 = 0.2588;
cos15 = 0.9659;
sin16 = 0.2756;
cos16 = 0.9613;
sin17 = 0.2924;
cos17 = 0.9563;
sin18 = 0.309;
cos18 = 0.9511;
sin19 = 0.3256;
cos19 = 0.9455;
sin20 = 0.342;
cos20 = 0.9397;
sin21 = 0.3584;
cos21 = 0.9336;
sin22 = 0.3746;
cos22 = 0.9272;
sin23 = 0.3907;
cos23 = 0.9205;
sin24 = 0.4067;
cos24 = 0.9135;
sin25 = 0.4226;
cos25 = 0.9063;
sin26 = 0.4384;
cos26 = 0.8988;
sin27 = 0.454;
cos27 = 0.891;
sin28 = 0.4695;
cos28 = 0.8829;
sin29 = 0.4848;
cos29 = 0.8746;
sin30 = 0.5;
cos30 = 0.866;
sin31 = 0.515;
cos31 = 0.8572;
sin32 = 0.5299;
cos32 = 0.848;
sin33 = 0.5446;
cos33 = 0.8387;
sin34 = 0.5592;
cos34 = 0.829;
sin35 = 0.5736;
cos35 = 0.8192;
sin36 = 0.5878;
cos36 = 0.809;
sin37 = 0.6018;
cos37 = 0.7986;
sin38 = 0.6157;
cos38 = 0.788;
sin39 = 0.6293;
cos39 = 0.7771;
sin40 = 0.6428;
cos40 = 0.766;
sin41 = 0.6561;
cos41 = 0.7547;
sin42 = 0.6691;
cos42 = 0.7431;
sin43 = 0.682;
cos43 = 0.7314;
sin44 = 0.6947;
cos44 = 0.7193;
sin45 = 0.7071;
cos45 = 0.7071;
sin46 = 0.7193;
cos46 = 0.6947;
sin47 = 0.7314;
cos47 = 0.682;
sin48 = 0.7431;
cos48 = 0.6691;
sin49 = 0.7547;
cos49 = 0.6561;
sin50 = 0.766;
cos50 = 0.6428;
sin51 = 0.7771;
cos51 = 0.6293;
sin52 = 0.788;
cos52 = 0.6157;
sin53 = 0.7986;
cos53 = 0.6018;
sin54 = 0.809;
cos54 = 0.5878;
sin55 = 0.8192;
cos55 = 0.5736;
sin56 = 0.829;
cos56 = 0.5592;
sin57 = 0.8387;
cos57 = 0.5446;
sin58 = 0.848;
cos58 = 0.5299;
sin59 = 0.8572;
cos59 = 0.515;
sin60 = 0.866;
cos60 = 0.5;
sin61 = 0.8746;
cos61 = 0.4848;
sin62 = 0.8829;
cos62 = 0.4695;
sin63 = 0.891;
cos63 = 0.454;
sin64 = 0.8988;
cos64 = 0.4384;
sin65 = 0.9063;
cos65 = 0.4226;
sin66 = 0.9135;
cos66 = 0.4067;
sin67 = 0.4067;
cos67 = 0.4067;
sin68 = 0.9272;
cos68 = 0.3746;
sin69 = 0.9336;
cos69 = 0.3584;
sin70 = 0.9397;
cos70 = 0.342;
sin71 = 0.9455;
cos71 = 0.3256;
sin72 = 0.9511;
cos72 = 0.309;
sin73 = 0.9563;
cos73 = 0.2924;
sin74 = 0.9613;
cos74 = 0.2756;
sin75 = 0.9659;
cos75 = 0.2588;
sin76 = 0.9703;
cos76 = 0.2419;
sin77 = 0.9744;
cos77 = 0.225;
sin78 = 0.9781;
cos78 = 0.2079;
sin79 = 0.9816;
cos79 = 0.1908;
sin80 = 0.9848;
cos80 = 0.1736;
sin81 = 0.9877;
cos81 = 0.1564;
sin82 = 0.9903;
cos82 = 0.1392;
sin83 = 0.9925;
cos83 = 0.1219;
sin84 = 0.9945;
cos84 = 0.1045;
sin85 = 0.9962;
cos85 = 0.0872;
sin86 = 0.9976;
cos86 = 0.0698;
sin87 = 0.9986;
cos87 = 0.0523;
sin88 = 0.9994;
cos88 = 0.0349;
sin89 = 0.9998;
cos89 = 0.0175;
sin90 = 1;
cos90 = 0;
Symbol 67 MovieClip Frame 2
theta = int(angle);
if (360 < Number(theta)) {
theta = theta - (int(theta / 360) * 360);
}
if ((360 >= Number(theta)) and (Number(theta) >= 270)) {
sin = eval ("sin" add (90 - (theta - 270))) * -1;
} else if ((Number(theta) < 270) and (Number(theta) >= 180)) {
sin = eval ("sin" add (theta - 180)) * -1;
} else if ((Number(theta) < 180) and (90 < Number(theta))) {
sin = eval ("sin" add (180 - theta));
} else {
sin = eval ("sin" add theta);
}
Symbol 67 MovieClip Frame 3
theta = int(angle);
if (360 < Number(theta)) {
theta = theta - (int(theta / 360) * 360);
}
if ((360 >= Number(theta)) and (Number(theta) >= 270)) {
cos = eval ("cos" add (90 - (theta - 270)));
} else if ((Number(theta) < 270) and (Number(theta) >= 180)) {
cos = eval ("cos" add (theta - 180)) * -1;
} else if ((Number(theta) < 180) and (90 < Number(theta))) {
cos = eval ("cos" add (180 - theta)) * -1;
} else {
cos = eval ("cos" add theta);
}
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 3
gotoAndStop (1);
Symbol 70 MovieClip Frame 5
gotoAndStop (1);
Symbol 71 MovieClip Frame 1
if ((_root.bally < 28) && (_root.vert == -1)) {
_root.hotZoneTest();
_root.vert = 1;
}
if ((316 < _root.bally) && (_root.vert == 1)) {
_root.hotZoneTest();
_root.vert = -1;
}
if (((_root.ballx >= (getProperty("_root.player", _x) - _root.speed)) && ((getProperty("_root.player", _x) + _root.speed) >= _root.ballx)) && (_root.horz == 1)) {
paddle = getProperty("_root.player", _y);
if ((25 >= (paddle - _root.bally)) && ((paddle - _root.bally) >= -25)) {
if ((paddle - _root.bally) >= 0) {
_root.vert = -1;
} else {
_root.vert = 1;
}
Set("_root.trig:angle", (((-1 * _root.vert) * (paddle - _root.bally)) / 25) * 75);
call("_root.trig:sin");
call("_root.trig:cos");
Set("/:xspeed", _root.trig:cos * _root.speed);
Set("/:yspeed", _root.trig:sin * _root.speed);
_root.horz = -1;
tellTarget ("_root.soundplayer") {
gotoAndPlay ("hit");
};
}
}
if (((_root.ballx >= (getProperty("_root.computer", _x) - _root.speed)) && ((getProperty("_root.computer", _x) + _root.speed) >= _root.ballx)) && (_root.horz == -1)) {
paddle = getProperty("_root.computer", _y);
if ((25 >= (paddle - _root.bally)) && ((paddle - _root.bally) >= -25)) {
if (Number(paddle - _root.bally) >= 0) {
_root.vert = -1;
} else {
_root.vert = 1;
}
Set("_root.trig:angle", (((-1 * _root.vert) * (paddle - _root.bally)) / 25) * 75);
call("_root.trig:sin");
call("_root.trig:cos");
Set("/:xspeed", _root.trig:cos * _root.speed);
Set("/:yspeed", _root.trig:sin * _root.speed);
_root.horz = 1;
tellTarget ("_root.soundplayer") {
gotoAndPlay ("hit");
};
}
}
if (Number(_root.ballx) < 20) {
_root.pscore = _root.pscore + 500;
tellTarget ("_root.soundplayer") {
gotoAndPlay ("miss");
_root.cballscore = _root.cballscore - 1;
};
if (0 >= _root.cballscore) {
tellTarget (_root) {
gotoAndStop ("win");
};
} else {
tellTarget (_root) {
gotoAndPlay ("round");
};
}
}
if (530 < Number(_root.ballx)) {
_root.cscore = _root.cscore + 500;
tellTarget ("_root.soundplayer") {
gotoAndPlay ("miss");
_root.pballscore = _root.pballscore - 1;
};
if (0 >= _root.pballscore) {
tellTarget ("/") {
gotoAndStop ("lose");
};
} else {
tellTarget (_root) {
gotoAndPlay ("round");
};
}
}
_root.ballx = _root.ballx + (_root.xspeed * _root.horz);
_root.bally = _root.bally + (_root.yspeed * _root.vert);
setProperty("_root.ball", _x , _root.ballx);
setProperty("_root.ball", _y , _root.bally);
Symbol 71 MovieClip Frame 2
if ((_root.bally < 28) && (_root.vert == -1)) {
_root.hotZoneTest();
_root.vert = 1;
}
if ((316 < _root.bally) && (_root.vert == 1)) {
_root.hotZoneTest();
_root.vert = -1;
}
if (((_root.ballx >= (getProperty("_root.player", _x) - _root.speed)) && ((getProperty("_root.player", _x) + _root.speed) >= _root.ballx)) && (_root.horz == 1)) {
paddle = getProperty("_root.player", _y);
if ((25 >= (paddle - _root.bally)) && ((paddle - _root.bally) >= -25)) {
if ((paddle - _root.bally) >= 0) {
_root.vert = -1;
} else {
_root.vert = 1;
}
Set("_root.trig:angle", (((-1 * _root.vert) * (paddle - _root.bally)) / 25) * 75);
call("_root.trig:sin");
call("_root.trig:cos");
Set("/:xspeed", _root.trig:cos * _root.speed);
Set("/:yspeed", _root.trig:sin * _root.speed);
_root.horz = -1;
tellTarget ("_root.soundplayer") {
gotoAndPlay ("hit");
};
}
}
if (((_root.ballx >= (getProperty("_root.computer", _x) - _root.speed)) && ((getProperty("_root.computer", _x) + _root.speed) >= _root.ballx)) && (_root.horz == -1)) {
paddle = getProperty("_root.computer", _y);
if ((25 >= (paddle - _root.bally)) && ((paddle - _root.bally) >= -25)) {
if (Number(paddle - _root.bally) >= 0) {
_root.vert = -1;
} else {
_root.vert = 1;
}
Set("_root.trig:angle", (((-1 * _root.vert) * (paddle - _root.bally)) / 25) * 75);
call("_root.trig:sin");
call("_root.trig:cos");
Set("/:xspeed", _root.trig:cos * _root.speed);
Set("/:yspeed", _root.trig:sin * _root.speed);
_root.horz = 1;
tellTarget ("_root.soundplayer") {
gotoAndPlay ("hit");
};
}
}
if (Number(_root.ballx) < 20) {
_root.pscore = _root.pscore + 500;
tellTarget ("_root.soundplayer") {
gotoAndPlay ("miss");
_root.cballscore = _root.cballscore - 1;
};
if (0 >= _root.cballscore) {
tellTarget (_root) {
gotoAndStop ("win");
};
} else {
tellTarget (_root) {
gotoAndPlay ("round");
};
}
}
if (530 < Number(_root.ballx)) {
_root.cscore = _root.cscore + 500;
tellTarget ("_root.soundplayer") {
gotoAndPlay ("miss");
_root.pballscore = _root.pballscore - 1;
};
if (0 >= _root.pballscore) {
tellTarget ("/") {
gotoAndStop ("lose");
};
} else {
tellTarget (_root) {
gotoAndPlay ("round");
};
}
}
_root.ballx = _root.ballx + (_root.xspeed * _root.horz);
_root.bally = _root.bally + (_root.yspeed * _root.vert);
setProperty("_root.ball", _x , _root.ballx);
setProperty("_root.ball", _y , _root.bally);
Symbol 72 MovieClip Frame 1
if (Number(/:horz) == Number(-1)) {
Set("/:cspeed", Number(random(13)) + 18);
if ((Number(/:bally) < Number(getProperty("/computer", _y))) and (Number(/:cspeed) >= 0)) {
Set("/:cspeed", /:cspeed * -1);
}
if (Number(/:cspeed) < 0) {
sign = 1;
} else {
sign = -1;
}
if ((Number(getProperty("/computer", _y) - /:bally) < 60) or (Number(-60) < Number(getProperty("/computer", _y) - /:bally))) {
dspeed = /:cspeed * (((getProperty("/computer", _y) - /:bally) * sign) / 60);
} else {
dspeed = /:cspeed;
}
setProperty("/computer", _y , Number(getProperty("/computer", _y)) + Number(dspeed));
if (Number(getProperty("/computer", _y)) < 55) {
setProperty("/computer", _y , 55);
}
if (290 < Number(getProperty("/computer", _y))) {
setProperty("/computer", _y , 290);
}
}
if (_root.pscore >= 3500) {
shouldIFire = random(4);
if ((shouldIFire == 2) && (_root.enemyFirestatus == false)) {
_root.enemyFire();
}
} else {
shouldIFire = random(9);
if ((shouldIFire == 2) && (_root.enemyFirestatus == false)) {
_root.enemyFire();
}
}
Symbol 72 MovieClip Frame 2
if (Number(/:horz) == Number(-1)) {
Set("/:cspeed", Number(random(15)) + 20);
if ((Number(/:bally) < Number(getProperty("/computer", _y))) and (Number(/:cspeed) >= 0)) {
Set("/:cspeed", /:cspeed * -1);
}
if (Number(/:cspeed) < 0) {
sign = 1;
} else {
sign = -1;
}
if ((Number(getProperty("/computer", _y) - /:bally) < 60) or (Number(-60) < Number(getProperty("/computer", _y) - /:bally))) {
dspeed = /:cspeed * (((getProperty("/computer", _y) - /:bally) * sign) / 60);
} else {
dspeed = /:cspeed;
}
setProperty("/computer", _y , Number(getProperty("/computer", _y)) + Number(dspeed));
if (Number(getProperty("/computer", _y)) < 55) {
setProperty("/computer", _y , 55);
}
if (290 < Number(getProperty("/computer", _y))) {
setProperty("/computer", _y , 290);
}
}
Symbol 75 Button
on (release, keyPress "<Enter>") {
gotoAndPlay (33);
}
Symbol 79 Button
on (release) {
_root.level = _root.level + 1;
if (3 < _root.level) {
levelalert = "You're on the highest level, you Rocker! Press PLAY.";
_root.level = 3;
currentspeed = levelArray[_root.level];
} else {
currentspeed = levelArray[_root.level];
gotoAndPlay (33);
}
}