Frame 1
function bgMusic(playMusic) {
if (playMusic) {
bgSound = new Sound(bg);
bgSound.attachSound("bgTrack");
bgSound.start(0, 99);
} else {
bgSound.stop();
}
}
function sitelock(url_to_lock) {
domain_parts = _url.split("://");
real_domain = domain_parts[1].split("/");
domain.text = real_domain[0];
if (real_domain[0] != url_to_lock) {
_root._alpha = 0;
}
}
bg._alpha = 30;
bgMusic(true);
myLocalSO = SharedObject.getLocal("nullG");
if (myLocalSO.data.levelProgress != undefined) {
levelProgress = myLocalSO.data.levelProgress;
} else {
levelProgress = 1;
}
var _mochiads_game_id = "2749971006ec07c0";
var NoMenu = new ContextMenu();
NoMenu.hideBuiltInItems();
this.menu = NoMenu;
Stage.showMenu = false;
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("eb397620", this, 10301, true);
Frame 2
function startGame() {
i = 0;
while (i < blackList.length) {
removeMovieClip(blackList[i]);
i++;
}
removeMovieClip(player);
removeMovieClip(antiGround);
dead = false;
starting = true;
gotoAndPlay(10 + level);
bg.onPress = function () {
};
}
function menuBlackHoles(holeNumber) {
blackList = [];
i = 0;
while (i < holeNumber) {
blackList[i] = attachMovie("blackHole", "blackHole" + i, 10 + i);
blackList[i]._x = 200 + random(100);
blackList[i]._y = 200 + random(100);
i++;
}
}
function menuLoop() {
movePlayer();
makeTrail();
antiGroundHit();
if (((((player._x > (Stage.width + 50)) or (player._x < -50)) or (player._y > (Stage.height + 50))) or (player._y < -50)) or enemyHit) {
player._x = Stage.width / 2;
player._y = Stage.height / 2;
ySpeed = random(30) - 15;
xSpeed = random(30) - 15;
}
}
function hitXY() {
upX = player._x;
upY = player._y - (player._height / 2);
leftX = player._x - (player._width / 2);
leftY = player._y;
downX = player._x;
downY = player._y + (player._height / 2);
rightX = player._x + (player._width / 2);
rightY = player._y;
}
function playSound(soundEffect) {
if (!mute) {
soundE.stop();
soundE = new Sound(this);
soundE.attachSound(soundEffect);
soundE.start(0, 1);
}
}
function playJumpSound(playJumpingSound) {
if (playJumpingSound and (!mute)) {
jumpingSound.stop();
jumpingSound = new Sound(player);
jumpingSound.attachSound("jumpSound");
jumpingSound.start(0, 99);
} else {
jumpingSound.stop();
}
}
function bgMusic(playMusic) {
if (playMusic) {
playBGMusic = true;
bgSound = new Sound(bg);
bgSound.attachSound("bgTrack");
bgSound.start(0, 99);
} else {
playBGMusic = false;
bgSound.stop();
}
}
function setJump() {
if (!playerJumping) {
radAngle = Math.atan2(player._x - _xmouse, player._y - _ymouse);
rotate = ((-radAngle) * 180) / Math.PI;
playerJumping = true;
nearGround = false;
starting = false;
xSpeed = (-Math.sin(radAngle)) * playerSpeed;
ySpeed = (-Math.cos(radAngle)) * playerSpeed;
playJumpSound(true);
}
}
function movePlayer() {
if (!starting) {
moveCounter = 0;
if (Math.abs(xSpeed) > 8) {
while (moveCounter < 3) {
player._x = player._x + (xSpeed / 3);
playerHit();
antiGroundHit();
moveCounter++;
}
} else {
player._x = player._x + xSpeed;
}
moveCounter = 0;
if (Math.abs(ySpeed) > 8) {
while (moveCounter < 3) {
player._y = player._y + (ySpeed / 3);
playerHit();
antiGroundHit();
moveCounter++;
}
} else {
player._y = player._y + ySpeed;
}
}
}
function playerHit() {
hitXY();
touch = false;
if (!dead) {
if (ground.hitTest(upX, upY, true)) {
playerJumping = false;
touch = true;
while (ground.hitTest(upX, upY, true)) {
hitXY();
player._y = player._y + 0.1;
}
}
if (ground.hitTest(rightX, rightY, true)) {
playerJumping = false;
touch = true;
while (ground.hitTest(rightX, rightY, true)) {
hitXY();
player._x = player._x - 0.1;
}
}
if (ground.hitTest(downX, downY, true)) {
playerJumping = false;
touch = true;
while (ground.hitTest(downX, downY, true)) {
hitXY();
player._y = player._y - 0.1;
}
}
if (ground.hitTest(leftX, leftY, true)) {
playerJumping = false;
touch = true;
while (ground.hitTest(leftX, leftY, true)) {
hitXY();
player._x = player._x + 0.1;
}
}
}
if (playerJumping == false) {
xSpeed = 0;
ySpeed = 0;
}
if (touch) {
nearGround = true;
playJumpSound(false);
xSpeed = 0;
ySpeed = 0;
}
}
function antiGroundHit() {
hitXY();
antiHit = false;
if (antiGround.hitTest(upX, upY, true)) {
while (antiGround.hitTest(upX, upY, true)) {
hitXY();
player._y = player._y + 1;
}
ySpeed = Math.abs(ySpeed);
createMiniBlast(upX, upY);
antiHit = true;
}
if (antiGround.hitTest(rightX, rightY, true)) {
while (antiGround.hitTest(rightX, rightY, true)) {
hitXY();
player._x = player._x - 1;
}
xSpeed = -1 * Math.abs(xSpeed);
createMiniBlast(rightX, rightY);
antiHit = true;
}
if (antiGround.hitTest(downX, downY, true)) {
while (antiGround.hitTest(downX, downY, true)) {
hitXY();
player._y = player._y - 1;
}
ySpeed = -1 * Math.abs(ySpeed);
createMiniBlast(downX, downY);
antiHit = true;
}
if (antiGround.hitTest(leftX, leftY, true)) {
while (antiGround.hitTest(leftX, leftY, true)) {
hitXY();
player._x = player._x + 1;
}
xSpeed = Math.abs(xSpeed);
createMiniBlast(leftX, leftY);
antiHit = true;
}
if (antiHit) {
playSound("hitAntiGround");
}
}
function enemyHitCheck() {
hitXY();
hitEnemy = false;
if (enemy.hitTest(upX, upY, true)) {
hitEnemy = true;
}
if (enemy.hitTest(rightX, rightY, true)) {
hitEnemy = true;
}
if (enemy.hitTest(downX, downY, true)) {
hitEnemy = true;
}
if (enemy.hitTest(leftX, leftY, true)) {
hitEnemy = true;
}
if (hitEnemy) {
enemyHit = true;
}
}
function checkLose() {
if (enemyHit) {
playJumpSound(false);
dead = true;
xSpeed = 0;
ySpeed = 0;
player.play();
}
if ((((player._x > (Stage.width + 50)) or (player._x < -50)) or (player._y > (Stage.height + 50))) or (player._y < -50)) {
lose();
}
}
function lose() {
playJumpSound(false);
enemyHit = false;
currentLevel = currentLevel - 1;
clearScreen();
gotoAndStop (4);
}
function clickCheck() {
if (Key.isDown(32)) {
setJump();
}
if (Key.isDown(82)) {
enemyHit = false;
currentLevel = currentLevel - 1;
lose();
}
}
function checkWin() {
if (player.hitTest(target)) {
clearScreen();
level = _currentframe - 10;
gotoAndStop (3);
}
}
function clearScreen() {
removeMovieClip(player);
}
function makeTrail() {
if ((xSpeed or ySpeed) and (!dead)) {
if (hitGravField) {
trail = attachMovie("gravTrail", "trail" + trailCounter, 200 + trailCounter);
} else {
trail = attachMovie("trail", "trail" + trailCounter, 200 + trailCounter);
}
trailRandom = -4;
trail._height = trail._height - trailRandom;
trail._width = trail._width - trailRandom;
trail._x = player._x;
trail._y = player._y;
trailCounter++;
if (trailCounter > maxTrailCounter) {
trailCounter = 0;
removeMovieClip("trail" + trailCounter);
}
}
}
function createMiniBlast(miniBlastX, miniBlastY) {
miniBlast = attachMovie("miniBlast", "miniBlast" + miniBlastCounter, 250 + miniBlastCounter);
miniBlast._x = miniBlastX;
miniBlast._y = miniBlastY;
miniBlastCounter++;
if (miniBlastCounter == 20) {
miniBlastCounter = 0;
}
}
function shoot() {
bulletTime++;
if (bulletTime == 2) {
bulletTime = 0;
bulletReady = true;
}
if ((clicked and (player._alpha > 10)) and (bulletHold < 10)) {
bulletHold = bulletHold + 0.5;
player._alpha = player._alpha - (0.5 * bulletHold);
player._alpha = player._alpha - (0.5 * bulletHold);
}
if (nearGround and (player._alpha < 100)) {
player._alpha = player._alpha + 5;
player._alpha = player._alpha + 5;
}
if (released and bulletReady) {
playSound("laser");
playerJumping = true;
starting = false;
bullet = attachMovie("bullet", "bullet" + bulletCounter, 150 + bulletCounter);
bulletArray[bulletCounter] = bullet;
bullet._x = player._x;
bullet._y = player._y;
angle = Math.atan2(bullet._x - _xmouse, bullet._y - _ymouse);
bulletXSpeed = (-Math.sin(angle)) * bulletSpeed;
bulletYSpeed = (-Math.cos(angle)) * bulletSpeed;
bullet._width = bullet._width + bulletHold;
xSpeed = xSpeed - (bulletXSpeed * (0.1 * bulletHold));
ySpeed = ySpeed - (bulletYSpeed * (0.1 * bulletHold));
rotate = ((-angle) * 180) / Math.PI;
bullet._rotation = rotate;
bulletCounter++;
if (bulletCounter > maxBullets) {
bulletCounter = 0;
}
bulletReady = false;
released = false;
bulletHold = 0;
bulletTime = 0;
}
}
function gravField() {
hitGravField = false;
if (((hitGravDown or hitGravUp) or hitGravRight) or hitGravLeft) {
hitGravField = true;
}
}
function gravitationDown() {
hitXY();
hitGravDown = false;
if (gravDown.hitTest(upX, upY, true)) {
hitGravDown = true;
}
if (gravDown.hitTest(rightX, rightY, true)) {
hitGravDown = true;
}
if (gravDown.hitTest(downX, downY, true)) {
hitGravDown = true;
}
if (gravDown.hitTest(leftX, leftY, true)) {
hitGravDown = true;
}
if (hitGravDown) {
ySpeed = ySpeed + gravG;
}
}
function gravitationUp() {
hitXY();
hitGravUp = false;
if (gravUp.hitTest(upX, upY, true)) {
hitGravUp = true;
}
if (gravUp.hitTest(rightX, rightY, true)) {
hitGravUp = true;
}
if (gravUp.hitTest(downX, downY, true)) {
hitGravUp = true;
}
if (gravUp.hitTest(leftX, leftY, true)) {
hitGravUp = true;
}
if (hitGravUp) {
ySpeed = ySpeed - gravG;
}
}
function gravitationLeft() {
hitXY();
hitGravLeft = false;
if (gravLeft.hitTest(upX, upY, true)) {
hitGravLeft = true;
}
if (gravLeft.hitTest(rightX, rightY, true)) {
hitGravLeft = true;
}
if (gravLeft.hitTest(downX, downY, true)) {
hitGravLeft = true;
}
if (gravLeft.hitTest(leftX, leftY, true)) {
hitGravLeft = true;
}
if (hitGravLeft) {
xSpeed = xSpeed - gravG;
}
}
function gravitationRight() {
hitXY();
hitGravRight = false;
if (gravRight.hitTest(upX, upY, true)) {
hitGravRight = true;
}
if (gravRight.hitTest(rightX, rightY, true)) {
hitGravRight = true;
}
if (gravRight.hitTest(downX, downY, true)) {
hitGravRight = true;
}
if (gravRight.hitTest(leftX, leftY, true)) {
hitGravRight = true;
}
if (hitGravRight) {
xSpeed = xSpeed + gravG;
}
}
function gravitaion() {
gravitationDown();
gravitationUp();
gravitationLeft();
gravitationRight();
gravField();
}
function moveBG() {
bg._x = -50 * (player._x / 500);
bg._y = -50 * (player._y / 500);
}
function mainLoop() {
moveBG();
clickCheck();
playerHit();
enemyHitCheck();
antiGroundHit();
movePlayer();
playerHit();
enemyHitCheck();
antiGroundHit();
gravitaion();
if ((xSpeed or ySpeed) and inLevel) {
makeTrail();
}
if (enableShoot and inLevel) {
shoot();
}
checkLose();
}
function reset() {
stop();
showE = attachMovie("showEffect", "showEffect", 2999);
showE._height = showE._height / 4;
showE._width = showE._width / 4;
showE._X = player._x;
showE._y = player._y;
dead = false;
player.swapDepths(999);
ingameReset.swapDepths(1222);
inLevel = true;
enableShoot = false;
bulletHold = 0;
bg.onPress = function () {
clicked = true;
};
bg.onRelease = function () {
clicked = false;
released = true;
};
ingameReset.onPress = function () {
inGameMenu = attachMovie("inGameMenu", "inGameMenu", 5000);
inGameMenu._x = 0;
inGameMenu._y = 0;
inGameMenu.yes.onPress = function () {
inLevel = false;
starting = false;
playJumpSound(false);
clearScreen();
removeMovieClip(inGameMenu);
_root.gotoAndStop(2);
};
inGameMenu.no.onPress = function () {
removeMovieClip(inGameMenu);
};
};
ingameMute.onPress = function () {
if (playBGMusic) {
bgMusic(false);
mute = true;
} else {
bgMusic(true);
mute = false;
}
};
starting = true;
level = _currentframe - 10;
trailCounter = 0;
miniBlastCounter = 0;
bulletCounter = 0;
bulletArray = [];
bulletReady = true;
bulletTime = 10;
maxBullets = 10;
bulletSpeed = 20;
playerSpeed = 8;
xSpeed = 0;
ySpeed = 0;
playerJumping = false;
gravG = 0.4;
killTrail = true;
this.onEnterFrame = function () {
mainLoop();
};
}
stop();
level = 1;
maxLevels = 24;
playBGMusic = true;
ySpeed = random(20) - 10;
xSpeed = random(20) - 10;
dead = false;
trailCounter = 0;
maxTrailCounter = 100;
killTrail = false;
bg._alpha = 30;
menuBlackHoles(1);
player.swapDepths(50);
antiGround.swapDepths(60);
playerJumping = true;
ingameMute.onPress = function () {
if (playBGMusic) {
bgMusic(false);
mute = true;
} else {
bgMusic(true);
mute = false;
}
};
this.onEnterFrame = function () {
menuLoop();
};
bg.onPress = function () {
blackList[i] = attachMovie("blackHole", "blackHole" + i, 10 + i);
blackList[i]._x = _xmouse;
blackList[i]._y = _ymouse;
i++;
};
antiGround.startButton.onPress = function () {
startGame();
};
antiGround.selectLevel.onPress = function () {
i = 0;
while (i < blackList.length) {
removeMovieClip(blackList[i]);
i++;
}
removeMovieClip(antiGround);
gotoAndStop (5);
};
antiGround.credits.onPress = function () {
i = 0;
while (i < blackList.length) {
removeMovieClip(blackList[i]);
i++;
}
removeMovieClip(antiGround);
gotoAndStop (6);
};
antiGround.clearScreen.onPress = function () {
i = 0;
while (i < blackList.length) {
removeMovieClip(blackList[i]);
i++;
}
};
clicker.onPress = function () {
clicked = true;
};
clicker.onRelease = function () {
clicked = false;
};
antiGround.moreGames.onPress = function () {
getURL ("http://www.bored.com/?utm_source=tpvisit&utm_medium=flashgames&utm_campaign=nullg", "_blank");
};
boredLogo.onRelease = function () {
getURL ("http://www.bored.com/?utm_source=tpvisit&utm_medium=flashgames&utm_campaign=nullg", "_blank");
};
Frame 3
stop();
inLevel = false;
myLocalSO.data.levelProgress = levelProgress;
retry.onPress = function () {
startGame();
};
nextLevel.onPress = function () {
gotoAndStop(11 + level);
};
menuButton.onPress = function () {
gotoAndPlay (2);
};
moreGames.onPress = function () {
getURL ("http://www.bored.com/?utm_source=tpvisit&utm_medium=flashgames&utm_campaign=nullg", "_blank");
};
Frame 4
stop();
inLevel = false;
gotoAndStop(10 + level);
menuButton.onPress = function () {
gotoAndStop (2);
};
Frame 5
player.swapDepths(50);
antiGround.swapDepths(60);
this.onEnterFrame = function () {
menuLoop();
};
menuButton.onPress = function () {
removeMovieClip(antiGround);
removeMovieClip(player);
gotoAndStop (2);
i = 0;
while (i < blackList.length) {
removeMovieClip(blackList[i]);
i++;
}
};
clearScreen2.onPress = function () {
i = 0;
while (i < blackList.length) {
removeMovieClip(blackList[i]);
i++;
}
};
startX = 20;
startY = 100;
levelCounter = 1;
i = 0;
while (i < 4) {
q = 0;
while (q < 7) {
if ((levelCounter <= maxLevels) and (levelCounter <= levelProgress)) {
select = antiGround.attachMovie("levelSelector", "levelSelector" + levelCounter, 1000 + levelCounter);
select.level.text = levelCounter;
select.levelNumber = levelCounter;
select._x = startX;
startX = startX + 70;
select._y = startY;
levelCounter++;
}
q++;
}
startY = startY + 70;
startX = 20;
i++;
}
Frame 6
player.swapDepths(50);
antiGround.swapDepths(60);
this.onEnterFrame = function () {
movePlayer();
makeTrail();
antiGroundHit();
if (((((player._x > (Stage.width + 50)) or (player._x < -50)) or (player._y > (Stage.height + 50))) or (player._y < -50)) or enemyHit) {
player._x = Stage.width / 2;
player._y = Stage.height / 2;
ySpeed = random(30) - 15;
xSpeed = random(30) - 15;
}
};
menuButton.onPress = function () {
removeMovieClip(antiGround);
removeMovieClip(player);
gotoAndStop (2);
i = 0;
while (i < blackList.length) {
removeMovieClip(blackList[i]);
i++;
}
};
clearScreen2.onPress = function () {
i = 0;
while (i < blackList.length) {
removeMovieClip(blackList[i]);
i++;
}
};
levelCounter = 1;
Frame 11
reset();
Frame 12
reset();
Frame 13
reset();
Frame 14
reset();
Frame 15
reset();
Frame 16
reset();
Frame 17
reset();
Frame 18
reset();
Frame 19
reset();
Frame 20
reset();
Frame 21
reset();
Frame 22
reset();
Frame 23
reset();
Frame 24
reset();
Frame 25
reset();
Frame 26
reset();
Frame 27
reset();
field._alpha = 80;
Frame 28
reset();
setJump();
ySpeed = 0;
xSpeed = 10;
enableShoot = true;
Frame 29
reset();
enableShoot = true;
Frame 30
reset();
enableShoot = true;
Frame 31
reset();
enableShoot = true;
Frame 32
reset();
enableShoot = true;
Frame 33
reset();
enableShoot = true;
Frame 34
reset();
enableShoot = true;
Frame 35
stop();
inLevel = false;
retry.onPress = function () {
gotoAndStop(10 + level);
};
menuButton.onPress = function () {
gotoAndStop (2);
};
Symbol 9 MovieClip [clicker] Frame 1
this._width = Stage.width;
this.height = Stage.height;
Symbol 18 MovieClip Frame 1
stop();
Symbol 18 MovieClip Frame 2
stop();
Symbol 20 MovieClip [gravLeft] Frame 1
xG = -_root.gravG;
this.onEnterFrame = function () {
if (_root.player.hitTest(arrows.hit)) {
_root.xSpeed = _root.xSpeed + xG;
}
};
Symbol 29 MovieClip [target] Frame 1
function distance() {
xD = this._x - _root.player._x;
yD = this._y - _root.player._y;
d = Math.sqrt((xD * xD) + (yD * yD));
if ((d < 30) and (!_root.dead)) {
playerSpeed = d / 3;
if (playerSpeed > 25) {
playerSpeed = 25;
}
radAngle = Math.atan2(_root.player._x - this._x, _root.player._y - this._y);
xSpeed = (-Math.sin(radAngle)) * playerSpeed;
ySpeed = (-Math.cos(radAngle)) * playerSpeed;
_root.xSpeed = (_root.xSpeed * 0.1) + xSpeed;
_root.ySpeed = (_root.ySpeed * 0.5) + ySpeed;
winCounter--;
}
if (winCounter == 0) {
_root.playJumpSound(false);
_root.clearScreen();
_root.level = _root._currentframe - 10;
if (_root.levelProgress < (_root.level + 1)) {
_root.levelProgress = _root.level + 1;
_root.myLocal_so.data.levelMap = _root.levelProgress;
_root.myLocal_so.flush();
}
_root.gotoAndStop(3);
}
}
g = 2;
m = 100;
mP = 1;
winCounter = 30;
rotate = 0;
rotateSpeed = -5;
rotateCounter = 0;
maxRotate = 3;
this.onEnterFrame = function () {
distance();
vortex._rotation = vortex._rotation - 3;
};
Symbol 37 MovieClip [player] Frame 1
stop();
Symbol 37 MovieClip [player] Frame 2
_root.playSound("explosion");
Symbol 37 MovieClip [player] Frame 38
_root.lose();
Symbol 49 MovieClip [gravTrail] Frame 10
if (_root.killTrail) {
removeMovieClip(this);
}
Symbol 52 MovieClip [trail] Frame 10
if (_root.killTrail) {
removeMovieClip(this);
}
Symbol 57 MovieClip [miniBlast] Frame 4
removeMovieClip(this);
Symbol 61 MovieClip [bullet] Frame 1
ySpeed = _root.bulletYSpeed;
xSpeed = _root.bulletXSpeed;
hitList = _root.hitList;
this.onEnterFrame = function () {
this._x = this._x + xSpeed;
this._y = this._y + ySpeed;
i = 0;
while (i < hitList.length) {
if (this.hitTest(hitList[i])) {
hitList[i].play();
}
i++;
}
};
Symbol 68 MovieClip [enemy] Frame 1
stop();
this.onEnterFrame = function () {
this._y = this._y + 5;
};
Symbol 68 MovieClip [enemy] Frame 5
removeMovieClip(this);
Symbol 70 MovieClip [vertical-pedal] Frame 1
player = _root.player;
lastY = this._y;
speed = 1;
first = true;
this.onEnterFrame = function () {
this._y = this._y + speed;
if (this.hitTest(player._x - 10, player._y, true)) {
player._y = player._y + speed;
}
};
Symbol 72 MovieClip [rotatingCircle] Frame 1
a = 10;
this._height = this._height - random(10);
this._width = this._width - random(10);
this.onEnterFrame = function () {
this._alpha = this._alpha - a;
};
Symbol 74 MovieClip [rotatingCircle2] Frame 1
a = 10;
this._height = this._height - random(15);
this._width = this._width - random(15);
this.onEnterFrame = function () {
this._alpha = this._alpha - a;
};
Symbol 81 MovieClip [trapRight] Frame 1
stop();
bullets = _root.bulletArray;
this.onEnterFrame = function () {
this._x = this._x + speed;
i = 0;
while (i < bullets.length) {
if (this.hitTest(bullets[i])) {
play();
}
i++;
}
};
Symbol 81 MovieClip [trapRight] Frame 5
stop();
removeMovieClip(this);
Symbol 87 MovieClip [levelSelector] Frame 1
this.onPress = function () {
if (levelNumber) {
_root.level = levelNumber;
_root.startGame();
}
};
Symbol 95 MovieClip [showEffect] Frame 8
stop();
Symbol 107 MovieClip [trapDown] Frame 1
stop();
bullets = _root.bulletArray;
this.onEnterFrame = function () {
this._y = this._y + speed;
i = 0;
while (i < bullets.length) {
if (this.hitTest(bullets[i])) {
play();
}
i++;
}
};
Symbol 107 MovieClip [trapDown] Frame 5
stop();
removeMovieClip(this);
Symbol 109 MovieClip [blackHole] Frame 1
function distance() {
xD = this._x - _root.player._x;
yD = this._y - _root.player._y;
d = Math.sqrt((xD * xD) + (yD * yD));
if (d < 500) {
playerSpeed = 60 / d;
if (playerSpeed > 25) {
playerSpeed = 25;
}
radAngle = Math.atan2(_root.player._x - this._x, _root.player._y - this._y);
xSpeed = (-Math.sin(radAngle)) * playerSpeed;
ySpeed = (-Math.cos(radAngle)) * playerSpeed;
_root.xSpeed = _root.xSpeed + xSpeed;
_root.ySpeed = _root.ySpeed + ySpeed;
}
}
g = 2;
m = 100;
mP = 1;
this.onEnterFrame = function () {
distance();
};
Symbol 222 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 1
rotate = 0;
i = 0;
rotating = [];
maxRotating = 10;
rotateSpeed = 1;
rotate2 = 0;
q = 0;
rot = [];
maxRot = 10;
rotSpeed = -0.5;
this.onEnterFrame = function () {
rotating[i] = attachMovie("rotatingCircle", "rotatingCircle" + i, 100 + i);
rotating[i]._x = 250;
rotating[i]._y = 250;
rotating[i]._rotation = rotate;
rotate = rotate + rotateSpeed;
i++;
if (i > maxRotating) {
i = 0;
}
removeMovieClip(rot[q]);
rot[q] = attachMovie("rotatingCircle2", "rotatingCircle2" + q, 150 + q);
rot[q]._x = 250;
rot[q]._y = 250;
rot[q]._rotation = rotate2;
rotate2 = rotate2 + rotSpeed;
q++;
if (q > maxRot) {
q = 0;
}
};
Symbol 236 MovieClip Frame 1
enemySpeed = 10;
frame = 15;
frame2 = 8;
enemyDown = [];
maxEnemyDown = 3;
enemyDownCounter = 2;
enemyUp = [];
maxEnemyUp = 3;
enemyUpCounter = 2;
enemyUp[0] = attachMovie("level11DownEnemy", "enemyUp0", 200);
enemyUp[0]._x = 280;
enemyUp[0]._y = 600;
enemyUp[1] = attachMovie("level11DownEnemy", "enemyUp1", 201);
enemyUp[1]._x = 280;
enemyUp[1]._y = 300;
enemyDown[0] = attachMovie("level11downEnemy", "enemyDown0", 100);
enemyDown[0]._x = 190;
enemyDown[0]._y = 0;
enemyDown[1] = attachMovie("level11downEnemy", "enemyDown1", 101);
enemyDown[1]._x = 190;
enemyDown[1]._y = 300;
this.onEnterFrame = function () {
if (frame == 30) {
enemyDown[enemyDownCounter] = attachMovie("level11downEnemy", "enemyDown" + enemyDownCounter, 100 + enemyDownCounter);
enemyDown[enemyDownCounter]._x = 190;
enemyDown[enemyDownCounter]._y = -150;
enemyDownCounter++;
if (enemyDownCounter > maxEnemyDown) {
enemyDownCounter = 0;
}
frame = 0;
}
if (frame2 == 30) {
enemyUp[enemyUpCounter] = attachMovie("level11DownEnemy", "enemyUp" + enemyUpCounter, 200 + enemyUpCounter);
enemyUp[enemyUpCounter]._x = 280;
enemyUp[enemyUpCounter]._y = 650;
enemyUpCounter++;
if (enemyUpCounter > maxEnemyUp) {
enemyUpCounter = 0;
}
frame2 = 0;
}
i = 0;
while (i < enemyDown.length) {
enemyDown[i]._y = enemyDown[i]._y + enemySpeed;
i++;
}
i = 0;
while (i < enemyUp.length) {
enemyUp[i]._y = enemyUp[i]._y - enemySpeed;
i++;
}
frame++;
frame2++;
};
Symbol 239 MovieClip Frame 1
function distance() {
xD = this._x - _root.player._x;
yD = this._y - _root.player._y;
d = Math.sqrt((xD * xD) + (yD * yD));
if (d < 500) {
playerSpeed = 60 / d;
if (playerSpeed > 25) {
playerSpeed = 25;
}
radAngle = Math.atan2(_root.player._x - this._x, _root.player._y - this._y);
xSpeed = (-Math.sin(radAngle)) * playerSpeed;
ySpeed = (-Math.cos(radAngle)) * playerSpeed;
_root.xSpeed = _root.xSpeed - xSpeed;
_root.ySpeed = _root.ySpeed - ySpeed;
}
}
g = 2;
m = 100;
mP = 1;
this.onEnterFrame = function () {
distance();
};
Symbol 244 MovieClip Frame 1
stop();
frame = 0;
delay = 30;
this.onEnterFrame = function () {
if (frame == delay) {
play();
}
frame++;
};
this._name = "gravDown";
Symbol 244 MovieClip Frame 2
stop();
frame = 0;
this._name = "gravUp";
Symbol 268 MovieClip Frame 1
currentTrap = 0;
maxTraps = 150;
delay = 2;
frame = 0;
this.onEnterFrame = function () {
frame++;
if (frame >= delay) {
trap = attachMovie("trapDown", "trap" + currentTrap, 100 + currentTrap);
trap._x = 100 + random(300);
trap._y = -20;
trap.speed = 5 - (random(300) / 100);
currentTrap++;
if (currentTrap >= maxTraps) {
currentTrap = 0;
}
frame = 0;
}
};
Symbol 274 MovieClip Frame 1
currentTrap = 0;
maxTraps = 150;
delay = 3;
frame = 0;
i = 0;
while (i < 30) {
trap = attachMovie("trapRight", "trap" + currentTrap, 100 + currentTrap);
trap._x = 2 + (8 * i);
trap._y = 120 + random(80);
trap.speed = 3 + (random(50) / 100);
currentTrap++;
if (currentTrap >= maxTraps) {
currentTrap = 0;
}
i++;
}
i = 0;
while (i < 30) {
trap = attachMovie("trapRight", "trap" + currentTrap, 100 + currentTrap);
trap._x = 500 - (2 + (8 * i));
trap._y = 320 + random(80);
trap.speed = -(3 + (random(50) / 100));
currentTrap++;
if (currentTrap >= maxTraps) {
currentTrap = 0;
}
i++;
}
this.onEnterFrame = function () {
frame++;
if (frame >= delay) {
trap = attachMovie("trapRight", "trap" + currentTrap, 100 + currentTrap);
trap._x = -20;
trap._y = 120 + random(80);
trap.speed = 3 + (random(50) / 100);
currentTrap++;
trap = attachMovie("trapRight", "trap" + currentTrap, 100 + currentTrap);
trap._x = 520;
trap._y = 320 + random(80);
trap.speed = -(3 + (random(50) / 100));
currentTrap++;
frame = 0;
}
if (currentTrap >= maxTraps) {
currentTrap = 0;
}
};