Instance of Symbol 220 MovieClip [playerMC] "playerMC" in Frame 1
/* no clip actions */
Frame 2
var gameMusic = new Sound();
gameMusic.attachSound("mscIntro1");
gameMusic.start(0, 1);
Frame 56
function scoreOut(str, head) {
var _local2 = "";
if ((head != undefinded) || (head != "")) {
_local2 = _local2 + (("<b>" + head) + "</b>: ");
}
_local2 = _local2 + str;
_root.scoreMC.textBox.text = _root.scoreMC.textBox.text + _local2;
}
function debOut(str, head) {
this.textBoxOut(str, head);
}
function debOutClear() {
_root.debugTextBox.htmlText = "";
}
function traceOut(str, head) {
var _local1 = "";
if ((head != undefinded) || (head != "")) {
_local1 = _local1 + (head + ":\n");
}
_local1 = _local1 + str;
}
function textBoxOut(str, head) {
var _local2 = "";
if ((head != undefinded) || (head != "")) {
_local2 = _local2 + (("<b>" + head) + "</b>: ");
}
_local2 = _local2 + str;
_root.debugTextBox.htmlText = _root.debugTextBox.htmlText + _local2;
}
function centerAll() {
_root.playerMC.center();
_root.env1MC.center();
_root.env2MC.center();
_root.env3MC.center();
}
function isPlayerWhoDies(hitByMC) {
_root.debOut(hitByMC.baddySize, "hitByMC.baddySize");
return(_root.playerMC.size < hitByMC.baddySize);
}
function speedControl(direct, keypress) {
if (Key.isDown(keypress)) {
if ((_root.dirSpeeds[direct + "Speed"] + _root.speedInc) < _root.maxSpeed) {
_root.dirSpeeds[direct + "Speed"] = _root.dirSpeeds[direct + "Speed"] + _root.speedInc;
}
} else if ((_root.dirSpeeds[direct + "Speed"] - _root.speedDec) > _root.minSpeed) {
_root.dirSpeeds[direct + "Speed"] = _root.dirSpeeds[direct + "Speed"] - _root.speedDec;
}
}
function atLeftEdge(mc) {
if ((mc._x - (mc._width / 2)) <= (0 + _root.edgeBuffer)) {
return(true);
}
return(false);
}
function atRightEdge(mc) {
if ((mc._x + (mc._width / 2)) >= (_root.staticStageWidth - _root.edgeBuffer)) {
return(true);
}
return(false);
}
function atTopEdge(mc) {
if ((mc._y - (mc._height / 2)) <= (0 + _root.edgeBuffer)) {
return(true);
}
return(false);
}
function atBotEdge(mc) {
if ((mc._y + (mc._height / 2)) >= (_root.staticStageHeight - _root.edgeBuffer)) {
return(true);
}
return(false);
}
function levelComplete(level) {
if ((level + 1) <= _root.totalLevels) {
_root.gotoAndPlay("levelOutro");
_root.levelNum = level + 1;
_root.playerMC.isImmune = true;
_root.levelIsComplete = true;
_root.isDestroyingAll = true;
_root.destroyAll();
} else {
_root.wonGame = true;
_root.gotoAndPlay("gameComplete");
}
}
function destroyAll() {
for (var _local2 in _root.baddyMoveSets) {
_root.baddyMoveSets[_local2].destroyAll();
}
}
displayPanelStaticWidth = 30;
staticStageWidth = 590 - displayPanelStaticWidth;
staticStageHeight = 400;
levelNum = 1;
score = 0;
levelScore = 0;
totalLevels = 8;
playerLives = 9;
maxLives = 9;
soundOn = true;
wonGame = false;
levelInstruct = "";
isShowingLevelInstruct = true;
scoreMod = 1.2;
baddyMoveSets = new Object();
baddyTypeKillCounter = new Object();
_root.playerMC.lives = playerLives;
intervalRegistry = new Array();
utils = new Utils();
_root.totalLoopFrames = 600;
_root.randTimeOffset = 10;
speedInc = 0.5;
speedDec = 0.3;
maxSpeed = 15;
minSpeed = 0;
_root.playerMoveRatio = 1;
dirSpeeds = new Object();
dirSpeeds.upSpeed = 0;
dirSpeeds.downSpeed = 0;
dirSpeeds.leftSpeed = 0;
dirSpeeds.rightSpeed = 0;
_root.centerX = Math.abs(_root.staticStageWidth / 2);
_root.centerY = Math.abs(_root.staticStageHeight / 2);
_root.edgeBuffer = 20;
_root.env2MC.setStaticWidths(1200, 800);
_root.env2MC.setStaticWidths(1000, 650);
_root.env3MC.setStaticWidths(750, 550);
_root.i = 0;
var sizeChangesArr = new Array();
sizeChangesArr[0] = new Array(500, 1000, 1500);
var l = 1;
while (l < _root.totalLevels) {
sizeChangesArr[l] = new Array(sizeChangesArr[l - 1][0] * _root.scoreMod, sizeChangesArr[l - 1][1] * _root.scoreMod, sizeChangesArr[l - 1][2] * _root.scoreMod);
l++;
}
_root.scoreMC.setScore(_root.score);
_root.livesMC.textBox.text = _root.playerMC.lives;
_root.sizeBarMC.hideElements();
var updateScoreFunct = function (prop, oldScore, newScore, userData) {
if (_root.scoreMultiplyer == 0) {
_root.scoreMC.setScore(newScore);
_root.levelScore = _root.levelScore + (newScore - oldScore);
} else {
_root.scoreMC.setScore(newScore * scoreMultiplyer);
_root.levelScore = _root.levelScore + ((newScore - oldScore) * scoreMultiplyer);
}
_root.sizeBarMC.setScore(_root.levelScore);
if (_root.playerMC.size == 1) {
if (_root.sizeChangesArr[_root.levelNum - 1][0] <= _root.levelScore) {
_root.playerMC.grow();
}
} else if (_root.playerMC.size == 2) {
if (_root.sizeChangesArr[_root.levelNum - 1][1] <= _root.levelScore) {
_root.playerMC.grow();
}
} else if (_root.playerMC.size == 3) {
if (_root.sizeChangesArr[_root.levelNum - 1][2] <= _root.levelScore) {
if (!_root.isDestroyingAll) {
_root.levelComplete(_root.levelNum);
}
}
}
return(newScore);
};
_root.watch("score", updateScoreFunct);
_root.playerMC.gotoAndPlay("init");
stop();
Frame 72
if (_root.levelNum == 1) {
_root.score = 0;
}
_root.levelScore = 0;
_root.sizeBarMC.showElements();
_root.scoreMC.setScore(_root.score);
_root.livesMC.textBox.text = _root.playerMC.lives;
_root.playerMC.shrinkTo1("");
_root.wonGame = false;
hitRegistry = new HitRegistry();
baddyKillCount = Object();
_root.levelIsComplete = false;
_root.isDestroyingAll = false;
_root.scoreMultiplyer = 1.2;
_root.sizeBarMC.setUp(sizeChangesArr[levelNum - 1][0], sizeChangesArr[levelNum - 1][1], sizeChangesArr[levelNum - 1][2], _root.levelScore);
_root.env1MC.moveRatio = 1.5;
_root.env2MC.moveRatio = 0.85;
_root.env3MC.moveRatio = 0.4;
_root.env1MC.moveSpeed = 7;
_root.env2MC.moveSpeed = 4;
_root.env3MC.moveSpeed = 1;
_root.lettersMC.init();
_root.playerMC.init();
_root.centerAll();
cloudMoveSetArgs = new Object();
cloudMoveSetArgs.objLibName = "cloudObjMC";
cloudMoveSetArgs.envMC = _root.env2MC;
cloudMoveSetArgs.moveDirection = "up";
cloudMoveSetArgs.moveSpeed = 4;
cloudMoveSetArgs.maxObjects = 30;
cloudMoveSetArgs.totalLoopFrames = _root.totalLoopFrames;
cloudMoveSetArgs.randTimeOffset = _root.randTimeOffset;
smallCloudMoveSetArgs = new Object();
smallCloudMoveSetArgs.objLibName = "cloudSmallObjMC";
smallCloudMoveSetArgs.envMC = _root.env3MC;
smallCloudMoveSetArgs.moveDirection = "up";
smallCloudMoveSetArgs.moveSpeed = 1;
smallCloudMoveSetArgs.maxObjects = 15;
smallCloudMoveSetArgs.totalLoopFrames = _root.totalLoopFrames;
smallCloudMoveSetArgs.randTimeOffset = _root.randTimeOffset;
var e2MoveSet = new MoveSet(_root.cloudMoveSetArgs);
var e3MoveSet = new MoveSet(_root.smallCloudMoveSetArgs);
baddiesArgs = new Object();
baddiesArgs.islands1 = new Object();
baddiesArgs.islands1.objLibName = "baddyIslandMC";
baddiesArgs.islands1.uniqueSetName = "baddyIslandMC1";
baddiesArgs.islands1.envMC = _root.env1MC;
baddiesArgs.islands1.moveDirection = "up";
baddiesArgs.islands1.moveSpeed = 5;
baddiesArgs.islands1.maxObjects = 5;
baddiesArgs.islands1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.islands1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.islands1.baddySize = 4;
baddiesArgs.islands1.supressFromCounter = true;
switch (_root.levelNum) {
case 1 :
_root.levelInstruct = "Collect the balloons. Do not hit the islands or else you will fall out of the sky!";
baddiesArgs.balloon1 = new Object();
baddiesArgs.balloon1.objLibName = "baddyBalloonMC";
baddiesArgs.balloon1.uniqueSetName = "baddyBalloonMC1";
baddiesArgs.balloon1.envMC = _root.env1MC;
baddiesArgs.balloon1.moveDirection = "up";
baddiesArgs.balloon1.moveSpeed = 3;
baddiesArgs.balloon1.maxObjects = 100;
baddiesArgs.balloon1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.balloon1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.balloon1.baddySize = 1;
baddiesArgs.balloon1.dieSound2 = "sndPop2";
break;
case 2 :
_root.levelInstruct = "Collect the balloons and the flying yellow birds.";
baddiesArgs.bird1 = new Object();
baddiesArgs.bird1.objLibName = "baddyYelBirdMC";
baddiesArgs.bird1.uniqueSetName = "baddyYelBirdMC1";
baddiesArgs.bird1.envMC = _root.env1MC;
baddiesArgs.bird1.moveDirection = "right";
baddiesArgs.bird1.moveSpeed = 5;
baddiesArgs.bird1.maxObjects = 50;
baddiesArgs.bird1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.bird1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.bird1.baddySize = 1;
baddiesArgs.bird1.dieSound = "sndSquak";
baddiesArgs.balloon1 = new Object();
baddiesArgs.balloon1.objLibName = "baddyBalloonMC";
baddiesArgs.balloon1.uniqueSetName = "baddyBalloonMC1";
baddiesArgs.balloon1.envMC = _root.env1MC;
baddiesArgs.balloon1.moveDirection = "up";
baddiesArgs.balloon1.moveSpeed = 5;
baddiesArgs.balloon1.maxObjects = 75;
baddiesArgs.balloon1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.balloon1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.balloon1.baddySize = 1;
baddiesArgs.balloon1.dieSound2 = "sndPop2";
baddiesArgs.bonusItem = new Object();
baddiesArgs.bonusItem.objLibName = "baddyBonusMC";
baddiesArgs.bonusItem.uniqueSetName = "baddyBonusMC1";
baddiesArgs.bonusItem.envMC = _root.env1MC;
baddiesArgs.bonusItem.moveDirection = "up";
baddiesArgs.bonusItem.moveSpeed = 5;
baddiesArgs.bonusItem.maxObjects = 2;
baddiesArgs.bonusItem.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.bonusItem.randTimeOffset = _root.randTimeOffset;
baddiesArgs.bonusItem.baddySize = 1;
baddiesArgs.bonusItem.dieSound2 = "sndBonus";
baddiesArgs.bonusItem.isBonusItem = true;
baddiesArgs.bonusItem.bonusItemType = "score";
baddiesArgs.bonusItem.score = 200;
break;
case 3 :
_root.levelInstruct = "Collect the balloons and the flying yellow birds. You must grow medium before you can collect the white birds!";
baddiesArgs.bird1 = new Object();
baddiesArgs.bird1.objLibName = "baddyYelBirdMC";
baddiesArgs.bird1.uniqueSetName = "baddyYelBirdMC1";
baddiesArgs.bird1.envMC = _root.env1MC;
baddiesArgs.bird1.moveDirection = "left";
baddiesArgs.bird1.moveSpeed = 7;
baddiesArgs.bird1.maxObjects = 50;
baddiesArgs.bird1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.bird1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.bird1.baddySize = 1;
baddiesArgs.bird1.dieSound = "sndSquak";
baddiesArgs.balloon1 = new Object();
baddiesArgs.balloon1.objLibName = "baddyBalloonMC";
baddiesArgs.balloon1.uniqueSetName = "baddyBalloonMC1";
baddiesArgs.balloon1.envMC = _root.env1MC;
baddiesArgs.balloon1.moveDirection = "up";
baddiesArgs.balloon1.moveSpeed = 7;
baddiesArgs.balloon1.maxObjects = 50;
baddiesArgs.balloon1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.balloon1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.balloon1.baddySize = 1;
baddiesArgs.balloon1.dieSound2 = "sndPop2";
baddiesArgs.stalk1 = new Object();
baddiesArgs.stalk1.objLibName = "baddyStalkMC";
baddiesArgs.stalk1.uniqueSetName = "baddyStalkRight1";
baddiesArgs.stalk1.envMC = _root.env1MC;
baddiesArgs.stalk1.moveDirection = "right";
baddiesArgs.stalk1.moveSpeed = 7;
baddiesArgs.stalk1.maxObjects = 5;
baddiesArgs.stalk1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.stalk1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.stalk1.baddySize = 2;
baddiesArgs.stalk1.flipIt = false;
baddiesArgs.stalk1.dieSound = "sndCrow";
baddiesArgs.islands1.maxObjects = 10;
break;
case 4 :
_root.levelInstruct = "Collect the ballons and the flying yellow birds. You must grow medium to collect the white birds and grow large to collect the machines!";
baddiesArgs.bird1 = new Object();
baddiesArgs.bird1.objLibName = "baddyYelBirdMC";
baddiesArgs.bird1.uniqueSetName = "baddyYelBirdMC1";
baddiesArgs.bird1.envMC = _root.env1MC;
baddiesArgs.bird1.moveDirection = "right";
baddiesArgs.bird1.moveSpeed = 9;
baddiesArgs.bird1.maxObjects = 30;
baddiesArgs.bird1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.bird1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.bird1.baddySize = 1;
baddiesArgs.bird1.dieSound = "sndSquak";
baddiesArgs.balloon1 = new Object();
baddiesArgs.balloon1.objLibName = "baddyBalloonMC";
baddiesArgs.balloon1.uniqueSetName = "baddyBalloonMC1";
baddiesArgs.balloon1.envMC = _root.env1MC;
baddiesArgs.balloon1.moveDirection = "up";
baddiesArgs.balloon1.moveSpeed = 7;
baddiesArgs.balloon1.maxObjects = 30;
baddiesArgs.balloon1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.balloon1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.balloon1.baddySize = 1;
baddiesArgs.balloon1.dieSound2 = "sndPop2";
baddiesArgs.stalk1 = new Object();
baddiesArgs.stalk1.objLibName = "baddyStalkMC";
baddiesArgs.stalk1.uniqueSetName = "baddyStalkRight1";
baddiesArgs.stalk1.envMC = _root.env1MC;
baddiesArgs.stalk1.moveDirection = "right";
baddiesArgs.stalk1.moveSpeed = 9;
baddiesArgs.stalk1.maxObjects = 10;
baddiesArgs.stalk1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.stalk1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.stalk1.baddySize = 2;
baddiesArgs.stalk1.flipIt = false;
baddiesArgs.stalk1.dieSound = "sndCrow";
baddiesArgs.stalk2 = new Object();
baddiesArgs.stalk2.objLibName = "baddyStalkMC";
baddiesArgs.stalk2.uniqueSetName = "baddyStalkLeft1";
baddiesArgs.stalk2.envMC = _root.env1MC;
baddiesArgs.stalk2.moveDirection = "left";
baddiesArgs.stalk2.moveSpeed = 9;
baddiesArgs.stalk2.maxObjects = 10;
baddiesArgs.stalk2.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.stalk2.randTimeOffset = _root.randTimeOffset;
baddiesArgs.stalk2.baddySize = 2;
baddiesArgs.stalk2.flipIt = true;
baddiesArgs.stalk2.dieSound = "sndCrow";
baddiesArgs.steam1 = new Object();
baddiesArgs.steam1.objLibName = "baddySteamMC";
baddiesArgs.steam1.uniqueSetName = "baddySteamMC1";
baddiesArgs.steam1.envMC = _root.env1MC;
baddiesArgs.steam1.moveDirection = "right";
baddiesArgs.steam1.moveSpeed = 3;
baddiesArgs.steam1.maxObjects = 4;
baddiesArgs.steam1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.steam1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.steam1.baddySize = 3;
baddiesArgs.steam1.dieSound = "sndMachine";
baddiesArgs.islands1.maxObjects = 18;
baddiesArgs.bonusItem = new Object();
baddiesArgs.bonusItem.objLibName = "baddyBonusMC";
baddiesArgs.bonusItem.uniqueSetName = "baddyBonusMC1";
baddiesArgs.bonusItem.envMC = _root.env1MC;
baddiesArgs.bonusItem.moveDirection = "up";
baddiesArgs.bonusItem.moveSpeed = 5;
baddiesArgs.bonusItem.maxObjects = 2;
baddiesArgs.bonusItem.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.bonusItem.randTimeOffset = _root.randTimeOffset;
baddiesArgs.bonusItem.baddySize = 1;
baddiesArgs.bonusItem.dieSound2 = "sndBonus";
baddiesArgs.bonusItem.isBonusItem = true;
baddiesArgs.bonusItem.bonusItemType = "life";
baddiesArgs.bonusItem.score = 200;
break;
case 5 :
_root.levelInstruct = "Watch out for the pink animals - they're very fast! You must grow medium to catch these!";
baddiesArgs.bird1 = new Object();
baddiesArgs.bird1.objLibName = "baddyYelBirdMC";
baddiesArgs.bird1.uniqueSetName = "baddyYelBirdMC1";
baddiesArgs.bird1.envMC = _root.env1MC;
baddiesArgs.bird1.moveDirection = "down";
baddiesArgs.bird1.moveSpeed = 10;
baddiesArgs.bird1.maxObjects = 30;
baddiesArgs.bird1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.bird1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.bird1.baddySize = 1;
baddiesArgs.bird1.dieSound = "sndSquak";
baddiesArgs.balloon1 = new Object();
baddiesArgs.balloon1.objLibName = "baddyBalloonMC";
baddiesArgs.balloon1.uniqueSetName = "baddyBalloonMC1";
baddiesArgs.balloon1.envMC = _root.env1MC;
baddiesArgs.balloon1.moveDirection = "up";
baddiesArgs.balloon1.moveSpeed = 7;
baddiesArgs.balloon1.maxObjects = 30;
baddiesArgs.balloon1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.balloon1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.balloon1.baddySize = 1;
baddiesArgs.balloon1.dieSound2 = "sndPop2";
baddiesArgs.stalk1 = new Object();
baddiesArgs.stalk1.objLibName = "baddyStalkMC";
baddiesArgs.stalk1.uniqueSetName = "baddyStalkRight1";
baddiesArgs.stalk1.envMC = _root.env1MC;
baddiesArgs.stalk1.moveDirection = "right";
baddiesArgs.stalk1.moveSpeed = 10;
baddiesArgs.stalk1.maxObjects = 10;
baddiesArgs.stalk1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.stalk1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.stalk1.baddySize = 2;
baddiesArgs.stalk1.flipIt = false;
baddiesArgs.stalk1.dieSound = "sndCrow";
baddiesArgs.stalk2 = new Object();
baddiesArgs.stalk2.objLibName = "baddyStalkMC";
baddiesArgs.stalk2.uniqueSetName = "baddyStalkLeft1";
baddiesArgs.stalk2.envMC = _root.env1MC;
baddiesArgs.stalk2.moveDirection = "left";
baddiesArgs.stalk2.moveSpeed = 10;
baddiesArgs.stalk2.maxObjects = 10;
baddiesArgs.stalk2.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.stalk2.randTimeOffset = _root.randTimeOffset;
baddiesArgs.stalk2.baddySize = 2;
baddiesArgs.stalk2.flipIt = true;
baddiesArgs.stalk2.dieSound = "sndCrow";
baddiesArgs.octo1 = new Object();
baddiesArgs.octo1.objLibName = "baddyOctoMC";
baddiesArgs.octo1.uniqueSetName = "baddyOctoMC1";
baddiesArgs.octo1.envMC = _root.env1MC;
baddiesArgs.octo1.moveDirection = "down";
baddiesArgs.octo1.moveSpeed = 15;
baddiesArgs.octo1.maxObjects = 10;
baddiesArgs.octo1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.octo1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.octo1.baddySize = 2;
baddiesArgs.octo1.dieSound = "sndBuzz";
baddiesArgs.islands.moveSpeed = 8;
baddiesArgs.islands1.maxObjects = 18;
break;
case 6 :
_root.levelInstruct = "Great! Grow medium to collect the white birds and pink animals but grow large to collect the machines!";
baddiesArgs.bird1 = new Object();
baddiesArgs.bird1.objLibName = "baddyYelBirdMC";
baddiesArgs.bird1.uniqueSetName = "baddyYelBirdMC1";
baddiesArgs.bird1.envMC = _root.env1MC;
baddiesArgs.bird1.moveDirection = "down";
baddiesArgs.bird1.moveSpeed = 12;
baddiesArgs.bird1.maxObjects = 40;
baddiesArgs.bird1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.bird1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.bird1.baddySize = 1;
baddiesArgs.bird1.dieSound = "sndSquak";
baddiesArgs.balloon1 = new Object();
baddiesArgs.balloon1.objLibName = "baddyBalloonMC";
baddiesArgs.balloon1.uniqueSetName = "baddyBalloonMC1";
baddiesArgs.balloon1.envMC = _root.env1MC;
baddiesArgs.balloon1.moveDirection = "up";
baddiesArgs.balloon1.moveSpeed = 10;
baddiesArgs.balloon1.maxObjects = 30;
baddiesArgs.balloon1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.balloon1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.balloon1.baddySize = 1;
baddiesArgs.balloon1.dieSound2 = "sndPop2";
baddiesArgs.octo1 = new Object();
baddiesArgs.octo1.objLibName = "baddyOctoMC";
baddiesArgs.octo1.uniqueSetName = "baddyOctoMC1";
baddiesArgs.octo1.envMC = _root.env1MC;
baddiesArgs.octo1.moveDirection = "right";
baddiesArgs.octo1.moveSpeed = 10;
baddiesArgs.octo1.maxObjects = 15;
baddiesArgs.octo1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.octo1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.octo1.baddySize = 2;
baddiesArgs.octo1.dieSound = "sndBuzz";
baddiesArgs.octo2 = new Object();
baddiesArgs.octo2.objLibName = "baddyOctoMC";
baddiesArgs.octo2.uniqueSetName = "baddyOctoMC1";
baddiesArgs.octo2.envMC = _root.env1MC;
baddiesArgs.octo2.moveDirection = "left";
baddiesArgs.octo2.moveSpeed = 10;
baddiesArgs.octo2.maxObjects = 15;
baddiesArgs.octo2.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.octo2.randTimeOffset = _root.randTimeOffset;
baddiesArgs.octo2.baddySize = 2;
baddiesArgs.octo2.flipIt = true;
baddiesArgs.octo2.dieSound = "sndBuzz";
baddiesArgs.steam1 = new Object();
baddiesArgs.steam1.objLibName = "baddySteamMC";
baddiesArgs.steam1.uniqueSetName = "baddySteamMC1";
baddiesArgs.steam1.envMC = _root.env1MC;
baddiesArgs.steam1.moveDirection = "right";
baddiesArgs.steam1.moveSpeed = 8;
baddiesArgs.steam1.maxObjects = 10;
baddiesArgs.steam1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.steam1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.steam1.baddySize = 3;
baddiesArgs.steam1.dieSound = "sndMachine";
baddiesArgs.islands.moveSpeed = 10;
baddiesArgs.islands1.maxObjects = 20;
baddiesArgs.bonusItem = new Object();
baddiesArgs.bonusItem.objLibName = "baddyBonusMC";
baddiesArgs.bonusItem.uniqueSetName = "baddyBonusMC1";
baddiesArgs.bonusItem.envMC = _root.env1MC;
baddiesArgs.bonusItem.moveDirection = "up";
baddiesArgs.bonusItem.moveSpeed = 5;
baddiesArgs.bonusItem.maxObjects = 4;
baddiesArgs.bonusItem.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.bonusItem.randTimeOffset = _root.randTimeOffset;
baddiesArgs.bonusItem.baddySize = 1;
baddiesArgs.bonusItem.dieSound2 = "sndBonus";
baddiesArgs.bonusItem.isBonusItem = true;
baddiesArgs.bonusItem.bonusItemType = "score";
baddiesArgs.bonusItem.score = 200;
break;
case 7 :
_root.levelInstruct = "You're doing really well. The white birds fly very fast on this level!";
baddiesArgs.balloon1 = new Object();
baddiesArgs.balloon1.objLibName = "baddyBalloonMC";
baddiesArgs.balloon1.uniqueSetName = "baddyBalloonMC1";
baddiesArgs.balloon1.envMC = _root.env1MC;
baddiesArgs.balloon1.moveDirection = "up";
baddiesArgs.balloon1.moveSpeed = 15;
baddiesArgs.balloon1.maxObjects = 30;
baddiesArgs.balloon1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.balloon1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.balloon1.baddySize = 1;
baddiesArgs.balloon1.dieSound2 = "sndPop2";
baddiesArgs.stalk1 = new Object();
baddiesArgs.stalk1.objLibName = "baddyStalkMC";
baddiesArgs.stalk1.uniqueSetName = "baddyStalkRight1";
baddiesArgs.stalk1.envMC = _root.env1MC;
baddiesArgs.stalk1.moveDirection = "right";
baddiesArgs.stalk1.moveSpeed = 17;
baddiesArgs.stalk1.maxObjects = 20;
baddiesArgs.stalk1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.stalk1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.stalk1.baddySize = 2;
baddiesArgs.stalk1.flipIt = false;
baddiesArgs.stalk1.dieSound = "sndCrow";
baddiesArgs.stalk2 = new Object();
baddiesArgs.stalk2.objLibName = "baddyStalkMC";
baddiesArgs.stalk2.uniqueSetName = "baddyStalkLeft1";
baddiesArgs.stalk2.envMC = _root.env1MC;
baddiesArgs.stalk2.moveDirection = "left";
baddiesArgs.stalk2.moveSpeed = 17;
baddiesArgs.stalk2.maxObjects = 20;
baddiesArgs.stalk2.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.stalk2.randTimeOffset = _root.randTimeOffset;
baddiesArgs.stalk2.baddySize = 2;
baddiesArgs.stalk2.flipIt = true;
baddiesArgs.stalk2.dieSound = "sndCrow";
baddiesArgs.steam1 = new Object();
baddiesArgs.steam1.objLibName = "baddySteamMC";
baddiesArgs.steam1.uniqueSetName = "baddySteamMC1";
baddiesArgs.steam1.envMC = _root.env1MC;
baddiesArgs.steam1.moveDirection = "down";
baddiesArgs.steam1.moveSpeed = 10;
baddiesArgs.steam1.maxObjects = 10;
baddiesArgs.steam1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.steam1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.steam1.baddySize = 3;
baddiesArgs.steam1.dieSound = "sndMachine";
baddiesArgs.islands.moveSpeed = 15;
baddiesArgs.islands1.maxObjects = 20;
break;
case 8 :
_root.levelInstruct = "You are very good! Can you survive this level to finish the game?";
baddiesArgs.balloon1 = new Object();
baddiesArgs.balloon1.objLibName = "baddyBalloonMC";
baddiesArgs.balloon1.uniqueSetName = "baddyBalloonMC1";
baddiesArgs.balloon1.envMC = _root.env1MC;
baddiesArgs.balloon1.moveDirection = "up";
baddiesArgs.balloon1.moveSpeed = 25;
baddiesArgs.balloon1.maxObjects = 30;
baddiesArgs.balloon1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.balloon1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.balloon1.baddySize = 1;
baddiesArgs.balloon1.dieSound2 = "sndPop2";
baddiesArgs.bird1 = new Object();
baddiesArgs.bird1.objLibName = "baddyYelBirdMC";
baddiesArgs.bird1.uniqueSetName = "baddyYelBirdMC1";
baddiesArgs.bird1.envMC = _root.env1MC;
baddiesArgs.bird1.moveDirection = "up";
baddiesArgs.bird1.moveSpeed = 25;
baddiesArgs.bird1.maxObjects = 30;
baddiesArgs.bird1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.bird1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.bird1.baddySize = 1;
baddiesArgs.bird1.dieSound = "sndSquak";
baddiesArgs.octo1 = new Object();
baddiesArgs.octo1.objLibName = "baddyOctoMC";
baddiesArgs.octo1.uniqueSetName = "baddyOctoMC1";
baddiesArgs.octo1.envMC = _root.env1MC;
baddiesArgs.octo1.moveDirection = "down";
baddiesArgs.octo1.moveSpeed = 20;
baddiesArgs.octo1.maxObjects = 15;
baddiesArgs.octo1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.octo1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.octo1.baddySize = 2;
baddiesArgs.octo1.dieSound = "sndBuzz";
baddiesArgs.steam1 = new Object();
baddiesArgs.steam1.objLibName = "baddySteamMC";
baddiesArgs.steam1.uniqueSetName = "baddySteamMC1";
baddiesArgs.steam1.envMC = _root.env1MC;
baddiesArgs.steam1.moveDirection = "right";
baddiesArgs.steam1.moveSpeed = 20;
baddiesArgs.steam1.maxObjects = 20;
baddiesArgs.steam1.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.steam1.randTimeOffset = _root.randTimeOffset;
baddiesArgs.steam1.baddySize = 3;
baddiesArgs.steam1.dieSound = "sndMachine";
baddiesArgs.steam2 = new Object();
baddiesArgs.steam2.objLibName = "baddySteamMC";
baddiesArgs.steam2.uniqueSetName = "baddySteamMC1";
baddiesArgs.steam2.envMC = _root.env1MC;
baddiesArgs.steam2.moveDirection = "left";
baddiesArgs.steam2.moveSpeed = 20;
baddiesArgs.steam2.maxObjects = 20;
baddiesArgs.steam2.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.steam2.randTimeOffset = _root.randTimeOffset;
baddiesArgs.steam2.baddySize = 3;
baddiesArgs.steam2.flipIt = true;
baddiesArgs.steam2.dieSound = "sndMachine";
baddiesArgs.islands.moveSpeed = 20;
baddiesArgs.islands1.maxObjects = 25;
baddiesArgs.bonusItem = new Object();
baddiesArgs.bonusItem.objLibName = "baddyBonusMC";
baddiesArgs.bonusItem.uniqueSetName = "baddyBonusMC1";
baddiesArgs.bonusItem.envMC = _root.env1MC;
baddiesArgs.bonusItem.moveDirection = "up";
baddiesArgs.bonusItem.moveSpeed = 5;
baddiesArgs.bonusItem.maxObjects = 2;
baddiesArgs.bonusItem.totalLoopFrames = _root.totalLoopFrames;
baddiesArgs.bonusItem.randTimeOffset = _root.randTimeOffset;
baddiesArgs.bonusItem.baddySize = 1;
baddiesArgs.bonusItem.dieSound2 = "sndBonus";
baddiesArgs.bonusItem.isBonusItem = true;
baddiesArgs.bonusItem.bonusItemType = "life";
baddiesArgs.bonusItem.score = 200;
}
var messageCompleteFunct = function (args) {
_root.playerMC.gotoAndPlay("init");
_root.gotoAndPlay("start");
};
var msgCompleteArgs = new Object();
_root.displayMessageMC.showMessageAndComplete(("Get ready for level " + _root.levelNum) + "!", messageCompleteFunct, msgCompleteArgs, 150, _root.levelInstruct);
baddyMoveSets = new Object();
_root.baddyTypeKillCounter = new Object();
for (var baddyArgName in _root.baddiesArgs) {
_root.baddyMoveSets[baddyArgName] = new MoveSet(_root.baddiesArgs[baddyArgName]);
var suppressUndefined = (_root.baddiesArgs[baddyArgName].supressFromCounter == undefined);
if (((!_root.baddiesArgs[baddyArgName].supressFromCounter) || (suppressUndefined)) && (!_root.baddiesArgs[baddyArgName].isBonusItem)) {
_root.baddyTypeKillCounter[_root.baddiesArgs[baddyArgName].objLibName] = 0;
}
}
this.onEnterFrame = function () {
this.speedControl("up", 38);
this.speedControl("down", 40);
this.speedControl("left", 37);
this.speedControl("right", 39);
_root.playerMC.control(_root.dirSpeeds);
e1MS = _root.env1MC.moveRatio;
e2MS = _root.env2MC.moveRatio;
e3MS = _root.env3MC.moveRatio;
if (atT) {
_root.dirSpeeds.upSpeed = 0;
}
if (atB) {
_root.dirSpeeds.downSpeed = 0;
}
if (atL) {
_root.dirSpeeds.leftSpeed = 0;
}
if (atR) {
_root.dirSpeeds.rightSpeed = 0;
}
envUpSp = _root.dirSpeeds.upSpeed * e1MS;
envDownSp = _root.dirSpeeds.downSpeed * e1MS;
envLeftSp = _root.dirSpeeds.leftSpeed * e1MS;
envRightSp = _root.dirSpeeds.rightSpeed * e1MS;
env2UpSp = _root.dirSpeeds.upSpeed * e2MS;
env2DownSp = _root.dirSpeeds.downSpeed * e2MS;
env2LeftSp = _root.dirSpeeds.leftSpeed * e2MS;
env2RightSp = _root.dirSpeeds.rightSpeed * e2MS;
env3UpSp = _root.dirSpeeds.upSpeed * e3MS;
env3DownSp = _root.dirSpeeds.downSpeed * e3MS;
env3LeftSp = _root.dirSpeeds.leftSpeed * e3MS;
env3RightSp = _root.dirSpeeds.rightSpeed * e3MS;
atL = _root.playerMC.isAtLeftEdge();
atR = _root.playerMC.isAtRightEdge();
atT = _root.playerMC.isAtTopEdge();
atB = _root.playerMC.isAtBotEdge();
_root.env1MC._y = _root.env1MC._y - envDownSp;
_root.env1MC._y = _root.env1MC._y + envUpSp;
_root.env1MC._x = _root.env1MC._x - envRightSp;
_root.env1MC._x = _root.env1MC._x + envLeftSp;
_root.env2MC._y = _root.env2MC._y - env2DownSp;
_root.env2MC._y = _root.env2MC._y + env2UpSp;
_root.env2MC._x = _root.env2MC._x - env2RightSp;
_root.env2MC._x = _root.env2MC._x + env2LeftSp;
_root.env3MC._y = _root.env3MC._y - env3DownSp;
_root.env3MC._y = _root.env3MC._y + env3UpSp;
_root.env3MC._x = _root.env3MC._x - env3RightSp;
_root.env3MC._x = _root.env3MC._x + env3LeftSp;
};
_root.i = 0;
stop();
_root.playerMC._alpha = 100;
var gameMusic = new Sound();
gameMusic.attachSound("mscInGame");
gameMusic.start(0, 1);
Frame 80
if (_root.levelNum == 1) {
var d = new Date();
var deCache = d.getTime();
var trackerUrl = ("http://ads.miniclip.com/RealMedia/ads/adstream_sx.ads/miniclip.com/CBBC_plays/142334@x01?deCache=" + deCache);
var lv = new LoadVars();
lv.load(trackerUrl);
}
_root.onEnterFrame = function () {
if ((i % 5) == 0) {
_root.scoreMultiplyer = 0;
}
this.speedControl("up", 38);
this.speedControl("down", 40);
this.speedControl("left", 37);
this.speedControl("right", 39);
_root.playerMC.control(_root.dirSpeeds);
if (!_root.playerMC.isDying) {
if (!_root.playerMC.isImmune) {
if (_root.hitRegistry.isHit(_root.playerMC.characterMC.hitArea)) {
_root.lastHitByParams = _root.hitRegistry.getLastHitByParams();
hitByMC = eval (_root.lastHitByParams.mcPath);
if (_root.isPlayerWhoDies(hitByMC)) {
_root.playerMC.die(_root.lastHitByParams.methodOfDeath);
} else {
hitByMC.die(true);
}
}
}
e1MS = _root.env1MC.moveRatio;
e2MS = _root.env2MC.moveRatio;
e3MS = _root.env3MC.moveRatio;
if (atT) {
_root.dirSpeeds.upSpeed = 0;
}
if (atB) {
_root.dirSpeeds.downSpeed = 0;
}
if (atL) {
_root.dirSpeeds.leftSpeed = 0;
}
if (atR) {
_root.dirSpeeds.rightSpeed = 0;
}
envUpSp = _root.dirSpeeds.upSpeed * e1MS;
envDownSp = _root.dirSpeeds.downSpeed * e1MS;
envLeftSp = _root.dirSpeeds.leftSpeed * e1MS;
envRightSp = _root.dirSpeeds.rightSpeed * e1MS;
env2UpSp = _root.dirSpeeds.upSpeed * e2MS;
env2DownSp = _root.dirSpeeds.downSpeed * e2MS;
env2LeftSp = _root.dirSpeeds.leftSpeed * e2MS;
env2RightSp = _root.dirSpeeds.rightSpeed * e2MS;
env3UpSp = _root.dirSpeeds.upSpeed * e3MS;
env3DownSp = _root.dirSpeeds.downSpeed * e3MS;
env3LeftSp = _root.dirSpeeds.leftSpeed * e3MS;
env3RightSp = _root.dirSpeeds.rightSpeed * e3MS;
atL = _root.playerMC.isAtLeftEdge();
atR = _root.playerMC.isAtRightEdge();
atT = _root.playerMC.isAtTopEdge();
atB = _root.playerMC.isAtBotEdge();
_root.env1MC._y = _root.env1MC._y - envDownSp;
_root.env1MC._y = _root.env1MC._y + envUpSp;
_root.env1MC._x = _root.env1MC._x - envRightSp;
_root.env1MC._x = _root.env1MC._x + envLeftSp;
_root.env2MC._y = _root.env2MC._y - env2DownSp;
_root.env2MC._y = _root.env2MC._y + env2UpSp;
_root.env2MC._x = _root.env2MC._x - env2RightSp;
_root.env2MC._x = _root.env2MC._x + env2LeftSp;
_root.env3MC._y = _root.env3MC._y - env3DownSp;
_root.env3MC._y = _root.env3MC._y + env3UpSp;
_root.env3MC._x = _root.env3MC._x - env3RightSp;
_root.env3MC._x = _root.env3MC._x + env3LeftSp;
}
e2MoveSet.launchObjectMCAtFrame(i, "cloudObj");
e3MoveSet.launchObjectMCAtFrame(i, "cloudSmallObj");
if (!_root.levelIsComplete) {
for (var baddySetName in _root.baddyMoveSets) {
var objLibName = _root.baddiesArgs[baddySetName].objLibName;
_root.baddyMoveSets[baddySetName].launchObjectMCAtFrame(i, objLibName);
}
}
if (_root.i < _root.totalLoopFrames) {
_root.i++;
} else {
var e2MoveSet = new MoveSet(_root.cloudMoveSetArgs);
var e3MoveSet = new MoveSet(_root.smallCloudMoveSetArgs);
if (!_root.levelIsComplete) {
for (var baddyArgName in _root.baddiesArgs) {
_root.baddyMoveSets[baddyArgName] = new MoveSet(_root.baddiesArgs[baddyArgName]);
}
}
_root.i = 0;
}
};
stop();
stop();
Frame 121
_root.levelCompleteMC.levelScoreTextBox.text = _root.levelScore;
_root.levelCompleteMC.totalScoreTextBox.text = _root.score;
_root.levelCompleteMC.headingTextBox.text = ("Level " + (_root.levelNum - 1)) + " complete!";
stop();
Frame 136
_root.gameOverMC.highestLevelTextBox.text = _root.levelNum;
_root.gameOverMC.totalScoreTextBox.text = _root.score;
_root.levelNum = 1;
_root.playerMC.lives = _root.playerLives;
_root.destroyAll();
stop();
Frame 152
_root.gameCompleteMC.headingTextBox.text = "Well done! Game complete!";
_root.gameCompleteMC.totalScoreTextBox.text = _root.score;
_root.levelNum = 1;
_root.playerMC.lives = _root.playerLives;
_root.destroyAll();
function gameCompleteAnim(easeType) {
var _local4 = _root.playerMC._x;
var _local6 = 266;
var _local7 = _root.playerMC._y;
var _local5 = 44;
var _local3 = 50;
var _local2 = _root.playerMC;
endGameTweenX = new mx.transitions.Tween(_local2, "_x", easeType, _local4, _local6, _local3);
endGameTweenY = new mx.transitions.Tween(_local2, "_y", easeType, _local7, _local5, _local3);
endGameTweenX.onMotionFinished = function () {
gotoAndPlay ("gameCompleteAnim");
};
}
_root.playerMC.shrinkTo1("");
gameCompleteAnim(mx.transitions.easing.Regular.easeInOut);
Frame 190
_root.playerMC._alpha = 0;
_root.playerMC.isImmune = true;
_root.destroyAll();
Frame 210
stop();
Symbol 26 MovieClip [baddyBonusMC] Frame 1
#initclip 39
Object.registerClass("baddyBonusMC", BaddyMoveObjectMC);
#endinitclip
this.hitArea = this.baddy.hitArea;
stop();
Symbol 26 MovieClip [baddyBonusMC] Frame 20
this.dieComplete();
Symbol 42 MovieClip [scoreMC] Frame 30
this.removeMovieClip();
Symbol 47 MovieClip Frame 1
this.gotoAndStop(_parent.utils.getRand(1, 4));
Symbol 48 MovieClip [cloudSmallObjMC] Frame 1
#initclip 22
Object.registerClass("cloudSmallObjMC", MoveObjectMC);
#endinitclip
Symbol 49 MovieClip [cloudObjMC] Frame 1
#initclip 23
Object.registerClass("cloudObjMC", MoveObjectMC);
#endinitclip
Symbol 59 MovieClip [baddyYelBirdMC] Frame 1
#initclip 24
Object.registerClass("baddyYelBirdMC", BaddyMoveObjectMC);
#endinitclip
this.hitArea = this.baddy.baddy.hitArea;
stop();
Symbol 59 MovieClip [baddyYelBirdMC] Frame 20
this.dieComplete();
Symbol 68 MovieClip Frame 1
gotoAndPlay(Math.ceil(Math.random() * 195));
Symbol 73 MovieClip Frame 2
gotoAndPlay(100 + Math.ceil(Math.random() * 50));
Symbol 74 MovieClip Frame 1
yellowcreature.stop();
gotoAndPlay(Math.ceil(Math.random() * 90));
Symbol 74 MovieClip Frame 117
gotoAndPlay(Math.ceil(Math.random() * 90) + 117);
Symbol 76 MovieClip Frame 1
yellowcreature.stop();
Symbol 80 MovieClip Frame 1
gotoAndPlay(Math.ceil(Math.random() * 95));
Symbol 81 MovieClip Frame 1
if (_root.levelNum == 1) {
r = _parent.utils.getRand(1, 5);
this.gotoAndStop("island" + r);
} else if (_root.levelNum == 2) {
r = _parent.utils.getRand(1, 3);
this.gotoAndStop("island" + r);
} else if (_root.levelNum == 3) {
r = _parent.utils.getRand(1, 4);
this.gotoAndStop("island" + r);
} else if (_root.levelNum == 5) {
r = _parent.utils.getRand(1, 5);
this.gotoAndStop("island" + r);
} else {
this.gotoAndStop("island1");
}
Symbol 81 MovieClip Frame 10
stop();
Symbol 81 MovieClip Frame 20
this.l2_creature._x = 20 + Math.ceil(Math.random() * 68);
stop();
Symbol 81 MovieClip Frame 30
this.l3_creature._x = 20 + Math.ceil(Math.random() * 110);
stop();
Symbol 81 MovieClip Frame 40
this.l4_creature._x = 20 + Math.ceil(Math.random() * 110);
stop();
Symbol 81 MovieClip Frame 50
this.l5_creature._x = 20 + Math.ceil(Math.random() * 110);
stop();
Symbol 82 MovieClip [baddyIslandMC] Frame 1
#initclip 25
Object.registerClass("baddyIslandMC", BaddyMoveObjectMC);
#endinitclip
this.hitArea = this.baddy.hitArea;
stop();
Symbol 82 MovieClip [baddyIslandMC] Frame 30
this.dieComplete();
Symbol 89 MovieClip Frame 2
colorArr = new Array();
colorArr.push(14483456);
colorArr.push(16750848);
colorArr.push(39168);
colorArr.push(26367);
colorArr.push(6697932);
mainColorHex = colorArr[Math.floor(Math.random() * colorArr.length)];
mainColor = new Color(this.balloonMC);
shadowColor = new Color(this.balloonShadowMC);
mainColor.setRGB(mainColorHex);
shadowColor.setRGB(shadowColor / 2);
stop();
Symbol 90 MovieClip Frame 17
gotoAndPlay (1);
Symbol 92 MovieClip [baddyBalloonMC] Frame 1
#initclip 26
Object.registerClass("baddyBalloonMC", BaddyMoveObjectMC);
#endinitclip
this.hitArea = this.baddy.baddy.hitArea;
stop();
Symbol 92 MovieClip [baddyBalloonMC] Frame 20
this.dieComplete();
Symbol 105 MovieClip [baddyOctoMC] Frame 1
#initclip 27
Object.registerClass("baddyOctoMC", BaddyMoveObjectMC);
#endinitclip
this.hitArea = this.baddy.baddy.hitArea;
stop();
Symbol 105 MovieClip [baddyOctoMC] Frame 21
this.dieComplete();
Symbol 130 MovieClip [baddySteamMC] Frame 1
#initclip 28
Object.registerClass("baddySteamMC", BaddyMoveObjectMC);
#endinitclip
this.hitArea = this.baddy.baddy.hitArea;
stop();
Symbol 130 MovieClip [baddySteamMC] Frame 20
this.dieComplete();
Symbol 139 MovieClip Frame 1
gotoAndPlay(Math.ceil(Math.random() * 50));
Symbol 145 MovieClip Frame 1
gotoAndPlay(Math.ceil(Math.random() * 50));
Symbol 149 MovieClip [baddyStalkMC] Frame 1
#initclip 29
Object.registerClass("baddyStalkMC", BaddyMoveObjectMC);
#endinitclip
this.hitArea = this.baddy.baddy.baddy.hitArea;
stop();
Symbol 149 MovieClip [baddyStalkMC] Frame 20
this.dieComplete();
Symbol 161 MovieClip [displayLevelEndPanelMC] Frame 1
#initclip 30
Object.registerClass("displayLevelEndPanelMC", LevelEndDisplayPanelMC);
#endinitclip
this.buildDisplay(_root.baddyTypeKillCounter);
stop();
Symbol 166 MovieClip Frame 10
stop();
Symbol 166 MovieClip Frame 19
stop();
Symbol 166 MovieClip Frame 29
stop();
Symbol 166 MovieClip Frame 40
stop();
Symbol 168 MovieClip [CBBCLettersMC] Frame 1
#initclip 31
Object.registerClass("CBBCLettersMC", CBBCModifyerMC);
#endinitclip
Symbol 175 MovieClip [sizeBarMC] Frame 1
#initclip 32
Object.registerClass("sizeBarMC", display.SizeBarMC);
#endinitclip
Symbol 179 MovieClip [mc_score] Frame 1
#initclip 33
Object.registerClass("mc_score", ScoreDisplayMC);
#endinitclip
Symbol 185 MovieClip [displayMessageMC] Frame 1
#initclip 34
Object.registerClass("displayMessageMC", DisplayMessageMC);
#endinitclip
stop();
Symbol 185 MovieClip [displayMessageMC] Frame 29
if (this.frameCounter < this.showForFrames) {
this.frameCounter = this.frameCounter + 5;
this.gotoAndPlay("wait");
}
Symbol 185 MovieClip [displayMessageMC] Frame 35
this.hideDisplay();
Symbol 219 MovieClip Frame 20
gotoAndPlay ("flying");
Symbol 219 MovieClip Frame 35
stop();
Symbol 220 MovieClip [playerMC] Frame 1
#initclip 35
Object.registerClass("playerMC", PlayerObjectMC);
#endinitclip
Symbol 220 MovieClip [playerMC] Frame 3
if (!this.suppessImmuneFlash) {
this.characterMC._alpha = 0;
}
Symbol 220 MovieClip [playerMC] Frame 5
this.characterMC._alpha = 100;
Symbol 220 MovieClip [playerMC] Frame 6
if (this.immuneCounter < this.immuneFrames) {
this.immuneCounter = this.immuneCounter + 6;
this.gotoAndPlay(1);
} else {
this.isImmune = false;
this.gotoAndPlay("flying");
}
Symbol 220 MovieClip [playerMC] Frame 19
stop();
Symbol 221 MovieClip [env1MC] Frame 1
#initclip 36
Object.registerClass("env1MC", EnvironmentMC);
#endinitclip
Symbol 222 MovieClip [env2MC] Frame 1
#initclip 37
Object.registerClass("env2MC", EnvironmentMC);
#endinitclip
Symbol 223 MovieClip [env3MC] Frame 1
#initclip 38
Object.registerClass("env3MC", EnvironmentMC);
#endinitclip
Symbol 339 MovieClip [__Packages.BaseMC] Frame 0
class BaseMC extends MovieClip
{
var utils, removeMovieClip;
function BaseMC () {
super();
utils = new Utils();
}
function destroy(hitRegistry) {
hitRegistry.removeFromRegistry(targetPath(this) + ".hitArea");
removeMovieClip();
}
function toString() {
var _local2 = "";
for (var _local3 in this) {
_local2 = _local2 + (((newline + _local3) + ": ") + this[_local3]);
}
return(_local2);
}
}
Symbol 340 MovieClip [__Packages.Utils] Frame 0
class Utils
{
function Utils () {
}
function getRand(low, high) {
return(Math.round(Math.random() * (high - low)) + low);
}
function getObjectAsString(object) {
var _local2 = "";
for (var _local3 in object) {
_local2 = _local2 + (((newline + _local3) + " : ") + object[_local3]);
}
return(_local2);
}
}
Symbol 341 MovieClip [__Packages.HitRegistry] Frame 0
class HitRegistry
{
var registry, lastHitByParams;
function HitRegistry () {
registry = new Object();
lastHitByParams = new Object();
}
function addObject(pathToMC, params) {
registry[pathToMC] = params;
}
function isHitTester(mc) {
var isHit = false;
for (var pathToMC in registry) {
var collisionRect = com.gskinner.sprites.CollisionDetection.checkForCollision(mc, eval (pathToMC), 100);
_root.debOutClear();
_root.debOut(collisionRect, "collisionRect");
}
}
function isHit(mc) {
for (var pathToMC in registry) {
var collisionRect = com.gskinner.sprites.CollisionDetection.checkForCollision(mc, eval (pathToMC), 100);
if (collisionRect != null) {
lastHitByParams = registry[pathToMC];
return(true);
}
}
return(false);
}
function getLastHitByParams() {
return(lastHitByParams);
}
function removeFromRegistry(pathToMC) {
if (registry[pathToMC] != undefined) {
delete registry[pathToMC];
}
}
function getTotal() {
var _local2 = 0;
for (var _local3 in registry) {
_local2++;
}
return(_local2);
}
}
Symbol 342 MovieClip [__Packages.com.gskinner.sprites.CollisionDetection] Frame 0
class com.gskinner.sprites.CollisionDetection
{
function CollisionDetection () {
}
static function checkForCollision(p_clip1, p_clip2, p_alphaTolerance) {
if (p_alphaTolerance == undefined) {
p_alphaTolerance = 255;
}
var _local4 = p_clip1.getBounds(_root);
var _local3 = p_clip2.getBounds(_root);
if (((_local4.xMax < _local3.xMin) || (_local3.xMax < _local4.xMin)) || ((_local4.yMax < _local3.yMin) || (_local3.yMax < _local4.yMin))) {
return(null);
}
var _local2 = {};
_local2.xMin = Math.max(_local4.xMin, _local3.xMin);
_local2.xMax = Math.min(_local4.xMax, _local3.xMax);
_local2.yMin = Math.max(_local4.yMin, _local3.yMin);
_local2.yMax = Math.min(_local4.yMax, _local3.yMax);
var _local7 = new flash.display.BitmapData(_local2.xMax - _local2.xMin, _local2.yMax - _local2.yMin, false);
var _local5 = p_clip1.transform.concatenatedMatrix;
_local5.tx = _local5.tx - _local2.xMin;
_local5.ty = _local5.ty - _local2.yMin;
_local7.draw(p_clip1, _local5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, -255, -255, p_alphaTolerance));
_local5 = p_clip2.transform.concatenatedMatrix;
_local5.tx = _local5.tx - _local2.xMin;
_local5.ty = _local5.ty - _local2.yMin;
_local7.draw(p_clip2, _local5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, p_alphaTolerance), "difference");
var _local6 = _local7.getColorBoundsRect(4294967295, 4278255615);
if (_local6.width == 0) {
return(null);
}
_local6.x = _local6.x + _local2.xMin;
_local6.y = _local6.y + _local2.yMin;
return(_local6);
}
}
Symbol 343 MovieClip [__Packages.ObjectMC] Frame 0
class ObjectMC extends BaseMC
{
function ObjectMC () {
super();
}
}
Symbol 344 MovieClip [__Packages.MoveObjectMC] Frame 0
class MoveObjectMC extends ObjectMC
{
var utils, moveDirection, onEnterFrame, _y, moveSpeed, _x, _height, _parent, _width;
function MoveObjectMC () {
super();
utils = new Utils();
moveDirection = "up";
onEnterFrame = function () {
this.move();
if (this.movedOffPlayArea()) {
this.destroy(_root.hitRegistry);
}
};
}
function move() {
switch (moveDirection) {
case "up" :
_y = _y - moveSpeed;
break;
case "down" :
_y = _y + moveSpeed;
break;
case "left" :
_x = _x - moveSpeed;
break;
case "right" :
_x = _x + moveSpeed;
}
}
function setMoveSpeed(moveSpeed) {
this.moveSpeed = moveSpeed;
}
function setMoveDirection(moveDirection) {
this.moveDirection = moveDirection;
}
function movedOffPlayArea() {
switch (moveDirection) {
case "up" :
if ((_y + _height) < 0) {
return(true);
}
break;
case "down" :
if ((_y + _height) > _parent.staticHeight) {
return(true);
}
break;
case "left" :
if ((_x + _width) < 0) {
return(true);
}
break;
case "right" :
if ((_x + _width) <= _parent.staticWidth) {
break;
}
return(true);
}
return(false);
}
}
Symbol 345 MovieClip [__Packages.BaddyMoveObjectMC] Frame 0
class BaddyMoveObjectMC extends MoveObjectMC
{
var baddySize, methodOfDeath, score, isDying, sounds, isBonusItem, bonusItemType, substituteBonus, libName, utils, _parent, _y, _x, gotoAndPlay, removeMovieClip, moveDirection, moveSpeed;
function BaddyMoveObjectMC () {
super();
baddySize = 1;
methodOfDeath = "falling";
score = 25 * (baddySize * 3);
isDying = false;
sounds = new Object();
sounds.die = "sndPop";
isBonusItem = false;
bonusItemType = "score";
substituteBonus = 200;
if (_root.hitRegistry != undefined) {
var _local4 = new Object();
_local4.mcPath = targetPath(this);
_local4.hitAreaMCPath = targetPath(this) + ".hitArea";
_local4.methodOfDeath = methodOfDeath;
_root.hitRegistry.addObject(_local4.hitAreaMCPath, _local4);
}
}
function setIsBonusItem(isBonusItem) {
this.isBonusItem = isBonusItem;
}
function setBaddySize(baddySize) {
score = 25 * (baddySize * 3);
this.baddySize = baddySize;
}
function setLibName(libName) {
this.libName = libName;
}
function setDieSound(libName) {
sounds.die = libName;
}
function setDieSound2(libName) {
sounds.die2 = libName;
}
function setBonusItemType(bonusItemType) {
this.bonusItemType = bonusItemType;
}
function setScore(score) {
this.score = score;
}
function die(doScoreUpdate) {
if (!isDying) {
isDying = true;
if (doScoreUpdate) {
var _local3 = new Sound();
if (sounds.die2 == undefined) {
_local3.attachSound(sounds.die);
} else {
var _local6 = utils.getRand(1, 2);
if (_local6 == 1) {
_local3.attachSound(sounds.die);
} else {
_local3.attachSound(sounds.die2);
}
}
_local3.start();
if (!isBonusItem) {
_root.score = _root.score + score;
_root.baddyTypeKillCounter[libName] = _root.baddyTypeKillCounter[libName] + 1;
var _local4 = "scoreMC_" + Math.random();
_parent.attachMovie("scoreMC", _local4, _parent.getNextHighestDepth(), {_x:_x, _y:_y});
var _local5 = ((_root.scoreMultiplyer == 0) ? 1 : (_root.scoreMultiplyer));
_parent[_local4].textBoxMC.textBox.text = score * _local5;
} else {
switch (bonusItemType) {
case "life" :
if ((_root.playerMC.lives + 1) <= _root.playerLives) {
_root.playerMC.lives++;
_root.livesMC.textBox.text = _root.playerMC.lives;
_root.displayMessageMC.showMessage("Extra life!");
} else {
_root.score = _root.score + substituteBonus;
var _local5 = ((_root.scoreMultiplyer == 0) ? 1 : (_root.scoreMultiplyer));
var _local7 = substituteBonus * _local5;
_root.displayMessageMC.showMessage(("Bonus! " + _local7) + " extra points!!");
}
break;
default :
_root.score = _root.score + score;
var _local5 = ((_root.scoreMultiplyer == 0) ? 1 : (_root.scoreMultiplyer));
var _local7 = score * _local5;
_root.displayMessageMC.showMessage(("Bonus! " + _local7) + " extra points!!");
}
}
}
gotoAndPlay("die");
}
}
function dieComplete() {
removeMovieClip();
}
function move() {
switch (moveDirection) {
case "up" :
_y = _y - moveSpeed;
break;
case "down" :
_y = _y + moveSpeed;
break;
case "left" :
_x = _x - moveSpeed;
break;
case "right" :
_x = _x + moveSpeed;
}
}
}
Symbol 346 MovieClip [__Packages.DisplayPanelMC] Frame 0
class DisplayPanelMC extends BaseMC
{
function DisplayPanelMC () {
super();
}
}
Symbol 347 MovieClip [__Packages.LevelEndDisplayPanelMC] Frame 0
class LevelEndDisplayPanelMC extends DisplayPanelMC
{
var displayBaddyCountMC, layoutWidth, marginTop, marginRight, bcdWidth, bcdHeight, startX, startY, lilPicX, lilPicY, outputContainerMC, _width;
function LevelEndDisplayPanelMC () {
super();
displayBaddyCountMC = "displayBaddyCountMC";
layoutWidth = 470;
marginTop = 5;
marginRight = 5;
bcdWidth = 100;
bcdHeight = 50;
startX = 0;
startY = 0;
lilPicX = 10;
lilPicY = 10;
}
function buildDisplay(baddyKillCountObj) {
outputContainerMC._x = 0;
outputContainerMC._y = 0;
var _local3 = startX;
var _local6 = startY;
var _local11 = 1;
var _local9 = new Object();
for (var _local10 in baddyKillCountObj) {
_local9[_local10] = baddyKillCountObj[_local10];
}
baddyKillCountObj = _local9;
for (var _local10 in baddyKillCountObj) {
var _local5 = _local10 + "_LilPic";
outputContainerMC.attachMovie(displayBaddyCountMC, displayBaddyCountMC + _local10, outputContainerMC.getNextHighestDepth(), {_x:_local3, _y:_local6});
var _local2 = outputContainerMC[displayBaddyCountMC + _local10];
_local2.textBox.text = baddyKillCountObj[_local10];
_local2.attachMovie(_local5, _local10 + "lilPic", _local2.getNextHighestDepth(), {_x:0, _y:0});
_local3 = _local3 + (bcdWidth + marginRight);
if (_local3 > layoutWidth) {
_local3 = startX;
_local6 = _local6 + (bcdHeight + marginTop);
}
}
outputContainerMC._x = (_width - outputContainerMC._width) / 2;
outputContainerMC._y = 75;
}
}
Symbol 348 MovieClip [__Packages.CBBCModifyerMC] Frame 0
class CBBCModifyerMC extends ObjectMC
{
var scoreMultiplyers, lastTimeScored, frenzyState, killsInCycle, currentKillCycle, totalLetters, currentLetter, totalLetterCycles, currentLetterCycle, timeRequirement, timeToFade, lastLetterNum, hitMax, prevScore;
function CBBCModifyerMC () {
super();
init();
}
function init() {
scoreMultiplyers = new Array(0, 2, 4, 8);
var _local4 = new Date();
lastTimeScored = _local4.getTime();
frenzyState = 1;
killsInCycle = 3;
currentKillCycle = 1;
totalLetters = 4;
currentLetter = 0;
totalLetterCycles = 3;
currentLetterCycle = 0;
timeRequirement = 8000;
timeToFade = 4000;
lastLetterNum = 0;
hitMax = false;
var _local3 = 0;
while (_local3 < totalLetters) {
_root.lettersMC[("letter" + (_local3 + 1)) + "MC"].gotoAndPlay("normal");
_local3++;
}
prevScore = 0;
_root.muliplyTextBox.text = "";
}
function highlightNextLetter() {
currentLetter++;
if (currentLetter > totalLetters) {
currentLetter = 0;
currentLetterCycle++;
if (currentLetterCycle >= totalLetterCycles) {
currentLetterCycle = totalLetterCycles;
}
}
_root.lettersMC[("letter" + currentLetter) + "MC"].gotoAndPlay("state" + (currentLetterCycle + 1));
}
function unhighlightLetter() {
if (currentLetter != totalLetters) {
var _local3 = totalLetters + 1;
while (_local3 > 0) {
_root.lettersMC[("letter" + _local3) + "MC"].gotoAndPlay("normal");
if (_local3 == currentLetter) {
break;
}
_local3--;
}
} else {
_root.lettersMC[("letter" + currentLetter) + "MC"].gotoAndPlay("normal");
}
currentLetter--;
if (currentLetter < 1) {
init();
}
}
function multiplyCheck(score) {
var _local6 = new Date();
var _local4 = _local6.getTime();
var _local5 = false;
if (prevScore != score) {
if ((lastTimeScored + (_local4 - lastTimeScored)) < (lastTimeScored + timeRequirement)) {
currentKillCycle++;
if (currentKillCycle > killsInCycle) {
currentKillCycle = 0;
highlightNextLetter();
}
}
lastTimeScored = _local4;
} else if (_local4 > (lastTimeScored + timeToFade)) {
unhighlightLetter();
_local5 = true;
hitMax = false;
}
var _local3 = 0;
if (currentLetter == totalLetters) {
hitMax = true;
_local3 = 1;
var _local8 = ("Bonus x " + scoreMultiplyers[currentLetterCycle + _local3]) + "!!!";
if (_root.displayMessageMC.message != _local8) {
_root.displayMessageMC.showMessage(("Bonus x " + scoreMultiplyers[currentLetterCycle + _local3]) + "!!!");
}
_root.muliplyTextBox.text = "x " + scoreMultiplyers[currentLetterCycle + _local3];
}
lastLetterNum = currentLetter;
prevScore = score;
var _local7 = (_local5 ? 0 : (scoreMultiplyers[currentLetterCycle + _local3]));
return(_local7);
}
}
Symbol 349 MovieClip [__Packages.display.SizeBarMC] Frame 0
class display.SizeBarMC extends BaseMC
{
var levelCompleteTotal, size2Threshhold, size3Threshhold, staticHeight, sizeMarker1, sizeMarker2, score, sizeBarFiller;
function SizeBarMC () {
super();
}
function setUp(size2Threshhold, size3Threshhold, levelCompleteTotal, score) {
this.levelCompleteTotal = levelCompleteTotal;
this.size2Threshhold = size2Threshhold;
this.size3Threshhold = size3Threshhold;
staticHeight = 243;
setScore(score);
updateMarkerY(sizeMarker1, this.size2Threshhold);
updateMarkerY(sizeMarker2, this.size3Threshhold);
}
function setScore(score) {
this.score = score;
updateFiller();
}
function updateFiller() {
var _local2 = getBarAttribs(score);
sizeBarFiller._height = _local2.height;
sizeBarFiller._y = _local2.y;
}
function updateMarkerY(markerMC, score) {
var _local2 = getBarAttribs(score);
markerMC._y = _local2.y + (markerMC._height / 2);
}
function hideElements() {
sizeBarFiller._alpha = 0;
sizeMarker1._alpha = 0;
sizeMarker2._alpha = 0;
}
function showElements() {
sizeBarFiller._alpha = 100;
sizeMarker1._alpha = 100;
sizeMarker2._alpha = 100;
}
function getBarAttribs(score) {
var _local2 = Object();
_local2.y = 0;
_local2.height = 0;
var _local3 = score / levelCompleteTotal;
_local2.height = staticHeight * _local3;
_local2.y = staticHeight - _local2.height;
return(_local2);
}
}
Symbol 350 MovieClip [__Packages.ScoreDisplayMC] Frame 0
class ScoreDisplayMC extends BaseMC
{
var score, textBox;
function ScoreDisplayMC () {
super();
}
function setScore(score) {
this.score = score;
var _local5 = 6;
var _local8 = "" + score;
var _local6 = _local8.length;
var _local4 = _local5 - _local6;
var _local3 = "";
var _local2 = 0;
while (_local2 < _local4) {
_local3 = _local3 + "0";
_local2++;
}
textBox.text = _local3 + score;
}
}
Symbol 351 MovieClip [__Packages.DisplayMessageMC] Frame 0
class DisplayMessageMC extends ObjectMC
{
var message, showForFrames, frameCounter, isShowingMessage, messageYPos, displayMessage, gotoAndPlay, watch, _x, _y, _width;
function DisplayMessageMC () {
super();
message = "";
showForFrames = 30;
frameCounter = 0;
isShowingMessage = true;
hideDisplay();
messageYPos = 50;
}
function showMessage(message) {
frameCounter = 0;
isShowingMessage = true;
setMessage(message);
displayMessage.textBox.text = this.message;
displayMessage.smallTextBox.text = "";
_centerDisplay();
gotoAndPlay("show");
}
function showMessageAndComplete(message, messageCompleteFunct, args, showForFrames, smallMessage) {
frameCounter = 0;
var _local2 = new Object();
_local2.messageCompleteFunct = messageCompleteFunct;
_local2.args = args;
_local2.displayMessageMC = this;
_local2.oldShowForFrames = 30;
this.showForFrames = 150;
isShowingMessage = true;
setMessage(message);
displayMessage.textBox.text = this.message;
if (smallMessage != undefined) {
displayMessage.smallTextBox.text = smallMessage;
} else {
displayMessage.smallTextBox.text = "";
}
_centerDisplay();
gotoAndPlay("show");
if ((messageCompleteFunct != null) && (messageCompleteFunct != undefined)) {
var _local3 = function (propName, oldVal, newVal, userData) {
if (newVal == false) {
userData.messageCompleteFunct(userData.args);
userData.displayMessageMC.unwatch("isShowingMessage");
userData.displayMessageMC.showForFrames = userData.oldShowForFrames;
}
return(newVal);
};
watch("isShowingMessage", _local3, _local2);
}
}
function setMessage(message) {
this.message = message;
}
function hideDisplay() {
isShowingMessage = false;
_x = 5000;
_y = 5000;
}
function _centerDisplay() {
_x = ((_root.staticStageWidth + _root.displayPanelStaticWidth) - _width) / 2;
_y = messageYPos;
}
}
Symbol 352 MovieClip [__Packages.PlayerObjectMC] Frame 0
class PlayerObjectMC extends ObjectMC
{
var size, lives, suppressImmuneFlash, downSpeed, upSpeed, leftSpeed, rightSpeed, speedRatio, isDying, fallSpeed, state, speedDampen, isImmune, immuneFrames, immuneCounter, stayDead, sounds, initialWidth, _width, initialHeight, _height, _y, _x, gotoAndPlay;
function PlayerObjectMC () {
super();
size = 1;
lives = _root.playerLives;
suppressImmuneFlash = false;
init();
}
function init() {
downSpeed = 0;
upSpeed = 0;
leftSpeed = 0;
rightSpeed = 0;
speedRatio = 1;
isDying = false;
fallSpeed = 9;
state = "flying";
speedDampen = 0.15;
isImmune = true;
immuneFrames = 50;
immuneCounter = 0;
stayDead = false;
_root.playerMC.characterMC.gotoAndPlay("flying");
sounds = new Object();
sounds.die = "sndScream";
sounds.falling = "sndFall";
sounds.growing = "sndGrow";
}
function onLoad() {
initialWidth = _width;
initialHeight = _height;
}
function setSpeedRatio(speedRatio) {
this.speedRatio = speedRatio;
}
function control(dirSpeeds) {
if (state == "flying") {
upSpeed = dirSpeeds.upSpeed * speedRatio;
downSpeed = dirSpeeds.downSpeed * speedRatio;
leftSpeed = dirSpeeds.leftSpeed * speedRatio;
rightSpeed = dirSpeeds.rightSpeed * speedRatio;
} else if (state == "falling") {
leftSpeed = leftSpeed - speedDampen;
rightSpeed = rightSpeed - speedDampen;
upSpeed = upSpeed - speedDampen;
leftSpeed = Math.abs(leftSpeed);
rightSpeed = Math.abs(rightSpeed);
if ((_y + _height) > 700) {
if (!stayDead) {
_root.playerMC.characterMC.gotoAndPlay("flying");
init();
_root.centerAll();
}
}
}
move();
}
function grow() {
size++;
var _local4 = 1.3;
var _local6 = mx.transitions.easing.Bounce.easeIn;
var _local3 = 20;
var _local7 = new mx.transitions.Tween(this, "_width", _local6, _width, _width * _local4, _local3);
var _local8 = new mx.transitions.Tween(this, "_height", _local6, _height, _height * _local4, _local3);
_root.displayMessageMC.showMessage("Growing!!!");
var _local5 = new Sound();
_local5.attachSound(sounds.growing);
_local5.start();
}
function shrink() {
size--;
var _local4 = 0.7;
var _local5 = mx.transitions.easing.Bounce.easeIn;
var _local3 = 20;
var _local6 = new mx.transitions.Tween(this, "_width", _local5, _width, _width * _local4, _local3);
var _local7 = new mx.transitions.Tween(this, "_height", _local5, _height, _height * _local4, _local3);
_root.displayMessageMC.showMessage("Shrinking!");
}
function shrinkTo1(displayMessageStr) {
size = 1;
var _local4 = mx.transitions.easing.Bounce.easeIn;
var _local3 = 20;
var _local5 = new mx.transitions.Tween(this, "_width", _local4, _width, initialWidth, _local3);
var _local7 = new mx.transitions.Tween(this, "_height", _local4, _height, initialHeight, _local3);
if (displayMessageStr != "") {
_root.displayMessageMC.showMessage(displayMessageStr);
}
}
function move() {
_y = _y - upSpeed;
_y = _y + downSpeed;
_x = _x - leftSpeed;
_x = _x + rightSpeed;
}
function die(params) {
if (lives > 0) {
lives--;
_root.livesMC.textBox.text = lives;
} else {
_root.gotoAndPlay("gameOver");
stayDead = true;
}
isDying = true;
switch (params.methodOfDeath) {
case "falling" :
state = "falling";
dbFalling();
break;
default :
state = "falling";
dbFalling();
}
}
function dbFalling() {
downSpeed = fallSpeed;
_root.playerMC.characterMC.gotoAndPlay("falling");
var _local3 = new Sound();
_local3.attachSound(sounds.falling);
_local3.start();
}
function isOffStage() {
}
function center() {
_x = Math.abs(_root.staticStageWidth / 2) - (_width / 2);
_y = Math.abs(_root.staticStageHeight / 2) - (_height / 2);
gotoAndPlay(1);
}
function isAtLeftEdge() {
if (_x <= (0 + _root.edgeBuffer)) {
return(true);
}
return(false);
}
function isAtRightEdge() {
if ((_x + _width) >= (_root.staticStageWidth - _root.edgeBuffer)) {
return(true);
}
return(false);
}
function isAtTopEdge() {
if (_y <= (0 + _root.edgeBuffer)) {
return(true);
}
return(false);
}
function isAtBotEdge() {
if ((_y + _height) >= (_root.staticStageHeight - _root.edgeBuffer)) {
return(true);
}
return(false);
}
}
Symbol 353 MovieClip [__Packages.mx.transitions.easing.Bounce] Frame 0
class mx.transitions.easing.Bounce
{
function Bounce () {
}
static function easeOut(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeIn(t, b, c, d) {
return((c - easeOut(d - t, 0, c, d)) + b);
}
static function easeInOut(t, b, c, d) {
if (t < (d / 2)) {
return((easeIn(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOut((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static var version = "1.1.0.52";
}
Symbol 354 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 355 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 356 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 357 MovieClip [__Packages.EnvironmentMC] Frame 0
class EnvironmentMC extends BaseMC
{
var staticWidth, staticHeight, _x, _y;
function EnvironmentMC () {
super();
staticWidth = 1200;
staticHeight = 800;
}
function cleanUp() {
}
function setStaticWidths(width, height) {
staticWidth = width;
staticHeight = height;
}
function center() {
var _local4 = Math.abs(_root.staticStageWidth / 2);
var _local3 = Math.abs(_root.staticStageHeight / 2);
_x = _local4 - Math.abs(staticWidth / 2);
_y = _local3 - Math.abs(staticHeight / 2);
}
function getTotalMCs() {
var _local2 = 0;
for (var _local3 in this) {
if (typeof(this[_local3]) == "movieclip") {
_local2++;
}
}
return(_local2);
}
}
Symbol 358 MovieClip [__Packages.MoveSet] Frame 0
class MoveSet
{
var objLibName, envMC, moveDirection, moveSpeed, randTimeOffset, maxObjects, totalLoopFrames, baddySize, uniqueSetName, flipIt, baddyDieSound, baddyDieSound2, isBonusItem, bonusItemType, score, envWidth, envHeight, objWidth, objHeight, launchedMCsIterator, utils, frameReleaseRefArr, mcPaths, objectParamsArr;
function MoveSet (args) {
init(args);
}
function init(args) {
objLibName = args.objLibName;
envMC = args.envMC;
moveDirection = args.moveDirection;
moveSpeed = args.moveSpeed;
randTimeOffset = args.randTimeOffset;
maxObjects = args.maxObjects;
totalLoopFrames = args.totalLoopFrames;
baddySize = ((args.baddySize != undefined) ? (args.baddySize) : 1);
uniqueSetName = ((args.uniqueSetName != undefined) ? (args.uniqueSetName) : (args.objLibName));
flipIt = ((args.flipIt != undefined) ? (args.flipIt) : false);
baddyDieSound = args.dieSound;
baddyDieSound2 = args.dieSound2;
isBonusItem = ((args.isBonusItem != undefined) ? (args.isBonusItem) : false);
bonusItemType = ((args.bonusItemType != undefined) ? (args.bonusItemType) : "score");
score = ((args.score != undefined) ? (args.score) : undefined);
envWidth = envMC.staticWidth;
envHeight = envMC.staticHeight;
envMC.attachMovie(objLibName, uniqueSetName, envMC.getNextHighestDepth(), {_x:5000, _y:5000});
var _local3 = envMC[uniqueSetName];
objWidth = _local3._width;
objHeight = _local3._height;
_local3.removeMovieClip();
launchedMCsIterator = 0;
utils = new Utils();
frameReleaseRefArr = new Array();
mcPaths = new Array();
objectParamsArr = new Array(totalLoopFrames);
makeNewObjectParamsArr();
}
function launchObjectMCAtFrame(frameNum, newMCName) {
if (hasObjectToLaunchAtFrame(frameNum)) {
var _local3 = getObjectParamsByReleaseFrame(frameNum);
envMC.attachMovie(objLibName, uniqueSetName + launchedMCsIterator, envMC.getNextHighestDepth(), {_x:_local3.startX, _y:_local3.startY});
var _local2 = envMC[uniqueSetName + launchedMCsIterator];
mcPaths.push(targetPath(_local2));
_local2.setMoveDirection(moveDirection);
_local2.setMoveSpeed(moveSpeed);
_local2.setBaddySize(baddySize);
if (baddyDieSound != undefined) {
_local2.setDieSound(baddyDieSound);
}
if (baddyDieSound2 != undefined) {
_local2.setDieSound2(baddyDieSound2);
}
if (isBonusItem != undefined) {
_local2.setIsBonusItem(isBonusItem);
}
if (score != undefined) {
_local2.setScore(score);
}
if (bonusItemType != undefined) {
_local2.setBonusItemType(bonusItemType);
}
_local2.setLibName(objLibName);
if (flipIt) {
_local2._xscale = _local2._xscale * -1;
}
_local2.destroyBelowY = 0;
launchedMCsIterator++;
}
}
function destroyAll() {
var currMC = null;
var i = 0;
while (i < mcPaths.length) {
currMC = eval (mcPaths[i]);
if (currMC != undefined) {
if (typeof(currMC.die) == "function") {
currMC.die(false);
} else {
currMC.removeMovieClip();
}
}
i++;
}
}
function makeNewObjectParamsArr() {
objectParamsArr = new Array();
var _local2 = 0;
while (_local2 < maxObjects) {
objectParamsArr[_local2] = new Object();
objectParamsArr[_local2].num = _local2;
var _local5 = (totalLoopFrames / maxObjects) * _local2;
var _local4 = Math.abs(utils.getRand(_local5 - (randTimeOffset / 2), _local5 + (randTimeOffset / 2)));
objectParamsArr[_local2].relTime = _local4;
var _local3 = getRandomStartLoc();
objectParamsArr[_local2].startX = _local3[0];
objectParamsArr[_local2].startY = _local3[1];
frameReleaseRefArr[_local4] = _local2;
_local2++;
}
objectParamsArr = objectParamsArr;
}
function getRandomStartLoc() {
var _local3 = new Array();
switch (moveDirection) {
case "up" :
_local3[0] = utils.getRand(0, envWidth);
_local3[1] = envHeight + objHeight;
break;
case "down" :
_local3[0] = utils.getRand(0, envWidth);
_local3[1] = -objHeight;
break;
case "left" :
_local3[0] = envWidth + objWidth;
_local3[1] = utils.getRand(0, envHeight);
break;
case "right" :
_local3[0] = -objWidth;
_local3[1] = utils.getRand(0, envHeight);
break;
default :
_root.debOut(("Move up default set in getRandomStartLoc (" + this) + ")!", "");
_local3[0] = utils.getRand(0, envWidth);
_local3[1] = envHeight + objHeight;
}
return(_local3);
}
function getObjectParamsByReleaseFrame(frameNumber) {
var _local2 = objectParamsArr[frameReleaseRefArr[frameNumber]];
if (_local2 != undefined) {
return(_local2);
}
return(new Object());
}
function hasObjectToLaunchAtFrame(frameNumber) {
var _local2 = objectParamsArr[frameReleaseRefArr[frameNumber]];
return(_local2 != undefined);
}
function getObjectParamsArr() {
return(objectParamsArr);
}
}
Symbol 359 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 251 Button
on (release) {
_root.gotoAndPlay("levelIntro");
}
Symbol 258 MovieClip Frame 1
stop();
this.sndControl.onRelease = function () {
var _local2 = new Sound();
_local2.setVolume(0);
_root.sndControl.gotoAndPlay("soundOn");
};
Symbol 258 MovieClip Frame 11
stop();
this.sndControl.onRelease = function () {
var _local2 = new Sound();
_local2.setVolume(100);
_root.sndControl.gotoAndPlay("soundOff");
};
Symbol 261 Button
on (release) {
_root.gotoAndPlay("levelIntro");
}
Symbol 269 Button
on (release) {
_root.gotoAndPlay("levelIntro");
}
Symbol 272 Button
on (release) {
_root.gotoAndPlay("instructions");
}
Symbol 275 Button
on (release) {
getURL ("http://ad.uk.doubleclick.net/clk;135525680;20289960;k", "_blank");
}
Symbol 338 MovieClip Frame 128
stop();