Frame 1
function resetStage() {
var _local1 = _root;
_local1._x = xnorm;
_local1._y = ynorm;
_local1._xscale = xscalenorm;
_local1._yscale = yscalenorm;
}
function buildMap(map) {
var _local1 = this;
enemyArray = new Array();
enemyCount = 0;
enemiesKilled = 0;
timecount = 0;
timetaken = 0;
_local1.attachMovie("empty", "scrClip", 0);
_local1.scrClip._x = startX;
_local1.scrClip._y = startY;
mapW = map[0].length;
mapH = map.length;
cMap = map;
var starty;
var startx;
if (startPos[1] < (visAreaY - 4)) {
starty = visAreaY - 5;
} else {
starty = startPos[1];
}
if ((startPos[0] + visAreaX) > (mapW + 2)) {
startx = (mapW - visAreaX) + 2;
} else {
startx = startPos[0];
}
toplayer = 4000;
d = 0;
var _local3 = mapH;
while (_local3 >= -1) {
var _local2 = -1;
while (_local2 < (mapW + 1)) {
var enemytile = false;
if (map[_local3][_local2] > 18) {
enemytile = true;
}
currentdepth = d;
if ((map[_local3][_local2] > 9) && (map[_local3][_local2] < 14)) {
d = toplayer;
}
_local1.scrClip.attachMovie("tile", (("t_" + _local3) + "_") + _local2, ++d);
_local1.scrClip[(("t_" + _local3) + "_") + _local2]._x = _local2 * tileW;
_local1.scrClip[(("t_" + _local3) + "_") + _local2]._y = _local3 * tileH;
if (enemytile) {
var enemyName = ("enemy" + enemyArray.length);
if (((map[_local3][_local2] == 24) || (map[_local3][_local2] == 25)) || (map[_local3][_local2] == 28)) {
_local1.scrClip.attachMovie("tile", enemyName, 0);
} else {
_local1.scrClip.attachMovie("tile", enemyName, 2000 + (++d));
}
_local1.scrClip[enemyName]._x = _local2 * tileW;
_local1.scrClip[enemyName]._y = _local3 * tileH;
_local1.scrClip[enemyName].gotoAndStop(map[_local3][_local2] + 1);
_local1.scrClip[enemyName].enemy.xpos = (_local2 * tileW) + (tileW / 2);
_local1.scrClip[enemyName].enemy.ypos = (_local3 * tileH) + (tileH / 2);
enemyArray.push(enemyName);
_local1.scrClip[(("t_" + _local3) + "_") + _local2].gotoAndStop(2);
scrClip[(("t_" + _local3) + "_") + _local2].tile_frame = 2;
if (map[_local3][_local2] < 30) {
enemyCount++;
}
} else {
_local1.scrClip[(("t_" + _local3) + "_") + _local2].gotoAndStop(map[_local3][_local2] + 1);
scrClip[(("t_" + _local3) + "_") + _local2].tile_frame = map[_local3][_local2] + 1;
}
_local1.scrClip[(("t_" + _local3) + "_") + _local2]._visible = false;
d = currentdepth;
d++;
toplayer++;
_local2++;
}
_local3--;
}
i = (starty - visAreaY) + 5;
while (i < (starty + 4)) {
j = startx - 2;
while (j < ((startx + visAreaX) - 1)) {
scrClip[(("t_" + i) + "_") + j]._visible = true;
if ((i == startPos[1]) && (j == startPos[0])) {
_local1.scrClip.attachMovie("Binky", "char", 3500);
_local1.scrClip.char.xpos = (j * tileW) + (tileW / 2);
_local1.scrClip.char.ypos = (i * tileH) + (tileH / 2);
_local1.attachMovie("binky's_bar", "bar", 100);
_local1.scrClip.bar._x = 0;
_local1.scrClip.bar._x = 0;
var k = 0;
while (k < maxBullets) {
var bulletName = ("bullet" + k);
bulletsArray.push(bulletName);
_local1.scrClip.attachMovie("bullet", bulletName, 3000 + k);
_local1.scrClip[bulletName].xpos = (j * tileW) + (tileW / 2);
_local1.scrClip[bulletName].ypos = (i * tileH) + (tileH / 2);
_local1.scrClip[bulletName]._visible = false;
k++;
}
var m = 0;
while (m < maxBullets) {
var enemybulletName = ("enemybullet" + m);
enemybulletsArray.push(enemybulletName);
_local1.scrClip.attachMovie("enemybullet", enemybulletName, 3100 + m);
_local1.scrClip[enemybulletName].xpos = (j * tileW) + (tileW / 2);
_local1.scrClip[enemybulletName].ypos = (i * tileH) + (tileH / 2);
_local1.scrClip[enemybulletName]._visible = false;
m++;
}
}
j++;
}
i++;
}
var magicNumber = ((mapH - visAreaX) + 2);
var fix_y = (((mapH - starty) - magicNumber) * tileH);
var fix_x = ((startx - 1) * tileW);
_local1.scrClip._y = _local1.scrClip._y + fix_y;
_local1.scrClip._x = _local1.scrClip._x - fix_x;
xpos = _local1.scrClip._x;
ypos = _local1.scrClip._y;
if (!initialized) {
INTERVAL_ID = setInterval(goGame, 12);
}
initialized = true;
}
function goGame() {
var _local1 = _root;
if (Key.isDown(80)) {
if (p_hasrealeased) {
pausegame = !_local1.pausegame;
pause_screen.nextFrame();
p_hasrealeased = false;
}
} else {
p_hasrealeased = true;
}
if (!pausegame) {
if (timecount >= 83) {
timetaken++;
timecount = 0;
}
timecount++;
_local1.scrClip.char.control();
updateBullets();
updateEnemies();
life = _local1.scrClip.char.life;
if (enemiesKilled == enemyCount) {
gotoAndStop ("tallyScore");
}
}
}
function doScroll(dir) {
var _local1 = this;
xScrSpeed = _local1.scrClip.char.xspeed;
yScrSpeed = _local1.scrClip.char.yspeed;
xpos = _local1.scrClip._x;
ypos = _local1.scrClip._y;
if ((dir == "right") && (j < (mapW + 2))) {
if (xpos > ((-(mapW - 7)) * tileW)) {
_local1.scrClip._x = Math.round(xpos - xScrSpeed);
}
majorX = majorX - (-xScrSpeed);
if (majorX >= tileW) {
var _local3 = (i - visAreaY) + 1;
while (_local3 < i) {
var _local2 = j;
while (_local2 < (j + 1)) {
_local1.scrClip[(("t_" + _local3) + "_") + _local2]._visible = true;
_local1.scrClip[(("t_" + _local3) + "_") + ((_local2 - visAreaX) - 1)]._visible = false;
_local2++;
}
_local3++;
}
j++;
majorX = majorX - tileW;
}
}
if ((dir == "left") && ((j - visAreaX) > -1)) {
if (xpos < -1) {
_local1.scrClip._x = Math.round(xpos - xScrSpeed);
}
majorX = majorX - (-xScrSpeed);
if (majorX <= 0) {
j--;
var _local3 = (i - visAreaY) + 1;
while (_local3 < i) {
var _local2 = (j - visAreaX) - 1;
while (_local2 < (j - visAreaX)) {
_local1.scrClip[(("t_" + _local3) + "_") + _local2]._visible = true;
_local1.scrClip[(("t_" + _local3) + "_") + ((_local2 + visAreaX) + 1)]._visible = false;
_local2++;
}
_local3++;
}
majorX = majorX + tileW;
}
}
if ((dir == "up") && ((i - visAreaY) > -2)) {
if (ypos < 10) {
_local1.scrClip._y = _local1.scrClip._y - _local1.scrClip.char.yspeed;
}
majorY = majorY - (-_local1.scrClip.char.yspeed);
if (majorY <= 0) {
i--;
var _local3 = (i - visAreaY) + 1;
while (_local3 < ((i - visAreaY) + 2)) {
var _local2 = (j - visAreaX) - 1;
while (_local2 < j) {
_local1.scrClip[(("t_" + _local3) + "_") + _local2]._visible = true;
_local1.scrClip[(("t_" + ((_local3 + visAreaY) - 1)) + "_") + _local2]._visible = false;
_local2++;
}
_local3++;
}
majorY = majorY + tileH;
}
}
if ((dir == "down") && (i < (mapH + 1))) {
if (ypos > ((-(mapH - 6)) * tileH)) {
_local1.scrClip._y = _local1.scrClip._y - _local1.scrClip.char.yspeed;
}
majorY = majorY - (-_local1.scrClip.char.yspeed);
if (majorY >= tileH) {
var _local3 = i;
while (_local3 < (i + 1)) {
var _local2 = (j - visareaX) - 1;
while (_local2 < j) {
_local1.scrClip[(("t_" + _local3) + "_") + _local2]._visible = true;
_local1.scrClip[(("t_" + ((_local3 - visAreaY) + 1)) + "_") + _local2]._visible = false;
_local2++;
}
_local3++;
}
i++;
majorY = majorY - tileH;
}
}
}
function updateEnemies() {
var _local3 = this;
var _local1 = 0;
while (_local1 < enemyArray.length) {
var _local2 = enemyArray[_local1];
if (!_local3.scrClip[_local2].enemy.dead) {
_local3.scrClip[_local2].enemy.control();
}
_local1++;
}
}
function updateBullets() {
var _local1 = this;
var _local3 = 0;
while (_local3 < maxBullets) {
var _local2 = bulletsArray[_local3];
var enemybulletClip = enemybulletsArray[_local3];
if (_local1.scrClip[_local2]._visible) {
_local1.scrClip[_local2].control();
} else {
_local1.scrClip[_local2]._x = -200;
_local1.scrClip[_local2]._y = 800;
}
if (_local1.scrClip[enemybulletClip]._visible) {
_local1.scrClip[enemybulletClip].control();
} else {
_local1.scrClip[enemybulletClip]._x = -200;
_local1.scrClip[enemybulletClip]._y = 800;
}
_local3++;
}
}
function shoot() {
var _local1 = this;
lastShot = getTimer();
var _local2 = bulletsArray[bulletCount];
_local1.scrClip[_local2].gotoAndStop(ammoType);
_local1.scrClip[_local2].justFired = true;
_local1.scrClip[_local2].xpos = _local1.scrClip.char.xpos + gunposx;
_local1.scrClip[_local2].ypos = _local1.scrClip.char.ypos + gunposy;
_local1.scrClip[_local2].dirx = _local1.scrClip.char.dirx;
_local1.scrClip[_local2].diry = _local1.scrClip.char.diry;
_local1.scrClip[_local2]._xscale = _local1.scrClip[_local2].realXScale;
_local1.scrClip[_local2]._yscale = _local1.scrClip[_local2].realYScale;
_local1.scrClip[_local2]._rotation = 0;
_local1.scrClip[_local2]._visible = true;
}
function enemyshoot(enemySource, ydir, xdir, xposi, yposi, type) {
var _local2 = this;
enemySource.lastShot = getTimer();
var _local1 = enemybulletsArray[enemybulletCount];
_local2.scrClip[_local1].gotoAndStop(type);
_local2.scrClip[_local1].justFired = true;
_local2.scrClip[_local1].xpos = xposi;
_local2.scrClip[_local1].ypos = yposi;
_local2.scrClip[_local1].dirx = xdir;
_local2.scrClip[_local1].diry = ydir;
_local2.scrClip[_local1]._visible = true;
}
function encode(datastring) {
var _local2 = datastring;
encodedText = "";
offset = 1;
var _local1 = 0;
while (_local1 < _local2.length) {
encodedText = encodedText + chr(_local2.charCodeAt(_local1) + offset);
if (offset == 1) {
offset = 5;
} else if (offset == 5) {
offset = 3;
} else {
offset = 1;
}
_local1++;
}
return(encodedText);
}
stop();
fscommand ("allowscale", false);
tileW = 64;
tileH = 64;
visAreaX = 11;
visAreaY = 9;
startX = 0;
startY = -384;
majorX = 0;
majorY = 0;
scrSpeed = 5;
bulletsArray = new Array();
enemybulletsArray = new Array();
maxBullets = 20;
bulletCount = 0;
enemybulletCount = 1;
shootSpeed = 100;
ammoType = 1;
level = 0;
xtramen = 2;
score = 0;
totalScore = 0;
pausegame = false;
p_hasreleased = true;
timecount = 0;
timetaken = 0;
attachMovie("pause_screen", "pause_screen", 1);
xnorm = _root._x;
ynorm = _root._y;
xscalenorm = _root._xscale;
yscalenorm = _root._yscale;
Instance of Symbol 582 MovieClip in Frame 1
onClipEvent (load) {
_quality = "medium";
}
Instance of Symbol 594 MovieClip "bar" in Frame 1
onClipEvent (enterFrame) {
PercentLoaded = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
this.percent = PercentLoaded + "%";
_root.isloaded = false;
timer = getTimer();
} else if ((timer + 1000) < getTimer()) {
_root.isloaded = true;
_root.gotoAndStop("MainMenu");
_root.play();
}
}
Frame 2
stop();
map = [[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 1, 1, 1, 1, 1, 1, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6], [6, 1, 1, 15, 1, 15, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 5, 5, 5, 1, 12, 12, 6], [6, 5, 5, 5, 5, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 7, 7, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1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7, 7, 7, 7, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6], [6, 1, 1, 1, 1, 1, 1, 19, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 19, 1, 1, 1, 1, 1, 1, 6], [6, 1, 1, 12, 12, 12, 1, 1, 1, 12, 12, 12, 1, 1, 8, 8, 1, 1, 12, 12, 12, 1, 1, 1, 12, 12, 12, 1, 1, 6], [10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10]];
startPos = [15, 21];
score = 0;
buildMap(map);
Frame 6
stop();
ammoType = 1;
level = 5;
map = [[6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6], [6, 1, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1, 1, 1, 1, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6], [6, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6], [6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 23, 6], [10, 10, 10, 10, 10, 10, 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1, 9], [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
startPos = [2, 19];
score = 0;
buildMap(map);
Frame 21
stop();
level = 20;
ammoType = 4;
map = [[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], [9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9], [9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9], [9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9], [9, 1, 5, 5, 5, 1, 1, 1, 1, 1, 5, 5, 1, 1, 5, 5, 1, 9], [9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9], [9, 1, 1, 1, 1, 1, 1, 5, 5, 28, 1, 1, 1, 5, 1, 1, 1, 9], [9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9], [9, 1, 5, 5, 1, 5, 1, 1, 1, 5, 5, 1, 1, 5, 5, 1, 1, 9], [9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9], [9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
startPos = [5, 7];
score = 0;
buildMap(map);
Frame 22
stop();
clearInterval(INTERVAL_ID);
initialized = false;
removeMovieClip("scrClip");
removeMovieClip("bar");
Instance of Symbol 640 MovieClip in Frame 22
onClipEvent (load) {
gotoAndStop (1);
}
Frame 23
stop();
clearInterval(INTERVAL_ID);
initialized = false;
removeMovieClip("scrClip");
removeMovieClip("bar");
Instance of Symbol 652 MovieClip in Frame 23
onClipEvent (enterFrame) {
if (((_root.score == 0) && (_root.life == 0)) && (_root.bonus == 0)) {
gotoAndStop (2);
} else {
if (_root.bonus > 0) {
_root.totalScore++;
_root.bonus--;
}
if (_root.score > 0) {
if (_root.score != 1) {
_root.totalScore = _root.totalScore + 2;
_root.score = _root.score - 2;
} else {
_root.totalScore++;
_root.score--;
}
}
if (_root.life > 0) {
_root.totalScore++;
_root.life--;
}
}
}
Instance of Symbol 658 MovieClip in Frame 23
onClipEvent (load) {
if (_root.level == 5) {
gotoAndStop (1);
} else if (_root.level == 10) {
gotoAndStop (2);
} else if (_root.level == 15) {
gotoAndStop (3);
} else {
gotoAndStop (4);
}
}
Instance of Symbol 661 MovieClip in Frame 23
onClipEvent (load) {
if (_root.level == 5) {
_root.bonus = 0;
gotoAndStop (2);
} else if (_root.level == 10) {
_root.bonus = 0;
gotoAndStop (2);
} else if (_root.level == 15) {
_root.bonus = 0;
gotoAndStop (2);
} else if (_root.level == 20) {
_root.bonus = 0;
gotoAndStop (2);
} else {
_root.bonus = ((_root.enemyCount * 4) - _root.timetaken) * 10;
if (_root.bonus < 0) {
_root.bonus = 0;
}
}
}
Frame 24
clearInterval(INTERVAL_ID);
initialized = false;
removeMovieClip("scrClip");
removeMovieClip("bar");
if (xtramen == 1) {
messagebox = "One Life Remaining";
} else {
messagebox = xtramen + " Lives Remaining";
}
Frame 58
gotoAndStop(level + 1);
Frame 59
stop();
Stage.showMenu = false;
Stage.scaleMode = "exactFit";
resetStage();
totalScore = 0;
Frame 60
stop();
Frame 61
stop();
Instance of Symbol 640 MovieClip in Frame 61
onClipEvent (load) {
gotoAndStop (1);
}
Frame 62
stop();
_quality = "high";
Instance of Symbol 843 MovieClip in Frame 62
onClipEvent (load) {
_quality = "high";
}
Symbol 6 MovieClip Frame 1
stop();
Symbol 11 MovieClip Frame 1
stop();
Symbol 16 MovieClip Frame 1
stop();
Symbol 19 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 1
stop();
Symbol 26 MovieClip Frame 1
stop();
Symbol 29 MovieClip Frame 1
stop();
Instance of Symbol 26 MovieClip "head" in Symbol 30 MovieClip Frame 1
/* no clip actions */
Symbol 30 MovieClip Frame 58
gotoAndPlay (1);
Symbol 31 MovieClip Frame 17
gotoAndPlay (1);
Symbol 32 MovieClip Frame 1
stop();
Symbol 32 MovieClip Frame 2
stop();
Instance of Symbol 31 MovieClip "stuff" in Symbol 32 MovieClip Frame 2
onClipEvent (enterFrame) {
play();
}
Symbol 35 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 1
stop();
Symbol 40 MovieClip Frame 1
stop();
faceLeft = true;
Symbol 40 MovieClip Frame 5
stop();
faceLeft = false;
Symbol 40 MovieClip Frame 9
gotoAndStop (1);
Symbol 42 MovieClip Frame 1
stop();
Symbol 42 MovieClip Frame 2
gotoAndStop (1);
Symbol 43 MovieClip [Binky] Frame 1
function render() {
_y = Math.round(ypos);
_x = Math.round(xpos);
}
function updateEdges() {
lastdownY = downY;
downY = Math.floor((ypos + 35) / tileH);
upY = Math.floor((ypos - 30) / tileH);
leftX = Math.floor((xpos - 15) / tileW);
rightX = Math.floor((xpos + 15) / tileW);
downY2 = Math.floor((ypos + 25) / tileH);
upY2 = Math.floor((ypos - 25) / tileH);
centerX = Math.floor(xpos / tileW);
centerY = Math.floor(ypos / tileH);
}
function weaponCollisionCheck() {
var _local2 = _root;
var _local3 = 0;
while (_local3 < _local2.maxBullets) {
var _local1 = _local2.enemybulletsArray[_local3];
if (_local2.scrClip[_local1]._visible && (this.hitTest(_local2.scrClip[_local1]))) {
if (_local2.scrClip[_local1].life > 0) {
_local2.scrClip[_local1].isDead = true;
hurt(_local2.scrClip[_local1].power);
}
}
_local3++;
}
}
function hurt(power) {
if (!invinsible) {
justhurt = true;
hurtnoise.gotoAndPlay(2);
life = life - power;
}
}
function control(dir) {
var _local1 = _root;
if (life <= 0) {
if (_local1.xtramen == 0) {
_local1.gotoAndStop("gameover");
} else {
_local1.gotoAndPlay("restart");
_local1.xtramen--;
}
}
if (justhurt == true) {
hurtTimer = getTimer();
var _local3 = {rb:90};
new Color(binky).setTransform(_local3);
justhurt = false;
invinsible = true;
}
if (invinsible) {
if ((hurtTimer + 1000) < getTimer()) {
var _local3 = {rb:0};
new Color(binky).setTransform(_local3);
invinsible = false;
}
}
if (cMap[centerY + 1][centerX] == 2) {
groundFriction = 0.97;
} else {
groundFriction = 0.8;
}
if (binky.faceLeft) {
dirx = -1;
_local1.gunposx = -40;
} else {
dirx = 1;
_local1.gunposx = 50;
}
if (yspeed == 0) {
diry = 0;
}
binky.animations.stuff.gunhand.gunstuff._rotation = -90;
binky.animations.stuff.head.headstuff._rotation = 0;
if (!shooting) {
binky.animations.stuff.gunhand.gunstuff._rotation = -35;
}
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
if ((Key.isDown(32) and (!Key.isDown(88))) || (autoJump)) {
if (onGround && (getTimer() > (justLandedTimer + 100))) {
if (autoJump) {
jumpspeed = 50;
maxHeight = 6;
autoJump = false;
}
yspeed = -jumpspeed;
onGround = false;
jumpPos = downY;
}
}
_local1.gunposy = -10;
if (Key.isDown(37)) {
if (!Key.isDown(88)) {
if (cMap[centerY + 1][centerX] != 2) {
if (!onGround) {
if ((xspeed >= -10) && (xspeed <= 10)) {
xspeed = -speed;
}
} else {
xspeed = -speed;
}
} else if ((xspeed <= 3) && (xpseed >= -15)) {
xspeed--;
}
}
dirx = -1;
diry = 0;
if (shooting) {
binky.animations.stuff.gunhand.gunstuff._rotation = -90;
binky.animations.stuff.head.headstuff._rotation = 0;
}
} else if (Key.isDown(39)) {
if (!Key.isDown(88)) {
if (cMap[centerY + 1][centerX] != 2) {
if (!onGround) {
if ((xspeed >= -10) && (xspeed <= 10)) {
xspeed = speed;
}
} else {
xspeed = speed;
}
} else if ((xspeed >= -3) && (xpeed <= 15)) {
xspeed++;
}
}
dirx = 1;
diry = 0;
if (shooting) {
binky.animations.stuff.gunhand.gunstuff._rotation = -90;
binky.animations.stuff.head.headstuff._rotation = 0;
}
}
if (Key.isDown(38)) {
_local1.gunposy = -30;
if (Key.isDown(37)) {
diry = -1;
dirx = -1;
if (shooting) {
binky.animations.stuff.gunhand.gunstuff._rotation = -135;
binky.animations.stuff.head.headstuff._rotation = 45;
}
} else if (Key.isDown(39)) {
diry = -1;
dirx = 1;
if (shooting) {
binky.animations.stuff.gunhand.gunstuff._rotation = -125;
binky.animations.stuff.head.headstuff._rotation = 45;
}
} else {
if (shooting) {
_local1.gunposx = 0;
binky.animations.stuff.gunhand.gunstuff._rotation = 180;
binky.animations.stuff.head.headstuff._rotation = 60;
}
diry = -1;
dirx = 0;
}
}
if (Key.isDown(40)) {
_local1.gunposy = 35;
if (Key.isDown(37)) {
diry = 1;
dirx = -1;
if (shooting) {
binky.animations.stuff.gunhand.gunstuff._rotation = -35;
binky.animations.stuff.head.headstuff._rotation = -45;
}
} else if (Key.isDown(39)) {
diry = 1;
dirx = 1;
if (shooting) {
binky.animations.stuff.gunhand.gunstuff._rotation = -35;
binky.animations.stuff.head.headstuff._rotation = -45;
}
} else {
diry = 1;
dirx = 0;
if (shooting) {
if (binky.faceleft) {
_local1.gunposx = -10;
} else {
_local1.gunposx = 20;
}
binky.animations.stuff.gunhand.gunstuff._rotation = 0;
binky.animations.stuff.head.headstuff._rotation = -60;
}
}
}
if (Key.isDown(90) and (getTimer() > (_local1.lastShot + shootSpeed))) {
if (_local1.bulletCount < _local1.maxBullets) {
shooting = true;
_local1.shoot();
_local1.bulletCount++;
} else {
_local1.bulletCount = 0;
}
} else if (!Key.isDown(90)) {
shooting = false;
}
if (!onGround) {
if (yspeed < 40) {
yspeed = yspeed + gravity;
}
yspeed = yspeed * airFriction;
}
if (onGround) {
xspeed = xspeed * groundFriction;
}
ypos = ypos + yspeed;
xpos = xpos + xspeed;
updateEdges();
if (cMap[centerY][centerX] == 12) {
hiding = true;
} else {
hiding = false;
}
if ((((cMap[downY2][leftX] > 1) && (cMap[downY2][leftX] < 11)) && (cMap[downY2][leftX] != 5)) || (((cMap[upY2][leftX] > 1) && (cMap[upY2][leftX] < 11)) && (cMap[upY2][leftX] != 5))) {
xpos = xpos - xspeed;
updateEdges();
if (((cMap[centerY][centerX - 1] > 1) && (cMap[centerY][centerX - 1] < 11)) && (cMap[centerY][centerX - 1] != 5)) {
xspeed = 0;
}
}
if ((((cMap[downY2][rightX] > 1) && (cMap[downY2][rightX] < 11)) && (cMap[downY2][rightX] != 5)) || (((cMap[upY2][rightX] > 1) && (cMap[upY2][rightX] < 11)) && (cMap[upY2][rightX] != 5))) {
xpos = xpos - xspeed;
updateEdges();
if (((cMap[centerY][centerX + 1] > 1) && (cMap[centerY][centerX + 1] < 11)) && (cMap[centerY][centerX + 1] != 5)) {
xspeed = 0;
}
}
if ((((cMap[upY][leftX] > 1) && (cMap[upY][leftX] < 11)) && (cMap[upY][leftX] != 5)) || (((cMap[upY][rightX] > 1) && (cMap[upY][rightX] < 11)) && (cMap[upY][rightX] != 5))) {
var _local2 = (upY * tileH) + (tileH * 1.5);
ypos = (_local2 - gravity) + 15;
yspeed = 0;
}
if ((((yspeed >= 0) && (lastdownY <= downY)) && (downY >= (jumpPos - maxHeight))) || (onGround)) {
if (((cMap[downY][leftX] > 1) && (cMap[downY][leftX] < 11)) || ((cMap[downY][rightX] > 1) && (cMap[downY][rightX] < 11))) {
if ((cMap[centerY][centerX] != 5) || ((cMap[centerY][centerX] == 5) && ((cMap[centerY - 1][centerX] <= 1) || (cMap[centerY - 1][centerX] >= 11)))) {
onGround = true;
setOnGround();
}
} else {
onGround = false;
}
}
if ((myRealx < 250) && (xspeed < 0)) {
_local1.doScroll("left");
}
if ((myRealx > 300) && (xspeed > 0)) {
_local1.doScroll("right");
}
if (yspeed < 0) {
if (myRealy < 150) {
_local1.doScroll("up");
}
} else if (myRealy > 160) {
_local1.doScroll("down");
}
this.render();
weaponCollisionCheck();
animateBinky();
}
function setOnGround() {
var _local1 = (downY * tileH) - (tileH / 2);
ypos = _local1 + gravity;
yspeed = 0;
jumpspeed = 30;
maxHeight = 2;
jumpPos = downY;
if (!onGround) {
justLandedTimer = getTimer();
}
}
function animateBinky() {
if (Key.isDown(37)) {
if (!binky.faceLeft) {
binky.play();
} else if (!Key.isDown(88)) {
binky.gotoAndStop("left");
binky.animations.gotoAndStop(2);
}
} else if (Key.isDown(39)) {
if (binky.faceLeft) {
binky.play();
} else if (!Key.isDown(88)) {
binky.gotoAndStop("right");
binky.animations.gotoAndStop(2);
}
} else {
binky.animations.gotoAndStop(1);
}
}
stop();
speed = 10;
xspeed = (yspeed = 0);
jumpspeed = 30;
maxHeight = 2;
shootSpeed = 100;
dirx = -1;
diry = 0;
cMap = _root.cMap;
tileW = _root.tileW;
tileH = _root.tileH;
jumpPos = Math.floor((ypos + 35) / tileH);
shooting = false;
autoJump = false;
life = 50;
gravity = 2.5;
groundFriction = 0.8;
airFriction = 1;
Symbol 60 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 2
stop();
Symbol 60 MovieClip Frame 3
stop();
Symbol 60 MovieClip Frame 4
stop();
Symbol 112 MovieClip Frame 60
gotoAndPlay (1);
Symbol 127 MovieClip Frame 14
stop();
_parent.hasExploded = true;
_parent.gotoAndStop("itemframe");
Symbol 138 MovieClip Frame 1
stop();
Symbol 138 MovieClip Frame 2
stop();
Symbol 138 MovieClip Frame 3
stop();
Symbol 140 MovieClip [itemSound] Frame 1
stop();
Symbol 140 MovieClip [itemSound] Frame 2
gotoAndStop (1);
Symbol 141 MovieClip Frame 1
function itemCollisionCheck() {
var _local1 = _root;
if (firstTimeCalled) {
time = getTimer();
firstTimeCalled = false;
}
if (getTimer() < (time + 5000)) {
if (item._visible && (item.hitTest(_local1.scrClip.char))) {
itemSound.gotoAndPlay(2);
item._visible = false;
if (item.itemType == "bonus") {
_local1.xtramen++;
} else {
_local1.scrClip.char.life = _local1.scrClip.char.life + 5;
}
_local1.score = _local1.score + 10;
_local1.enemiesKilled++;
_parent.dead = true;
}
} else {
item._visible = false;
_local1.enemiesKilled++;
_parent.dead = true;
}
}
stop();
hasExploded = false;
firstTimeCalled = true;
Symbol 141 MovieClip Frame 2
stop();
_root.score = _root.score + 25;
Symbol 141 MovieClip Frame 3
stop();
Instance of Symbol 138 MovieClip "item" in Symbol 141 MovieClip Frame 3
onClipEvent (load) {
item = random(100);
if (item < 5) {
gotoAndStop (2);
itemType = "bonus";
} else {
itemType = "normal";
gotoAndStop (1);
}
}
Symbol 149 MovieClip Frame 19
gotoAndPlay (1);
Symbol 150 MovieClip Frame 1
function itemCollisionCheck() {
var _local1 = _root;
if (firstTimeCalled) {
time = getTimer();
firstTimeCalled = false;
}
if (getTimer() < (time + 5000)) {
if (item._visible && (item.hitTest(_local1.scrClip.char))) {
itemSound.gotoAndPlay(2);
item._visible = false;
if (item.itemType == "bonus") {
_local1.xtramen++;
} else {
_local1.scrClip.char.life = _local1.scrClip.char.life + 5;
}
_local1.score = _local1.score + 10;
_local1.enemiesKilled++;
_parent.dead = true;
}
} else {
item._visible = false;
_local1.enemiesKilled++;
_parent.dead = true;
}
}
stop();
hasExploded = false;
firstTimeCalled = true;
Symbol 150 MovieClip Frame 2
stop();
_root.score = _root.score + 15;
Symbol 150 MovieClip Frame 3
stop();
Instance of Symbol 138 MovieClip "item" in Symbol 150 MovieClip Frame 3
onClipEvent (load) {
item = random(100);
if (item < 5) {
gotoAndStop (2);
itemType = "bonus";
} else {
itemType = "normal";
gotoAndStop (1);
}
}
Symbol 158 MovieClip Frame 1
function itemCollisionCheck() {
var _local1 = _root;
if (firstTimeCalled) {
time = getTimer();
firstTimeCalled = false;
}
if (getTimer() < (time + 5000)) {
if (item._visible && (item.hitTest(_local1.scrClip.char))) {
itemSound.gotoAndPlay(2);
item._visible = false;
if (item.itemType == "bonus") {
_local1.xtramen++;
} else {
_local1.scrClip.char.life = _local1.scrClip.char.life + 5;
}
_local1.score = _local1.score + 10;
_local1.enemiesKilled++;
_parent.dead = true;
}
} else {
item._visible = false;
_local1.enemiesKilled++;
_parent.dead = true;
}
}
stop();
hasExploded = false;
firstTimeCalled = true;
Symbol 158 MovieClip Frame 2
stop();
_root.score = _root.score + 15;
Symbol 158 MovieClip Frame 3
stop();
Instance of Symbol 138 MovieClip "item" in Symbol 158 MovieClip Frame 3
onClipEvent (load) {
item = random(100);
if (item < 5) {
gotoAndStop (2);
itemType = "bonus";
} else {
itemType = "normal";
gotoAndStop (1);
}
}
Symbol 172 MovieClip Frame 20
gotoAndPlay (1);
Symbol 176 MovieClip Frame 1
function itemCollisionCheck() {
var _local1 = _root;
if (firstTimeCalled) {
time = getTimer();
firstTimeCalled = false;
}
if (getTimer() < (time + 5000)) {
if (item._visible && (item.hitTest(_local1.scrClip.char))) {
itemSound.gotoAndPlay(2);
item._visible = false;
if (item.itemType == "bonus") {
_local1.xtramen++;
} else {
_local1.scrClip.char.life = _local1.scrClip.char.life + 5;
}
_local1.score = _local1.score + 10;
_local1.enemiesKilled++;
_parent.dead = true;
}
} else {
item._visible = false;
_local1.enemiesKilled++;
_parent.dead = true;
}
}
stop();
hasExploded = false;
firstTimeCalled = true;
Symbol 176 MovieClip Frame 2
stop();
Symbol 176 MovieClip Frame 3
stop();
_root.score = _root.score + 15;
Symbol 176 MovieClip Frame 4
stop();
Instance of Symbol 138 MovieClip "item" in Symbol 176 MovieClip Frame 4
onClipEvent (load) {
item = random(100);
if (item < 5) {
gotoAndStop (2);
itemType = "bonus";
} else {
itemType = "normal";
gotoAndStop (1);
}
}
Symbol 186 MovieClip Frame 35
stop();
_parent._parent.ypos = _parent._parent.STARTY;
_parent._parent.dying = false;
_parent._parent.growing = true;
Symbol 193 MovieClip Frame 15
stop();
_parent._parent.growing = false;
_parent.gotoAndStop("normal");
Symbol 194 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 2
stop();
Symbol 194 MovieClip Frame 3
stop();
Symbol 204 MovieClip Frame 20
stop();
_parent.gotoAndStop("norm");
Symbol 205 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 2
stop();
Symbol 215 MovieClip Frame 20
gotoAndPlay (1);
Symbol 216 MovieClip Frame 30
gotoAndPlay (1);
Symbol 217 MovieClip Frame 1
function itemCollisionCheck() {
var _local1 = _root;
if (firstTimeCalled) {
time = getTimer();
firstTimeCalled = false;
}
if (getTimer() < (time + 5000)) {
if (item._visible && (item.hitTest(_local1.scrClip.char))) {
itemSound.gotoAndPlay(2);
item._visible = false;
if (item.itemType == "bonus") {
_local1.xtramen++;
} else {
_local1.scrClip.char.life = _local1.scrClip.char.life + 5;
}
_local1.score = _local1.score + 10;
_local1.enemiesKilled++;
_parent.dead = true;
}
} else {
item._visible = false;
_local1.enemiesKilled++;
_parent.dead = true;
}
}
stop();
hasExploded = false;
firstTimeCalled = true;
Symbol 217 MovieClip Frame 2
stop();
_root.score = _root.score + 15;
Symbol 217 MovieClip Frame 3
stop();
Instance of Symbol 138 MovieClip "item" in Symbol 217 MovieClip Frame 3
onClipEvent (load) {
item = random(100);
if (item < 5) {
gotoAndStop (2);
itemType = "bonus";
} else {
itemType = "normal";
gotoAndStop (1);
}
}
Symbol 234 MovieClip Frame 60
gotoAndPlay (1);
Symbol 235 MovieClip Frame 1
function itemCollisionCheck() {
var _local1 = _root;
if (firstTimeCalled) {
time = getTimer();
firstTimeCalled = false;
}
if (getTimer() < (time + 5000)) {
if (item._visible && (item.hitTest(_local1.scrClip.char))) {
itemSound.gotoAndPlay(2);
item._visible = false;
if (item.itemType == "bonus") {
_local1.xtramen++;
} else {
_local1.scrClip.char.life = _local1.scrClip.char.life + 5;
}
_local1.score = _local1.score + 10;
_local1.enemiesKilled++;
_parent.dead = true;
}
} else {
item._visible = false;
_local1.enemiesKilled++;
_parent.dead = true;
}
}
stop();
hasExploded = false;
firstTimeCalled = true;
Symbol 235 MovieClip Frame 2
stop();
_root.score = _root.score + 25;
Symbol 235 MovieClip Frame 3
stop();
Instance of Symbol 138 MovieClip "item" in Symbol 235 MovieClip Frame 3
onClipEvent (load) {
item = random(100);
if (item < 5) {
gotoAndStop (2);
itemType = "bonus";
} else {
itemType = "normal";
gotoAndStop (1);
}
}
Symbol 239 MovieClip Frame 1
stop();
Symbol 239 MovieClip Frame 2
stop();
Symbol 240 MovieClip Frame 1
function render() {
_parent._y = Math.round(ypos);
_parent._x = Math.round(xpos);
}
function updateEdges() {
downY = Math.floor((ypos + 35) / tileH);
upY = Math.floor((ypos - 30) / tileH);
leftX = Math.floor((xpos - 30) / tileW);
rightX = Math.floor((xpos + 30) / tileW);
downY2 = Math.floor((ypos + 30) / tileH);
upY2 = Math.floor((ypos - 30) / tileH);
}
function control() {
var _local1 = _root;
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
if (life < 0) {
if (!enemy.hasExploded) {
enemy.gotoAndStop("dead");
} else {
enemy.itemCollisionCheck();
}
} else if ((((myRealx > 800) || (myRealx < -200)) || (myRealy < -200)) || (myRealy > 600)) {
_visible = false;
} else {
_visible = true;
disX = Math.abs(myRealx - _local1.scrClip.char.myRealx);
disY = Math.abs(myRealy - _local1.scrClip.char.myRealy);
if ((beingShot == true) || ((_local1.scrClip.char.hiding == false) && ((disX < (400 + awareness)) && (disY < (100 + awareness))))) {
near = true;
attacking = false;
awareness = 200;
if (myRealx > _local1.scrClip.char.myRealx) {
_xscale = scale;
dirx = -1;
if (disY <= 64) {
if (disX <= 64) {
xspeed = 1.3 * speed;
} else if (disX <= 256) {
attacking = true;
} else {
xspeed = -1.3 * speed;
}
binkyIsNotBelow();
binkyIsNotAbove();
} else if (myRealy < _local1.scrClip.char.myRealy) {
binkyIsNotAbove();
BinkyIsBelow = true;
if (!runRightBelow) {
runLeftBelow = true;
}
} else if (myRealy > _local1.scrClip.char.myRealy) {
binkyIsNotBelow();
BinkyIsAbove = true;
if (!runRightAbove) {
runLeftAbove = true;
}
jumpNow();
if ((!Jump) && (disX > 16)) {
xspeed = -1.3 * speed;
}
}
} else if (myRealx < _local1.scrClip.char.myRealx) {
_xscale = (-scale);
dirx = 1;
if (disY <= 64) {
if (disX <= 64) {
xspeed = -1.3 * speed;
} else if (disX <= 256) {
attacking = true;
} else {
xspeed = 1.3 * speed;
}
binkyIsNotBelow();
binkyIsNotAbove();
} else if (myRealy < _local1.scrClip.char.myRealy) {
binkyIsNotAbove();
BinkyIsBelow = true;
if (!runLeftBelow) {
runRightBelow = true;
}
} else if (myRealy > _local1.scrClip.char.myRealy) {
binkyIsNotBelow();
BinkyIsAbove = true;
if (!runLeftAbove) {
runRightAbove = true;
}
jumpNow();
if ((!Jump) && (disX > 16)) {
xspeed = 1.3 * speed;
}
}
}
if (BinkyIsBelow) {
if (runLeftBelow) {
xspeed = -1.3 * speed;
} else if (runRightBelow) {
xspeed = 1.3 * speed;
}
} else if (BinkyIsAbove) {
if (runLeftAbove) {
xspeed = -1.3 * speed;
} else if (runRightAbove) {
xspeed = 1.3 * speed;
}
}
} else {
near = false;
attacking = false;
awareness = 0;
binkyIsNotBelow();
binkyIsNotAbove();
}
if (near == false) {
if (count < 180) {
xspeed = (speed * 3) / 4;
_xscale = (-scale);
dirx = 1;
count++;
} else if (count < 360) {
xspeed = ((-speed) * 3) / 4;
_xscale = scale;
dirx = -1;
count++;
} else {
count = 0;
}
}
if (attacking == true) {
if (getTimer() > (lastShot + 800)) {
if (_local1.enemybulletCount <= _local1.maxBullets) {
if (dirx == -1) {
enemygunloc.xpos = xpos + enemygunloc._x;
} else {
enemygunloc.xpos = xpos - enemygunloc._x;
}
enemygunloc.ypos = ypos + enemygunloc._y;
_local1.enemyshoot(this, 0, dirx, enemygunloc.xpos, enemygunloc.ypos, 1);
_local1.enemybulletCount++;
} else {
_local1.enemybulletCount = 0;
}
}
}
if (beingShot) {
beingShot = false;
}
if (!onGround) {
if (yspeed < 40) {
yspeed = yspeed + gravity;
}
yspeed = yspeed * airFriction;
}
if (onGround) {
xspeed = xspeed * groundFriction;
}
ypos = ypos + yspeed;
xpos = xpos + xspeed;
updateEdges();
if ((((cMap[downY2][leftX] > 1) && (cMap[downY2][leftX] < 10)) && (cMap[downY2][leftX] != 5)) || (((cMap[upY2][leftX] > 1) && (cMap[upY2][leftX] < 10)) && (cMap[upY2][leftX] != 5))) {
if (near == true) {
jumpNow();
} else {
count = 0;
}
xpos = xpos - xspeed;
xspeed = 0;
updateEdges();
}
if ((((cMap[downY2][rightX] > 1) && (cMap[downY2][rightX] < 10)) && (cMap[downY2][rightX] != 5)) || (((cMap[upY2][rightX] > 1) && (cMap[upY2][rightX] < 10)) && (cMap[upY2][rightX] != 5))) {
if (near == true) {
jumpNow();
} else {
count = 181;
}
xpos = xpos - xspeed;
xspeed = 0;
updateEdges();
}
if ((((cMap[upY][leftX] > 1) && (cMap[upY][leftX] < 10)) && (cMap[upY][leftX] != 5)) || (((cMap[upY][rightX] > 1) && (cMap[upY][rightX] < 10)) && (cMap[upY][rightX] != 5))) {
var _local2 = (upY * tileH) + (tileH * 1.5);
ypos = _local2 - gravity;
yspeed = 0;
}
if ((((yspeed > 0) && (lastdownY <= downY)) && (downY >= (jumpPos - 2))) || (onGround)) {
if (((cMap[downY][leftX] > 1) && (cMap[downY][leftX] < 11)) || ((cMap[downY][rightX] > 1) && (cMap[downY][rightX] < 11))) {
var _local3 = (downY * tileH) - (tileH / 2);
ypos = _local3 + gravity;
yspeed = 0;
if (!onGround) {
justLandedTimer = getTimer();
}
onGround = true;
if (onGroundTimer == 0) {
refreshChaseDirection();
}
onGroundTimer++;
} else {
if (onGround && (near == false)) {
if (count < 180) {
count = 181;
} else if (count < 360) {
count = 0;
}
}
onGround = false;
onGroundTimer = 0;
}
}
this.render();
weaponCollisionCheck();
}
}
function jumpNow() {
var _local1 = random(300);
if (onGround) {
if (_local1 <= 5) {
Jump = true;
yspeed = -jumpspeed;
jumpPos = downY;
onGround = false;
} else {
Jump = false;
refreshChaseDirection();
}
}
}
function binkyIsNotBelow() {
runLeftBelow = false;
runRightBelow = false;
BinkyIsBelow = false;
}
function binkyIsNotAbove() {
runLeftAbove = false;
runRightAbove = false;
BinkyIsAbove = false;
}
function refreshChaseDirection() {
if (BinkyIsBelow || (BinkyIsAbove)) {
binkyIsNotBelow();
binkyIsNotAbove();
}
}
function weaponCollisionCheck() {
var _local2 = _root;
var _local3 = 0;
while (_local3 < _local2.maxBullets) {
var _local1 = _local2.bulletsArray[_local3];
if (_local2.scrClip[_local1]._visible && (this.hitTest(_local2.scrClip[_local1]))) {
life = life - _local2.scrClip[_local1].power;
_local2.scrClip[_local1].isDead = true;
beingShot = true;
}
_local3++;
}
}
stop();
dead = false;
life = 50 + (5 * _root.level);
speed = 5;
jumpspeed = 18;
cMap = _root.cMap;
tileW = _root.tileW;
tileH = _root.tileH;
count = 0;
temp = 0;
dirx = -1;
lastShot = 0;
near = false;
attacking = false;
awareness = 0;
gravity = 0.8;
groundFriction = 0.8;
airFriction = 0.98;
scale = _xscale;
Symbol 240 MovieClip Frame 2
function render() {
_parent._y = Math.round(ypos);
_parent._x = Math.round(xpos);
}
function updateEdges() {
downY = Math.floor((ypos + 35) / tileH);
upY = Math.floor((ypos - 30) / tileH);
leftX = Math.floor((xpos - 30) / tileW);
rightX = Math.floor((xpos + 30) / tileW);
downY2 = Math.floor((ypos + 30) / tileH);
upY2 = Math.floor((ypos - 30) / tileH);
}
function control() {
var _local1 = _root;
var _local2 = this;
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
if (life < 0) {
if (!enemy.hasExploded) {
enemy.gotoAndStop("dead");
} else {
enemy.itemCollisionCheck();
}
} else if ((((myRealx > 800) || (myRealx < -200)) || (myRealy < -200)) || (myRealy > 600)) {
_visible = false;
} else {
_visible = true;
disX = Math.abs(myRealx - _local1.scrClip.char.myRealx);
disY = Math.abs(myRealy - _local1.scrClip.char.myRealy);
if ((beingShot == true) || ((_local1.scrClip.char.hiding == false) && ((disX < (200 + awareness)) && (disY < (200 + awareness))))) {
near = true;
awareness = 300;
if (myRealx > _local1.scrClip.char.myRealx) {
_xscale = scale;
dirx = -1;
closeLeft = false;
closeEdgeLeft = false;
if (disX < 128) {
if (!closeEdgeRight) {
xspeed = (speed * 3) / 4;
closeRight = true;
} else {
xspeed = (speed * -3) / 4;
}
} else {
closeRight = false;
}
} else {
_xscale = (-scale);
dirx = 1;
closeRight = false;
closeEdgeRight = false;
if (disX < 128) {
if (!closeEdgeLeft) {
xspeed = (speed * -3) / 4;
closeLeft = true;
} else {
xspeed = (speed * 3) / 4;
}
} else {
closeLeft = false;
}
}
} else {
near = false;
closeRight = false;
closeLeft = false;
closeEdgeLeft = false;
closeEdgeRight = false;
awareness = 0;
}
if (near == false) {
if (count < 180) {
xspeed = (speed * 3) / 4;
_xscale = (-scale);
dirx = 1;
count++;
} else if (count < 360) {
xspeed = ((-speed) * 3) / 4;
_xscale = scale;
dirx = -1;
count++;
} else {
count = 0;
}
}
if (near == true) {
if (getTimer() > (lastShot + 800)) {
if ((_local1.enemybulletCount + 3) > _local1.maxBullets) {
_local1.enemybulletCount = 0;
}
if (dirx == -1) {
enemygunloc.xpos = xpos + enemygunloc._x;
} else {
enemygunloc.xpos = xpos - enemygunloc._x;
}
enemygunloc.ypos = ypos + enemygunloc._y;
_local1.enemyshoot(_local2, -1, dirx, enemygunloc.xpos, enemygunloc.ypos, 1);
_local1.enemybulletCount++;
_local1.enemyshoot(_local2, 1, dirx, enemygunloc.xpos, enemygunloc.ypos, 1);
_local1.enemybulletCount++;
_local1.enemyshoot(_local2, 0, dirx, enemygunloc.xpos, enemygunloc.ypos, 1);
_local1.enemybulletCount++;
}
}
if (beingShot) {
beingShot = false;
}
if (!onGround) {
if (yspeed < 40) {
yspeed = yspeed + gravity;
}
yspeed = yspeed * airFriction;
}
if (onGround) {
xspeed = xspeed * groundFriction;
}
ypos = ypos + yspeed;
xpos = xpos + xspeed;
updateEdges();
if ((((cMap[downY2][leftX] > 1) && (cMap[downY2][leftX] < 11)) && (cMap[downY2][leftX] != 5)) || (((cMap[upY2][leftX] > 1) && (cMap[upY2][leftX] < 11)) && (cMap[upY2][leftX] != 5))) {
if (!near) {
count = 0;
}
xpos = xpos - xspeed;
xspeed = 0;
updateEdges();
}
if ((((cMap[downY2][rightX] > 1) && (cMap[downY2][rightX] < 11)) && (cMap[downY2][rightX] != 5)) || (((cMap[upY2][rightX] > 1) && (cMap[upY2][rightX] < 11)) && (cMap[upY2][rightX] != 5))) {
if (!near) {
count = 181;
}
xpos = xpos - xspeed;
xspeed = 0;
updateEdges();
}
if ((((cMap[upY][leftX] > 1) && (cMap[upY][leftX] < 11)) && (cMap[upY][leftX] != 5)) || (((cMap[upY][rightX] > 1) && (cMap[upY][rightX] < 11)) && (cMap[upY][rightX] != 5))) {
var _local3 = (upY * tileH) + (tileH * 1.5);
ypos = _local3 - gravity;
yspeed = 0;
}
if ((((yspeed > 0) && (lastdownY <= downY)) && (downY >= (jumpPos - 2))) || (onGround)) {
if (((cMap[downY][leftX] > 1) && (cMap[downY][leftX] < 11)) || ((cMap[downY][rightX] > 1) && (cMap[downY][rightX] < 11))) {
var ground = ((downY * tileH) - (tileH / 2));
ypos = ground + gravity;
yspeed = 0;
if (!onGround) {
justLandedTimer = getTimer();
}
onGround = true;
} else {
if (onGround && (count < 180)) {
count = 181;
} else if (onGround && (count < 360)) {
count = 0;
}
if (onGround && (closeRight)) {
closeEdgeRight = true;
xspeed = (speed * -3) / 4;
} else if (onGround && (closeLeft)) {
closeEdgeLeft = true;
xspeed = (speed * 3) / 4;
}
}
}
_local2.render();
weaponCollisionCheck();
}
}
stop();
dead = false;
life = 80 + (5 * _root.level);
speed = 5;
jumpspeed = 18;
cMap = _root.cMap;
tileW = _root.tileW;
tileH = _root.tileH;
count = 0;
temp = 0;
near = false;
closeEdgeLeft = false;
closeEdgeRight = false;
dirx = -1;
lastShot = 0;
awareness = 0;
gravity = 0.8;
groundFriction = 0.8;
airFriction = 0.98;
scale = _xscale;
Symbol 240 MovieClip Frame 3
function render() {
_parent._y = Math.round(ypos);
_parent._x = Math.round(xpos);
}
function updateEdges() {
downY = Math.floor((ypos + 35) / tileH);
upY = Math.floor((ypos - 30) / tileH);
leftX = Math.floor((xpos - 30) / tileW);
rightX = Math.floor((xpos + 30) / tileW);
downY2 = Math.floor((ypos + 30) / tileH);
upY2 = Math.floor((ypos - 30) / tileH);
}
function control() {
var _local1 = _root;
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
if (life < 0) {
if (!enemy.hasExploded) {
enemy.gotoAndStop("dead");
} else {
enemy.itemCollisionCheck();
}
} else if ((((myRealx > 800) || (myRealx < -200)) || (myRealy < -200)) || (myRealy > 600)) {
_visible = false;
} else {
_visible = true;
disX = Math.abs(myRealx - _local1.scrClip.char.myRealx);
disY = Math.abs(myRealy - _local1.scrClip.char.myRealy);
if ((beingShot == true) || ((_local1.scrClip.char.hiding == false) && ((disX < (400 + awareness)) && (disY < (100 + awareness))))) {
near = true;
attacking = false;
awareness = 200;
if (myRealx > _local1.scrClip.char.myRealx) {
_xscale = scale;
dirx = -1;
if (disY <= 32) {
if (disX <= 64) {
xspeed = 1.3 * speed;
} else if (disX <= 256) {
attacking = true;
} else {
xspeed = -1.3 * speed;
}
binkyIsNotBelow();
binkyIsNotAbove();
} else if (myRealy < _local1.scrClip.char.myRealy) {
binkyIsNotAbove();
BinkyIsBelow = true;
if (!runRightBelow) {
runLeftBelow = true;
}
} else if (myRealy > _local1.scrClip.char.myRealy) {
binkyIsNotBelow();
BinkyIsAbove = true;
if (!runRightAbove) {
runLeftAbove = true;
}
jumpNow();
}
} else if (myRealx < _local1.scrClip.char.myRealx) {
_xscale = (-scale);
dirx = 1;
if (disY <= 32) {
if (disX <= 64) {
xspeed = -1.3 * speed;
} else if (disX <= 256) {
attacking = true;
} else {
xspeed = 1.3 * speed;
}
binkyIsNotBelow();
binkyIsNotAbove();
} else if (myRealy < _local1.scrClip.char.myRealy) {
binkyIsNotAbove();
BinkyIsBelow = true;
if (!runLeftBelow) {
runRightBelow = true;
}
} else if (myRealy > _local1.scrClip.char.myRealy) {
binkyIsNotBelow();
BinkyIsAbove = true;
if (!runLeftAbove) {
runRightAbove = true;
}
jumpNow();
}
}
if (BinkyIsBelow) {
if (runLeftBelow) {
xspeed = -1.3 * speed;
} else if (runRightBelow) {
xspeed = 1.3 * speed;
}
} else if (BinkyIsAbove) {
if (runLeftAbove) {
xspeed = -1.3 * speed;
} else if (runRightAbove) {
xspeed = 1.3 * speed;
}
}
} else {
near = false;
attacking = false;
awareness = 0;
binkyIsNotBelow();
binkyIsNotAbove();
}
if (near == false) {
if (count < 180) {
xspeed = (speed * 3) / 4;
_xscale = (-scale);
dirx = 1;
count++;
} else if (count < 360) {
xspeed = ((-speed) * 3) / 4;
_xscale = scale;
dirx = -1;
count++;
} else {
count = 0;
}
}
if (attacking == true) {
if (getTimer() > (lastShot + 800)) {
if (_local1.enemybulletCount < _local1.maxBullets) {
if (dirx == -1) {
enemygunloc.xpos = xpos + enemygunloc._x;
} else {
enemygunloc.xpos = xpos - enemygunloc._x;
}
enemygunloc.ypos = ypos + enemygunloc._y;
_local1.enemyshoot(this, 0, dirx, enemygunloc.xpos, enemygunloc.ypos, 1);
_local1.enemybulletCount++;
} else {
_local1.enemybulletCount = 0;
}
}
}
if (beingShot) {
beingShot = false;
}
if (onGround) {
xspeed = xspeed * groundFriction;
} else {
if (yspeed < 40) {
yspeed = yspeed + gravity;
}
yspeed = yspeed * airFriction;
}
ypos = ypos + yspeed;
xpos = xpos + xspeed;
updateEdges();
if ((((cMap[downY2][leftX] > 1) && (cMap[downY2][leftX] < 10)) && (cMap[downY2][leftX] != 5)) || (((cMap[upY2][leftX] > 1) && (cMap[upY2][leftX] < 10)) && (cMap[upY2][leftX] != 5))) {
if (near == true) {
jumpNow();
} else {
count = 0;
}
xpos = xpos - xspeed;
xspeed = 0;
updateEdges();
}
if ((((cMap[downY2][rightX] > 1) && (cMap[downY2][rightX] < 10)) && (cMap[downY2][rightX] != 5)) || (((cMap[upY2][rightX] > 1) && (cMap[upY2][rightX] < 10)) && (cMap[upY2][rightX] != 5))) {
if (near == true) {
jumpNow();
} else {
count = 181;
}
xpos = xpos - xspeed;
xspeed = 0;
updateEdges();
}
if ((((cMap[upY][leftX] > 1) && (cMap[upY][leftX] < 10)) && (cMap[upY][leftX] != 5)) || (((cMap[upY][rightX] > 1) && (cMap[upY][rightX] < 10)) && (cMap[upY][rightX] != 5))) {
var _local2 = (upY * tileH) + (tileH * 1.5);
ypos = _local2 - gravity;
yspeed = 0;
}
if ((((yspeed > 0) && (lastdownY <= downY)) && (downY >= (jumpPos - 2))) || (onGround)) {
if (((cMap[downY][leftX] > 1) && (cMap[downY][leftX] < 11)) || ((cMap[downY][rightX] > 1) && (cMap[downY][rightX] < 11))) {
var _local3 = (downY * tileH) - (tileH / 2);
ypos = _local3 + gravity;
yspeed = 0;
if (!onGround) {
justLandedTimer = getTimer();
}
onGround = true;
} else {
if (onGround && (near == false)) {
if (count < 180) {
count = 181;
} else if (count < 360) {
count = 0;
}
}
onGround = false;
}
}
this.render();
weaponCollisionCheck();
}
}
function jumpNow() {
if (onGround) {
yspeed = -jumpspeed;
jumpPos = downY;
onGround = false;
}
}
stop();
dead = false;
life = 60 + (5 * _root.level);
speed = 5;
jumpspeed = 18;
cMap = _root.cMap;
tileW = _root.tileW;
tileH = _root.tileH;
count = 0;
temp = 0;
dirx = -1;
lastShot = 0;
near = false;
attacking = false;
awareness = 0;
gravity = 0.8;
groundFriction = 0.8;
airFriction = 0.98;
scale = _xscale;
Symbol 240 MovieClip Frame 4
function render() {
_parent._y = Math.round(ypos);
_parent._x = Math.round(xpos);
}
function updateEdges() {
downY = Math.floor((ypos + 35) / tileH);
upY = Math.floor((ypos - 30) / tileH);
leftX = Math.floor((xpos - 30) / tileW);
rightX = Math.floor((xpos + 30) / tileW);
downY2 = Math.floor((ypos + 30) / tileH);
upY2 = Math.floor((ypos - 30) / tileH);
}
function control() {
var _local1 = _root;
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
if (life < 0) {
if (!enemy.hasExploded) {
enemy.gotoAndStop("dead");
} else {
enemy.itemCollisionCheck();
}
} else {
if ((xspeed > 8) || (xspeed < -8)) {
enemy.gotoAndStop("charge");
if (this.enemy.turtle.hitscreen.hitTest(_local1.scrClip.char)) {
_local1.scrClip.char.hurt(5);
}
} else {
enemy.gotoAndStop("normal");
}
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy < -200)) || (myRealy > 600)) {
_visible = false;
} else {
_visible = true;
disX = Math.abs(myRealx - _local1.scrClip.char.myRealx);
disY = Math.abs(myRealy - _local1.scrClip.char.myRealy);
if ((beingShot == true) || ((_local1.scrClip.char.hiding == false) && ((disX < (400 + awareness)) && (disY < (100 + awareness))))) {
near = true;
awareness = 300;
if (myRealx > _local1.scrClip.char.myRealx) {
rightSide = true;
if (!leftSide) {
if (rightSide) {
_xscale = scale;
dirx = -1;
xspeed = (-150 / runTimer) * speed;
runTimer = runTimer - 15;
if (runTimer < 50) {
runTimer = 50;
}
}
} else {
xspeed = (150 / runTimer) * speed;
runTimer = runTimer + 4;
if (runTimer > 500) {
runTimer = 500;
leftSide = false;
}
}
power = Math.floor(powerIntial / runTimer);
} else {
leftSide = true;
if (!rightSide) {
if (leftSide) {
_xscale = (-scale);
dirx = 1;
xspeed = (150 / runTimer) * speed;
runTimer = runTimer - 15;
if (runTimer < 50) {
runTimer = 50;
}
}
} else {
xspeed = (-150 / runTimer) * speed;
runTimer = runTimer + 4;
if (runTimer > 500) {
runTimer = 500;
rightSide = false;
}
}
power = Math.floor(powerIntial / runTimer);
}
} else {
near = false;
awareness = 0;
runTimer = 500;
rightSide = false;
leftSide = false;
}
if (near == false) {
if (count < 180) {
xspeed = (speed * 3) / 4;
_xscale = (-scale);
dirx = 1;
count++;
} else if (count < 360) {
xspeed = ((-speed) * 3) / 4;
_xscale = scale;
dirx = -1;
count++;
} else {
count = 0;
}
}
if (beingShot) {
beingShot = false;
}
if (!onGround) {
if (yspeed < 40) {
yspeed = yspeed + gravity;
}
yspeed = yspeed * airFriction;
}
if (onGround) {
xspeed = xspeed * groundFriction;
}
ypos = ypos + yspeed;
xpos = xpos + xspeed;
updateEdges();
if ((((cMap[downY2][leftX] > 1) && (cMap[downY2][leftX] < 11)) && (cMap[downY2][leftX] != 5)) || (((cMap[upY2][leftX] > 1) && (cMap[upY2][leftX] < 11)) && (cMap[upY2][leftX] != 5))) {
if (near) {
refreshChaseDirection();
} else {
count = 0;
}
xpos = xpos - xspeed;
xspeed = 0;
updateEdges();
}
if ((((cMap[downY2][rightX] > 1) && (cMap[downY2][rightX] < 11)) && (cMap[downY2][rightX] != 5)) || (((cMap[upY2][rightX] > 1) && (cMap[upY2][rightX] < 11)) && (cMap[upY2][rightX] != 5))) {
if (near) {
refreshChaseDirection();
} else {
count = 181;
}
xpos = xpos - xspeed;
xspeed = 0;
updateEdges();
}
if ((((cMap[upY][leftX] > 1) && (cMap[upY][leftX] < 11)) && (cMap[upY][leftX] != 5)) || (((cMap[upY][rightX] > 1) && (cMap[upY][rightX] < 11)) && (cMap[upY][rightX] != 5))) {
var _local2 = (upY * tileH) + (tileH * 1.5);
ypos = _local2 - gravity;
yspeed = 0;
}
if ((((yspeed > 0) && (lastdownY <= downY)) && (downY >= (jumpPos - 2))) || (onGround)) {
if (((cMap[downY][leftX] > 1) && (cMap[downY][leftX] < 11)) || ((cMap[downY][rightX] > 1) && (cMap[downY][rightX] < 11))) {
var _local3 = (downY * tileH) - (tileH / 2);
ypos = _local3 + gravity;
yspeed = 0;
if (!onGround) {
justLandedTimer = getTimer();
}
onGround = true;
} else {
if (onGround && (count < 180)) {
count = 181;
} else if (onGround && (count < 360)) {
count = 0;
}
onGround = false;
}
}
this.render();
weaponCollisionCheck();
}
}
}
function refreshChaseDirection() {
if (rightSide || (leftSide)) {
rightSide = false;
leftSide = false;
runTimer = 500;
}
}
stop();
dead = false;
life = 100;
speed = 5;
jumpspeed = 18;
cMap = _root.cMap;
tileW = _root.tileW;
tileH = _root.tileH;
count = 0;
temp = 0;
near = false;
runTimer = 500;
power = 5;
powerIntial = 1000;
dirx = -1;
lastShot = 0;
awareness = 0;
gravity = 0.8;
groundFriction = 0.8;
airFriction = 0.98;
scale = _xscale;
Symbol 240 MovieClip Frame 5
function control() {
var _local1 = _root;
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy < -200)) || (myRealy > 600)) {
_visible = false;
} else {
_visible = true;
disX = Math.abs(myRealx - _local1.scrClip.char.myRealx);
disY = myRealy - _local1.scrClip.char.myRealy;
if (((((!falling) && (!growing)) && (!dying)) && (disY < 0)) && (disX < 100)) {
falling = true;
speed = 0;
enemy.gotoAndStop("normal");
} else if (falling) {
if (this.enemy.hitTest(_local1.scrClip.char)) {
_local1.scrClip.char.hurt(5);
}
ypos = ypos + speed;
speed++;
centerX = Math.floor(xpos / _local1.tileW);
centerY = Math.floor(ypos / _local1.tileH);
tile = _local1.cMap[centerY + 1][centerX];
if ((tile > 1) && (tile < 11)) {
falling = false;
enemy.gotoAndStop("die");
dying = true;
}
} else if (growing) {
enemy.gotoAndStop("regenerate");
}
}
render();
}
stop();
STARTY = ypos;
dead = false;
life = 40;
speed = 0;
cMap = _root.cMap;
tileW = _root.tileW;
tileH = _root.tileH;
falling = false;
growing = false;
dying = false;
enemy.gotoAndStop("normal");
Symbol 240 MovieClip Frame 6
function control() {
var _local1 = _root;
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy < -200)) || (myRealy > 600)) {
_visible = false;
} else {
_visible = true;
disX = Math.abs(myRealx - _local1.scrClip.char.myRealx);
disY = Math.abs(myRealy - _local1.scrClip.char.myRealy);
if ((disX < 35) && (disY < 35)) {
if (!timerIsReset) {
timer = getTimer();
timerIsReset = true;
}
if (getTimer() > (timer + 800)) {
timerIsReset = false;
_local1.scrClip.char.autoJump = true;
enemy.gotoAndStop("go");
}
} else {
timerIsReset = false;
}
}
render();
}
stop();
cMap = _root.cMap;
tileW = _root.tileW;
tileH = _root.tileH;
timerIsReset = false;
Symbol 240 MovieClip Frame 7
function render() {
_parent._y = Math.round(ypos);
_parent._x = Math.round(xpos);
}
function updateEdges() {
downY = Math.floor((ypos + 35) / tileH);
upY = Math.floor((ypos - 30) / tileH);
leftX = Math.floor((xpos - 30) / tileW);
rightX = Math.floor((xpos + 30) / tileW);
downY2 = Math.floor((ypos + 30) / tileH);
upY2 = Math.floor((ypos - 30) / tileH);
}
function control() {
var _local1 = _root;
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
if (life < 0) {
if (!enemy.hasExploded) {
enemy.gotoAndStop("dead");
} else {
enemy.itemCollisionCheck();
}
} else if ((((myRealx > 800) || (myRealx < -200)) || (myRealy < -200)) || (myRealy > 600)) {
_visible = false;
} else {
_visible = true;
disX = Math.abs(myRealx - _local1.scrClip.char.myRealx);
disY = Math.abs(myRealy - _local1.scrClip.char.myRealy);
if ((beingShot == true) || ((_local1.scrClip.char.hiding == false) && ((disX < (400 + awareness)) && (disY < (100 + awareness))))) {
near = true;
attacking = false;
awareness = 200;
if (myRealx > _local1.scrClip.char.myRealx) {
_xscale = scale;
dirx = -1;
if (disY <= 32) {
if (disX <= 150) {
xspeed = 1.3 * speed;
} else if (disX <= 256) {
attacking = true;
} else {
xspeed = -1.3 * speed;
}
binkyIsNotBelow();
binkyIsNotAbove();
} else if (myRealy < _local1.scrClip.char.myRealy) {
binkyIsNotAbove();
BinkyIsBelow = true;
if (!runRightBelow) {
runLeftBelow = true;
}
} else if (myRealy > _local1.scrClip.char.myRealy) {
binkyIsNotBelow();
BinkyIsAbove = true;
if (!runRightAbove) {
runLeftAbove = true;
}
jumpNow();
}
} else if (myRealx < _local1.scrClip.char.myRealx) {
_xscale = (-scale);
dirx = 1;
if (disY <= 32) {
if (disX <= 150) {
xspeed = -1.3 * speed;
} else if (disX <= 256) {
attacking = true;
} else {
xspeed = 1.3 * speed;
}
binkyIsNotBelow();
binkyIsNotAbove();
} else if (myRealy < _local1.scrClip.char.myRealy) {
binkyIsNotAbove();
BinkyIsBelow = true;
if (!runLeftBelow) {
runRightBelow = true;
}
} else if (myRealy > _local1.scrClip.char.myRealy) {
binkyIsNotBelow();
BinkyIsAbove = true;
if (!runLeftAbove) {
runRightAbove = true;
}
jumpNow();
}
}
if (BinkyIsBelow) {
if (runLeftBelow) {
xspeed = -1.3 * speed;
} else if (runRightBelow) {
xspeed = 1.3 * speed;
}
} else if (BinkyIsAbove) {
if (runLeftAbove) {
xspeed = -1.3 * speed;
} else if (runRightAbove) {
xspeed = 1.3 * speed;
}
}
} else {
near = false;
attacking = false;
awareness = 0;
binkyIsNotBelow();
binkyIsNotAbove();
}
if (near == false) {
if (count < 180) {
xspeed = (speed * 3) / 4;
_xscale = (-scale);
dirx = 1;
count++;
} else if (count < 360) {
xspeed = ((-speed) * 3) / 4;
_xscale = scale;
dirx = -1;
count++;
} else {
count = 0;
}
}
if (attacking == true) {
if (getTimer() > (lastShot + 35)) {
if (_local1.enemybulletCount < _local1.maxBullets) {
if (dirx == -1) {
enemygunloc.xpos = xpos + enemygunloc._x;
} else {
enemygunloc.xpos = xpos - enemygunloc._x;
}
enemygunloc.ypos = ypos + enemygunloc._y;
_local1.enemyshoot(this, 0, dirx, enemygunloc.xpos, enemygunloc.ypos, "flame");
_local1.enemybulletCount++;
} else {
_local1.enemybulletCount = 0;
}
}
}
if (beingShot) {
beingShot = false;
}
if (onGround) {
xspeed = xspeed * groundFriction;
} else {
if (yspeed < 40) {
yspeed = yspeed + gravity;
}
yspeed = yspeed * airFriction;
}
ypos = ypos + yspeed;
xpos = xpos + xspeed;
updateEdges();
if ((((cMap[downY2][leftX] > 1) && (cMap[downY2][leftX] < 10)) && (cMap[downY2][leftX] != 5)) || (((cMap[upY2][leftX] > 1) && (cMap[upY2][leftX] < 10)) && (cMap[upY2][leftX] != 5))) {
if (near == true) {
jumpNow();
} else {
count = 0;
}
xpos = xpos - xspeed;
xspeed = 0;
updateEdges();
}
if ((((cMap[downY2][rightX] > 1) && (cMap[downY2][rightX] < 10)) && (cMap[downY2][rightX] != 5)) || (((cMap[upY2][rightX] > 1) && (cMap[upY2][rightX] < 10)) && (cMap[upY2][rightX] != 5))) {
if (near == true) {
jumpNow();
} else {
count = 181;
}
xpos = xpos - xspeed;
xspeed = 0;
updateEdges();
}
if ((((cMap[upY][leftX] > 1) && (cMap[upY][leftX] < 10)) && (cMap[upY][leftX] != 5)) || (((cMap[upY][rightX] > 1) && (cMap[upY][rightX] < 10)) && (cMap[upY][rightX] != 5))) {
var _local2 = (upY * tileH) + (tileH * 1.5);
ypos = _local2 - gravity;
yspeed = 0;
}
if ((((yspeed > 0) && (lastdownY <= downY)) && (downY >= (jumpPos - 2))) || (onGround)) {
if (((cMap[downY][leftX] > 1) && (cMap[downY][leftX] < 11)) || ((cMap[downY][rightX] > 1) && (cMap[downY][rightX] < 11))) {
var _local3 = (downY * tileH) - (tileH / 2);
ypos = _local3 + gravity;
yspeed = 0;
if (!onGround) {
justLandedTimer = getTimer();
}
onGround = true;
} else {
if (onGround && (near == false)) {
if (count < 180) {
count = 181;
} else if (count < 360) {
count = 0;
}
}
onGround = false;
}
}
this.render();
weaponCollisionCheck();
}
}
function jumpNow() {
if (onGround) {
yspeed = -jumpspeed;
jumpPos = downY;
onGround = false;
}
}
stop();
dead = false;
life = 150;
speed = 5;
jumpspeed = 18;
cMap = _root.cMap;
tileW = _root.tileW;
tileH = _root.tileH;
count = 0;
temp = 0;
dirx = -1;
lastShot = 0;
near = false;
attacking = false;
awareness = 0;
gravity = 0.8;
groundFriction = 0.8;
airFriction = 0.98;
scale = _xscale;
Symbol 240 MovieClip Frame 8
function control() {
var _local1 = _root;
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy < -200)) || (myRealy > 600)) {
_visible = false;
} else {
_visible = true;
if (!haveamount) {
amount = 1000 + (1000 * random(4));
haveamount = true;
}
if ((time + amount) < getTimer()) {
if (_local1.enemybulletCount < _local1.maxBullets) {
enemygunloc.xpos = xpos + enemygunloc._x;
enemygunloc.ypos = ypos + enemygunloc._y;
_local1.enemyshoot(this, -1, 0, enemygunloc.xpos, enemygunloc.ypos, "fireball");
_local1.enemybulletCount++;
} else {
_local1.enemybulletCount = 0;
}
haveamount = false;
time = getTimer();
}
}
render();
}
stop();
cMap = _root.cMap;
tileW = _root.tileW;
tileH = _root.tileH;
time = getTimer();
haveamount = false;
Symbol 240 MovieClip Frame 9
function render() {
_parent._y = Math.round(ypos);
_parent._x = Math.round(xpos);
}
function updateEdges() {
downY = Math.floor((ypos + 35) / tileH);
upY = Math.floor((ypos - 30) / tileH);
leftX = Math.floor((xpos - 30) / tileW);
rightX = Math.floor((xpos + 30) / tileW);
downY2 = Math.floor((ypos + 30) / tileH);
upY2 = Math.floor((ypos - 30) / tileH);
}
function control() {
var _local1 = _root;
var _local2 = this;
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
if (life < 0) {
if (!enemy.hasExploded) {
enemy.gotoAndStop("dead");
} else {
enemy.itemCollisionCheck();
}
} else if ((((myRealx > 800) || (myRealx < -200)) || (myRealy < -200)) || (myRealy > 600)) {
_visible = false;
} else {
_visible = true;
disX = Math.abs(myRealx - _local1.scrClip.char.myRealx);
disY = Math.abs(myRealy - _local1.scrClip.char.myRealy);
if ((beingShot == true) || ((_local1.scrClip.char.hiding == false) && ((disX < (400 + awareness)) && (disY < (100 + awareness))))) {
near = true;
attacking = false;
awareness = 200;
if (myRealx > _local1.scrClip.char.myRealx) {
_xscale = scale;
dirx = -1;
if (disY <= 64) {
if (disX <= 64) {
xspeed = 1.3 * speed;
} else if (disX <= 256) {
attacking = true;
} else {
xspeed = -1.3 * speed;
}
binkyIsNotBelow();
binkyIsNotAbove();
} else if (myRealy < _local1.scrClip.char.myRealy) {
binkyIsNotAbove();
BinkyIsBelow = true;
if (!runRightBelow) {
runLeftBelow = true;
}
} else if (myRealy > _local1.scrClip.char.myRealy) {
binkyIsNotBelow();
BinkyIsAbove = true;
if (!runRightAbove) {
runLeftAbove = true;
}
jumpNow();
if ((!Jump) && (disX > 16)) {
xspeed = -1.3 * speed;
}
}
} else if (myRealx < _local1.scrClip.char.myRealx) {
_xscale = (-scale);
dirx = 1;
if (disY <= 64) {
if (disX <= 64) {
xspeed = -1.3 * speed;
} else if (disX <= 256) {
attacking = true;
} else {
xspeed = 1.3 * speed;
}
binkyIsNotBelow();
binkyIsNotAbove();
} else if (myRealy < _local1.scrClip.char.myRealy) {
binkyIsNotAbove();
BinkyIsBelow = true;
if (!runLeftBelow) {
runRightBelow = true;
}
} else if (myRealy > _local1.scrClip.char.myRealy) {
binkyIsNotBelow();
BinkyIsAbove = true;
if (!runLeftAbove) {
runRightAbove = true;
}
jumpNow();
if ((!Jump) && (disX > 16)) {
xspeed = 1.3 * speed;
}
}
}
if (BinkyIsBelow) {
if (runLeftBelow) {
xspeed = -1.3 * speed;
} else if (runRightBelow) {
xspeed = 1.3 * speed;
}
} else if (BinkyIsAbove) {
if (runLeftAbove) {
xspeed = -1.3 * speed;
} else if (runRightAbove) {
xspeed = 1.3 * speed;
}
}
} else {
near = false;
attacking = false;
awareness = 0;
binkyIsNotBelow();
binkyIsNotAbove();
}
if (near == false) {
if (count < 180) {
xspeed = (speed * 3) / 4;
_xscale = (-scale);
dirx = 1;
count++;
} else if (count < 360) {
xspeed = ((-speed) * 3) / 4;
_xscale = scale;
dirx = -1;
count++;
} else {
count = 0;
}
}
if (attacking == true) {
if (getTimer() > (lastShot + 800)) {
if ((_local1.enemybulletCount + 3) > _local1.maxBullets) {
_local1.enemybulletCount = 0;
}
if (dirx == -1) {
enemygunloc.xpos = xpos + enemygunloc._x;
} else {
enemygunloc.xpos = xpos - enemygunloc._x;
}
enemygunloc.ypos = ypos + enemygunloc._y;
_local1.enemyshoot(_local2, -1, dirx, enemygunloc.xpos, enemygunloc.ypos, "sparky");
_local1.enemybulletCount++;
_local1.enemyshoot(_local2, 1, dirx, enemygunloc.xpos, enemygunloc.ypos, "sparky");
_local1.enemybulletCount++;
_local1.enemyshoot(_local2, 0, dirx, enemygunloc.xpos, enemygunloc.ypos, "sparky");
_local1.enemybulletCount++;
}
}
if (beingShot) {
beingShot = false;
}
if (!onGround) {
if (yspeed < 40) {
yspeed = yspeed + gravity;
}
yspeed = yspeed * airFriction;
}
if (onGround) {
xspeed = xspeed * groundFriction;
}
ypos = ypos + yspeed;
xpos = xpos + xspeed;
updateEdges();
if ((((cMap[downY2][leftX] > 1) && (cMap[downY2][leftX] < 10)) && (cMap[downY2][leftX] != 5)) || (((cMap[upY2][leftX] > 1) && (cMap[upY2][leftX] < 10)) && (cMap[upY2][leftX] != 5))) {
if (near == true) {
jumpNow();
} else {
count = 0;
}
xpos = xpos - xspeed;
xspeed = 0;
updateEdges();
}
if ((((cMap[downY2][rightX] > 1) && (cMap[downY2][rightX] < 10)) && (cMap[downY2][rightX] != 5)) || (((cMap[upY2][rightX] > 1) && (cMap[upY2][rightX] < 10)) && (cMap[upY2][rightX] != 5))) {
if (near == true) {
jumpNow();
} else {
count = 181;
}
xpos = xpos - xspeed;
xspeed = 0;
updateEdges();
}
if ((((cMap[upY][leftX] > 1) && (cMap[upY][leftX] < 10)) && (cMap[upY][leftX] != 5)) || (((cMap[upY][rightX] > 1) && (cMap[upY][rightX] < 10)) && (cMap[upY][rightX] != 5))) {
var _local3 = (upY * tileH) + (tileH * 1.5);
ypos = _local3 - gravity;
yspeed = 0;
}
if ((((yspeed > 0) && (lastdownY <= downY)) && (downY >= (jumpPos - 2))) || (onGround)) {
if (((cMap[downY][leftX] > 1) && (cMap[downY][leftX] < 11)) || ((cMap[downY][rightX] > 1) && (cMap[downY][rightX] < 11))) {
var ground = ((downY * tileH) - (tileH / 2));
ypos = ground + gravity;
yspeed = 0;
if (!onGround) {
justLandedTimer = getTimer();
}
onGround = true;
if (onGroundTimer == 0) {
refreshChaseDirection();
}
onGroundTimer++;
} else {
if (onGround && (near == false)) {
if (count < 180) {
count = 181;
} else if (count < 360) {
count = 0;
}
}
onGround = false;
onGroundTimer = 0;
}
}
_local2.render();
weaponCollisionCheck();
}
}
stop();
dead = false;
life = 120;
speed = 7;
jumpspeed = 18;
cMap = _root.cMap;
tileW = _root.tileW;
tileH = _root.tileH;
count = 0;
temp = 0;
dirx = -1;
lastShot = 0;
near = false;
attacking = false;
awareness = 0;
gravity = 0.8;
groundFriction = 0.8;
airFriction = 0.98;
scale = _xscale;
Symbol 240 MovieClip Frame 10
function control() {
var _local1 = _root;
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy < -200)) || (myRealy > 600)) {
_visible = false;
} else {
_visible = true;
disX = myRealx - _local1.scrClip.char.myRealx;
disY = myRealy - _local1.scrClip.char.myRealy;
if ((((disX < 50) && (disX > -50)) && (disY < 50)) && (disY > -50)) {
eye.gotoAndStop(2);
eye._rotation = 0;
} else {
eye.gotoAndStop(1);
if (disY <= 0) {
eye._rotation = ((-Math.atan(disX / disY)) * 180) / Math.PI;
} else {
eye._rotation = 180 - ((Math.atan(disX / disY) * 180) / Math.PI);
}
}
}
render();
}
stop();
Symbol 259 MovieClip Frame 45
_parent._parent.launching = true;
Symbol 259 MovieClip Frame 70
_parent._parent.attacking = false;
_parent._parent.attackCount++;
_parent._parent.waiting = getTimer();
Symbol 261 MovieClip Frame 21
_parent._parent.launching = true;
Symbol 261 MovieClip Frame 30
_parent._parent.attacking = false;
_parent._parent.attackCount++;
_parent._parent.waiting = getTimer();
Symbol 267 MovieClip Frame 1
count = 0;
Symbol 267 MovieClip Frame 40
if (count == 10) {
_parent._parent.doneTeasing = true;
} else {
count++;
gotoAndPlay (20);
}
Symbol 273 MovieClip Frame 64
_parent._parent.hurting = false;
_parent._parent.attackCount = 0;
Symbol 274 MovieClip Frame 1
function itemCollisionCheck() {
var _local1 = _root;
if (item._visible && (item.hitTest(_local1.scrClip.char))) {
itemSound.gotoAndPlay(2);
item._visible = false;
_local1.scrClip.char.life = _local1.scrClip.char.life + 5;
_local1.score = _local1.score + 10;
_local1.enemiesKilled++;
_parent.dead = true;
}
}
stop();
hasExploded = false;
firstTimeCalled = true;
Symbol 274 MovieClip Frame 2
stop();
Symbol 274 MovieClip Frame 3
stop();
Symbol 274 MovieClip Frame 4
stop();
Symbol 274 MovieClip Frame 5
stop();
Symbol 274 MovieClip Frame 6
stop();
_root.score = _root.score + 500;
Symbol 274 MovieClip Frame 7
stop();
Instance of Symbol 138 MovieClip "item" in Symbol 274 MovieClip Frame 7
onClipEvent (load) {
gotoAndStop (3);
}
Symbol 285 MovieClip Frame 1
function control() {
var _local1 = _root;
if (life == 0) {
if (!boss.hasExploded) {
boss.gotoAndStop("dead");
} else {
boss.itemCollisionCheck();
}
} else if (attackCount >= 4) {
if (boss.hitTest(spikes) && (spikespeed > 0)) {
if (!hurting) {
life--;
}
hurting = true;
}
if (doneTeasing) {
attackCount = 0;
doneTeasing = false;
} else if (hurting) {
boss.gotoAndStop("hurt");
} else {
boss.gotoAndStop("tease");
}
} else if (!attacking) {
boss.gotoAndStop("idle");
if (getTimer() > (waiting + 4000)) {
attacknum = random(2);
attacking = true;
}
} else if (attacknum == 0) {
boss.gotoAndStop("attack1");
if (launching) {
if (_local1.enemybulletCount >= _local1.maxBullets) {
_local1.enemybulletCount = 0;
}
enemygunloc.xpos = xpos + enemygunloc._x;
enemygunloc.ypos = ypos + enemygunloc._y;
_local1.enemyshoot(this, -1, -1, enemygunloc.xpos, enemygunloc.ypos, "blob");
_local1.enemybulletCount++;
launching = false;
}
} else {
boss.gotoAndStop("attack2");
if (launching) {
if (_local1.enemybulletCount >= _local1.maxBullets) {
_local1.enemybulletCount = 0;
}
enemygunloc2.xpos = xpos + enemygunloc2._x;
enemygunloc2.ypos = ypos + enemygunloc2._y;
_local1.enemyshoot(this, 0, -1, enemygunloc2.xpos, enemygunloc2.ypos, "vine");
_local1.enemybulletCount++;
launching = false;
}
}
platformRealy = (_parent._y + platform._y) + _local1.ypos;
if (((_local1.scrClip.char.yspeed > 0) && (platform.hitTest(_local1.scrClip.char))) && ((_local1.scrClip.char.myRealY - 50) < platformRealy)) {
platform._y = platform._y + _local1.scrClip.char.yspeed;
vine._y = vine._y + _local1.scrClip.char.yspeed;
spikes._y = spikes._y - _local1.scrClip.char.yspeed;
spikespeed = 0;
} else if (platform._y > platformStartY) {
if (platform.hitTest(_local1.scrClip.char) && ((_local1.scrClip.char.myRealY - 50) < platformRealy)) {
} else {
spikespeed++;
platform._y = platform._y - spikespeed;
vine._y = vine._y - spikespeed;
spikes._y = spikes._y + spikespeed;
}
} else {
spikespeed = 0;
}
}
attacking = false;
launching = false;
waiting = getTimer();
platformStartY = platform._y;
attackCount = 0;
doneTeasing = false;
hurting = false;
life = 3;
Symbol 293 MovieClip Frame 1
stop();
Symbol 298 MovieClip Frame 1
stop();
Symbol 303 MovieClip Frame 1
stop();
Symbol 308 MovieClip Frame 1
stop();
Symbol 312 MovieClip Frame 50
gotoAndPlay (1);
Symbol 313 MovieClip Frame 50
gotoAndPlay (1);
Symbol 318 MovieClip Frame 1
stop();
Symbol 318 MovieClip Frame 2
stop();
Symbol 323 MovieClip Frame 1
stop();
Symbol 323 MovieClip Frame 2
stop();
Symbol 324 MovieClip Frame 20
_parent._parent.launching = true;
Instance of Symbol 318 MovieClip in Symbol 324 MovieClip Frame 56
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 323 MovieClip in Symbol 324 MovieClip Frame 56
onClipEvent (load) {
gotoAndStop (2);
}
Symbol 324 MovieClip Frame 70
_parent._parent.attacking = false;
_parent._parent.waiting = getTimer();
Symbol 330 MovieClip Frame 1
stop();
Symbol 335 MovieClip Frame 1
stop();
Symbol 336 MovieClip Frame 14
_parent._parent.launching = true;
Symbol 336 MovieClip Frame 38
_parent._parent.attacking = false;
_parent._parent.waiting = getTimer();
Symbol 340 MovieClip Frame 115
stop();
_parent._parent.rolling = true;
_parent._parent.timer = getTimer();
Symbol 342 MovieClip Frame 31
if (((_parent._parent.fallenTimer + 4000) > getTimer()) && (_parent._parent.fallenhits < 50)) {
gotoAndPlay (3);
} else if (_parent._parent.fallenhits >= 50) {
_parent._parent.downcount++;
}
Symbol 342 MovieClip Frame 61
_parent._parent.fallen = false;
_parent._parent.headlife = 100;
_parent._parent.fallenhits = 0;
Symbol 343 MovieClip Frame 1
function itemCollisionCheck() {
var _local1 = _root;
if (item._visible && (item.hitTest(_local1.scrClip.char))) {
itemSound.gotoAndPlay(2);
item._visible = false;
_local1.scrClip.char.life = _local1.scrClip.char.life + 5;
_local1.score = _local1.score + 10;
_local1.enemiesKilled++;
_parent.dead = true;
}
}
stop();
hasExploded = false;
firstTimeCalled = true;
Symbol 343 MovieClip Frame 7
stop();
_root.score = _root.score + 500;
Symbol 343 MovieClip Frame 8
stop();
Instance of Symbol 138 MovieClip "item" in Symbol 343 MovieClip Frame 8
onClipEvent (load) {
gotoAndStop (4);
}
Symbol 344 MovieClip Frame 1
function render() {
_parent._y = Math.round(ypos);
_parent._x = Math.round(xpos);
}
function weaponCollisionCheck() {
var _local2 = _root;
var _local3 = 0;
while (_local3 < _local2.maxBullets) {
var _local1 = _local2.bulletsArray[_local3];
if (headlife <= 0) {
if (_local2.scrClip[_local1]._visible && (boss.hitTest(_local2.scrClip[_local1]))) {
if (fallen) {
fallenhits = fallenhits + _local2.scrClip[_local1].power;
var colors = {rb:75};
new Color(boss).setTransform(colors);
}
_local2.scrClip[_local1].isDead = true;
}
} else if (_local2.scrClip[_local1]._visible && (boss.anim.head.hitTest(_local2.scrClip[_local1]))) {
headlife = headlife - _local2.scrClip[_local1].power;
_local2.scrClip[_local1].isDead = true;
var colors = {rb:75};
new Color(boss.anim.head).setTransform(colors);
if (boss.anim.head._rotation != headrot) {
boss.anim.head._rotation = headrot;
} else {
randomrot = random(3);
if (randomrot == 0) {
boss.anim.head._rotation = boss.anim.head._rotation - 20;
} else if (randomrot == 1) {
boss.anim.head._rotation = boss.anim.head._rotation + 20;
} else {
boss.anim.head._rotation = boss.anim.head._rotation - 10;
}
}
}
_local3++;
}
}
function control() {
var _local1 = _root;
var _local2 = this;
var _local3 = {rb:0};
new Color(boss.anim.head).setTransform(_local3);
new Color(boss).setTransform(_local3);
boss.anim.head._rotation = headrot;
if (downcount == 3) {
if (!boss.hasExploded) {
boss.gotoAndStop("dead");
} else {
boss.itemCollisionCheck();
}
} else {
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
disX = myRealx - _local1.scrClip.char.myRealx;
disY = myRealy - _local1.scrClip.char.myRealy;
if (headlife <= 0) {
if (fallen == true) {
boss.gotoAndStop("fallen");
} else {
boss.gotoAndStop("attack3");
if (rolling == true) {
boss.anim.ball._rotation = boss.anim.ball._rotation - 10;
centerX = Math.floor(xpos / _local1.tileW);
centerY = Math.floor(ypos / _local1.tileH);
leftTile = _local1.cMap[centerY][centerX - 1];
rightTile = _local1.cMap[centerY][centerX + 1];
if (boss.anim.hitscreen.hitTest(_local1.scrClip.char)) {
if (!_local1.scrClip.char.invinsible) {
_local1.scrClip.char.life = _local1.scrClip.char.life - 5;
_local1.scrClip.char.justhurt = true;
}
}
if ((((leftTile > 1) && (leftTile < 10)) && (leftTile != 5)) || (((rightTile > 1) && (rightTile < 10)) && (rightTile != 5))) {
_xscale = (-_xscale);
}
if (_xscale == scale) {
xpos = xpos - 10;
} else {
xpos = xpos + 10;
}
if ((timer + 6000) < getTimer()) {
rolling = false;
fallen = true;
fallenTimer = getTimer();
}
}
}
} else if (!attacking) {
if (getTimer() > (waiting + 4000)) {
attacknum = random(2);
attacking = true;
}
centerX = Math.floor(xpos / _local1.tileW);
centerY = Math.floor(ypos / _local1.tileH);
leftTile = _local1.cMap[centerY][centerX - 1];
rightTile = _local1.cMap[centerY][centerX + 1];
if (disX > 100) {
_xscale = scale;
if (((leftTile <= 1) || (leftTile == 5)) || (leftTile >= 10)) {
xpos = xpos - speed;
}
boss.gotoAndStop("walk");
} else if (disX < -200) {
_xscale = (-scale);
if (((rightTile <= 1) || (rightTile == 5)) || (rightTile >= 10)) {
xpos = xpos + speed;
}
boss.gotoAndStop("walk");
} else {
boss.gotoAndStop("idle");
}
} else if (attacknum == 0) {
boss.gotoAndStop("attack1");
if (launching) {
if ((_local1.enemybulletCount + 1) > _local1.maxBullets) {
_local1.enemybulletCount = 0;
}
if (_xscale == scale) {
enemygunloc1.xpos = xpos + enemygunloc1._x;
enemygunloc2.xpos = xpos + enemygunloc2._x;
} else {
enemygunloc1.xpos = xpos - enemygunloc1._x;
enemygunloc2.xpos = xpos - enemygunloc2._x;
}
enemygunloc1.ypos = ypos + enemygunloc1._y;
enemygunloc2.ypos = ypos + enemygunloc2._y;
_local1.enemyshoot(_local2, 0, 0, enemygunloc1.xpos, enemygunloc1.ypos, "mis2");
_local1.enemybulletCount++;
_local1.enemyshoot(_local2, 0, 0, enemygunloc2.xpos, enemygunloc2.ypos, "mis1");
_local1.enemybulletCount++;
launching = false;
}
} else {
boss.gotoAndStop("attack2");
if (launching) {
if ((_local1.enemybulletCount + 2) > _local1.maxBullets) {
_local1.enemybulletCount = 0;
}
if (_xscale == scale) {
enemygunloc3.xpos = xpos + enemygunloc3._x;
} else {
enemygunloc3.xpos = xpos - enemygunloc3._x;
}
enemygunloc3.ypos = ypos + enemygunloc3._y;
_local1.enemyshoot(_local2, -1, -1, enemygunloc3.xpos, enemygunloc3.ypos, "spark");
_local1.enemybulletCount++;
_local1.enemyshoot(_local2, -1, 0, enemygunloc3.xpos, enemygunloc3.ypos, "spark");
_local1.enemybulletCount++;
_local1.enemyshoot(_local2, -1, 1, enemygunloc3.xpos, enemygunloc3.ypos, "spark");
_local1.enemybulletCount++;
launching = false;
}
}
weaponCollisionCheck();
}
render();
}
scale = _xscale;
headrot = boss.anim.head._rotation;
speed = 3;
attacking = false;
launching = false;
waiting = getTimer();
life = 100;
headlife = 100;
fallenhits = 0;
downcount = 0;
Symbol 347 MovieClip Frame 1
function itemCollisionCheck() {
var _local1 = _root;
if (firstTimeCalled) {
time = getTimer();
firstTimeCalled = false;
}
if (getTimer() < (time + 5000)) {
if (item._visible && (item.hitTest(_local1.scrClip.char))) {
itemSound.gotoAndPlay(2);
item._visible = false;
_local1.scrClip.char.life = _local1.scrClip.char.life + 5;
_local1.score = _local1.score + 10;
_local1.enemiesKilled++;
_parent.dead = true;
}
} else {
item._visible = false;
_local1.enemiesKilled++;
_parent.dead = true;
}
}
stop();
hasExploded = false;
firstTimeCalled = true;
Symbol 347 MovieClip Frame 2
stop();
_root.score = _root.score + 500;
Symbol 347 MovieClip Frame 3
stop();
Instance of Symbol 138 MovieClip "item" in Symbol 347 MovieClip Frame 3
onClipEvent (load) {
gotoAndStop (5);
}
Symbol 356 MovieClip Frame 1
function control() {
if (hasControls == true) {
if (currentXLocations[index + 1] != undefined) {
_x = currentXLocations[index];
_y = currentYLocations[index];
_rotation = currentRotations[index];
index++;
} else {
hasControls = false;
}
}
}
hasControls = false;
index = 0;
Symbol 365 MovieClip Frame 45
_parent.gotoAndStop(2);
Symbol 366 MovieClip Frame 1
stop();
isInUse = true;
Symbol 366 MovieClip Frame 2
stop();
isInUse = false;
Symbol 367 MovieClip Frame 1
function weaponCollisionCheck() {
var _local1 = _root;
var _local3 = 0;
while (_local3 < _local1.maxBullets) {
var _local2 = _local1.bulletsArray[_local3];
if (((((!morphing) && (centerX > -1)) && (centerX < (_local1.mapW + 1))) && (centerY > -1)) && (centerY < _local1.mapH)) {
if (_local1.scrClip[_local2]._visible && (this.head.hitTest(_local1.scrClip[_local2]))) {
life = life - _local1.scrClip[_local2].power;
_local1.scrClip[_local2].isDead = true;
if (life < ((segArray.length - 1) * 800)) {
morphing = true;
morphingTime = getTimer();
}
}
}
_local3++;
}
}
function render() {
_parent._y = Math.round(ypos);
_parent._x = Math.round(xpos);
}
function control() {
var _local1 = this;
var _local3 = _root;
if (hasDied) {
if (!head.hasExploded) {
head.gotoAndStop("dead");
} else {
head.itemCollisionCheck();
}
} else {
head._x = head._x + (Math.sin((head._rotation * Math.PI) / 180) * speed);
head._y = head._y - (Math.cos((head._rotation * Math.PI) / 180) * speed);
centerX = Math.floor((xpos + head._x) / _local3.tileW);
centerY = Math.floor((ypos + head._y) / _local3.tileH);
if (morphing) {
if ((morphingTime + 2000) < getTimer()) {
_local1[segArray[segArray.length - 1]]._visible = false;
segArray.pop();
_local3.score = _local3.score + 100;
if (segArray.length == 0) {
hasDied = true;
} else {
speed = speed + 2;
sinRot++;
haveEnoughData = false;
var _local2 = 0;
while (_local2 < (segArray.length - 1)) {
_local1[segArray[_local2]].hasControls = false;
_local2++;
}
currentXLocations = new Array();
currentYLocations = new Array();
currentRotations = new Array();
lasttime = getTimer();
}
morphing = false;
} else {
head._rotation = head._rotation + 90;
}
} else if ((((centerX > (_local3.mapW + 3)) || (centerX < -3)) || (centerY > (_local3.mapH + 3))) || (centerY < -3)) {
head._rotation = head._rotation + (90 + random(30));
} else {
if (head.hitscreen.hitTest(_local3.scrClip.char)) {
if (!_local3.scrClip.char.invinsible) {
_local3.scrClip.char.life = _local3.scrClip.char.life - 2;
_local3.scrClip.char.justhurt = true;
}
}
if (sinCount < 20) {
head._rotation = head._rotation + sinRot;
} else if (sinCount < 40) {
head._rotation = head._rotation - sinRot;
} else {
sinCount = 0;
}
sinCount++;
}
if (!haveEnoughData) {
if (((lasttime + 50) + ((head._height / speed) * 12)) <= getTimer()) {
haveEnoughData = true;
}
}
if ((!_local1[segArray[0]].hasControls) && (haveEnoughData)) {
var _local2 = segArray.length - 1;
while (_local2 >= 0) {
if (_local2 == 0) {
_local1[segArray[_local2]].currentXLocations = currentXLocations;
_local1[segArray[_local2]].currentYLocations = currentYLocations;
_local1[segArray[_local2]].currentRotations = currentRotations;
} else {
_local1[segArray[_local2]].currentXLocations = _local1[segArray[_local2 - 1]].currentXLocations;
_local1[segArray[_local2]].currentYLocations = _local1[segArray[_local2 - 1]].currentYLocations;
_local1[segArray[_local2]].currentRotations = _local1[segArray[_local2 - 1]].currentRotations;
}
_local1[segArray[_local2]].hasControls = true;
_local1[segArray[_local2]].index = 0;
_local2--;
}
currentXLocations = new Array();
currentYLocations = new Array();
currentRotations = new Array();
}
currentXLocations.push(head._x);
currentYLocations.push(head._y);
currentRotations.push(head._rotation);
var _local2 = 0;
while (_local2 < segArray.length) {
_local1[segArray[_local2]].control();
_local2++;
}
if (centerX == 0) {
wormhole_left._y = head._y;
if (!wormhole_left.isInUse) {
wormhole_left.gotoAndStop(1);
}
} else if ((centerX + 1) == _local3.mapW) {
wormhole_right._y = head._y;
if (!wormhole_right.isInUse) {
wormhole_right.gotoAndStop(1);
}
}
if ((centerY + 1) == 0) {
wormhole_up._x = head._x;
if (!wormhole_up.isInUse) {
wormhole_up.gotoAndStop(1);
}
} else if ((centerY + 1) == _local3.mapH) {
wormhole_down._x = head._x;
if (!wormhole_down.isInUse) {
wormhole_down.gotoAndStop(1);
}
}
weaponCollisionCheck();
}
render();
}
segArray = new Array();
segArray.push("seg1");
segArray.push("seg2");
segArray.push("seg3");
segArray.push("seg4");
lasttime = getTimer();
haveEnoughData = false;
morphing = false;
morphingTime = 0;
speed = 10;
life = 800 * segArray.length;
hasDied = false;
currentXLocations = new Array();
currentYLocations = new Array();
currentRotations = new Array();
sinCount = 0;
sinRot = 5;
head._rotation = 0;
wormhole_left._x = wormhole_left._x + ((-xpos) - _root.tileW);
wormhole_right._x = wormhole_right._x + ((-xpos) + ((_root.mapW + 1) * _root.tileW));
wormhole_up._y = wormhole_up._y + (-ypos);
wormhole_down._y = wormhole_down._y + ((-ypos) + ((_root.mapH - 1) * _root.tileH));
Instance of Symbol 366 MovieClip "wormhole_down" in Symbol 367 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 366 MovieClip "wormhole_up" in Symbol 367 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 366 MovieClip "wormhole_left" in Symbol 367 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 366 MovieClip "wormhole_right" in Symbol 367 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Symbol 376 MovieClip Frame 30
_root.scrClip.enemy0.enemy.launching = true;
Symbol 376 MovieClip Frame 90
_parent.gotoAndStop(2);
Symbol 377 MovieClip Frame 1
stop();
Symbol 377 MovieClip Frame 2
stop();
Instance of Symbol 377 MovieClip "hand" in Symbol 378 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Symbol 380 MovieClip Frame 50
_parent._parent._parent.readytoMove = true;
_parent.gotoAndStop("reappear");
Symbol 381 MovieClip Frame 50
_parent._parent._parent.reinit();
_parent.gotoAndStop("idle");
Symbol 382 MovieClip Frame 1
stop();
Symbol 382 MovieClip Frame 2
stop();
Symbol 382 MovieClip Frame 3
stop();
Symbol 390 MovieClip Frame 80
gotoAndPlay (1);
Symbol 401 MovieClip Frame 60
stop();
_parent._parent.phase = "two";
_parent._parent.reinit2();
_parent.gotoAndStop("phase2");
Symbol 402 MovieClip Frame 60
gotoAndPlay (1);
Symbol 403 MovieClip Frame 60
gotoAndPlay (1);
Symbol 413 MovieClip Frame 1
stop();
Symbol 413 MovieClip Frame 2
stop();
Symbol 413 MovieClip Frame 3
stop();
Symbol 420 MovieClip Frame 1
stop();
Symbol 420 MovieClip Frame 2
stop();
Symbol 420 MovieClip Frame 3
stop();
Symbol 423 MovieClip Frame 1
stop();
Symbol 423 MovieClip Frame 2
stop();
Symbol 427 MovieClip Frame 49
_parent._parent.phase = "three";
_parent._parent.reinit3();
_parent.gotoAndStop("phase3");
Symbol 428 MovieClip Frame 40
gotoAndPlay (1);
Symbol 429 MovieClip Frame 16
stop();
Instance of Symbol 413 MovieClip "arm1" in Symbol 430 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("itemframe");
}
Instance of Symbol 413 MovieClip "arm2" in Symbol 430 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("itemframe");
}
Instance of Symbol 424 MovieClip "body" in Symbol 430 MovieClip Frame 1
onClipEvent (load) {
eye.gotoAndStop("itemframe");
}
Symbol 430 MovieClip Frame 150
_root.score = _root.score + 500;
_root.enemiesKilled++;
Symbol 431 MovieClip Frame 1
stop();
Symbol 431 MovieClip Frame 2
stop();
Symbol 431 MovieClip Frame 3
stop();
Symbol 431 MovieClip Frame 4
stop();
Symbol 431 MovieClip Frame 5
stop();
Symbol 431 MovieClip Frame 6
stop();
Symbol 432 MovieClip Frame 1
function render() {
_parent._y = Math.round(ypos);
_parent._x = Math.round(xpos);
}
function reinit() {
doneMoving = false;
go = false;
timer = getTimer();
hasShot = false;
shootTime = (timer + 2000) + random(500);
}
function reinit2() {
newangle = newangle + (180 + random(30));
speed = 8;
xgood = (ygood = false);
}
function reinit3() {
hand1life = (hand2life = (eyelife = 500));
hand1IsDead = (hand2IsDead = (eyeIsDead = false));
timer = getTimer();
shootTime1 = (timer + 500) + random(500);
launching1 = (launching2 = (launching3 = false));
shootTime2 = (timer + 3000) + random(500);
shootTime3 = (timer + 4000) + random(500);
startRot = 0;
}
function weaponCollisionCheck() {
var _local2 = _root;
var _local3 = 0;
while (_local3 < _local2.maxBullets) {
var _local1 = _local2.bulletsArray[_local3];
if (_local2.scrClip[_local1]._visible && (this.hitTest(_local2.scrClip[_local1]))) {
secondlife = secondlife - _local2.scrClip[_local1].power;
var colors = {rb:75};
new Color(boss).setTransform(colors);
_local2.scrClip[_local1].isDead = true;
}
_local3++;
}
}
function weaponCollisionCheck2() {
var _local2 = _root;
var _local3 = 0;
while (_local3 < _local2.maxBullets) {
var _local1 = _local2.bulletsArray[_local3];
if (_local2.scrClip[_local1]._visible) {
if ((!hand1IsDead) && (this.boss.phase3.arm1.hand.hitTest(_local2.scrClip[_local1]))) {
hand1life = hand1life - _local2.scrClip[_local1].power;
var colors = {rb:75};
new Color(boss.phase3.arm1.hand).setTransform(colors);
_local2.scrClip[_local1].isDead = true;
}
if ((!hand2IsDead) && (this.boss.phase3.arm2.hand.hitTest(_local2.scrClip[_local1]))) {
hand2life = hand2life - _local2.scrClip[_local1].power;
var colors = {rb:75};
new Color(boss.phase3.arm2.hand).setTransform(colors);
_local2.scrClip[_local1].isDead = true;
}
if ((!eyeIsDead) && (this.boss.phase3.body.eye.hitTest(_local2.scrClip[_local1]))) {
eyelife = eyelife - _local2.scrClip[_local1].power;
var colors = {rb:75};
new Color(boss.phase3.body.eye).setTransform(colors);
_local2.scrClip[_local1].isDead = true;
}
}
_local3++;
}
}
function ownWeaponCollisionCheck() {
var _local2 = _root;
var _local3 = 0;
while (_local3 < _local2.maxBullets) {
var _local1 = _local2.enemybulletsArray[_local3];
if ((_local2.scrClip[_local1]._visible && (!_local2.scrClip[_local1].isDead)) && (boss.phase1.hitscreen.hitTest(_local2.scrClip[_local1]))) {
if (_local2.scrClip[_local1].isReversed) {
_local2.scrClip[_local1].isDead = true;
var colors = {rb:75};
new Color(boss).setTransform(colors);
hitcount++;
rad = rad + 10;
}
}
_local3++;
}
}
function control() {
var _local1 = _root;
var _local2 = this;
if (hasDied) {
if (!hasExploded) {
gotoAndStop ("dead");
} else {
itemCollisionCheck();
}
} else if (phase == "one") {
var _local3 = {rb:0};
new Color(boss).setTransform(_local3);
var angle = (getTimer() * speedScale);
boss._x = cx + (Math.sin(-angle) * rad);
boss._y = cy + (Math.cos(-angle) * rad);
if (hitcount > 2) {
_local1.score = _local1.score + 500;
phase = "transition1";
} else {
if (hasShot) {
if (go) {
if (!doneMoving) {
if (readytoMove) {
randomX = random(_local1.mapW - 3);
if (randomX < 3) {
randomX = randomX + 3;
}
randomY = random(_local1.mapH - 3);
if (randomY < 4) {
randomY = randomY + 4;
}
xpos = randomX * _local1.tileW;
ypos = randomY * _local1.tileH;
readytoMove = false;
}
}
} else if ((timer + 2000) < getTimer()) {
boss.phase1.gotoAndStop("disappear");
go = true;
}
} else if (shootTime < getTimer()) {
boss.phase1.animations.full.hand.gotoAndStop(1);
if (launching) {
if (_local1.enemybulletCount >= _local1.maxBullets) {
_local1.enemybulletCount = 0;
}
enemygunloc_x = xpos + enemygunloc._x;
enemygunloc_y = ypos + enemygunloc._y;
_local1.enemyshoot(_local2, -1, -1, enemygunloc_x, enemygunloc_y, "wizball");
_local1.enemybulletCount++;
launching = false;
timer = getTimer();
hasShot = true;
}
}
ownWeaponCollisionCheck();
}
} else if (phase == "two") {
if (secondlife < 0) {
var _local3 = {rb:0};
new Color(boss).setTransform(_local3);
_local1.score = _local1.score + 500;
phase = "transition2";
} else {
var _local3 = {rb:0};
new Color(boss).setTransform(_local3);
weaponCollisionCheck();
xdir = Math.sin((newangle * Math.PI) / 180);
ydir = Math.cos((newangle * Math.PI) / 180);
xpos = xpos + (xdir * speed);
ypos = ypos - (ydir * speed);
centerX = Math.floor(xpos / _local1.tileW);
centerY = Math.floor(ypos / _local1.tileH);
upTile = _local1.cMap[centerY - 3][centerX];
downTile = _local1.cMap[centerY + 2][centerX];
rightTile = _local1.cMap[centerY - 2][centerX + 1];
leftTile = _local1.cMap[centerY - 2][centerX - 1];
if (((((upTile > 1) && (upTile < 10)) && (upTile != 5)) && (ydir > 0)) || ((((downTile > 1) && (downTile < 10)) && (downTile != 5)) && (ydir <= 0))) {
reinit2();
}
if (((((leftTile > 1) && (leftTile < 10)) && (leftTile != 5)) && (xdir < 0)) || ((((rightTile > 1) && (rightTile < 10)) && (rightTile != 5)) && (xdir >= 0))) {
reinit2();
}
if (launching) {
if ((_local1.enemybulletCount + 1) > _local1.maxBullets) {
_local1.enemybulletCount = 0;
}
enemygunloc_x = xpos + enemygunloc._x;
enemygunloc_y = ypos + enemygunloc._y;
enemygunloc1_x = xpos + enemygunloc2._x;
enemygunloc1_y = ypos + enemygunloc2._y;
_local1.enemyshoot(_local2, -1, -1, enemygunloc_x, enemygunloc_y, "bomb");
_local1.enemybulletCount++;
_local1.enemyshoot(_local2, -1, 1, enemygunloc1_x, enemygunloc1_y, "bomb");
_local1.enemybulletCount++;
timer = getTimer();
shootTime = (timer + 500) + random(500);
launching = false;
} else if (shootTime < getTimer()) {
launching = true;
}
}
} else if (phase == "three") {
if ((hand1IsDead && (hand2IsDead)) && (eyeIsDead)) {
boss.gotoAndStop("die");
} else {
var _local3 = {rb:0};
new Color(boss.phase3.arm1.hand).setTransform(_local3);
new Color(boss.phase3.arm2.hand).setTransform(_local3);
new Color(boss.phase3.body.eye).setTransform(_local3);
weaponCollisionCheck2();
if (!hand1IsDead) {
if (hand1life < 0) {
boss.phase3.arm1.gotoAndStop(2);
_local1.score = _local1.score + 100;
hand1IsDead = true;
}
if (launching1) {
if ((_local1.enemybulletCount + 1) > _local1.maxBullets) {
_local1.enemybulletCount = 0;
}
enemygunloc_x = xpos + enemygunloc3._x;
enemygunloc_y = ypos + enemygunloc3._y;
_local1.enemyshoot(_local2, 0, 0, enemygunloc_x, enemygunloc_y, "star");
_local1.enemybulletCount++;
timer = getTimer();
shootTime1 = (timer + 3000) + random(500);
launching1 = false;
} else if (shootTime1 < getTimer()) {
launching1 = true;
}
}
if (!hand2IsDead) {
if (hand2life < 0) {
boss.phase3.arm2.gotoAndStop(2);
_local1.score = _local1.score + 100;
hand2IsDead = true;
}
if (launching2) {
if ((_local1.enemybulletCount + 1) > _local1.maxBullets) {
_local1.enemybulletCount = 0;
}
enemygunloc_x = xpos + enemygunloc4._x;
enemygunloc_y = ypos + enemygunloc4._y;
_local1.enemyshoot(_local2, 0, 0, enemygunloc_x, enemygunloc_y, "star");
_local1.enemybulletCount++;
timer = getTimer();
shootTime2 = (timer + 3000) + random(500);
launching2 = false;
} else if (shootTime2 < getTimer()) {
launching2 = true;
}
}
if (!eyeIsDead) {
if (eyelife < 0) {
boss.phase3.body.eye.gotoAndStop(2);
boss.phase3.body.laser.gotoAndStop(1);
_local1.score = _local1.score + 100;
eyeIsDead = true;
}
if (launching3) {
if (boss.phase3.body.laser.hitTest(_local1.scrClip.char)) {
if (!_local1.scrClip.char.invinsible) {
_local1.scrClip.char.life = _local1.scrClip.char.life - 2;
_local1.scrClip.char.justhurt = true;
}
}
lasercount++;
boss.phase3.body.laser.gotoAndStop(2);
boss.phase3.body.laser._rotation = boss.phase3.body.laser._rotation + 3;
if (lasercount > 30) {
timer = getTimer();
shootTime3 = (timer + 3000) + random(500);
launching3 = false;
}
} else {
boss.phase3.body.laser.gotoAndStop(1);
laserx = (xpos + _local1.xpos) + 20;
lasery = (ypos + _local1.ypos) - 200;
disX = laserx - _local1.scrClip.char.myRealx;
disY = lasery - _local1.scrClip.char.myRealy;
if (disY <= 0) {
boss.phase3.body.laser._rotation = ((-Math.atan(disX / disY)) * 180) / Math.PI;
} else {
boss.phase3.body.laser._rotation = 180 - ((Math.atan(disX / disY) * 180) / Math.PI);
}
if (shootTime3 < getTimer()) {
startRot = boss.phase3.body.laser._rotation;
lasercount = 0;
launching3 = true;
}
}
} else {
boss.phase3.body.laser.gotoAndStop(1);
}
}
} else if (phase == "transition1") {
if (Math.round(boss._x) < -60) {
boss._x++;
} else if (Math.round(boss._x) > -60) {
boss._x--;
} else {
xgood = true;
}
if (Math.round(boss._y) < -208) {
boss._y++;
} else if (Math.round(boss._y) > -208) {
boss._y--;
} else {
ygood = true;
}
centerX = Math.floor(xpos / _local1.tileW);
centerY = Math.floor(ypos / _local1.tileH);
if (centerY < (_local1.mapH - 3)) {
ypos++;
} else if (xgood && (ygood)) {
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
disX = myRealx - _local1.scrClip.char.myRealx;
disY = myRealy - _local1.scrClip.char.myRealy;
if ((Math.abs(disX) < 400) && (Math.abs(disY) < 200)) {
boss.gotoAndStop("transition1");
}
}
} else if (phase == "transition2") {
centerX = Math.floor(xpos / _local1.tileW);
centerY = Math.floor(ypos / _local1.tileH);
if ((centerY < (_local1.mapH - 3)) || (centerY > (_local1.mapH - 3))) {
if (centerY < (_local1.mapH - 3)) {
ypos++;
} else {
ypos--;
}
} else {
ygood = true;
}
if ((centerX < (_local1.mapW / 2)) || (centerX > (_local1.mapW / 2))) {
if (centerX < (_local1.mapW / 2)) {
xpos = xpos + 2;
} else {
xpos = xpos - 2;
}
} else {
xgood = true;
}
if (centerY < (_local1.mapH - 3)) {
ypos++;
} else {
ygood = true;
}
if (xgood && (ygood)) {
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
disX = myRealx - _local1.scrClip.char.myRealx;
disY = myRealy - _local1.scrClip.char.myRealy;
if ((Math.abs(disX) < 400) && (Math.abs(disY) < 200)) {
boss.gotoAndStop("transition2");
}
}
}
render();
}
hasDied = false;
hasShot = false;
doneMoving = false;
go = false;
timer = getTimer();
doneMoving = false;
readytoMove = false;
shootTime = timer + 2000;
hitcount = 0;
secondlife = 2000;
cx = 15;
cy = -180;
rad = 75;
speed = 2;
speedScale = 0.00628318530717959 / speed;
newangle = 180;
phase = "one";
Symbol 433 MovieClip [tile] Frame 1
stop();
Symbol 433 MovieClip [tile] Frame 2
stop();
Symbol 433 MovieClip [tile] Frame 3
stop();
Symbol 433 MovieClip [tile] Frame 4
stop();
Symbol 433 MovieClip [tile] Frame 5
stop();
Symbol 433 MovieClip [tile] Frame 6
stop();
Instance of Symbol 60 MovieClip in Symbol 433 MovieClip [tile] Frame 6
onClipEvent (load) {
if (_root.level <= 5) {
gotoAndStop (1);
} else if (_root.level <= 10) {
gotoAndStop (2);
} else if (_root.level <= 15) {
gotoAndStop (3);
} else if (_root.level <= 20) {
gotoAndStop (4);
}
}
Symbol 433 MovieClip [tile] Frame 7
stop();
Symbol 433 MovieClip [tile] Frame 8
stop();
Symbol 433 MovieClip [tile] Frame 9
stop();
Symbol 433 MovieClip [tile] Frame 10
stop();
Instance of Symbol 73 MovieClip in Symbol 433 MovieClip [tile] Frame 10
onClipEvent (load) {
if (_root.level <= 10) {
gotoAndStop (1);
} else if (_root.level <= 15) {
gotoAndStop (2);
} else if (_root.level <= 20) {
gotoAndStop (3);
}
}
Symbol 433 MovieClip [tile] Frame 11
stop();
Symbol 433 MovieClip [tile] Frame 12
stop();
Symbol 433 MovieClip [tile] Frame 13
stop();
Symbol 433 MovieClip [tile] Frame 16
stop();
Symbol 433 MovieClip [tile] Frame 17
stop();
Symbol 433 MovieClip [tile] Frame 20
stop();
Symbol 433 MovieClip [tile] Frame 21
stop();
Instance of Symbol 240 MovieClip "enemy" in Symbol 433 MovieClip [tile] Frame 21
onClipEvent (load) {
gotoAndStop (2);
}
Symbol 433 MovieClip [tile] Frame 22
stop();
Instance of Symbol 240 MovieClip "enemy" in Symbol 433 MovieClip [tile] Frame 22
onClipEvent (load) {
gotoAndStop (3);
}
Symbol 433 MovieClip [tile] Frame 23
stop();
Instance of Symbol 240 MovieClip "enemy" in Symbol 433 MovieClip [tile] Frame 23
onClipEvent (load) {
gotoAndStop (4);
}
Symbol 433 MovieClip [tile] Frame 24
stop();
Symbol 433 MovieClip [tile] Frame 25
stop();
Symbol 433 MovieClip [tile] Frame 26
stop();
Symbol 433 MovieClip [tile] Frame 27
stop();
Instance of Symbol 240 MovieClip "enemy" in Symbol 433 MovieClip [tile] Frame 27
onClipEvent (load) {
gotoAndStop (7);
}
Symbol 433 MovieClip [tile] Frame 28
stop();
Instance of Symbol 240 MovieClip "enemy" in Symbol 433 MovieClip [tile] Frame 28
onClipEvent (load) {
gotoAndStop (9);
}
Symbol 433 MovieClip [tile] Frame 29
stop();
Symbol 433 MovieClip [tile] Frame 30
stop();
Symbol 433 MovieClip [tile] Frame 31
stop();
Instance of Symbol 240 MovieClip "enemy" in Symbol 433 MovieClip [tile] Frame 31
onClipEvent (load) {
gotoAndStop (5);
}
Symbol 433 MovieClip [tile] Frame 32
stop();
Instance of Symbol 240 MovieClip "enemy" in Symbol 433 MovieClip [tile] Frame 32
onClipEvent (load) {
gotoAndStop (6);
}
Symbol 433 MovieClip [tile] Frame 33
stop();
Instance of Symbol 240 MovieClip "enemy" in Symbol 433 MovieClip [tile] Frame 33
onClipEvent (load) {
gotoAndStop (8);
}
Symbol 433 MovieClip [tile] Frame 34
stop();
Instance of Symbol 240 MovieClip "enemy" in Symbol 433 MovieClip [tile] Frame 34
onClipEvent (load) {
gotoAndStop (10);
}
Symbol 439 MovieClip Frame 1
stop();
Symbol 439 MovieClip Frame 2
gotoAndStop (1);
Symbol 447 MovieClip Frame 1
stop();
Symbol 447 MovieClip Frame 2
stop();
_root.score = _root.score + 50;
Symbol 447 MovieClip Frame 3
stop();
_parent._visible = false;
_parent.isDead = false;
Symbol 450 MovieClip Frame 1
stop();
Symbol 450 MovieClip Frame 2
stop();
_root.score = _root.score + 50;
Symbol 450 MovieClip Frame 3
stop();
_parent._visible = false;
_parent.isDead = false;
Symbol 469 MovieClip Frame 5
stop();
Symbol 473 MovieClip Frame 10
stop();
Symbol 474 MovieClip Frame 5
_parent.gotoAndStop("down");
Symbol 475 MovieClip Frame 1
stop();
Symbol 475 MovieClip Frame 2
stop();
Symbol 475 MovieClip Frame 3
stop();
Symbol 475 MovieClip Frame 4
stop();
Symbol 484 MovieClip Frame 14
gotoAndPlay (3);
Symbol 486 MovieClip Frame 1
stop();
Symbol 486 MovieClip Frame 2
gotoAndStop (1);
Symbol 490 MovieClip Frame 1
stop();
Symbol 490 MovieClip Frame 2
gotoAndStop (1);
Symbol 493 MovieClip Frame 1
stop();
Symbol 493 MovieClip Frame 2
stop();
Symbol 493 MovieClip Frame 3
stop();
_parent.reinit();
_parent._visible = false;
Symbol 494 MovieClip Frame 1
stop();
Symbol 494 MovieClip Frame 2
gotoAndStop (1);
Symbol 497 MovieClip Frame 1
stop();
Symbol 497 MovieClip Frame 2
stop();
Symbol 497 MovieClip Frame 3
stop();
_parent.reinit();
_parent._visible = false;
Symbol 500 MovieClip Frame 1
stop();
Symbol 500 MovieClip Frame 2
stop();
Symbol 500 MovieClip Frame 3
stop();
_parent.reinit();
_parent._visible = false;
Symbol 503 MovieClip [enemybullet] Frame 1
function weaponCollisionCheck() {
var _local2 = _root;
var _local3;
while (_local3 < _local2.maxBullets) {
var _local1 = _local2.bulletsArray[_local3];
if (_local2.scrClip[_local1]._visible && (this.hitTest(_local2.scrClip[_local1]))) {
life = life - _local2.scrClip[_local1].power;
_local2.scrClip[_local1].isDead = true;
}
_local3++;
}
}
function render() {
_y = Math.round(ypos);
_x = Math.round(xpos);
}
function control() {
if (isDead) {
_visible = false;
isDead = false;
}
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
if (justFired) {
_xscale = realXScale;
_yscale = realYScale;
ammoSound6.gotoAndPlay(2);
justFired = false;
}
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy > 800)) || (myRealy < -200)) {
_visible = false;
} else {
ypos = ypos + (speed * diry);
xpos = xpos + (speed * dirx);
}
this.render();
}
stop();
realYScale = _yscale;
realXScale = _xscale;
speed = 15;
justFired = false;
isDead = false;
power = 5;
life = 100;
Symbol 503 MovieClip [enemybullet] Frame 2
function control() {
var _local1 = _root;
if ((life <= 0) || (isDead)) {
mis.gotoAndStop("dead");
} else {
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
Ax = _local1.scrClip.char.myRealx;
Ay = _local1.scrClip.char.myRealy;
Bx = myRealx;
By = myRealy;
A = Math.abs(Ax - Bx);
B = Math.abs(Ay - By);
Dir = Math.atan2(B, A);
Dir = (Dir * 180) / Math.PI;
if (Ay > By) {
if (Ax < Bx) {
Dir = (-Dir) + 270;
}
if (Ax > Bx) {
Dir = Dir + 90;
}
}
if (Ay < By) {
if (Ax < Bx) {
Dir = Dir + 270;
}
if (Ax > Bx) {
Dir = (-Dir) + 90;
}
}
ComX = Math.sin((_rotation * Math.PI) / 180) * speed;
ComY = Math.cos((_rotation * Math.PI) / 180) * speed;
xpos = xpos + ComX;
ypos = ypos - ComY;
Diff = Math.abs(Dir - _rotation);
if (Ax < Bx) {
Dir = Dir - 360;
Diff = Math.abs(Dir - _rotation);
if (Diff > Sens) {
if (_rotation > Dir) {
_rotation = ((Rot = Rot - Sens));
} else if (_rotation < Dir) {
_rotation = ((Rot = Rot + Sens));
}
}
}
if (Ax > Bx) {
if (Diff > Sens) {
if (_rotation > Dir) {
_rotation = ((Rot = Rot - Sens));
} else if (_rotation < Dir) {
_rotation = ((Rot = Rot + Sens));
}
}
}
weaponCollisionCheck();
}
render();
}
speed = 7;
life = 8;
justFired = false;
isDead = false;
power = 10;
Sens = 10;
Symbol 503 MovieClip [enemybullet] Frame 3
function control() {
var _local1 = _root;
if ((life <= 0) || (isDead)) {
mis.gotoAndStop("dead");
} else {
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
Ax = _local1.scrClip.char.myRealx;
Ay = _local1.scrClip.char.myRealy;
Bx = myRealx;
By = myRealy;
A = Math.abs(Ax - Bx);
B = Math.abs(Ay - By);
Dir = Math.atan2(B, A);
Dir = (Dir * 180) / Math.PI;
if (Ay > By) {
if (Ax < Bx) {
Dir = (-Dir) + 270;
}
if (Ax > Bx) {
Dir = Dir + 90;
}
}
if (Ay < By) {
if (Ax < Bx) {
Dir = Dir + 270;
}
if (Ax > Bx) {
Dir = (-Dir) + 90;
}
}
ComX = Math.sin((_rotation * Math.PI) / 180) * speed;
ComY = Math.cos((_rotation * Math.PI) / 180) * speed;
xpos = xpos + ComX;
ypos = ypos - ComY;
Diff = Math.abs(Dir - _rotation);
if (Ax < Bx) {
Dir = Dir - 360;
Diff = Math.abs(Dir - _rotation);
if (Diff > Sens) {
if (_rotation > Dir) {
_rotation = ((Rot = Rot - Sens));
} else if (_rotation < Dir) {
_rotation = ((Rot = Rot + Sens));
}
}
}
if (Ax > Bx) {
if (Diff > Sens) {
if (_rotation > Dir) {
_rotation = ((Rot = Rot - Sens));
} else if (_rotation < Dir) {
_rotation = ((Rot = Rot + Sens));
}
}
}
weaponCollisionCheck();
}
render();
}
speed = 7;
life = 8;
justFired = false;
isDead = false;
power = 10;
Sens = 10;
Symbol 503 MovieClip [enemybullet] Frame 4
function control() {
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
if ((myRealy > 400) || (isDead)) {
_visible = false;
isDead = false;
}
if (justFired) {
if (diry < 0) {
yspeed = -15;
} else {
yspeed = 15;
}
justFired = false;
}
xpos = xpos + (speed * dirx);
ypos = ypos + yspeed;
yspeed++;
this.render();
}
speed = 10;
isDead = false;
power = 5;
life = 100;
Symbol 503 MovieClip [enemybullet] Frame 5
function control() {
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
if (justFired) {
vinesound.gotoAndPlay(2);
justFired = false;
}
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy > 800)) || (myRealy < -200)) {
_visible = false;
isDead = false;
} else {
ypos = ypos + (speed * diry);
xpos = xpos + (speed * dirx);
}
this.render();
}
stop();
speed = 15;
justFired = false;
isDead = false;
power = 5;
life = 100;
Symbol 503 MovieClip [enemybullet] Frame 6
function control() {
var _local1 = _root;
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
if ((((myRealx > 900) || (myRealx < -300)) || (myRealy > 800)) || (myRealy < -200)) {
_visible = false;
isDead = false;
} else {
xpos = xpos + (speed * dirx);
ypos = ypos + yspeed;
yspeed++;
centerX = Math.floor(xpos / _local1.tileW);
centerY = Math.floor(ypos / _local1.tileH);
downTile = _local1.cMap[centerY + 1][centerX];
if (yspeed >= 0) {
if ((downTile > 1) && (downTile < 11)) {
if (beenJumping == true) {
blob.gotoAndStop("landing");
jumpTimer = getTimer();
beenJumping = false;
}
if ((jumpTimer + 1000) <= getTimer()) {
yspeed = -15;
speed = 10;
beenJumping = true;
} else {
speed = 0;
yspeed = 0;
}
} else {
blob.gotoAndStop("falling");
}
} else {
blob.gotoAndStop("jumping");
}
}
this.render();
}
stop();
speed = 3;
justFired = false;
isDead = false;
power = 5;
beenJumping = true;
life = 100;
Symbol 503 MovieClip [enemybullet] Frame 7
function control(dir) {
var _local1 = this;
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
if (justFired) {
_xscale = realXScale;
_yscale = realYScale;
_visible = true;
_alpha = 100;
power = 5;
ammoSound4.gotoAndPlay(2);
justFired = false;
}
if (_alpha > 20) {
_alpha = (_alpha - 5);
} else {
isDead = true;
}
if (isDead) {
power = 0;
_alpha = (_alpha - 5);
if (_alpha < 0) {
_visible = false;
_alpha = 100;
isDead = false;
power = 5;
_xscale = realXScale;
_yscale = realYScale;
}
}
if (dirx == -1) {
_local1._rotation = 180;
}
if (dirx == 1) {
_local1._rotation = 0;
}
if (diry == -1) {
_local1._rotation = 270;
}
if (diry == 1) {
_local1._rotation = 90;
}
if ((dirx == -1) and (diry == -1)) {
_local1._rotation = 225;
}
if ((dirx == 1) and (diry == -1)) {
_local1._rotation = 315;
}
if ((dirx == -1) and (diry == 1)) {
_local1._rotation = 135;
}
if ((dirx == 1) and (diry == 1)) {
_local1._rotation = 45;
}
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy > 800)) || (myRealy < -200)) {
isDead = true;
_xscale = realXScale;
_yscale = realYScale;
} else {
ypos = ypos + (speed * diry);
xpos = xpos + (speed * dirx);
if (((xpos % 6) <= 2) || ((ypos % 3) <= 2)) {
_xscale = (_xscale + 25);
_yscale = (_yscale + 25);
}
}
_local1.render();
}
stop();
speed = 7;
power = 5;
justFired = false;
isDead = false;
stop();
Symbol 503 MovieClip [enemybullet] Frame 8
function control() {
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
if (((ypos > startY) && (yspeed > 0)) || (isDead)) {
_rotation = 0;
_visible = false;
isDead = false;
}
if (justFired) {
fireballsound.gotoAndPlay(2);
yspeed = -10 - random(10);
startY = ypos;
justFired = false;
}
_rotation = (_rotation + 45);
ypos = ypos + yspeed;
yspeed++;
this.render();
}
isDead = false;
power = 5;
life = 100;
Symbol 503 MovieClip [enemybullet] Frame 9
function reinit() {
isDead = false;
power = 5;
isReversed = false;
life = 100;
count = 0;
_rotation = 0;
}
function weaponCollisionCheck() {
var _local2 = _root;
var _local3;
while (_local3 < _local2.maxBullets) {
var _local1 = _local2.bulletsArray[_local3];
if (_local2.scrClip[_local1]._visible && (this.hitTest(_local2.scrClip[_local1]))) {
if (!isReversed) {
count++;
if (count > 20) {
isReversed = true;
life = 0;
count = 0;
}
}
xspeed = xspeed + (0.5 * _local2.scrClip[_local1].dirx);
yspeed = yspeed + (0.5 * _local2.scrClip[_local1].diry);
_local2.scrClip[_local1].isDead = true;
}
_local3++;
}
}
function control() {
var _local1 = _root;
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
if ((((myRealx > 1000) || (myRealx < -400)) || (myRealy > 1000)) || (myRealy < -400)) {
_visible = false;
isDead = false;
} else if (isDead) {
life = 0;
ball.gotoAndStop("dead");
} else {
if (justFired) {
wizsound.gotoAndPlay(2);
charX = _local1.scrClip.char.myRealx;
charY = _local1.scrClip.char.myRealy;
disX = myRealX - charX;
disY = myRealY - charY;
if (math.abs(disX) < 100) {
xspeed = 0;
} else if (disX < 0) {
xspeed = 3;
} else {
xspeed = -3;
}
if (Math.abs(disY) < 100) {
yspeed = 0;
} else if (disY < 0) {
yspeed = 3;
} else {
yspeed = -3;
}
justFired = false;
}
xpos = xpos + xspeed;
ypos = ypos + yspeed;
if (xspeed <= 0) {
_rotation = (_rotation - 3);
} else {
_rotation = (_rotation + 3);
}
weaponCollisionCheck();
this.render();
}
}
Symbol 503 MovieClip [enemybullet] Frame 10
function reinit() {
var _local1 = _root;
_rotation = 0;
bomb.gotoAndStop("norm");
life = 40;
speed = 0;
cMap = _local1.cMap;
tileW = _local1.tileW;
tileH = _local1.tileH;
isDead = false;
}
function control() {
var _local1 = _root;
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
centerX = Math.floor(xpos / _local1.tileW);
centerY = Math.floor(ypos / _local1.tileH);
tile = _local1.cMap[centerY + 1][centerX];
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy < -200)) || (myRealy > 600)) {
_visible = false;
} else if (isDead || ((tile > 1) && (tile < 11))) {
life = 0;
bomb.gotoAndStop("dead");
} else {
_visible = true;
if (justFired) {
if (diry < 0) {
yspeed = -15;
} else {
yspeed = 15;
}
justFired = false;
}
xpos = xpos + (speed * dirx);
ypos = ypos + yspeed;
yspeed++;
}
render();
}
stop();
reinit();
Symbol 503 MovieClip [enemybullet] Frame 11
function reinit() {
_rotation = 0;
angle = 0;
speed = 12;
life = 4;
justFired = false;
isDead = false;
power = 5;
Sens = 10;
}
function control() {
var _local1 = _root;
if ((life <= 0) || (isDead)) {
mis.gotoAndStop("dead");
} else {
myRealx = xpos + _local1.xpos;
myRealy = ypos + _local1.ypos;
Ax = _local1.scrClip.char.myRealx;
Ay = _local1.scrClip.char.myRealy;
Bx = myRealx;
By = myRealy;
A = Math.abs(Ax - Bx);
B = Math.abs(Ay - By);
Dir = Math.atan2(B, A);
Dir = (Dir * 180) / Math.PI;
if (Ay > By) {
if (Ax < Bx) {
Dir = (-Dir) + 270;
}
if (Ax > Bx) {
Dir = Dir + 90;
}
}
if (Ay < By) {
if (Ax < Bx) {
Dir = Dir + 270;
}
if (Ax > Bx) {
Dir = (-Dir) + 90;
}
}
ComX = Math.sin((angle * Math.PI) / 180) * speed;
ComY = Math.cos((angle * Math.PI) / 180) * speed;
xpos = xpos + ComX;
ypos = ypos - ComY;
Diff = Math.abs(Dir - angle);
if (Ax < Bx) {
Dir = Dir - 360;
Diff = Math.abs(Dir - angle);
if (Diff > Sens) {
if (angle > Dir) {
angle = (Rot = Rot - Sens);
} else if (angle < Dir) {
angle = (Rot = Rot + Sens);
}
}
}
if (Ax > Bx) {
if (Diff > Sens) {
if (angle > Dir) {
angle = (Rot = Rot - Sens);
} else if (angle < Dir) {
angle = (Rot = Rot + Sens);
}
}
}
if (angle < 0) {
_rotation = (_rotation - 20);
} else {
_rotation = (_rotation + 20);
}
weaponCollisionCheck();
}
render();
}
reinit();
Symbol 503 MovieClip [enemybullet] Frame 12
function control() {
if (isDead) {
_visible = false;
isDead = false;
}
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
if (justFired) {
_xscale = realXScale;
_yscale = realYScale;
ammoSound6.gotoAndPlay(2);
justFired = false;
}
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy > 800)) || (myRealy < -200)) {
_visible = false;
} else {
ypos = ypos + (speed * diry);
xpos = xpos + (speed * dirx);
}
_rotation = (_rotation + 3);
this.render();
}
stop();
realYScale = _yscale;
realXScale = _xscale;
speed = 15;
justFired = false;
isDead = false;
power = 2;
life = 100;
Symbol 510 MovieClip [ammoSound2] Frame 1
stop();
Symbol 510 MovieClip [ammoSound2] Frame 2
gotoAndStop (1);
Symbol 513 MovieClip Frame 4
stop();
Symbol 515 MovieClip Frame 1
stop();
Symbol 515 MovieClip Frame 2
gotoAndStop (1);
Symbol 518 MovieClip [ammo3] Frame 3
stop();
Symbol 529 MovieClip [ammoSound3] Frame 1
stop();
Symbol 529 MovieClip [ammoSound3] Frame 4
gotoAndStop (1);
Symbol 541 MovieClip Frame 11
_parent._visible = false;
stop();
Symbol 550 MovieClip Frame 15
_parent._visible = false;
stop();
Symbol 557 MovieClip Frame 13
_parent._visible = false;
stop();
Symbol 558 MovieClip [bullet] Frame 1
function render() {
_y = Math.round(ypos);
_x = Math.round(xpos);
}
function control(dir) {
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
if (justFired) {
ammoSound1.gotoAndPlay(2);
justFired = false;
}
if (isDead) {
isDead = false;
gotoAndStop (11);
}
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy > 800)) || (myRealy < -200)) {
_visible = false;
} else {
ypos = ypos + (speed * diry);
xpos = xpos + (speed * dirx);
}
this.render();
}
stop();
speed = 25;
power = 2;
justFired = false;
isDead = false;
_root.scrClip.char.shootSpeed = 100;
dirx = _root.scrClip.char.dirx;
diry = _root.scrClip.char.diry;
realYScale = ammo1._yscale;
realXScale = ammo1._xscale;
tileW = _root.tileW;
tileH = _root.tileH;
Symbol 558 MovieClip [bullet] Frame 2
function control(dir) {
var _local1 = this;
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
if (justFired) {
_visible = true;
_alpha = 100;
power = 2;
ammoSound4.gotoAndPlay(2);
justFired = false;
}
if (_alpha > 20) {
_alpha = (_alpha - 5);
} else {
isDead = true;
}
if (isDead) {
power = 0;
_alpha = (_alpha - 5);
if (_alpha < 0) {
_visible = false;
_alpha = 100;
isDead = false;
power = 2;
}
}
if (dirx == -1) {
_local1._rotation = 180;
}
if (dirx == 1) {
_local1._rotation = 0;
}
if (diry == -1) {
_local1._rotation = 270;
}
if (diry == 1) {
_local1._rotation = 90;
}
if ((dirx == -1) and (diry == -1)) {
_local1._rotation = 225;
}
if ((dirx == 1) and (diry == -1)) {
_local1._rotation = 315;
}
if ((dirx == -1) and (diry == 1)) {
_local1._rotation = 135;
}
if ((dirx == 1) and (diry == 1)) {
_local1._rotation = 45;
}
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy > 800)) || (myRealy < -200)) {
isDead = true;
_local1._xscale = realXScale;
_local1._yscale = realYScale;
} else {
ypos = ypos + (speed * diry);
xpos = xpos + (speed * dirx);
if (((xpos % 6) <= 2) || ((ypos % 3) <= 2)) {
_xscale = (_xscale + 25);
_yscale = (_yscale + 25);
}
}
_local1.render();
}
stop();
speed = 7;
power = 2;
justFired = false;
isDead = false;
_root.scrClip.char.shootSpeed = 35;
stop();
Symbol 558 MovieClip [bullet] Frame 3
function control(dir) {
var _local1 = this;
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
if (justFired) {
_local1._visible = true;
ammoSound5.gotoAndPlay(2);
justFired = false;
}
if (isDead) {
_xscale = realXScale;
_yscale = realYScale;
gotoAndStop (13);
isDead = false;
}
if (dirx == -1) {
_local1._rotation = 180;
}
if (dirx == 1) {
_local1._rotation = 0;
}
if (diry == -1) {
_local1._rotation = 270;
}
if (diry == 1) {
_local1._rotation = 90;
}
if ((dirx == -1) and (diry == -1)) {
_local1._rotation = 225;
}
if ((dirx == 1) and (diry == -1)) {
_local1._rotation = 315;
}
if ((dirx == -1) and (diry == 1)) {
_local1._rotation = 135;
}
if ((dirx == 1) and (diry == 1)) {
_local1._rotation = 45;
}
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy > 800)) || (myRealy < -200)) {
_visible = false;
_local1._xscale = realXScale;
_local1._yscale = realYScale;
} else {
ypos = ypos + (speed * diry);
xpos = xpos + (speed * dirx);
if (((xpos % 3) <= 2) || ((ypos % 3) <= 2)) {
_local1._xscale = _local1._xscale + 35;
_local1._yscale = _local1._yscale + 35;
}
}
_local1.render();
}
stop();
speed = 10;
power = 3;
justFired = false;
isDead = false;
_root.scrClip.char.shootSpeed = 50;
charXpos = _root.scrClip.char.xpos;
charYpos = _root.scrClip.char.ypos;
stop();
Symbol 558 MovieClip [bullet] Frame 4
function control(dir) {
var _local1 = this;
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
if (justFired) {
_local1._visible = true;
ammoSound2.gotoAndPlay(2);
justFired = false;
}
if (isDead) {
gotoAndStop (14);
isDead = false;
}
if (dirx == -1) {
_local1._rotation = 180;
}
if (dirx == 1) {
_local1._rotation = 0;
}
if (diry == -1) {
_local1._rotation = 270;
}
if (diry == 1) {
_local1._rotation = 90;
}
if ((dirx == -1) and (diry == -1)) {
_local1._rotation = 225;
}
if ((dirx == 1) and (diry == -1)) {
_local1._rotation = 315;
}
if ((dirx == -1) and (diry == 1)) {
_local1._rotation = 135;
}
if ((dirx == 1) and (diry == 1)) {
_local1._rotation = 45;
}
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy > 800)) || (myRealy < -200)) {
_visible = false;
} else {
angle = degrees * (Math.PI/180);
degrees = degrees + 30;
ypos = ypos + (speed * diry);
xpos = xpos + (speed * dirx);
xposition = radius * Math.sin(angle);
yposition = radius * Math.cos(angle);
spiral._x = xposition + spiralcenter._x;
spiral._y = yposition + spiralcenter._y;
}
_local1.render();
}
stop();
speed = 20;
radius = 20;
degrees = 60;
power = 5;
justFired = false;
isDead = false;
_root.scrClip.char.shootSpeed = 75;
stop();
Symbol 558 MovieClip [bullet] Frame 5
function control(dir) {
var _local1 = this;
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
if (justFired) {
_local1._visible = true;
ammoSound3.gotoAndPlay(2);
justFired = false;
}
if (isDead) {
_local1._rotation = 0;
isDead = false;
gotoAndStop (13);
}
if (dirx == -1) {
_local1._rotation = 180;
}
if (dirx == 1) {
_local1._rotation = 0;
}
if (diry == -1) {
_local1._rotation = 270;
}
if (diry == 1) {
_local1._rotation = 90;
}
if ((dirx == -1) and (diry == -1)) {
_local1._rotation = 225;
}
if ((dirx == 1) and (diry == -1)) {
_local1._rotation = 315;
}
if ((dirx == -1) and (diry == 1)) {
_local1._rotation = 135;
}
if ((dirx == 1) and (diry == 1)) {
_local1._rotation = 45;
}
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy > 800)) || (myRealy < -200)) {
_visible = false;
} else {
ypos = ypos + (speed * diry);
xpos = xpos + (speed * dirx);
}
_local1.render();
}
stop();
speed = 20;
power = 4;
justFired = false;
isDead = false;
stop();
Symbol 558 MovieClip [bullet] Frame 11
function render() {
_y = Math.round(ypos);
_x = Math.round(xpos);
}
function control(dir) {
var _local1 = this;
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
_local1._xscale = realXScale;
_local1._yscale = realYScale;
_local1._rotation = 0;
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy > 800)) || (myRealy < -200)) {
_visible = false;
} else {
ypos = ypos + (speed * diry);
xpos = xpos + (speed * dirx);
}
_local1.render();
}
stop();
speed = 0;
power = 0;
dirx = 0;
diry = 0;
tileW = _root.tileW;
tileH = _root.tileH;
Symbol 558 MovieClip [bullet] Frame 12
function render() {
_y = Math.round(ypos);
_x = Math.round(xpos);
}
function control(dir) {
var _local1 = this;
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
_local1._xscale = realXScale;
_local1._yscale = realYScale;
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy > 800)) || (myRealy < -200)) {
_visible = false;
} else {
ypos = ypos + (speed * diry);
xpos = xpos + (speed * dirx);
}
_local1.render();
}
stop();
speed = 0;
power = 0;
dirx = 0;
diry = 0;
tileW = _root.tileW;
tileH = _root.tileH;
Symbol 558 MovieClip [bullet] Frame 13
function render() {
_y = Math.round(ypos);
_x = Math.round(xpos);
}
function control() {
var _local1 = this;
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
_local1._xscale = realXScale;
_local1._yscale = realYScale;
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy > 800)) || (myRealy < -200)) {
_visible = false;
} else {
ypos = ypos + (speed * diry);
xpos = xpos + (speed * dirx);
}
_local1.render();
}
stop();
speed = 0;
power = 0;
dirx = 0;
diry = 0;
tileW = _root.tileW;
tileH = _root.tileH;
Symbol 558 MovieClip [bullet] Frame 14
function render() {
_y = Math.round(ypos);
_x = Math.round(xpos);
}
function control(dir) {
var _local1 = this;
myRealx = xpos + _root.xpos;
myRealy = ypos + _root.ypos;
_local1._xscale = realXScale;
_local1._yscale = realYScale;
if ((((myRealx > 800) || (myRealx < -200)) || (myRealy > 800)) || (myRealy < -200)) {
_visible = false;
} else {
ypos = ypos + (speed * diry);
xpos = xpos + (speed * dirx);
}
_local1.render();
}
stop();
speed = 0;
power = 0;
dirx = 0;
diry = 0;
tileW = _root.tileW;
tileH = _root.tileH;
Symbol 572 MovieClip [pause_screen] Frame 1
stop();
Symbol 572 MovieClip [pause_screen] Frame 2
stop();
Symbol 572 MovieClip [pause_screen] Frame 3
gotoAndStop (1);
Symbol 582 MovieClip Frame 60
gotoAndPlay (1);
Symbol 594 MovieClip Frame 1
stop();
_root.isloaded = false;
Symbol 594 MovieClip Frame 2
stop();
Symbol 616 Button
on (press) {
gotoAndStop ("question");
}
Symbol 619 Button
on (press) {
gotoAndStop ("submit");
}
Symbol 624 Button
on (press) {
gamedata = _root.encode((((playername + "<END>") + _root.totalScore) + "<END>") + _root.level);
_parent.gamedata = gamedata;
_parent.loadVariables("http://www.jonahtaylor.com/binkysquest/scores/submitscore.php", "POST");
_parent.gotoAndStop("success");
}
Symbol 626 Button
on (press) {
_parent.gotoAndStop("first");
}
Symbol 632 Button
on (press) {
_root.gotoAndStop("MainMenu");
}
Symbol 634 Button
on (press) {
_parent.gotoAndStop("first");
}
Symbol 637 Button
on (press) {
_parent.gotoAndStop("last");
}
Symbol 639 Button
on (press) {
_root.gotoAndStop("MainMenu");
}
Symbol 651 Button
on (release) {
if (_root.level == 20) {
_root.gotoAndStop("WIN");
} else if ((((_root.level == 0) || (_root.level == 5)) || (_root.level == 10)) || (_root.level == 15)) {
_root.timetaken = 0;
_root.level++;
_root.gotoAndStop("stagetransition");
} else {
_root.timetaken = 0;
_root.level++;
_root.gotoAndStop(_root.level + 1);
}
}
Symbol 652 MovieClip Frame 1
stop();
Symbol 658 MovieClip Frame 1
stop();
Symbol 658 MovieClip Frame 2
stop();
Symbol 658 MovieClip Frame 3
stop();
Symbol 661 MovieClip Frame 1
stop();
Symbol 661 MovieClip Frame 2
stop();
Symbol 674 MovieClip Frame 25
stop();
morph = false;
_parent.menus.showTransition = true;
Symbol 674 MovieClip Frame 50
gotoAndPlay (1);
Symbol 678 Button
on (press) {
_root.level = 1;
xtramen = 2;
_root.gotoAndStop("stagetransition");
_root._quality = "low";
}
Symbol 680 Button
on (press) {
_parent.showTransition = true;
_parent.transitionFrame = "Instructions";
}
Symbol 682 Button
on (press) {
_root.gotoAndStop("intro");
_root._quality = "high";
}
Symbol 684 Button
on (press) {
_parent.showTransition = true;
_parent.transitionFrame = "Scores";
_parent.loadVariables("http://www.jonahtaylor.com/binkysquest/scores/getscores_ingame.php", "GET");
}
Symbol 686 Button
on (press) {
_parent.showTransition = true;
_parent.transitionFrame = "Credits";
}
Symbol 696 Button
on (release) {
getURL ("http://www.jonahtaylor.com/binkysquest", "_blank");
}
Symbol 706 Button
on (press) {
showTransition = true;
transitionFrame = "Menu";
}
Symbol 727 Button
on (release) {
getURL ("mailto:bqfanmail@jonahtaylor.com");
}
Symbol 729 MovieClip Frame 1
name1 = "Player1";
score1 = 0;
name2 = "Player2";
score2 = 0;
name3 = "Player3";
score3 = 0;
name4 = "Player4";
score4 = 0;
name5 = "Player5";
score5 = 0;
Symbol 729 MovieClip Frame 25
stop();
showTransition = false;
Symbol 729 MovieClip Frame 50
gotoAndStop(transitionFrame);
showTransition = false;
_parent.bubble.morph = true;
Symbol 729 MovieClip Frame 76
stop();
showTransition = false;
Symbol 729 MovieClip Frame 101
gotoAndStop(transitionFrame);
showTransition = false;
_parent.bubble.morph = true;
Symbol 729 MovieClip Frame 128
stop();
showTransition = false;
Symbol 729 MovieClip Frame 152
gotoAndStop(transitionFrame);
showTransition = false;
_parent.bubble.morph = true;
Symbol 729 MovieClip Frame 178
stop();
showTransition = false;
Symbol 729 MovieClip Frame 203
gotoAndStop(transitionFrame);
showTransition = false;
_parent.bubble.morph = true;
Instance of Symbol 674 MovieClip "bubble" in Symbol 730 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
morph = true;
}
onClipEvent (enterFrame) {
if (morph == true) {
play();
} else {
stop();
}
}
Instance of Symbol 729 MovieClip "menus" in Symbol 730 MovieClip Frame 1
onClipEvent (load) {
stop();
showTransition = false;
transitionFrame = "Menu";
}
onClipEvent (enterFrame) {
if (showTransition) {
play();
} else {
stop();
}
}
Symbol 785 MovieClip Frame 1
stop();
Symbol 785 MovieClip Frame 2
stop();
Symbol 785 MovieClip Frame 3
stop();
Symbol 785 MovieClip Frame 4
stop();
Symbol 790 Button
on (press) {
_root.gotoAndStop(_root.level + 1);
}
Instance of Symbol 785 MovieClip in Symbol 791 MovieClip Frame 1
onClipEvent (load) {
switch (_root.level) {
case 1 :
gotoAndStop (1);
break;
case 6 :
gotoAndStop (2);
break;
case 11 :
gotoAndStop (3);
break;
case 16 :
gotoAndStop (4);
}
}
Symbol 791 MovieClip Frame 213
_root.gotoAndStop(_root.level + 1);
Symbol 806 Button
on (press) {
_root.gotoAndStop("MainMenu");
}
Symbol 807 MovieClip Frame 1
function camControl() {
var _local2 = _parent;
var _local3 = this;
parentColor.setTransform(camColor.getTransform());
var _local1 = sX / _local3._width;
var scaleY = (sY / _local3._height);
_local2._x = cX - (_local3._x * _local1);
_local2._y = cY - (_local3._y * scaleY);
_local2._xscale = 100 * _local1;
_local2._yscale = 100 * scaleY;
}
function resetStage() {
var _local1 = _parent;
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_local1._xscale = 100;
_local1._yscale = 100;
_local1._x = 0;
_local1._y = 0;
}
this.camera._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
Symbol 830 MovieClip Frame 10
gotoAndPlay (1);
Symbol 843 MovieClip Frame 6181
_root.gotoAndStop("MainMenu");