Frame 1
function gameMenu(menu, obj) {
getURL (_root.authorsSite, "_blank");
}
_root.externalMusic = 0;
_root.gameTitle = "Amoeba";
_root.gameDesc = "Dangers in a microscopic world!";
_root.vNum = "1.07";
_root.flashVersionsNeeded = 7;
_root.legalDomain = "file:///D";
_root.authorName = "Terry Paton";
_root.authorContact = "terry@terrypaton.com";
_root.authorsSite = "http://www.terrypaton.com";
_root.gameLocation = _root._url.substr(0, legalDomain.length);
_root.gameQuality = "AUTO";
var menu_cm = new ContextMenu();
menu_cm.customItems.push(new ContextMenuItem(gameTitle, gameMenu));
menu_cm.hideBuiltInItems();
_root.menu = menu_cm;
fscommand ("fullscreen", true);
Instance of Symbol 142 MovieClip in Frame 4
onClipEvent (load) {
var flashVersion = System.capabilities.version;
_root.flashVersionsinstalled = flashVersion.substr(4, 1);
if (_root.flashVersionsNeeded > _root.flashVersionsinstalled) {
_root.stop();
this.gotoAndStop(2);
} else if (_root.gameLocation != _root.legalDomain) {
}
}
Frame 5
function flyingBlobClass() {
}
flyingBlobClass.prototype = new MovieClip();
flyingBlobClass.prototype.onLoad = function () {
this.x = -50 - random(300);
this.y = random(480);
this.gotoAndStop(random(5) + 1);
this.speed = random(5) + 2;
this._x = this.x;
this._y = this.y;
};
flyingBlobClass.prototype.onEnterFrame = function () {
this.x = this.x + this.speed;
this._x = this.x;
this._y = this.y;
if (this.x > 680) {
this.x = -50 - random(300);
this.y = random(480);
this.gotoAndStop(random(5) + 1);
this.speed = random(5) + 2;
}
};
Object.registerClass("flyingBlobs", flyingBlobClass);
level1data = new Array(100, 100, 5, 5);
level1quota = 5;
level2quota = 8;
level3quota = 12;
level4quota = 16;
level5quota = 20;
level6quota = 26;
level7quota = 32;
level8quota = 36;
level9quota = 40;
Frame 6
sound1 = new Sound();
sound1.attachSound("sound1");
sound2 = new Sound();
sound2.attachSound("sound2");
sound3 = new Sound();
sound3.attachSound("sound3");
sound4 = new Sound();
sound4.attachSound("sound4");
sound5 = new Sound();
sound5.attachSound("sound5");
sound6 = new Sound();
sound6.attachSound("sound6");
sound7 = new Sound();
sound7.attachSound("sound7");
sound8 = new Sound();
sound8.attachSound("sound8");
sound9 = new Sound();
sound9.attachSound("sound9");
sound10 = new Sound();
sound10.attachSound("sound10");
extralife_snd = new Sound();
extralife_snd.attachSound("sound10");
if (_root.externalMusic == 0) {
music1 = new Sound();
music1.attachSound("music1");
gameovermusic = new Sound();
gameovermusic.attachSound("gameovermusic");
intromusic = new Sound();
intromusic.attachSound("intromusic");
optionsmusic = new Sound();
optionsmusic.attachSound("optionsmusic");
gamefinishedmusic = new Sound();
gamefinishedmusic.attachSound("gamefinishedmusic");
}
Frame 7
function stopmusic() {
music1.stop();
optionsmusic.stop();
intromusic.stop();
gameovermusic.stop();
gamefinishedmusic.stop();
}
function playmusic() {
if (musicstate == 1) {
stopmusic();
trace("playing music");
switch (gameScene) {
case "INTRO" :
intromusic.start(0, 90);
return;
case "GAME" :
intromusic.start(0, 90);
return;
case "GAME OVER" :
return;
case "CREDITS" :
return;
case "HOW TO PLAY" :
return;
case "GAME FINISHED" :
intromusic.start(0, 90);
return;
}
}
}
storage = SharedObject.getLocal("store");
level = storage.data.uptolevel;
if (level == undefined) {
storage.data.uptolevel = 1;
level = 1;
}
yourhigh = storage.data.myhighscore;
if (yourhigh == undefined) {
storage.data.myhighscore = 0;
yourhigh = 0;
}
musicstate = storage.data.musicsetting;
if ((musicstate == undefined) || (musicstate == 2)) {
musicstate = 1;
storage.data.musicsetting = 1;
}
Frame 8
function playgame() {
gotoAndPlay (23);
}
function resetlevel() {
this.resetclip.resetclip.gotoAndPlay(2);
storage.data.myhighscore = 0;
yourhigh = 0;
storage.flush();
}
function musicon() {
this.options.on_off.gotoAndStop(1);
musicstate = 1;
storage.data.musicsetting = 1;
playmusic();
}
function musicoff() {
stopmusic();
this.options.on_off.gotoAndStop(2);
musicstate = 0;
storage.data.musicsetting = 0;
}
_root.level = 1;
delete state;
_quality = "HIGH";
if (level > 1) {
playcont.gotoAndStop(2);
}
gameScene = "INTRO";
playmusic();
i = 0;
while (i < 5) {
this.flyingBlob_holder.attachMovie("flyingBlobs", "fb" + i, i);
i++;
}
i = 0;
while (i < 5) {
this.flyingBlob_holder2.attachMovie("flyingBlobs", "fb" + i, i);
i++;
}
if (musicstate == 0) {
this.options.on_off.gotoAndStop(2);
}
Frame 22
stop();
Frame 23
function trailClass() {
}
trailClass.prototype = new MovieClip();
trailClass.prototype.onLoad = function () {
this.c = 0;
this._alpha = 70;
this._xscale = 80 + random(20);
this._rotation = random(360);
};
trailClass.prototype.onEnterFrame = function () {
this.c++;
this._xscale = this._xscale - 5;
this._yscale = this._yscale - 5;
this._alpha = this._alpha - 3;
if (this.c > 20) {
removeMovieClip(this);
}
};
Object.registerClass("trail", trailClass);
function powerUpClass() {
}
powerUpClass.prototype = new MovieClip();
powerUpClass.prototype.onLoad = function () {
this.x = this._x;
this.y = this._y;
this.startx = this.x;
this.starty = this.y;
this.yspeed = random(3) + 1;
this.xspeed = random(4) + 1;
this.maxSpeed = 5;
this.starttime = getTimer();
this.state = "normal";
this.typeOfpowerUp = random(4) + 1;
this.pointsawarded = 100;
this.gotoAndStop(this.typeOfpowerUp);
};
powerUpClass.prototype.onEnterFrame = function () {
if (_root.state == "paused") {
}
if (this.state == "remove") {
removeMovieClip(this);
}
if (_root.state == "playing") {
switch (this.typeOfpowerUp) {
case 1 :
this._rotation = this._rotation + 10;
if (this.y < stageTop) {
this.y = stageTop;
this.yspeed = -this.yspeed;
}
if (this.y > stageBottom) {
this.y = stageBottom;
this.yspeed = -this.yspeed;
}
if (this.x > stageRight) {
this.x = stageRight;
this.xspeed = -this.xspeed;
}
if (this.x < stageLeft) {
this.x = stageLeft;
this.xspeed = -this.xspeed;
}
this.y = this.y + (this.yspeed * speedModifier);
this.x = this.x + (this.xspeed * speedModifier);
break;
case 2 :
break;
case 3 :
this._rotation = this._rotation + 10;
break;
case 4 :
break;
}
if (this.hitTest(_root.player) == true) {
trace("power up has hit player");
switch (this.typeOfpowerUp) {
case 1 :
sound1.start();
starPowerUp();
break;
case 2 :
sound2.start();
stunPowerUp();
break;
case 3 :
sound3.start();
spiralPowerUp();
this._rotation = this._rotation + 10;
break;
case 4 :
sound4.start();
shrinkPowerUp();
break;
}
_root.score = _root.score + this.pointsawarded;
state = "power up wait start";
powerUpEffect = this.typeOfpowerUp;
removeMovieClip(this);
}
this._x = int(this.x);
this._y = int(this.y);
}
};
Object.registerClass("powerUp", powerUpClass);
function damagePlayer() {
playerEnergy = playerEnergy - 1;
if (playerEnergy < 0) {
playerEnergy = 0;
}
energyBar.energyBar_Bar._xscale = playerEnergy;
energyBar.energyLoss.gotoAndPlay(2);
if (playerEnergy < 1) {
state = "game over";
}
}
function enemy2Class() {
}
enemy2Class.prototype = new MovieClip();
enemy2Class.prototype.onLoad = function () {
this.x = this._x;
this.y = this._y;
this.startx = this.x;
this.starty = this.y;
this.maxSpeed = 5;
this.starttime = getTimer();
this.state = "normal";
};
enemy2Class.prototype.onEnterFrame = function () {
if (this.state == "kill") {
trace("kill");
this.killCount = 10;
this.state = "dying";
}
if (this.state == "dying") {
this._alpha = this._alpha - 10;
this.killCount--;
if (this.killCount < 1) {
removeMovieClip(this);
}
}
if (_root.state == "paused") {
}
if (_root.state == "playing") {
if (this.state == "stun") {
this.stunCount = 60;
this.state = "stun wait";
}
if (this.state == "stun wait") {
this.stunCount--;
if (this.stunCount < 0) {
this.state = "normal";
}
}
if (this.state == "normal") {
this._rotation = this._rotation + 10;
if (this.y < stageTop) {
this.y = stageTop;
this.clip.yspeed = -this.clip.yspeed;
this.clip.xspeed = -this.clip.xspeed;
}
if (this.y > stageBottom) {
this.y = stageBottom;
this.clip.yspeed = -this.clip.yspeed;
this.clip.xspeed = -this.clip.xspeed;
}
if (this.x > stageRight) {
this.x = stageRight;
this.clip.yspeed = -this.clip.yspeed;
this.clip.xspeed = -this.clip.xspeed;
}
if (this.x < stageLeft) {
this.x = stageLeft;
this.clip.yspeed = -this.clip.yspeed;
this.clip.xspeed = -this.clip.xspeed;
}
this.y = this.y + (this.clip.yspeed * speedModifier);
this.x = this.x + (this.clip.xspeed * speedModifier);
this._x = int(this.x);
this._y = int(this.y);
if (Math.abs(this.x - px) < (25 * (playerScale / 100))) {
if (Math.abs(this.y - py) < (25 * (playerScale / 100))) {
sound1.start();
playerEnergy = playerEnergy - 1;
damagePlayer();
}
}
}
}
};
Object.registerClass("enemy1", enemy2Class);
function enemyBClass() {
}
enemyBClass.prototype = new MovieClip();
enemyBClass.prototype.onLoad = function () {
this.x = this._x;
this.y = this._y;
this.startx = this.x;
this.starty = this.y;
this.maxSpeed = 5;
this.starttime = getTimer();
this.state = "normal";
this.mNum = 0;
trace("level = " + level);
if (level < 5) {
this.bugType = 0;
}
if ((level == 5) || (level == 6)) {
this.bugType = random(2);
}
if (level > 6) {
this.bugType = random(3);
}
this.body.gotoAndStop(this.bugType + 1);
};
enemyBClass.prototype.onEnterFrame = function () {
if (this.state == "kill") {
trace("kill");
this.killCount = 10;
this.state = "dying";
}
if (this.state == "dying") {
this._alpha = this._alpha - 10;
this.killCount--;
if (this.killCount < 1) {
removeMovieClip(this);
}
}
if (_root.state == "paused") {
}
if (_root.state == "playing") {
if (this.state == "stun") {
this.stunCount = 60;
this.state = "stun wait";
}
if (this.state == "stun wait") {
this.stunCount--;
if (this.stunCount < 0) {
this.state = "normal";
}
}
if (this.state == "normal") {
this._rotation = this._rotation + 10;
if (this.y < stageTop) {
this.y = stageTop;
this.clip.yspeed = -this.clip.yspeed;
this.clip.xspeed = -this.clip.xspeed;
}
if (this.y > stageBottom) {
this.y = stageBottom;
this.clip.yspeed = -this.clip.yspeed;
this.clip.xspeed = -this.clip.xspeed;
}
if (this.x > stageRight) {
this.x = stageRight;
this.clip.yspeed = -this.clip.yspeed;
this.clip.xspeed = -this.clip.xspeed;
}
if (this.x < stageLeft) {
this.x = stageLeft;
this.clip.yspeed = -this.clip.yspeed;
this.clip.xspeed = -this.clip.xspeed;
}
if (this.bugType == 0) {
this.mNum = this.mNum + 0.05;
this.y = this.y + ((4 * Math.cos(this.mNum)) * speedModifier);
this.x = this.x + ((4 * Math.sin(this.mNum)) * speedModifier);
}
if (this.bugType == 1) {
this.mNum = this.mNum + 0.05;
this.y = this.y + ((4 * Math.sin(this.mNum)) * speedModifier);
this.x = this.x + ((4 * Math.cos(this.mNum)) * speedModifier);
}
if (this.bugType == 2) {
this.mNum = this.mNum + 0.03;
this.y = this.y + ((3 * Math.cos(this.mNum)) * speedModifier);
this.x = this.x + ((6 * Math.sin(this.mNum)) * speedModifier);
}
this._x = int(this.x);
this._y = int(this.y);
if (Math.abs(this.x - px) < (25 * (playerScale / 100))) {
if (Math.abs(this.y - py) < (25 * (playerScale / 100))) {
sound1.start();
playerEnergy = playerEnergy - 1;
damagePlayer();
}
}
}
}
};
Object.registerClass("enemy2", enemyBClass);
function tellplayer(num) {
attachMovie("tell_player", "tellPlayer", 9);
with (tellPlayer) {
_x = 320;
_y = 240;
clip.gotoAndStop(num);
}
_root.playerscore.gotoAndPlay(2);
if (num == 9) {
extralife_snd.start();
}
switch (num) {
case 1 :
_root.score = _root.score + 500;
_root.sound1.start();
return;
case 2 :
_root.score = _root.score + 750;
_root.sound2.start();
return;
case 3 :
_root.score = _root.score + 1000;
_root.sound3.start();
return;
case 4 :
_root.score = _root.score + 2000;
_root.sound4.start();
return;
case 5 :
_root.score = _root.score + 3000;
_root.sound5.start();
return;
case 6 :
_root.score = _root.score + 4000;
_root.sound6.start();
return;
}
}
function pausebtnpress() {
if (_root.state == "playing") {
_root.state = "paused";
attachMovie("paused_clip", "tellPlayer", 9);
tellPlayer._x = 320;
tellPlayer._y = 240;
} else if (_root.state == "paused") {
removeMovieClip("tellPlayer");
_root.state = "playing";
}
}
function frameaction() {
if (state == "start again") {
attachMovie("ready_announce", "tellPlayer", 9);
tellPlayer._x = 320;
tellPlayer._y = 240;
_global.playerState = 1;
attachMovie("player", "player", 180);
player._x = px;
player._y = py;
this.state = "paused";
}
if (state == "paused") {
}
if (state == "power up wait start") {
pxmove = 0;
pymove = 0;
ptx = px;
pty = py;
powerWaitCount = 0;
powerWaitDelay = 30;
state = "power up wait";
}
if (state == "power up wait") {
powerWaitCount++;
if (powerWaitCount > powerWaitDelay) {
state = "playing";
}
switch (powerUpEffect) {
case 1 :
i = 0;
while (i < 25) {
if (powerClip.hitTest(eval ("enemyHolder.b" + i)) == true) {
if ((eval ("enemyHolder.b" + i).state != "kill") && (eval ("enemyHolder.b" + i).state != undefined)) {
trace("hit enemiy = " + i);
eval ("enemyHolder.b" + i).state = "kill";
score = score + 1;
}
}
i++;
}
break;
case 2 :
i = 0;
while (i < 25) {
if ((powerClip.hitTest(eval ("enemyHolder.b" + i)) == true) && (eval ("enemyHolder.b" + i).state != undefined)) {
if (eval ("enemyHolder.b" + i).state != "stun") {
trace("hit enemiy = " + i);
eval ("enemyHolder.b" + i).state = "stun";
}
}
i++;
}
break;
case 3 :
score = score + 1;
speedModifier = speedModifier - 0.03;
if (speedModifier < 0.03) {
speedModifier = 0.03;
}
break;
case 4 :
playerScale = playerScale - 1;
if (playerScale < 100) {
playerScale = 100;
}
player._xscale = playerScale;
player._yscale = playerScale;
score = score - 1;
break;
}
}
if (state == "begin") {
setuplevel();
state = "paused";
}
if (state == "playing") {
playerEnergy = playerEnergy - 0.05;
if (playerEnergy < 0) {
playerEnergy = 0;
}
if (playerEnergy < 1) {
state = "game over";
}
energyBar.energyBar_Bar._xscale = playerEnergy;
if (speedModifier < 1) {
speedModifier = speedModifier + 0.001;
}
if ((((pxmove > 0.5) || (pymove > 0.5)) || (pxmove < -0.5)) || (pymove < -0.5)) {
if (random(3) == 0) {
trailHolder.attachMovie("trail", "tr" + trNum, trNum);
eval ("trailHolder.tr" + trNum)._x = px + random(5);
eval ("trailHolder.tr" + trNum)._y = py + random(5);
trNum++;
}
}
if (playerState == 5) {
}
if (Key.isDown(leftKey)) {
ptx = ptx - 10;
}
if (Key.isDown(rightKey)) {
ptx = ptx + 10;
}
if (Key.isDown(upKey)) {
pty = pty - 10;
}
if (Key.isDown(downKey)) {
pty = pty + 10;
}
pxmove = (ptx - px) * 0.2;
pymove = (pty - py) * 0.2;
lastpx = px;
lastpy = py;
px = px + pxmove;
py = py + pymove;
player._x = px;
player._y = py;
if (Math.abs(enemyHolder.levelTarget._x - px) < (30 * (playerScale / 100))) {
if (Math.abs(enemyHolder.levelTarget._y - py) < (30 * (playerScale / 100))) {
sound10.start();
playerEnergy = playerEnergy + 3;
if (playerEnergy > 100) {
playerEnergy = 100;
}
energyBar.energyBar_Bar._xscale = playerEnergy;
energyBar.energyLoss.gotoAndPlay(2);
removeMovieClip("enemyHolder.levelTarget");
playerScale = playerScale + 8;
player.itemCollected_clip.gotoAndPlay(1);
player._xscale = playerScale;
player._yscale = playerScale;
score = score + 100;
playerscore.gotoAndPlay(2);
currentLevelCollect++;
currentLevelquota = eval (("level" + level) + "quota");
remainObjects = currentLevelquota - currentLevelCollect;
if (currentLevelCollect >= currentLevelquota) {
state = "level complete";
playerEnergy = playerEnergy + 15;
if (playerEnergy > 100) {
playerEnergy = 100;
}
energyBar.energyBar_Bar._xscale = playerEnergy;
} else {
addmoreBaddies();
addTarget();
}
}
}
if (px < stageLeft) {
px = stageLeft;
ptx = stageLeft;
}
if (px > stageRight) {
px = stageRight;
ptx = stageRight;
}
if (py < stageTop) {
py = stageTop;
pty = stageTop;
}
if (py > stageBottom) {
py = stageBottom;
pty = stageBottom;
}
if ((pxmove > 0.5) || (pymove > 0.5)) {
this.player.playerbody1._rotation = this.player.playerbody1._rotation + 5;
} else if ((pxmove < -0.5) || (pymove < -0.5)) {
this.player.playerbody1._rotation = this.player.playerbody1._rotation - 5;
}
xOff = px - lastpx;
yOff = py - lastpy;
this.player.playerbody1._x = -xOff;
this.player.playerbody1._y = -yOff;
this.player.playerbody2._x = -(xOff * 2);
this.player.playerbody2._y = -(yOff * 2);
this.player.playerTail._x = -xOff;
this.player.playerTail._y = -yOff;
this.player.playerTail2._x = -(xOff * 2);
this.player.playerTail2._y = -(yOff * 2);
}
if (state == "level complete") {
i = 0;
while (i < 500) {
removeMovieClip(eval ("enemyHolder.b" + i));
i++;
}
i = 200;
while (i < 220) {
removeMovieClip(eval ("enemyHolder.powerUp" + i));
i++;
}
attachMovie("level_complete", "tellPlayer", 200);
tellPlayer._x = 320;
tellPlayer._y = 240;
state = "level complete wait";
count = 76;
}
if (state == "level complete wait") {
count--;
if (count < 1) {
state = "next level";
}
}
if (state == "next level") {
level++;
if (level > 9) {
removeMovieClip(player);
gotoAndPlay (64);
} else {
setuplevel();
}
}
if (state == "game over") {
removeMovieClip(player);
gotoAndPlay ("GAMEOVER");
}
}
function addmoreBaddies() {
trace("enemyLevel = " + enemyLevel);
if (level < 3) {
enemyHolder.attachMovie("enemy1", "b" + enemyLevel, enemyLevel);
}
if ((level == 3) || (level == 4)) {
tempG = random(2);
if (tempG == 0) {
enemyHolder.attachMovie("enemy1", "b" + enemyLevel, enemyLevel);
} else {
enemyHolder.attachMovie("enemy2", "b" + enemyLevel, enemyLevel);
}
}
if (level > 4) {
tempG = random(2);
if (tempG == 0) {
enemyHolder.attachMovie("enemy1", "b" + enemyLevel, enemyLevel);
} else {
enemyHolder.attachMovie("enemy2", "b" + enemyLevel, enemyLevel);
}
}
with (eval ("enemyHolder.b" + enemyLevel)) {
c = random(2);
if (c == 0) {
} else {
_x = -20;
_y = findNewYLocation();
}
a = random(4);
switch (a) {
case 0 :
clip.xspeed = -5;
clip.yspeed = -5;
_x = findNewXLocation();
_y = -20;
if (py < 100) {
_y = 500;
}
break;
case 1 :
clip.xspeed = 5;
clip.yspeed = -5;
_x = findNewXLocation();
_y = -20;
if (py < 100) {
_y = 500;
}
break;
case 2 :
clip.xspeed = 0;
clip.yspeed = 5;
_x = findNewXLocation();
_y = -20;
if (py < 100) {
_y = 500;
}
break;
case 3 :
clip.xspeed = 5;
clip.yspeed = 0;
_x = -20;
_y = findNewYLocation();
if (px < 100) {
_x = 660;
}
break;
}
}
trace(eval ("enemyHolder.b" + enemyLevel)._x);
enemyLevel++;
}
function addPowerUp() {
if ((enemyLevel - 1) > 3) {
if (random(3) < 2) {
nextClip = 200;
enemyHolder.attachMovie("powerUp", "powerUp" + nextClip, nextClip);
eval ("enemyHolder.powerUp" + nextClip)._x = findNewXLocation();
eval ("enemyHolder.powerUp" + nextClip)._y = findNewYLocation();
trace(eval ("enemyHolder.powerUp" + nextClip)._y);
}
}
}
function findNewXLocation() {
tempXD = 10;
while (tempXD < 150) {
newX = random(520) + 60;
tempXD = Math.abs(px - newX);
}
return(Math.floor(newX));
}
function findNewYLocation() {
tempYD = 10;
while (tempYD < 150) {
newY = random(360) + 60;
tempYD = Math.abs(py - newY);
}
return(Math.floor(newY));
}
function starPowerUp() {
attachMovie("starPower", "powerClip", 198);
powerClip._x = px;
powerClip._y = py;
}
function stunPowerUp() {
attachMovie("stunPower", "powerClip", 198);
powerClip._x = px;
powerClip._y = py;
}
function spiralPowerUp() {
attachMovie("spiralPower", "powerClip", 198);
powerClip._x = px;
powerClip._y = py;
}
function shrinkPowerUp() {
attachMovie("shrinkPower", "powerClip", 198);
powerClip._x = px;
powerClip._y = py;
}
function addTarget() {
enemyHolder.attachMovie("levelTarget", "levelTarget", 1000);
enemyHolder.levelTarget._x = findNewXLocation();
enemyHolder.levelTarget._y = findNewYLocation();
enemyHolder.levelTarget._rotation = random(360);
addPowerUp();
}
function setup() {
playerEnergy = 100;
_quality = _root.gameQuality;
var _local3 = new Object();
_local3.onMouseDown = function () {
if ((playerState == 1) && (state == "playing")) {
trace("mouse clicked");
}
};
Mouse.addListener(_local3);
extralives = 0;
_root.lives = 2;
_root.score = 0;
_global.playerState = 1;
ptx = px;
pty = py;
trNum = 1;
_global.state = "begin";
acl = 0;
_global.prot = 0;
_root.pnum = 2;
gameScene = "GAME";
}
function musicon() {
this.on_off.gotoAndStop(1);
musicstate = 1;
storage.data.musicsetting = 1;
playmusic();
}
function musicoff() {
stopmusic();
this.on_off.gotoAndStop(2);
musicstate = 0;
storage.data.musicsetting = 0;
}
if (musicstate == 0) {
this.on_off.gotoAndStop(2);
}
function setuplevel() {
enemyLevel = 1;
powerUpEffect = 0;
currentLevelCollect = 0;
currentLevelquota = eval (("level" + level) + "quota");
remainObjects = currentLevelquota - currentLevelCollect;
speedModifier = 1;
playerScale = 100;
px = 320;
py = 400;
ptx = px;
pty = py;
addTarget();
upKey = 38;
downKey = 40;
leftKey = 37;
rightKey = 39;
stageLeft = 20;
stageRight = 640;
stageTop = 20;
stageBottom = 460;
_root.state = "paused";
_root.levelann = "Level " + level;
attachMovie("level_announce", "tellPlayer", 200);
tellPlayer._x = 320;
tellPlayer._y = 240;
background.gotoAndStop(level);
background.back_blobs._rotation = random(360);
attachMovie("player", "player", 196);
player.attachMovie("playerbody2", "playerbody2", 197);
player.attachMovie("playerbody1", "playerbody1", 198);
player.itemCollected_clip.gotoAndPlay(1);
player._x = px;
player._y = py;
lastpx = px;
lastpy = py;
xOff = px - lastpx;
yOff = py - lastpy;
this.player.playerbody1._x = -xOff;
this.player.playerbody1._y = -yOff;
this.player.playerbody2._x = -(xOff * 2);
this.player.playerbody2._y = -(yOff * 2);
this.player.playerTail._x = -xOff;
this.player.playerTail._y = -yOff;
this.player.playerTail2._x = -(xOff * 2);
this.player.playerTail2._y = -(yOff * 2);
playerState = 1;
addmoreBaddies();
playmusic();
}
Instance of Symbol 197 MovieClip in Frame 23
onClipEvent (enterFrame) {
_root.frameaction();
}
Frame 32
setup();
stop();
Frame 34
if (score > yourhigh) {
yourhigh = score;
newscore.gotoAndStop(2);
storage.data.myhighscore = score;
}
storage.data.uptolevel = level;
storage.flush();
gamescene = "game over";
playmusic();
Frame 41
stop();
Frame 42
function gomain() {
_root.state = "start again";
gotoAndPlay (8);
}
gameScene = "CREDITS";
playmusic();
Frame 54
stop();
Frame 55
function gomain() {
_root.state = "start again";
gotoAndPlay (8);
}
if (musicstate == 0) {
this.options.on_off.gotoAndStop(2);
}
gameScene = "HOW TO PLAY";
playmusic();
Frame 63
stop();
Frame 64
if (score > yourhigh) {
yourhigh = score;
storage.data.myhighscore = score;
}
storage.data.uptolevel = 1;
level = 1;
gameScene = "GAME FINISHED";
playmusic();
Frame 78
stop();
Symbol 9 MovieClip Frame 1
_root.stop();
PercentLoaded = Math.floor((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
setProperty(bar, _xscale , PercentLoaded);
} else {
_root.play();
}
Symbol 9 MovieClip Frame 2
gotoAndPlay (1);
Symbol 23 MovieClip Frame 1
stop();
Symbol 24 MovieClip [tell_player] Frame 65
removeMovieClip(this);
Symbol 38 MovieClip Frame 12
stop();
Symbol 44 MovieClip [shrinkPower] Frame 31
removeMovieClip(this);
Symbol 46 MovieClip [spiralPower] Frame 31
removeMovieClip(this);
Symbol 48 MovieClip [starPower] Frame 31
removeMovieClip(this);
Symbol 50 MovieClip [stunPower] Frame 31
removeMovieClip(this);
Symbol 54 MovieClip [ready_announce] Frame 76
removeMovieClip(this);
Symbol 59 Button
on (release) {
_root.pausebtnpress();
}
Symbol 60 MovieClip [paused_clip] Frame 30
stop();
Symbol 63 MovieClip [lifelost] Frame 80
_root.state = "start again";
removeMovieClip(this);
Symbol 66 MovieClip [level_announce] Frame 77
_root.state = "playing";
removeMovieClip(this);
Symbol 77 MovieClip Frame 1
stop();
Symbol 82 MovieClip [level_complete] Frame 76
removeMovieClip(this);
Symbol 87 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 1
stop();
Symbol 92 MovieClip [player] Frame 1
Symbol 101 MovieClip [levelTarget] Frame 15
stop();
Symbol 114 MovieClip Frame 1
stop();
Symbol 129 Button
on (release) {
getURL ("http://www.macromedia.com/go/getflashplayer/", "_blank");
}
Symbol 132 Button
on (release) {
_root.play();
}
Symbol 141 Button
on (release) {
getURL (((("mailto:" + _root.authorContact) + "?subject=") + _root.gameTitle) + " licensing");
}
Symbol 142 MovieClip Frame 1
stop();
Symbol 153 Button
on (release) {
gotoAndPlay (42);
}
Symbol 159 Button
on (release) {
gotoAndPlay (55);
}
Symbol 164 MovieClip Frame 23
stop();
Symbol 165 Button
on (press) {
_root.musicoff();
this.over.play();
}
Symbol 168 Button
on (press) {
_root.musicon();
this.over.play();
}
Symbol 169 MovieClip Frame 1
stop();
Symbol 175 MovieClip Frame 1
stop();
Symbol 180 Button
on (release) {
_root.resetlevel();
}
Symbol 188 Button
on (press) {
_root.playgame();
}
Symbol 190 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 1
stop();
Symbol 206 MovieClip Frame 1
stop();
Symbol 215 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 1
stop();
Symbol 230 Button
on (release) {
_root.state = "start again";
gotoAndPlay (8);
}
Symbol 237 Button
on (release) {
getURL ("http://www.terrypaton.com", "_blank");
}
Symbol 238 Button
on (release) {
_root.gomain();
}
Symbol 250 Button
on (release) {
gotoAndPlay (8);
}