Symbol 19 MovieClip Frame 1
stop();
Symbol 21 MovieClip Frame 1
stop();
Symbol 23 MovieClip Frame 1
stop();
Symbol 25 MovieClip Frame 1
stop();
Symbol 35 MovieClip Frame 1
stop();
Symbol 55 MovieClip Frame 1
function swDir(num) {
var gf = gObj[num];
gf.yDir = gf.yDir * -1;
gf.xDir = gf.xDir * -1;
if (0 < ((gf.rDir = gf.rDir * -1))) {
gf.a.gotoAndStop(2);
gf.b.gotoAndStop(2);
gf.c.gotoAndStop(2);
gf.d.gotoAndStop(2);
} else {
gf.a.gotoAndStop(1);
gf.b.gotoAndStop(1);
gf.c.gotoAndStop(1);
gf.d.gotoAndStop(1);
}
}
function score(h) {
var ts;
sndpinc.start(0, 1);
ball.xDir = 16;
ball.yDir = 12;
if (h) {
ball._y = human._y;
ball._x = human._x - 16;
ts = ++h_score;
h_board = h_score;
} else {
if (cpu.ison) {
ball._y = cpu._y;
ball._x = cpu._x + 16;
} else {
ball._y = pm._y;
ball._x = pm._x;
}
ts = ++c_score;
c_board = c_score;
}
var highest;
if (h_score < c_score) {
highest = c_score;
} else if (c_score < h_score) {
highest = h_score;
} else {
highest = ts - 1;
}
if (highest == ts) {
if ((ts % 10) == 0) {
bgNext();
}
if (ts == 55) {
pm.brn = 5;
pm.hitArea._xscale = (pm.hitArea._yscale = 140);
pm.spd = 18;
cpu._visible = false;
cpu.ison = false;
pm.f = 1.3;
pm._xscale = (pm._yscale = 250);
bgm.stop();
fbossbgm.start(0, 1000);
pm._visible = true;
g3._visible = false;
g2._visible = false;
g._visible = false;
mbrk = false;
resetB(0);
resetB(1);
resetB(2);
} else if (ts == 45) {
bossbgm.stop();
bgm.start(0, 1000);
pm._visible = false;
pm._x = -50;
g3._visible = true;
g2._visible = true;
} else if (ts == 35) {
mbrk = true;
} else if (ts == 30) {
bgm2.stop();
bossbgm.start(0, 1000);
pm._visible = true;
g3._visible = false;
g2._visible = false;
mbrk = false;
resetB(0);
resetB(1);
resetB(2);
g._visible = true;
} else if (ts == 25) {
mbrk = true;
} else if (ts == 20) {
pm._visible = false;
pm._x = -50;
g3._visible = true;
g2._visible = true;
mbrk = false;
resetB(0);
resetB(1);
resetB(2);
bossbgm.stop();
bgm2.start(0, 1000);
} else if (ts == 15) {
bgm.stop();
bossbgm.start(0, 1000);
pm._visible = true;
} else if (ts == (10 / levDiv)) {
mbrk = true;
g._visible = false;
} else if (ts == 1) {
g._visible = true;
}
if (ts == 75) {
pscreen._visible = true;
paused = true;
if (ts == c_score) {
bgm.stop();
sndlose.start(0, 1);
pscreen.txt = "\n\n\nTry Again";
} else {
bgm.stop();
sndwin.start(0, 1);
pscreen.txt = "\n\nYou Won!!\n | | \n\\__/";
}
pscreen.title2 = (pscreen.title2 = (pscreen.title = "Game Over"));
pscreen.subtitle = "Press M to return to main menu";
pscreen.info = "";
gameover = true;
}
}
t1._x = (t2._x = ball._x);
t1._y = (t2._y = ball._y);
}
function bgColor(r, g, b) {
clr.rb = r;
clr.gb = g;
clr.bb = b;
bgTrans.setTransform(clr);
}
function bgNext() {
curClr = (curClr + 1) % 6;
bgColor(cset[curClr][0], cset[curClr][1], cset[curClr][2]);
}
function resetB(num) {
brkSet[num]._y = (-30 * Math.random()) - 20;
brkSet[num]._x = 40 + (320 * Math.random());
brkSet[num].xDir = 0;
brkSet[num].yDir = (3 * Math.random()) + 2;
}
function resetAll() {
bgm.stop();
bgm.start(0, 10000);
gameover = false;
ball.xDir = 16;
ball.yDir = 12;
h_board = (h_score = 0);
c_board = (c_score = 0);
pm.xDir = 0;
pm.yDir = 0;
pm.numRot = 0;
pm._visible = false;
pm._x = -50;
pm._y = 150;
pm.spd = 12;
pm._xscale = (pm._yscale = (pm.hitArea._xscale = (pm.hitArea._yscale = 100)));
pm.brn = 2;
curClr = -1;
bgNext();
mbrk = false;
resetB(0);
resetB(1);
resetB(2);
g._visible = false;
g2._visible = false;
g3._visible = false;
g3._x = 100;
g2._x = 300;
cpu.ison = true;
cpu._visible = true;
cpu._y = 150;
human._y = 150;
pscreen.title2 = "";
pscreen.title = "";
pscreen.txt = "";
pscreen.subtitle = "";
pscreen.info = "";
fb._x = -50;
ball._x = cpu._x + 10;
ball._y = cpu._y;
lazy = false;
paused = false;
}
function swscreenSize() {
if (_parent._yscale == 100) {
_parent._xscale = (_parent._yscale = 125);
} else if (_parent._yscale == 125) {
_parent._xscale = (_parent._yscale = 150);
} else if (_parent._yscale == 150) {
_parent._xscale = (_parent._yscale = 175);
} else if (_parent._yscale == 175) {
_parent._xscale = (_parent._yscale = 200);
} else if (_parent._yscale == 200) {
_parent._xscale = (_parent._yscale = 100);
}
}
_quality = "MEDIUM";
icons._visible = false;
sDelay = 0;
icons.dummy.a.gotoAndStop(2);
icons.dummy.b.gotoAndStop(2);
icons.dummy.c.gotoAndStop(2);
icons.dummy.d.gotoAndStop(2);
rotdelay = 0;
MChoice = 2;
kDelay = 0;
mballA = 4;
pDelay = 0;
curClr = -1;
bgTrans = new Color(bg);
clr = new Object();
brkSet = new Array(b1, b2, b3);
gObj = new Array(g, g2, g3);
g.xDir = 0;
g.rDir = -1;
g.f = 0.03;
g2.xDir = 0;
g2.rDir = -1;
g2.f = 0.08;
g3.xDir = 0;
g3.rDir = -1;
g3.f = 0.08;
sndbmp = new Sound();
sndbmp.attachSound("bump");
sndfb = new Sound();
sndfb.attachSound("fireball");
sndpinc = new Sound();
sndpinc.attachSound("pinc");
sndlose = new Sound();
sndlose.attachSound("lose");
sndwin = new Sound();
sndwin.attachSound("win");
sndchg = new Sound();
sndchg.attachSound("charge");
sndgf = new Sound();
sndgf.attachSound("gf");
bgm = new Sound();
bgm.attachSound("bgm");
bgm2 = new Sound();
bgm2.attachSound("bgm2");
bossbgm = new Sound();
bossbgm.attachSound("boss");
fbossbgm = new Sound();
fbossbgm.attachSound("final");
cset = new Array(new Array(-255, -255, -128), new Array(0, 0, 0), new Array(64, -128, -255), new Array(32, -255, -255), new Array(-255, -64, -255));
swDir(2);
swscreenSize();
swscreenSize();
Symbol 55 MovieClip Frame 2
c_board = (h_board = "");
if (menuball._alpha < 50) {
menuball._alpha = 50;
mballA = mballA * -1;
} else if (100 < menuball._alpha) {
menuball._alpha = 100;
mballA = mballA * -1;
}
menuball._alpha = menuball._alpha + mballA;
pscreen.title2 = (pscreen.title = "Insane Orb");
pscreen.txt = "\nEasy\nNormal\nHard\n\nCredits";
pscreen.subtitle = "Main Menu";
pscreen.info = "Use the UP/DOWN keys to make a selection\nPress SPACEBAR to continue";
pscreen._visible = true;
menuball._visible = true;
if (kDelay == 0) {
if (Key.isDown(38) && (1 < MChoice)) {
sndpinc.start(0, 1);
MChoice--;
kDelay = 1;
}
if (Key.isDown(40) && (MChoice < 4)) {
sndpinc.start(0, 1);
MChoice++;
kDelay = 1;
}
if (MChoice == 1) {
menuball._x = 171;
menuball._y = 115;
} else if (MChoice == 2) {
menuball._x = 162;
menuball._y = 136;
} else if (MChoice == 3) {
menuball._x = 171;
menuball._y = 158;
} else if (MChoice == 4) {
menuball._x = 161;
menuball._y = 200;
}
if (Key.isDown(Key.SPACE)) {
kDelay = 1;
if (MChoice == 1) {
diffBall = 0.5;
diffCpuVis = 70;
diffCpuSpd = 6;
diffCpuReac = 10;
diffGrav = 0.65;
diffpmSpd = 0.7;
levDiv = 1;
} else if (MChoice == 2) {
diffBall = 0.65;
diffCpuVis = 90;
diffCpuSpd = 10;
diffCpuReac = 8;
diffGrav = 0.75;
diffpmSpd = 0.8;
levDiv = 1;
} else if (MChoice == 3) {
diffBall = 0.95;
diffCpuVis = 150;
diffCpuSpd = 11;
diffCpuReac = 7;
diffGrav = 0.9;
diffpmSpd = 1;
levDiv = 1;
}
if (MChoice == 4) {
pscreen.title2 = (pscreen.title = "Credits");
pscreen.txt = "MUSIC:\nA boy and His Blob OC ReMix by Mazedude\nSonic the Hedgehog 2 & 3 Boss Battle Themes\n\nSOUND F/X:\nFrom Sonic 2 and Mario games";
pscreen.subtitle = "Created by Werner Valdez";
pscreen.info = "Press M to return to main menu";
frameNum = 2;
} else {
pscreen.title2 = (pscreen.title = "Instructions");
pscreen.subtitle = "Get 75 points to win";
pscreen.info = "Hit SPACEBAR to continue\nPress M to return to main menu";
pscreen.txt = "Press SHIFT to change screen size\nP to Pause & Unpause the game\nUP/DOWN keys to move\nSPACEBAR to fire\nBounce the orb past the left screen to score\nIf you get lazy press L to turn on/off lazy mode";
frameNum = 8;
}
menuball._visible = false;
gotoAndPlay (4);
}
} else if (((!Key.isDown(Key.SPACE)) && (!Key.isDown(38))) && (!Key.isDown(40))) {
kDelay = 0;
}
if (Key.isDown(Key.SHIFT)) {
if (sDelay == 0) {
sDelay = 1;
swscreenSize();
}
} else {
sDelay = 0;
}
Symbol 55 MovieClip Frame 3
gotoAndPlay (2);
Symbol 55 MovieClip Frame 4
if (Key.isDown(Key.SPACE)) {
if ((kDelay == 0) && (frameNum == 8)) {
kDelay = 1;
pscreen.title2 = (pscreen.title = "Objects");
pscreen.subtitle = "";
pscreen.info = "Hit SPACEBAR to start game\nPress M to return to main menu";
pscreen.txt = "";
icons._visible = true;
gotoAndPlay (8);
}
} else {
kDelay = 0;
}
if (Key.isDown(77)) {
gotoAndPlay (2);
}
if (Key.isDown(Key.SHIFT)) {
if (sDelay == 0) {
sDelay = 1;
swscreenSize();
}
} else {
sDelay = 0;
}
Symbol 55 MovieClip Frame 5
gotoAndPlay (4);
Symbol 55 MovieClip Frame 6
if ((Key.isDown(80) && (pdelay == 0)) && (!gameover)) {
pDelay = 7;
if (paused) {
pscreen.title2 = (pscreen.title = "");
pscreen.subtitle = "";
pscreen._visible = false;
paused = false;
} else {
pscreen.title2 = (pscreen.title = "Pause");
pscreen.info = "Press M return to main menu";
pscreen._visible = true;
paused = true;
}
}
if (0 < pDelay) {
pDelay--;
}
if (!paused) {
if (Key.isDown(76) && (pdelay == 0)) {
pdelay = 4;
if (lazy) {
lazy = false;
} else {
lazy = true;
}
}
t1._x = t1._x + ((ball._x - t1._x) / 0.8);
t1._y = t1._y + ((ball._y - t1._y) / 0.8);
t2._x = t2._x + ((ball._x - t2._x) / 1.2);
t2._y = t2._y + ((ball._y - t2._y) / 1.2);
if (-50 < fb._x) {
fb._x = fb._x + -20;
}
if (ball.hitTest(fb)) {
sndbmp.start(0, 1);
ball.xDir = -26;
ball._x = fb._x - 10;
}
if (!lazy) {
if (Key.isDown(Key.UP) && (0 < (human._y - 18))) {
human._y = human._y - 15;
} else if (Key.isDown(Key.DOWN) && ((human._y + 18) < 300)) {
human._y = human._y + 15;
}
if (key.isDown(Key.SPACE) && (fb._x < 0)) {
sndfb.start(0, 1);
fb._x = human._x;
fb._y = human._y;
}
} else {
tmpDistance = Math.ceil(((Math.abs(ball._x - human._x) / 30) + 1) * ball.yDir) + ball._y;
if ((30 < ball._x) || (ball.yDir == 0)) {
if ((human._y + 2) < ball._y) {
human._y = human._y + 12;
} else if (ball._y < (human._y - 2)) {
human._y = human._y - 12;
}
} else if (human._y < 150) {
human._y = human._y + 12;
} else if (150 < cpu._y) {
human._y = human._y - 12;
}
if ((((human._y + 30) >= tmpDistance) && (tmpDistance >= (human._y - 30))) && (fb._x < 0)) {
sndfb.start(0, 1);
fb._x = human._x;
fb._y = human._y;
}
}
if (cpu.ison) {
if ((ball._x < diffCpuVis) || (ball.yDir == 0)) {
if ((cpu._y + diffCpuReac) < ball._y) {
cpu._y = cpu._y + diffCpuSpd;
} else if (ball._y < (cpu._y - diffCpuReac)) {
cpu._y = cpu._y - diffCpuSpd;
}
} else if (cpu._y < 150) {
cpu._y = cpu._y + diffCpuSpd;
} else if (150 < cpu._y) {
cpu._y = cpu._y - diffCpuSpd;
}
}
if (pm._visible) {
if (!pm.hitArea.hitTest(ball)) {
if (pm._currentframe == 2) {
pm.gotoAndStop(1);
}
if (cpu.ison || ((ball._x < 300) && (ball.xDir < 0))) {
if (Math.abs(pm.xDir) < pm.spd) {
pm.xDir = pm.xDir + (((ball._x - pm._x) + (pm.brn * ball.xDir)) / 20);
}
if (Math.abs(pm.yDir) < pm.spd) {
pm.yDir = pm.yDir + (((ball._y - pm._y) + (pm.brn * ball.yDir)) / 20);
}
}
if (pm.spd < Math.abs(pm.xDir)) {
if (pm.xDir < 0) {
pm.xDir++;
} else {
pm.xDir--;
}
}
if (pm.spd < Math.abs(pm.yDir)) {
if (pm.yDir < 0) {
pm.yDir++;
} else {
pm.yDir--;
}
}
if (0 < pm.xDir) {
if (395 < pm._x) {
pm.xDir = 0;
pm._x = 390;
} else if ((!cpu.ison) && (130 < pm._x)) {
pm.xDir = 0;
pm._x = 130;
}
} else if ((pm._x < 5) && (pm.xDir < 0)) {
pm.xDir = 0;
pm._x = 10;
}
if ((295 < pm._y) && (0 < pm.yDir)) {
pm.yDir = 0;
pm._y = 295;
} else if ((pm._y < 5) && (pm.yDir < 0)) {
pm.yDir = 0;
pm._y = 5;
}
angle = Math.atan2(ball._y - pm._y, ball._x - pm._x) / (Math.PI/180);
pm._rotation = angle;
} else {
pm._rotation = (pm._rotation + 60) % 360;
pm.numRot++;
if (25 < pm.numRot) {
pm.numRot = 0;
ball._x = ball._x + ((ball.xDir = 16 + (8 * Math.random())));
ball._y = ball._y + ((ball.yDir = 6 + (16 * Math.random())));
if (Math.random() < 0.6) {
ball.yDir = ball.yDir * -1;
}
sndfb.start(0, 1);
}
if (pm._currentframe == 1) {
sndchg.start(0, 1);
ball.xDir = 0;
ball.yDir = 0;
pm.xDir = (pm.yDir = 0);
pm._x = ball._x;
pm._y = ball._y;
pm.gotoAndStop(2);
}
}
i4 = 0;
while (i4 < 3) {
gf2 = gObj[i4];
if (gf2._visible == false) {
} else if (pm.hitArea.hitTest(gf2)) {
pm.yDir = pm.yDir + ((((gf2._y - pm._y) * gf2.f) * gf2.rDir) * diffGrav);
pm.xDir = pm.xDir + ((((gf2._x - pm._x) * gf2.f) * gf2.rDir) * diffGrav);
}
i4++;
}
pm._x = pm._x + (pm.xDir * diffpmSpd);
pm._y = pm._y + (pm.yDir * diffpmSpd);
}
ball._x = ball._x + ((ball.xDir * diffBall) * 0.85);
ball._y = ball._y + ((ball.yDir * diffBall) * 0.85);
if (400 < ball._x) {
score(0);
} else if (ball._x < 0) {
score(1);
}
if (ball.hitTest(human)) {
sndbmp.start(0, 1);
ball._x = human._x - 16;
ball.xDir = ball.xDir * -1;
} else if (ball.hitTest(cpu) && (cpu.ison)) {
sndbmp.start(0, 1);
ball._x = cpu._x + 16;
ball.xDir = ball.xDir * -1;
}
if (292 < ball._y) {
sndbmp.start(0, 1);
ball._y = 292;
ball.yDir = ball.yDir * -1;
}
if (ball._y < 8) {
sndbmp.start(0, 1);
ball._y = 8;
ball.yDir = ball.yDir * -1;
}
if (rotdelay == 0) {
rotdelay = 1;
} else {
rotdelay = 0;
}
i = 0;
while (i < 3) {
var gf = gObj[i];
if (gf._visible == true) {
if (300 < gf.xDir) {
sndgf.start(0, 1);
swDir(i);
gf.xDir = 0;
} else {
gf.xDir++;
}
if (rotdelay == 0) {
gf.a._rotation = (gf.a._rotation + (gf.rDir * 20)) % 360;
gf.b._rotation = (gf.b._rotation + (gf.rDir * 12)) % 360;
gf.c._rotation = (gf.c._rotation + (gf.rDir * 5)) % 360;
gf.d._rotation = (gf.d._rotation + (gf.rDir * 2)) % 360;
if (gf != g) {
gf._x = gf._x + gf.rDir;
}
}
if (ball.hitTest(gf)) {
ball.yDir = ball.yDir + ((((gf._y - ball._y) * gf.f) * gf.rDir) * diffGrav);
ball.xDir = ball.xDir + ((((gf._x - ball._x) * gf.f) * gf.rDir) * diffGrav);
}
}
i++;
}
if (mbrk) {
i3 = 0;
while (i3 < 3) {
curBrk = brkSet[i3];
curBrk._x = curBrk._x + curBrk.xDir;
curBrk._y = curBrk._y + curBrk.yDir;
i4 = 0;
while (i4 < 3) {
gf2 = gObj[i4];
if (gf2._visible == false) {
} else if (curBrk.hitTest(gf2)) {
curBrk.yDir = curBrk.yDir + ((((gf2._y - curBrk._y) * gf2.f) * gf2.rDir) * diffGrav);
curBrk.xDir = curBrk.xDir + ((((gf2._x - curBrk._x) * gf2.f) * gf2.rDir) * diffGrav);
}
i4++;
}
if (curBrk.hitTest(ball)) {
sndbmp.start(0, 1);
tmpX = curBrk.xDir;
tmpY = curBrk.yDir;
curBrk.xDir = (ball.xDir + tmpX) * 0.8;
curBrk.yDir = (ball.yDir + tmpY) * 0.8;
ball.xDir = (-(ball.xDir + tmpX)) * 0.9;
ball.yDir = (-(ball.yDir + tmpY)) * 0.9;
}
if (curBrk.hitTest(fb)) {
sndbmp.start(0, 1);
curBrk.xDir = -26;
curBrk._x = fb._x - 10;
}
if ((((350 < curBrk._y) || (curBrk._y < -100)) || (curBrk._x < -50)) || (450 < curBrk._x)) {
resetB(i3);
}
if ((pm._visible == true) && (curBrk.hitTest(pm.hitArea))) {
sndbmp.start(0, 1);
curBrk.xDir = pm.xDir * 1.5;
curBrk.yDir = pm.yDir * 1.5;
pm.xDir = pm.xDir * 0.75;
pm.yDir = pm.yDir * 0.75;
}
i3++;
}
}
}
if (Key.isDown(77)) {
resetAll();
bgm.stop();
gotoAndPlay (2);
}
if (Key.isDown(Key.SHIFT)) {
if (sDelay == 0) {
sDelay = 1;
swscreenSize();
}
} else {
sDelay = 0;
}
Symbol 55 MovieClip Frame 7
gotoAndPlay (6);
Symbol 55 MovieClip Frame 8
if (Key.isDown(Key.SPACE)) {
if (kDelay == 0) {
kDelay = 1;
icons._visible = false;
pscreen._visible = false;
resetAll();
gotoAndPlay (6);
}
} else {
kDelay = 0;
}
if (Key.isDown(77)) {
icons._visible = false;
gotoAndPlay (2);
}
if (Key.isDown(Key.SHIFT)) {
if (sDelay == 0) {
sDelay = 1;
swscreenSize();
}
} else {
sDelay = 0;
}
Symbol 55 MovieClip Frame 9
gotoAndPlay (8);