Frame 1
Frame 2
function movement(u, myBoll) {
var _local2 = myBoll.DX;
var _local1 = myBoll.DY;
u._x = u._x + _local2;
u._y = u._y + _local1;
if ((_local2 > 25) || (_local2 < -25)) {
if (_local2 > 0) {
_local2 = 25;
}
if (_local2 < 0) {
_local2 = -25;
}
}
if ((_local1 > 25) || (_local1 < -25)) {
if (_local1 > 0) {
_local1 = 25;
}
if (_local1 < 0) {
_local1 = -25;
}
}
if (u._x < 25) {
u._x = 50 - u._x;
_local2 = -_local2;
}
if (u._x > 425) {
u._x = 850 - u._x;
_local2 = -_local2;
}
if (u._y < 25) {
u._y = 50 - u._y;
_local1 = -_local1;
}
if (u._y > 425) {
u._y = 850 - u._y;
_local1 = -_local1;
}
if (Key.isDown(40)) {
_local1 = _local1 + 0.3;
}
if (Key.isDown(38)) {
_local1 = _local1 - 0.3;
}
if (Key.isDown(39)) {
_local2 = _local2 + 0.3;
}
if (Key.isDown(37)) {
_local2 = _local2 - 0.3;
}
if (gravityway._rotation == 0) {
_local1 = _local1 + 0.4;
}
if (gravityway._rotation == 180) {
_local1 = _local1 - 0.4;
}
if (gravityway._rotation == -90) {
_local2 = _local2 + 0.4;
}
if (gravityway._rotation == 90) {
_local2 = _local2 - 0.4;
}
myBoll.DX = _local2;
myBoll.DY = _local1;
}
function spikeball(enemy, myBoll) {
var _local3 = myBoll.DX;
var _local2 = myBoll.DY;
enemy._x = enemy._x + _local3;
enemy._y = enemy._y + _local2;
if (timer <= 1) {
enemy._y = 400;
enemy._alpha = 100;
enemy._x = 400;
enemy._rotation = 0;
}
if ((_local3 > 25) || (_local3 < -25)) {
if (_local3 > 0) {
_local3 = 25;
}
if (_local3 < 0) {
_local3 = -25;
}
}
if ((_local2 > 25) || (_local2 < -25)) {
if (_local2 > 0) {
_local2 = 25;
}
if (_local2 < 0) {
_local2 = -25;
}
}
if (enemy._x < 35) {
enemy._x = 70 - enemy._x;
_local3 = -_local3;
}
if (enemy._x > 415) {
enemy._x = 830 - enemy._x;
_local3 = -_local3;
}
if (enemy._y < 35) {
enemy._y = 70 - enemy._y;
_local2 = -_local2;
}
if (enemy._y > 415) {
enemy._y = 830 - enemy._y;
_local2 = -_local2;
}
if (gravityway._rotation == 0) {
_local2 = _local2 + 0.2;
}
if (gravityway._rotation == 180) {
_local2 = _local2 - 0.2;
}
if (gravityway._rotation == -90) {
_local3 = _local3 + 0.2;
}
if (gravityway._rotation == 90) {
_local3 = _local3 - 0.2;
}
myBoll.DX = _local3;
myBoll.DY = _local2;
HIT(enemy);
}
function G2() {
if ((random(120) == 0) || (timer == 300)) {
if (random(2) == 1) {
gravityway._rotation = 180;
} else {
gravityway._rotation = 0;
}
}
}
function G4() {
var _local1 = random(4);
if ((random(180) == 0) || (timer == 300)) {
gravityway._rotation = _local1 * 90;
}
}
function CLEAR() {
myBoll1.DX = 0;
myBoll1.DY = 0;
myBoll2.DX = 1;
myBoll2.DY = 0;
myBoll3.DX = 2;
myBoll3.DY = 0;
myBoll4.DX = 3;
myBoll4.DY = 0;
myBoll5.DX = 5;
myBoll5.DY = 5;
gravityway._rotation = 0;
}
function HIT(enemy) {
if ((Math.sqrt(((enemy._x - u1._x) * (enemy._x - u1._x)) + ((enemy._y - u1._y) * (enemy._y - u1._y))) + 5) < ((u1._width + enemy._width) / 2)) {
death = 1;
}
if ((Math.sqrt(((enemy._x - u2._x) * (enemy._x - u2._x)) + ((enemy._y - u2._y) * (enemy._y - u2._y))) + 5) < ((u2._width + enemy._width) / 2)) {
death = 1;
}
if ((Math.sqrt(((enemy._x - u3._x) * (enemy._x - u3._x)) + ((enemy._y - u3._y) * (enemy._y - u3._y))) + 5) < ((u3._width + enemy._width) / 2)) {
death = 1;
}
if ((Math.sqrt(((enemy._x - u4._x) * (enemy._x - u4._x)) + ((enemy._y - u4._y) * (enemy._y - u4._y))) + 5) < ((u4._width + enemy._width) / 2)) {
death = 1;
}
}
function WALLSPIKE(enemy) {
if (enemy._x > 415) {
enemy._x = 415;
}
if (enemy._x < 35) {
enemy._x = 35;
}
if (enemy._y > 415) {
enemy._y = 415;
}
if (enemy._y < 35) {
enemy._y = 35;
}
if (enemy._alpha < 100) {
enemy._alpha = enemy._alpha + 2.5;
} else {
enemy._alpha = 100;
if ((enemy._x == 35) && (enemy._y == 415)) {
enemy._rotation = 0;
enemy._x = enemy._x + 3;
} else if ((enemy._x == 415) && (enemy._y == 415)) {
enemy._rotation = -90;
enemy._y = enemy._y - 3;
} else if ((enemy._x == 415) && (enemy._y == 35)) {
enemy._rotation = 180;
enemy._x = enemy._x - 3;
} else if ((enemy._x == 35) && (enemy._y == 35)) {
enemy._rotation = 90;
enemy._y = enemy._y + 3;
} else if (enemy._rotation == 0) {
enemy._x = enemy._x + 3;
} else if (enemy._rotation == 180) {
enemy._x = enemy._x - 3;
} else if (enemy._rotation == 90) {
enemy._y = enemy._y + 3;
} else if (enemy._rotation == -90) {
enemy._y = enemy._y - 3;
}
HIT(enemy);
}
}
function DS(enemy) {
if (timer <= 1) {
enemy._y = 415;
enemy._alpha = 0;
enemy._x = 35;
enemy._rotation = 0;
}
WALLSPIKE(enemy);
}
function LS(enemy) {
if (timer <= 1) {
enemy._y = 35;
enemy._alpha = 0;
enemy._x = 415;
enemy._rotation = 0;
}
WALLSPIKE(enemy);
}
function BS(enemy) {
if (enemy._x > 300) {
enemy._x = 300;
}
if (enemy._x < 150) {
enemy._x = 150;
}
if (enemy._y > 300) {
enemy._y = 300;
}
if (enemy._y < 150) {
enemy._y = 150;
}
if (enemy._alpha < 100) {
enemy._alpha = enemy._alpha + 2.5;
} else {
enemy._alpha = 100;
if ((enemy._x == 150) && (enemy._y == 300)) {
enemy._rotation = 0;
enemy._x = enemy._x + 3;
} else if ((enemy._x == 300) && (enemy._y == 300)) {
enemy._rotation = -90;
enemy._y = enemy._y - 3;
} else if ((enemy._x == 300) && (enemy._y == 150)) {
enemy._rotation = 180;
enemy._x = enemy._x - 3;
} else if ((enemy._x == 150) && (enemy._y == 150)) {
enemy._rotation = 90;
enemy._y = enemy._y + 3;
} else if (enemy._rotation == 0) {
enemy._x = enemy._x + 3;
} else if (enemy._rotation == 180) {
enemy._x = enemy._x - 3;
} else if (enemy._rotation == 90) {
enemy._y = enemy._y + 3;
} else if (enemy._rotation == -90) {
enemy._y = enemy._y - 3;
}
HIT(enemy);
}
}
var difficulty = 0;
var DX1 = 0;
var DY1 = 0;
var DX2 = 1;
var DY2 = 0;
var DX3 = 2;
var DY3 = 0;
var DX4 = 3;
var DY4 = 0;
var DX5 = 0;
var DY5 = 0;
var myBoll1 = new BALL(DX1, DY1);
var myBoll2 = new BALL(DX2, DY2);
var myBoll3 = new BALL(DX3, DY3);
var myBoll4 = new BALL(DX4, DY4);
var myBoll5 = new BALL(DX5, DY5);
gotoAndStop (3);
Frame 3
CLEAR();
var timer = 0;
var level = 1;
var death = 0;
Frame 22
LevelText.text = "level " + level;
movement(u1, myBoll1);
if (difficulty > 1) {
movement(u2, myBoll2);
} else {
u2._x = -1000;
}
if (difficulty > 2) {
movement(u3, myBoll3);
} else {
u3._x = -1000;
}
if (difficulty > 3) {
movement(u4, myBoll4);
} else {
u4._x = -1000;
}
timer = timer + 1;
TIMELEFT.text = Math.floor((600 - timer) / 40) + 1;
if (timer >= 600) {
timer = 0;
gotoAndStop (24);
}
if (level == 1) {
DS(Dspike);
}
if (level == 2) {
DS(Dspike);
LS(Lspike);
}
if (level == 3) {
DS(Dspike);
LS(Lspike);
spikeball(ballspike, myBoll5);
}
if (level == 4) {
spikeball(ballspike, myBoll5);
G2();
}
if (level == 5) {
DS(Dspike);
LS(Lspike);
spikeball(ballspike, myBoll5);
G2();
}
if (level == 6) {
DS(Dspike);
LS(Lspike);
spikeball(ballspike, myBoll5);
G4();
}
if (level == 7) {
DS(Dspike);
LS(Lspike);
spikeball(ballspike, myBoll5);
G4();
BS(Bspike);
}
Frame 23
if (death == 1) {
gotoAndStop (21);
} else {
gotoAndPlay (22);
}
Frame 24
if (level == 7) {
gotoAndStop (19);
}
level = level + 1;
CLEAR();
Symbol 4 Button
on (release) {
getURL ("http://www.albinoblacksheep.com/", "_blank");
}
Symbol 17 Button
on (release) {
_root.play();
}
Symbol 18 MovieClip Frame 1
_root.stop();
PercentLoaded = (_root.getBytesLoaded() / _root.getBytesTotal()) * 100;
if (PercentLoaded != 100) {
setProperty(loading_bar, _xscale , PercentLoaded);
} else {
gotoAndStop (3);
}
Symbol 18 MovieClip Frame 2
gotoAndPlay (1);
Symbol 91 MovieClip [__Packages.BALL] Frame 0
class BALL
{
var DX, DY;
function BALL (DX, DY) {
this.DX = DX;
this.DY = DY;
}
}
Symbol 24 Button
on (release) {
getURL ("http://www.albinoblacksheep.com", "_blank");
}
Symbol 34 Button
on (release) {
gotoAndStop (20);
}
Symbol 40 Button
on (release) {
gotoAndStop (4);
}
Symbol 46 Button
on (release) {
gotoAndStop (3);
}
Symbol 57 Button
on (release) {
difficulty = 1;
gotoAndPlay (22);
}
Symbol 60 Button
on (release) {
difficulty = 2;
gotoAndPlay (22);
}
Symbol 63 Button
on (release) {
difficulty = 3;
gotoAndPlay (22);
}
Symbol 66 Button
on (release) {
difficulty = 4;
gotoAndPlay (22);
}
Symbol 73 Button
on (release) {
gotoAndStop (3);
}
Symbol 78 Button
on (release) {
death = 0;
timer = 0;
CLEAR();
gotoAndPlay (22);
}
on (keyPress "<Enter>") {
death = 0;
timer = 0;
CLEAR();
gotoAndPlay (22);
}
Symbol 90 Button
on (release) {
gotoAndPlay (22);
}
on (keyPress "<Enter>") {
death = 0;
timer = 0;
CLEAR();
gotoAndPlay (22);
}