Frame 1
function check_domain() {
if (_root._url.indexOf("kongregate.com") > -1) {
_global.kongregate_site = true;
} else if (_root._url.indexOf("mindjolt.com") > -1) {
_global.mindjolt_site = true;
}
}
_global.mindjolt_site = false;
_global.kongregate_site = false;
check_domain();
com.mindjolt.api.as2.MindJoltSponsoredAPI.connect("CYU4124D", "8359CE89FA385111");
startGameCounter = 0;
var framesLoaded = this.getBytesLoaded();
var totalFrames = this.getBytesTotal();
var percentLoaded2 = int(((framesLoaded - 382031) / (totalFrames - 382031)) * 100);
trace(framesLoaded);
loadingScreen.loadingTxt = percentLoaded2 + " %";
loadingScreen.gotoAndStop(percentLoaded2 / 2);
var CPMStarPoolID = 1437;
var CPMStarSubPoolID = 15040;
if (_global.kongregate_site == false) {
System.security.allowDomain("server.cpmstar.com");
adBox.loadMovie((("http://server.cpmstar.com/adviewas2.swf?poolid=" + CPMStarPoolID) + "&subpoolid=") + CPMStarSubPoolID);
}
loadingScreen.stop();
Frame 3
if (framesLoaded == totalFrames) {
gotoAndPlay ("display_ad");
} else {
gotoAndPlay ("loop1");
}
Frame 5
if (startGameCounter == 100) {
if (_global.kongregate_site == false) {
gotoAndStop ("show_btn");
} else {
gotoAndStop ("show_mj_anim");
}
} else {
startGameCounter++;
gotoAndPlay ("display_ad");
}
Frame 8
stop();
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("1778a920", this, 10301, true);
sounds = new Object();
sounds.fire = new Sound();
sounds.fire.attachSound("fire");
sounds.weee = new Sound();
sounds.weee.attachSound("weee");
clockSound = new Sound(this.createEmptyMovieClip("snd2", 19002));
clockSound.attachSound("Clock");
musicObject = new Sound(this.createEmptyMovieClip("snd", 19000));
musicObject.attachSound("music");
sounds.doh = new Sound();
sounds.doh.attachSound("doh");
sounds.cheer = new Sound();
sounds.cheer.attachSound("cheer");
sounds.madeit = new Sound();
sounds.madeit.attachSound("madeit");
sounds.extraPoints = new Sound();
sounds.extraPoints.attachSound("bonusx4");
sounds.levelComplete = new Sound();
sounds.levelComplete.attachSound("GainLife");
sounds.Explosion = new Sound();
sounds.Explosion.attachSound("explosion");
sounds.bing = new Sound();
sounds.bing.attachSound("bing");
sounds.harp = new Sound();
sounds.harp.attachSound("harp");
sounds.Appear = new Sound();
sounds.Appear.attachSound("Appear");
sounds.popFx = new Sound();
sounds.popFx.attachSound("pop");
musicObject.start(0, 1000);
var furriesEscapeTarget = new Array(5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 5, 5, 6, 6, 7, 7);
var windGuages = new Array("lowLeft", "lowLeft", "lowLeft", "lowLeft", "lowLeft");
var backgroundTiles = new Array("flowerTile", "sunTile", "starTile", "carTile", "lightningTile", "heartTile", "cloverTile", "butterflyTile", "snowflakeTile", "cloudTile");
var levelFurries1 = new Array("mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc");
var levelFurries2 = new Array("mouse_mc", "racoon_mc", "mouse_mc", "racoon_mc", "mouse_mc", "mouse_mc", "mouse_mc", "racoon_mc", "mouse_mc", "mouse_mc", "mouse_mc");
var levelFurries3 = new Array("racoon_mc", "racoon_mc", "racoon_mc", "dog_mc", "dog_mc", "mouse_mc", "mouse_mc", "dog_mc", "dog_mc", "mouse_mc", "mouse_mc");
var levelFurries4 = new Array("racoon_mc", "racoon_mc", "racoon_mc", "mouse_mc", "mouse_mc", "mouse_mc", "cat_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc");
var levelFurries5 = new Array("racoon_mc", "racoon_mc", "racoon_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc");
var levelFurries6 = new Array("mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "cat_mc", "cat_mc", "cat_mc", "mouse_mc", "mouse_mc", "mouse_mc");
var levelFurries7 = new Array("bunny_mc", "bunny_mc", "cat_mc", "bunny_mc", "bunny_mc", "mouse_mc", "mouse_mc", "mouse_mc", "bunny_mc", "mouse_mc", "bunny_mc");
var levelFurries8 = new Array("bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc");
var levelFurries9 = new Array("cat_mc", "mouse_mc", "cat_mc", "mouse_mc", "racoon_mc", "racoon_mc", "racoon_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc");
var levelFurries10 = new Array("dog_mc", "dog_mc", "racoon_mc", "racoon_mc", "racoon_mc", "bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "mouse_mc", "mouse_mc");
var levelFurries11 = new Array("bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "racoon_mc", "racoon_mc", "racoon_mc", "racoon_mc");
var levelFurries12 = new Array("racoon_mc", "racoon_mc", "racoon_mc", "racoon_mc", "racoon_mc", "racoon_mc", "racoon_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc");
var levelFurries13 = new Array("mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc", "mouse_mc");
var levelFurries14 = new Array("dog_mc", "dog_mc", "dog_mc", "bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "racoon_mc", "bunny_mc", "mouse_mc", "mouse_mc");
var levelFurries15 = new Array("bunny_mc", "bunny_mc", "bunny_mc", "bunny_mc", "cat_mc", "cat_mc", "cat_mc", "cat_mc", "cat_mc", "mouse_mc", "mouse_mc");
var levelFurries16 = new Array("mouse_mc", "mouse_mc", "cat_mc", "racoon_mc", "racoon_mc", "racoon_mc", "racoon_mc", "racoon_mc", "racoon_mc", "racoon_mc", "dog_mc");
var levelFurries17 = new Array("mouse_mc", "cat_mc", "cat_mc", "cat_mc", "mouse_mc", "mouse_mc", "mouse_mc", "cat_mc", "cat_mc", "mouse_mc", "mouse_mc");
var levelFurries18 = new Array("mouse_mc", "cat_mc", "cat_mc", "cat_mc", "cat_mc", "cat_mc", "cat_mc", "cat_mc", "cat_mc", "mouse_mc", "mouse_mc");
var levelFurries20 = new Array("dog_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc");
var levelFurries19 = new Array("dog_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc", "dog_mc", "mouse_mc");
var levelFurries = new Array(levelFurries1, levelFurries2, levelFurries3, levelFurries4, levelFurries5, levelFurries6, levelFurries7, levelFurries8, levelFurries9, levelFurries10, levelFurries11, levelFurries12, levelFurries13, levelFurries14, levelFurries15, levelFurries16, levelFurries17, levelFurries18, levelFurries19, levelFurries20);
var enemies1 = new Array("beex", -1, -1, 6, 0);
var enemies2 = new Array("beex", -1, -1, 8, 0, "beex", -1, 300, 4, 0);
var enemies3 = new Array("birdMc", -1, -1, 4, 0);
var enemies4 = new Array("birdMc", -1, -1, 6, 0, "birdMc", -1, 200, 4, 0);
var enemies5 = new Array("fallingStar", -1, -10, 0, 8, "fallingStar", -1, -10, 0, 8);
var enemies6 = new Array("fallingStar", -1, -10, 0, 6, "fallingStar", -1, -10, 0, 6, "fallingStar", -1, -10, 0, 7);
var enemies7 = new Array("wheelMc", -1, -10, 8, 8);
var enemies8 = new Array("WheelMc", -1, -10, 7, 7);
var enemies9 = new Array("lightning", -1, -50, 8, 8);
var enemies10 = new Array("lightning", -1, -50, 8, 8, "lightning", -1, -50, 4, 6);
var enemies11 = new Array("arrow", -1, 590, 8, -6, "arrow", -1, 590, 7, -5);
var enemies12 = new Array("arrow", -1, 590, 8, -6, "arrow", -1, 590, 7, -5, "arrow", -1, 590, 6, -7);
var enemies13 = new Array("gold", -1, 590, 6, -5);
var enemies14 = new Array("gold", -1, 590, 8, -6);
var enemies19 = new Array("kite", -1, 590, 2, -6);
var enemies20 = new Array("kite", -1, 590, 3, -7);
var enemies17 = new Array("snowflake", -1, -10, 0, 1, "snowflake", -1, -10, 0, 3);
var enemies18 = new Array("snowflake", -1, -10, 0, 1, "snowflake", -1, -10, 0, 3, "snowflake", -1, -10, 0, 2);
var enemies15 = new Array("beex", -1, -1, 8, 0, "beex", -1, 300, 4, 0, "birdMc", -1, -1, 8, 0);
var enemies16 = new Array("birdMc", -1, -1, 8, 0, "birdMc", -1, -1, 7, 0, "birdMc", -1, -1, 6, 0);
var enemies = new Array(enemies1, enemies2, enemies3, enemies4, enemies5, enemies6, enemies7, enemies8, enemies9, enemies10, enemies11, enemies12, enemies13, enemies14, enemies15, enemies16, enemies17, enemies18, enemies19, enemies20);
var pickupMcs = new Array("cakePickup", "cheesecakePickup", "icelollyPickup", "piePickup", "cone", "icecream");
var pickups1 = new Array("cakePickup", -1, -1, -8);
var pickups = new Array(pickups1, pickups1, pickups1, pickups1, pickups1, pickups1, pickups1, pickups1, pickups1, pickups1);
function setupGame() {
Game = new GameGame(gameMc, this, 736, 576, 138, 32, startLives);
Presentation = new GamePresentation(this);
Presentation.setupSplashScreen(splashScreenElements);
this.onEnterFrame = mainLoop;
}
function runSounds() {
var vv = musicObject.getVolume();
if (soundFade == "out") {
if (vv > 0) {
soundFadeControl = soundFadeControl - 2;
musicObject.setVolume(soundFadeControl);
if (soundFadeControl == 0) {
soundSwitch = "off";
soundFade = "done";
}
} else {
soundSwitch = "off";
soundFade = "done";
musicObject.setVolume(0);
}
} else if (soundFade == "in") {
if (vv < 90) {
soundFadeControl = soundFadeControl + 2;
musicObject.setVolume(soundFadeControl);
if (soundFadeControl >= 90) {
soundSwitch = "on";
soundFade = "done";
}
} else {
musicObject.setVolume(90);
soundSwitch = "on";
soundFade = "done";
}
}
}
function quitGame() {
obj.vx = 0;
obj.vy = 0;
obj.clip.removeMovieClip();
Game.msgMc.removeMovieClip();
Game.gameState = "game_over_restart";
Game.endScreenMc.removeMovieClip();
}
function clearSprites() {
var ml = (Game.missilesArray.length - 1);
var i = ml;
while (i >= 0) {
Game.missilesArray[i].remove();
i--;
}
var el = (Game.enemyArray.length - 1);
var i = el;
while (i >= 0) {
Game.enemyArray[i].remove();
i--;
}
var el = (Game.pickupsArray.length - 1);
var i = el;
while (i >= 0) {
Game.pickupsArray[i].remove();
i--;
}
}
function mainLoop() {
runSounds();
if (Game.gameState == "setup") {
clearSprites();
Game.setupBackground();
Game.setupGerms();
Game.setupEnemies();
Game.setupPickups();
Game.clockDelay = 20;
Presentation.splashScreenMc.removeMovieClip();
Game.msgMc = Game.inGameMsgsMc.attachMovie("getReadyMsgAnim", "getready", 1);
Game.msgMc._x = Game.movieWidth / 2;
Game.msgMc._y = (Game.movieHeight / 2) - 40;
obj.vx = 3;
obj.vy = 0;
obj.x = Game.xPlayerStart;
obj.y = Game.yPlayerStart;
Game.minutes = Game.StartTimer;
Game.sec = 0;
Game.displayTime();
Game.sizeTarget = furriesEscapeTarget[Game.levelNumber - 1];
Game.lives = startLives;
Game.setLives();
Game.setTarget();
Game.setScore();
Game.setLevel();
if (musicPlaying == "off") {
Game.turnMusicOff();
} else {
Game.turnMusicOn();
}
Game.gameState = "pre_start";
} else if (Game.gameState == "start_new_level") {
Game.levelNumber++;
Game.setupBackground();
clearSprites();
Game.setupGerms();
Game.setupEnemies();
Game.setupPickups();
Game.clockDelay = 20;
Game.sizeTarget = furriesEscapeTarget[Game.levelNumber - 1];
Game.msgMc = Game.inGameMsgsMc.attachMovie("getReadyMsgAnim", "getready", 1);
Game.msgMc._x = Game.movieWidth / 2;
Game.msgMc._y = (Game.movieHeight / 2) - 40;
obj.vx = 3;
obj.vy = 0;
Game.minutes = Game.StartTimer;
Game.sec = 0;
Game.displayTime();
Game.bonusCountArray.splice(0);
Game.lives = startLives;
Game.setLives();
Game.setTarget();
Game.setScore();
Game.setLevel();
Game.gameState = "pre_start";
} else if (Game.gameState == "restart") {
Game.score = 0;
Game.setScore();
Game.gameState = "pre_start";
} else if (Game.gameState == "game_over_restart") {
Game.setupBackground();
clearSprites();
Game.setupGerms();
Game.setupEnemies();
clearSprites();
Game.enemyArray.splice(0);
Game.clockDelay = 20;
Presentation.setupSplashScreen(splashScreenElements);
Game.score = 0;
Game.levelNumber = 1;
Game.bonusCountArray.splice(0);
Game.gameState = "waiting_to_start";
} else if (Game.gameState == "pre_start") {
Game.mainLoop();
} else if (Game.gameState == "start_game") {
Game.mainLoop();
} else if (Game.gameState == "display_bonus") {
bonusCountDelay--;
if (bonusCountDelay == 0) {
bonusCountDelay = 1;
trace(Game.timeBonus);
if (Game.timeBonus > Game.currentTimeBonus) {
Game.currentTimeBonus++;
Game.msgMc.msg.timeBonus.text = ("+" + Game.currentTimeBonus) + "x10";
Game.score = Game.score + 10;
if (Game.timeBonus > (Game.currentTimeBonus + 1)) {
sounds.bing.start(0, 1);
}
Game.setScore();
playHarp = 1;
} else {
Game.msgMc.msg.totalScore.text = Game.score;
if (playHarp == 1) {
playHarp = 0;
sounds.harp.start(0, 1);
}
Game.setScore();
Game.msgMc.play();
}
}
} else if (Game.gameState == "play") {
Game.mainLoop();
}
}
function setupGoodGuy(mCName, xStart, yStart, grav, rg) {
var goodGuyMc = Game.inGameObjectsMc.attachMovie(mCName, "gg" + Game.numberOfDropped, Game.numberOfDropped);
var sp = Useful1.RandomNumber(5, 10);
sp = sp / 10;
Game.goodGuysArray.push(new GoodGuy(goodGuyMc, this, xStart, yStart, sp, mCName, grav, rg));
}
function setupPickups() {
var iy = 0;
while (iy < Game.levelHeightBlocks) {
var ix = 0;
while (ix < Game.levelWidthBlocks) {
var ind = ((iy * Game.levelWidthBlocks) + ix);
if ((iy == 0) or (iy == (Game.levelHeightBlocks - 3))) {
squareNamesArray[ind] = "edgeSquare";
} else if ((ix == 0) or (ix == (Game.levelWidthBlocks - 1))) {
squareNamesArray[ind] = "edgeSquare";
} else {
squareNamesArray[ind] = "square";
}
ix++;
}
iy++;
}
}
function setupPanel() {
ix = 0;
iy = 0;
ii = 0;
var i = 0;
while (i < gameObjectNames.length) {
var addd = Game.inGameStatsMc.ingamestatsmc;
addd = addd.wg;
trace(addd._name);
addd = addd["w" + (i + 1)];
trace(addd._name);
addd = addd.wb;
trace(addd._name);
Game.rightPanelGameObjects[i] = addd;
Game.rightPanelGameObjects[i].indexA = i;
Game.rightPanelGameObjects[i].gameObjectBtn.onRelease = clickRightPanelObject;
Game.rightPanelGameObjects[i].gameObjectBtn.onRollOver = rollOverRightPanelObject;
Game.rightPanelGameObjects[i].gameObjectBtn.onRollOut = rollOutRightPanelObject;
i++;
}
}
function clickRightPanelObject() {
trace(this._parent.indexA);
Game.currentPickedUp = mousePointer.attachMovie(rightPanelGameObjectNames[this._parent.indexA], "pickedup", 1);
if (gameObjectRange[this._parent.indexA] != 0) {
rangeCircle = mousePointer.attachMovie(gameObjectRange[this._parent.indexA], "range", 0);
rangeCircle._x = rangeCircle._x + (blockSize / 2);
rangeCircle._y = rangeCircle._y + (blockSize / 2);
} else {
removeMovieClip(rangeCircle);
}
Game.currentPickedUp.indexA = this._parent.indexA;
}
function rollOverRightPanelObject() {
trace("roll over");
}
function rollOutRightPanelObject() {
trace("roll out");
}
function dropGameObject() {
var xx = _xmouse;
var yy = _ymouse;
if (Game.currentPickedUp != undefined) {
if (checkIfOverLapping() == true) {
var topBit = 0;
trace(Game.currentPickedUp.indexA);
var costOfGameObject = gameObjectCost[Game.currentPickedUp.indexA];
var money2 = Game.score;
money2 = money2 - costOfGameObject;
if (money2 >= 0) {
setupGoodGuy("magnet1", xx, yy, 0.7, 100);
if (rt.gameObjectNames[currentPickedUp.indexA] != "magnet") {
}
Game.numberOfDropped++;
}
}
}
}
function checkIfOverLapping() {
if ((_xmouse > (736 - blockSize)) or (_xmouse < blockSize)) {
return(false);
}
return(true);
}
var gameMc = this.createEmptyMovieClip("gameMc", 0);
var Useful1 = new Useful();
var scrollOff = 0;
var startReal = true;
var Game;
var Presentation;
var Player;
var Background;
var Wave;
var SoundClass;
var parallaxLayersNames = new Array();
obj = {x:ball._x, y:ball._y, vx:3, vy:0};
var xLevelStart = 0;
var yLevelStart = -2100;
var ballMc;
var squareNamesArray = new Array();
var mousePointer = this.attachMovie("crosshair", "crosshair", 50);
mousePointer.yOld = 0;
var bonusCountDelay = 1;
var titleInfo = {mCName:"title", xPos:-290, yPos:-270};
var playInfo = {mCName:"playBtnAnim", xPos:180, yPos:120};
var instructionsInfo = {mCName:"instructionsBtnAnim", xPos:70, yPos:200};
var controlsInfo = {mCName:"controlsBtnAnim", xPos:90, yPos:235};
var highscoresInfo = {mCName:"highscoresBtnAnim", xPos:75, yPos:420};
var SplashMusicBtn = {mCName:"SplashMusicBtn", xPos:290, yPos:365};
var moreGamesBtn = {mCName:"moreGamesBtn", xPos:280, yPos:325};
if (_global.mindjolt_site == true) {
var splashScreenElements = [titleInfo, playInfo, instructionsInfo, controlsInfo, SplashMusicBtn, moreGamesBtn];
} else {
var splashScreenElements = [titleInfo, playInfo, instructionsInfo, controlsInfo, highscoresInfo, SplashMusicBtn, moreGamesBtn];
}
var startLives = 3000;
mousePointer.onEnterFrame = function () {
this._x = _xmouse;
yOld = this._y;
this._y = _ymouse;
};
var mouseButton = false;
this.onMouseUp = function () {
mouseButton = false;
};
this.onMouseDown = function () {
mouseButton = true;
};
var soundControl = 1;
var soundFade;
var soundFadeControl = 100;
soundMc.soundBtn.onRelease = function () {
if (soundControl == 0) {
soundControl = 1;
soundFade = "in";
soundMc.soundControlMc.gotoAndStop(1);
} else {
soundControl = 0;
soundFade = "out";
soundMc.soundControlMc.gotoAndStop(2);
}
};
var soundSwitch = "on";
var musicPlaying = "on";
var playHarp = 0;
var rightPanelGameObjectNames = new Array("gameObject4", "gameObject3", "gameObject1", "gameObject2", "gameObject5", "gameObject1", "gameObject1", "gameObject1", "gameObject1");
var gameObjectNames = new Array("moneyDrop", "manWithBat", "tower1", "redTurret", "blueTurret", "spaceMine", "blueForceField", "towerBase", "towerBase", "towerBase", "towerBase");
var gameObjectCost = Array(1, 10, 20, 15, 5, 4, 3, 2, 1);
var gameObjectRange = Array("shortRangeCircle", "longRangeCircle", 0, 0, 0, 0, 0, 0);
setupGame();
setupPanel();
var blockSize = 32;
stop();
Symbol 23 MovieClip Frame 1
stop();
Symbol 24 MovieClip [bonusMc1] Frame 16
this.removeMovieClip();
Symbol 28 MovieClip [M_stars1] Frame 15
this.removeMovieClip();
Symbol 29 MovieClip [starAnim2] Frame 1
i = 1;
heart.onEnterFrame = function () {
if (_currentframe != 13) {
myMovie = heart.duplicateMovieClip("heart" + i, i);
myMovie._rotation = Math.random() * 360;
myMovie._xscale = scale;
myMovie._yscale = scale;
scale = (Math.random() * 80) + 20;
i++;
}
};
Symbol 29 MovieClip [starAnim2] Frame 24
this.removeMovieClip();
stop();
Symbol 71 MovieClip [windGuage] Frame 1
stop();
Symbol 103 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 3
_parent._parent._parent.gotoAndStop("falling");
Symbol 106 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 4
_parent._parent._parent.gotoAndStop("falling");
Symbol 109 MovieClip Frame 1
stop();
Symbol 109 MovieClip Frame 4
_parent._parent._parent.gotoAndStop("falling");
Symbol 112 MovieClip Frame 1
stop();
Symbol 112 MovieClip Frame 4
_parent._parent._parent.gotoAndStop("falling");
Symbol 115 MovieClip Frame 1
stop();
Symbol 115 MovieClip Frame 4
_parent._parent._parent.gotoAndStop("falling");
Symbol 116 MovieClip [balloons] Frame 1
stop();
Symbol 117 MovieClip [mouseBalloon] Frame 40
gotoAndPlay ("swing");
Symbol 131 MovieClip [mouse_mc] Frame 1
stop();
Symbol 136 MovieClip [dogBalloon] Frame 40
gotoAndPlay ("swing");
Symbol 152 MovieClip [dog_mc] Frame 1
stop();
Symbol 158 MovieClip Frame 40
gotoAndPlay ("swing");
Symbol 169 MovieClip [cat_mc] Frame 1
stop();
Symbol 175 MovieClip [racoonBalloon] Frame 40
gotoAndPlay ("swing");
Symbol 187 MovieClip [racoon_mc] Frame 1
stop();
Symbol 192 MovieClip [bunnyBalloon] Frame 38
gotoAndPlay ("swing");
Symbol 206 MovieClip [bunny_mc] Frame 1
stop();
Symbol 222 MovieClip [starAnim] Frame 1
i = 1;
heart.onEnterFrame = function () {
if (_currentframe != 13) {
myMovie = heart.duplicateMovieClip("heart" + i, i);
myMovie._rotation = Math.random() * 360;
myMovie._xscale = scale;
myMovie._yscale = scale;
scale = (Math.random() * 80) + 20;
i++;
}
};
Symbol 222 MovieClip [starAnim] Frame 24
this.removeMovieClip();
stop();
Symbol 274 MovieClip Frame 1
score.text = _parent._parent._parent._parent._parent._parent._parent.Game.score;
var score2 = _parent._parent._parent._parent._parent._parent._parent.Game.score;
submitBtn.onRelease = function () {
if ((nameTxt.text != undefined) and (nameTxt.text != "")) {
_root.MindJoltSponsoredAPI.submitScore(nameTxt.text, score2);
gotoAndStop (2);
}
};
moreGamesBtn.onRelease = function () {
_parent._parent._parent._parent._parent._parent._parent.MindJoltSponsoredAPI.openLink(5);
};
viewhighscores.onRelease = function () {
_parent._parent._parent._parent._parent._parent._parent.MindJoltSponsoredAPI.openLink(4);
};
stop();
quitBtn.onRelease = function () {
_parent._parent._parent._parent._parent._parent._parent.quitGame();
};
Symbol 275 MovieClip [gameOverMsg] Frame 1
if (_global.mindjolt_site == true) {
msg.gotoAndStop(3);
ScoreAPI = new LocalConnection();
ScoreAPI.send(_root.com_mindjolt_api, "submitScore", _parent._parent._parent._parent._parent._parent.Game.score);
}
Symbol 276 MovieClip [gameOverMsgAnim] Frame 10
stop();
Symbol 276 MovieClip [gameOverMsgAnim] Frame 23
_parent._parent._parent._parent._parent.Game.gameState = "game_over_restart";
stop();
Symbol 282 MovieClip Frame 1
stop();
Symbol 286 MovieClip Frame 1
stop();
Symbol 288 MovieClip [loseLifeMsgAnim] Frame 48
if (_parent._parent._parent._parent._parent.Game.gameState != "restart") {
_parent._parent._parent._parent._parent.Game.gameState = "restart";
}
this.removeMovieClip();
Symbol 295 MovieClip [getReadyMsgAnim] Frame 11
msg.msg.sizeTarget.text = _parent._parent._parent._parent._parent.Game.sizeTarget;
Symbol 295 MovieClip [getReadyMsgAnim] Frame 74
_parent._parent._parent._parent._parent.Game.gameState = "play";
this.removeMovieClip();
Symbol 303 MovieClip [levelCompleteMsgs] Frame 1
stop();
Symbol 305 MovieClip [levelCompleteMsgAnim] Frame 15
msg.titleMc.gotoAndStop(howWellDone);
Symbol 305 MovieClip [levelCompleteMsgAnim] Frame 31
_parent._parent._parent._parent._parent.Game.gameState = "display_bonus";
stop();
Symbol 305 MovieClip [levelCompleteMsgAnim] Frame 81
_parent._parent._parent._parent._parent.Game.gameState = "start_new_level";
stop();
Symbol 309 MovieClip [pausedMsgAnim] Frame 33
stop();
Symbol 309 MovieClip [pausedMsgAnim] Frame 42
this.removeMovieClip();
Symbol 312 MovieClip [bullet] Frame 1
stop();
Symbol 318 MovieClip Frame 256
_parent.myObject.mCDeath();
Symbol 322 MovieClip [mainface] Frame 1
stop();
Symbol 323 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 1
stop();
Symbol 360 MovieClip [man with pistol anim] Frame 1
stop();
Symbol 429 Button
on (release) {
getURL ("http://www.flashgamemaker.com", _blank);
}
Symbol 445 Button
on (release) {
_root.MindJoltSponsoredAPI.openLink(6);
}
Symbol 447 MovieClip [SplashScreen] Frame 1
if (_global.mindjolt_site == true) {
mj.text = "MJ";
}
Symbol 468 MovieClip [splashInfo] Frame 1
stop();
Symbol 468 MovieClip [splashInfo] Frame 2
stop();
backBtn.onRelease = function () {
_root.Presentation.setupPresentationElements();
gotoAndStop (1);
};
Symbol 468 MovieClip [splashInfo] Frame 3
backBtn.onRelease = function () {
_root.Presentation.setupPresentationElements();
gotoAndStop (1);
};
Symbol 468 MovieClip [splashInfo] Frame 4
function moveOn() {
_parent.panel._visible = true;
_root.Presentation.setupPresentationElements();
trace(this._currentframe);
gotoAndStop (1);
}
backBtn.onRelease = function () {
_root.mochi.MochiScores.closeLeaderboard();
moveOn();
};
_parent.panel._visible = false;
var leaderBoardMc = this.createEmptyMovieClip("leaderBoard", 1);
leaderBoardMc._x = -330;
leaderBoardMc._y = -280;
mochi.MochiScores.showLeaderboard({boardID:_root.leaderboardID, clip:leaderBoardMc, onClose:moveOn, onError:moveOn});
stop();
Symbol 471 MovieClip Frame 1
stop();
Symbol 473 MovieClip [SplashMusicBtn] Frame 1
if (_root.musicPlaying == "off") {
musicMc.gotoAndStop(2);
}
musicBtn.onRelease = function () {
if (musicMc._currentframe == 1) {
this._parent._parent._parent._parent._parent._parent.soundFade = "out";
this._parent._parent._parent._parent._parent._parent.musicPlaying = "off";
musicMc.gotoAndStop(2);
} else {
this._parent._parent._parent._parent._parent._parent.soundFade = "in";
this._parent._parent._parent._parent._parent._parent.musicPlaying = "on";
musicMc.gotoAndStop(1);
}
};
Symbol 476 MovieClip [balloonMaskMc] Frame 1
stop();
Symbol 479 MovieClip [balloonMaskGradient] Frame 1
stop();
Symbol 495 MovieClip [backgroundGround1] Frame 1
stop();
Symbol 515 MovieClip [hotAirBalloon] Frame 27
gotoAndPlay ("loop");
Symbol 522 MovieClip Frame 1
if (_global.mindjolt_site == true) {
gotoAndStop (3);
ScoreAPI = new LocalConnection();
ScoreAPI.send(_root.com_mindjolt_api, "submitScore", _root.Game.score);
}
score.text = _parent._parent._parent._parent._parent._parent._parent.Game.score;
var score2 = _parent._parent._parent._parent._parent._parent._parent.Game.score;
submitBtn.onRelease = function () {
if ((nameTxt.text != undefined) and (nameTxt.text != "")) {
_root.MindJoltSponsoredAPI.submitScore(nameTxt.text, score2);
gotoAndStop (2);
}
};
moreGamesBtn.onRelease = function () {
_parent._parent._parent._parent._parent._parent._parent.MindJoltSponsoredAPI.openLink(5);
};
viewhighscores.onRelease = function () {
_parent._parent._parent._parent._parent._parent._parent.MindJoltSponsoredAPI.openLink(4);
};
stop();
quitBtn.onRelease = function () {
_root.quitGame();
};
Symbol 522 MovieClip Frame 3
if (_global.mindjolt_site == true) {
gotoAndStop (3);
ScoreAPI = new LocalConnection();
ScoreAPI.send(_root.com_mindjolt_api, "submitScore", _root.Game.score);
}
Symbol 523 MovieClip [endScreen] Frame 1
play();
Symbol 611 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if (options.clip.__mochiservicesMC != mochi.MochiServices.__get__clip()) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
if (mochi.MochiServices.__get__clip() == _root.__mochiservicesMC) {
mochi.MochiServices.__get__clip()._parent.gameOverMc.play();
} else {
mochi.MochiServices.__get__clip().gameOverMc.play();
}
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 612 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function getVersion() {
return("1.2");
}
static function allowDomains(server) {
var hostname = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(hostname);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(hostname);
}
}
return(hostname);
}
static function get isNetworkAvailable() {
if (System.security) {
var o = System.security;
if (o.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_container == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_container != undefined) {
_container.removeMovieClip();
delete _container;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip.createEmptyMovieClip("__mochiservicesMC", clip.getNextHighestDepth());
} else {
_container = _root.createEmptyMovieClip("__mochiservicesMC", _root.getNextHighestDepth());
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
if (!isNetworkAvailable) {
return(undefined);
}
allowDomains(_gatewayURL);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_container, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var cb = pkg.callbackID;
var cblst = this._callbacks[cb];
if (!cblst) {
return(undefined);
}
var method = cblst.callbackMethod;
var obj = cblst.callbackObject;
if (obj && (typeof(method) == "string")) {
method = obj[method];
}
if (method != undefined) {
method.apply(obj, pkg.args);
}
delete this._callbacks[cb];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var request;
var callback;
while (_sendChannel._queue.length > 0) {
request = _sendChannel._queue.shift();
delete callback;
if (request.callbackID != null) {
callback = _rcvChannel._callbacks[request.callbackID];
}
delete _rcvChannel._callbacks[request.callbackID];
if (error) {
handleError(request.args, callback.callbackObject, callback.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_container == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 613 MovieClip [__Packages.com.mindjolt.api.as2.MindJoltSponsoredAPI] Frame 0
class com.mindjolt.api.as2.MindJoltSponsoredAPI
{
static var flashCookie, gameId, key;
function MindJoltSponsoredAPI () {
}
static function connect(_gameId, _key) {
_root.MindJoltSponsoredAPI = com.mindjolt.api.as2.MindJoltSponsoredAPI;
if (!connected) {
flashCookie = SharedObject.getLocal("com.mindjolt", "/");
gameId = _gameId.toUpperCase();
key = _key.toUpperCase();
trace("its connected!");
connected = true;
} else {
trace("already connected!");
}
}
static function submitScore(name, score, mode) {
var userToken = null;
trace("testing if we have a userToken in shared object yet");
if (flashCookie.data.userToken != null) {
userToken = flashCookie.data.userToken;
trace(("FOUND [" + userToken) + "]");
} else {
userToken = null;
trace("no userToken set");
}
var rc4 = (new com.meychi.ascrypt.RC4());
var session = com.meychi.ascrypt.RC4.encrypt((((("score=" + score) + "&name=") + escape(name)) + ((mode != null) ? ("&mode=" + escape(mode)) : "")) + ((userToken != null) ? ("&userToken=" + escape(userToken)) : ""), key);
var send_lv = new LoadVars();
var lvlAnswer = new LoadVars();
send_lv.gameId = gameId;
send_lv.session = session;
lvlAnswer.onLoad = function (success) {
if (success) {
var session = this.session;
if (session != null) {
trace("got back session");
var rc4 = (new com.meychi.ascrypt.RC4());
var sessionVars = new LoadVars();
sessionVars.decode(com.meychi.ascrypt.RC4.decrypt(session, com.mindjolt.api.as2.MindJoltSponsoredAPI.key));
var userToken = sessionVars.userToken;
trace(("result [" + sessionVars.result) + "]");
if (userToken != null) {
trace(("we are being told to set userToken [" + userToken) + "]");
com.mindjolt.api.as2.MindJoltSponsoredAPI.flashCookie.data.userToken = userToken;
com.mindjolt.api.as2.MindJoltSponsoredAPI.flashCookie.flush();
}
}
} else {
trace("IOError in SubmitScore");
}
};
send_lv.sendAndLoad("http://game.mindjolt.com/servlet/GameScore", lvlAnswer, "POST");
}
static function openLink(linkId, mode) {
var url = (((((("http://game.mindjolt.com/servlet/GameLink?key=" + gameId) + "&link=") + linkId) + ((mode != null) ? ("&mode=" + escape(mode)) : "")) + "&httpref=") + escape(_url));
trace("open link");
getURL (url, "_blank");
}
static var connected = false;
}
Symbol 614 MovieClip [__Packages.com.meychi.ascrypt.RC4] Frame 0
class com.meychi.ascrypt.RC4
{
function RC4 () {
}
static function encrypt(src, key) {
var mtxt = strToChars(src);
var mkey = strToChars(key);
var result = calculate(mtxt, mkey);
return(charsToHex(result));
}
static function decrypt(src, key) {
var mtxt = hexToChars(src);
var mkey = strToChars(key);
var result = calculate(mtxt, mkey);
return(charsToStr(result));
}
static function initialize(pwd) {
var b = 0;
var tempSwap;
var intLength = pwd.length;
var a = 0;
while (a <= 255) {
mykey[a] = pwd[a % intLength];
sbox[a] = a;
a++;
}
var a = 0;
while (a <= 255) {
b = ((b + sbox[a]) + mykey[a]) % 256;
tempSwap = sbox[a];
sbox[a] = sbox[b];
sbox[b] = tempSwap;
a++;
}
}
static function calculate(plaintxt, psw) {
initialize(psw);
var i = 0;
var j = 0;
var cipher = new Array();
var k;
var temp;
var cipherby;
var a = 0;
while (a < plaintxt.length) {
i = (i + 1) % 256;
j = (j + sbox[i]) % 256;
temp = sbox[i];
sbox[i] = sbox[j];
sbox[j] = temp;
var idx = ((sbox[i] + sbox[j]) % 256);
k = sbox[idx];
cipherby = plaintxt[a] ^ k;
cipher.push(cipherby);
a++;
}
return(cipher);
}
static function charsToHex(chars) {
var result = new String("");
var hexes = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var i = 0;
while (i < chars.length) {
result = result + (hexes[chars[i] >> 4] + hexes[chars[i] & 15]);
i++;
}
return(result);
}
static function hexToChars(hex) {
var codes = new Array();
var i = ((hex.substr(0, 2) == "0x") ? 2 : 0);
while (i < hex.length) {
codes.push(parseInt(hex.substr(i, 2), 16));
i = i + 2;
}
return(codes);
}
static function charsToStr(chars) {
var result = new String("");
var i = 0;
while (i < chars.length) {
result = result + String.fromCharCode(chars[i]);
i++;
}
return(result);
}
static function strToChars(str) {
var codes = new Array();
var i = 0;
while (i < str.length) {
codes.push(str.charCodeAt(i));
i++;
}
return(codes);
}
static var sbox = new Array(255);
static var mykey = new Array(255);
}
Symbol 615 MovieClip [__Packages.GoodGuy] Frame 0
class GoodGuy
{
var root, mC, range, arrayIndex, hits, gravity, float, delayToFire, gotGold, energyBarOn, falling, xDir, target, homing, ringDrop, movingCloser, spriteType;
function GoodGuy (clip, rt, xStart, yStart, sp, st) {
root = rt;
mC = clip;
range = 30;
arrayIndex = 0;
hits = 0;
gravity = 0.1;
xOrigin = xStart;
yOrigin = yStart;
float = false;
yPos = 0;
xVel = 0;
yVel = 0;
delayToFire = 30;
angle = 0.2;
gotGold = 0;
energyBarOn = 0;
degrees = 0;
radius = 255;
falling = false;
centerX = root.movieWidth / 2;
centerY = root.movieHeight / 2;
speed = sp;
xDir = 1;
mC.gotoAndStop("run");
target = undefined;
numberOfMissiles = 0;
energyStart = 100;
energy = energyStart;
homing = 0;
ringDrop = 20;
movingCloser = 0;
delayToFire = 50;
spriteType = st;
updatePosition();
}
function applyGravity() {
yVel = yVel + 1;
}
function main(index1, index2) {
if (float == false) {
applyGravity();
}
moveEnemy();
hotAirBalloonCollision();
checkForPickups();
updatePosition();
}
function hotAirBalloonCollision() {
if (root.Game.hotAirBalloonMc.balloon.balloon.collision.hitTest(mC)) {
root.Game.decreaseSizeTarget(1, spriteType);
var explosion = root.Game.inGameExplosionsMc.attachMovie("bonusMc1", "starAnim" + root.Game.pickupsArray.length, root.Game.pickupsArray.length);
if (root.Game.sizeTarget < 0) {
explosion.vv.gotoAndStop(2);
}
explosion._x = mC._x;
explosion._y = mC._y;
remove();
root.sounds.madeit.start(0, 1);
}
}
function checkForPickups() {
var i = 0;
while (i < root.Game.pickupsArray.length) {
if (mC._currentframe == 1) {
if (mC.dog.dog.hitTest(root.Game.pickupsArray[i].mC)) {
var explosion = root.Game.inGameExplosionsMc.attachMovie("starAnim", "starAnim" + root.Game.pickupsArray.length, root.Game.pickupsArray.length);
explosion._x = mC._x;
explosion._y = mC._y;
root.Game.increaseScore(100);
root.Game.pickupsArray[i].remove();
root.sounds.levelComplete.start(0, 1);
}
} else if (mC.collision.hitTest(root.Game.pickupsArray[i].mC)) {
var explosion = root.Game.inGameExplosionsMc.attachMovie("starAnim", "starAnim" + root.Game.pickupsArray.length, root.Game.pickupsArray.length);
explosion._x = mC._x;
explosion._y = mC._y;
root.Game.increaseScore(100);
root.Game.pickupsArray[i].remove();
root.sounds.levelComplete.start(0, 1);
}
i++;
}
}
function hit() {
mC.dog.balloon.balloon.gotoAndPlay("pop");
root.sounds.popFx.start(0, 1);
falling = true;
float = false;
}
function moveEnemy() {
if (falling == true) {
if ((yOrigin + yPos) > 576) {
remove();
}
} else if (float == true) {
if (spriteType == "dog_mc") {
yVel = -4;
} else if (spriteType == "bunny_mc") {
yVel = -7;
} else if (spriteType == "cat_mc") {
yVel = -5;
} else if (spriteType == "mouse_mc") {
yVel = -9;
} else if (spriteType == "racoon_mc") {
yVel = -6;
}
if ((yOrigin + yPos) < -70) {
remove();
}
} else {
var yVel2 = yVel;
var yVel3 = yVel;
if (yVel3 < 0) {
yVel3 = (yVel3 - yVel3) - yVel3;
}
var xm = mC._x;
var ym = (mC._y + 30);
trace(root.Game.backgroundMc._name);
var i = 0;
while (i < int(yVel3)) {
if (root.Game.groundMc.hitTest(xm, ym + i, true)) {
trace("hit");
break;
}
i++;
}
trace(i);
yVel = yVel - int(yVel2);
yVel = i + yVel;
xVel = xDir * speed;
updatePosition();
var xm = mC._x;
var ym = (mC._y + 30);
if (root.Game.groundMc.hitTest(xm, ym + i, true)) {
var hit = 0;
var i = 0;
while (i < 10) {
yPos--;
mC._x = xOrigin + xPos;
mC._y = yOrigin + yPos;
if (root.Game.groundMc.hitTest(mC._x, mC._y, true) == false) {
trace("free");
hit = 1;
break;
}
i++;
}
if (hit == 0) {
changeDirection();
}
}
trace("cat x pos");
trace(xPos);
if ((xOrigin + xPos) > 690) {
xDir = -1;
} else if ((xOrigin + xPos) < 10) {
xDir = 1;
}
if (xVel > 0) {
mC._xscale = -100;
} else {
mC._xscale = 100;
}
}
}
function changeDirection() {
if (xDir < 0) {
xDir = 1;
} else {
xDir = -1;
}
}
function remove() {
var i = 0;
while (i < root.Game.goodGuysArray.length) {
if (this == root.Game.goodGuysArray[i]) {
arrayIndex = i;
}
i++;
}
mC.removeMovieClip();
root.Game.goodGuysArray.splice(arrayIndex, 1);
}
function updatePosition() {
if (root.Game.gameState == "play") {
if (float == true) {
xVel = -root.Game.windVector.yVel;
}
}
xPos = xPos + xVel;
yPos = yPos + yVel;
mC._x = xOrigin + xPos;
mC._y = yOrigin + yPos;
}
var xOrigin = 0;
var yOrigin = 0;
var xPos = 0;
var yPos = 0;
var xVel = 0;
var yVel = 0;
var angle = 0;
var degrees = 0;
var centerX = 0;
var centerY = 0;
var radius = 0;
var speed = 0;
var cost = 0;
var playerleft = 0;
var playerright = 0;
var gameObjectType = "";
var energyStart = 0;
var energy = 0;
var delayToFireMissile = 60;
var numberOfMissiles = 0;
}
Symbol 616 MovieClip [__Packages.Game] Frame 0
class Game
{
var root, startGame, money, energy;
function Game (m, e, rt) {
root = rt;
startGame = 0;
money = m;
energy = e;
}
function increaseMoney(increase) {
money = money + increase;
}
function decreaseMoney(decrease) {
money = money - decrease;
}
function increaseEnergy(increase) {
energy = energy - increase;
if (energy <= 0) {
energy = 0;
}
}
function decreaseEnergy(decrease) {
energy = energy - decrease;
if (energy <= 0) {
startGame = 0;
root._parent.gotoAndStop("gameOver");
}
}
}
Symbol 617 MovieClip [__Packages.GamePresentation] Frame 0
class GamePresentation
{
var rt, mC, splashScreenMc, optionsMc, elementMc, btnType, myObject;
function GamePresentation (rt2) {
rt = rt2;
mC = rt.Game.presentationMc;
}
function setupSplashScreen(elementsPositions) {
splashScreenMc = mC.attachMovie("SplashScreen", "splashscreenmc", 1);
splashScreenMc._x = 350;
splashScreenMc._y = 287;
var splashInfo = splashScreenMc.attachMovie("splashInfo", "screens", 100);
setupPresentationElements();
}
function setupPresentationElements() {
optionsMc = splashScreenMc.createEmptyMovieClip("options", 1);
optionsMc._x = -350;
optionsMc._y = -287;
var i = 0;
while (i < rt.splashScreenElements.length) {
var info = rt.splashScreenElements[i];
if (info.mCName != "title") {
elementMc = optionsMc.attachMovie(info.mCName, info.mCName, i);
elementMc._x = info.xPos;
elementMc._y = info.yPos;
} else {
elementMc = splashScreenMc.attachMovie(info.mCName, info.mCName, i);
elementMc._x = info.xPos;
elementMc._y = info.yPos;
}
if (info.mCName != "title") {
elementMc.btn.btnType = info.mCName;
elementMc.btn.splashScreenMc = splashScreenMc;
elementMc.btn.myObject = this;
elementMc.btn.onRelease = clickRightSplashSceenBtn;
elementMc.btn.onRollOver = rollOverSplashSceenBtn;
elementMc.btn.onRollOut = rollOutSplashSceenBtn;
}
i++;
}
}
function clickRightSplashSceenBtn() {
if (btnType == "playBtnAnim") {
myObject.rt.Game.gameState = "setup";
} else if (btnType == "instructionsBtnAnim") {
splashScreenMc.screens.gotoAndStop("showinstructions");
splashScreenMc.options.removeMovieClip();
} else if (btnType == "controlsBtnAnim") {
splashScreenMc.screens.gotoAndStop("showcontrols");
splashScreenMc.options.removeMovieClip();
} else if (btnType == "highscoresBtnAnim") {
myObject.rt.MindJoltSponsoredAPI.openLink(3);
} else if (btnType == "moreGamesBtn") {
myObject.rt.MindJoltSponsoredAPI.openLink(2);
}
}
function rollOverSplashSceenBtn() {
}
function rollOutSplashSceenBtn() {
if (btnType == "playBtnAnim") {
} else if (btnType == "instructionsBtnAnim") {
} else if (btnType == "controlsBtnAnim") {
} else if (btnType == "highscoresBtnAnim") {
}
}
function RandomNumber(x, y) {
return(Math.round(Math.random() * (y - x)) + x);
}
function getArcVelocity(gravity, speed, xStart, yStart, xEnd, yEnd) {
var velocities = new Object();
var xd = (xEnd - xStart);
var yd = (yEnd - yStart);
var dist = Math.sqrt((xd * xd) + (yd * yd));
var steps = Math.ceil(dist / speed);
velocities.gravity = gravity;
velocities.steps = steps;
velocities.xStep = xd / steps;
velocities.yStep = yd / steps;
if (gravity > 0) {
velocities.yStep = velocities.yStep - ((steps * gravity) / 2);
}
return(velocities);
}
function localToGlobalXY(mc1) {
var temp = new Object();
temp.newX = 0;
temp.newY = 0;
var clip = mc1;
while (clip != _root) {
var xs = (temp.newX * (clip._xscale / 100));
var ys = (temp.newY * (clip._yscale / 100));
var r = (clip._rotation * (Math.PI/180));
temp.newX = (xs * Math.cos(r)) - (ys * Math.sin(r));
temp.newY = (xs * Math.sin(r)) + (ys * Math.cos(r));
temp.newX = temp.newX + clip._x;
temp.newY = temp.newY + clip._y;
clip = clip._parent;
}
return(temp);
}
function radian(degree) {
return((Math.PI/180) * degree);
}
function addThrust(rot, speed) {
var thrustVectors = new Object();
thrustVectors.xVel = Math.cos(radian(rot)) * speed;
thrustVectors.yVel = Math.sin(radian(rot)) * speed;
return(thrustVectors);
}
}
Symbol 618 MovieClip [__Packages.GameGame] Frame 0
class GameGame
{
var mC, rt, numBalls, movieWidth, movieHeight, blockSize, levelWidthBlocks, levelHeightBlocks, levelWidth, levelHeight, gameState, lostGold, numberOfMissiles, inGameMc, presentationMc, inGameActionMc, inGameStatsMc, inGameContainerMc, ballMc, inGameMsgsMc, playerMc, inGameBackgroundParallaxMc, inGameBackgroundMc, inGameBackgroundGraphicsMc, groundMc, inGameEnemyMc, inGameMissilesMc, inGameExplosionsMc, inGameScoreMc, inGameObjectsMc, inGamePickupsMc, missilesArray, enemyArray, goodGuysArray, targetArray, pickupsArray, numberOfDropped, rightPanelGameObjects, gameObjects, backgroundSquaresArray, currentPickedUp, windVector, score, sizeTarget, bestScore, starAnimDelay, lives, meterLevel, meterLevelSpeed, gameStartDelay, meterLevelDir, scoreIndex, xMidway, yMidway, starTrails, cannonManFlying, windRotation, ballChainArray, badGuysArray, bonusCountArray, spring, friction, gravity, springLength, ballCount, saucerChance, saucerDelay, left, right, top, bottom, levelNumber, scaleSpeed, balloonPlotted, extraPointsSound, secDisplay, minDisplay, StartTimer, clockDelay, minutes, sec, fulltime, powerMeter, msgMc, endScreenMc, currentTimeBonus, timeBonus, backgroundMc, guageMc, hotAirBalloonMc;
function GameGame (mc, rt2, sw, sh, levelW, levelH, startLives) {
mC = mc;
rt = rt2;
numBalls = 15;
movieWidth = sw;
movieHeight = sh;
blockSize = 32;
levelWidthBlocks = levelW;
levelHeightBlocks = levelH;
levelWidth = levelWidthBlocks * blockSize;
levelHeight = levelHeightBlocks * blockSize;
gameState = "loading";
lostGold = 0;
numberOfMissiles = 0;
inGameMc = mC.createEmptyMovieClip("inGameMc", 0);
presentationMc = mC.createEmptyMovieClip("presentationMc", 1);
inGameActionMc = inGameMc.createEmptyMovieClip("inGameActionMc", 0);
inGameStatsMc = inGameMc.createEmptyMovieClip("inGameStatsMc", 1);
inGameContainerMc = inGameActionMc.createEmptyMovieClip("inGameBackgroundMc", 9);
ballMc = inGameActionMc.createEmptyMovieClip("cannonman", 10);
inGameMsgsMc = inGameActionMc.createEmptyMovieClip("cannonman", 11);
playerMc = inGameContainerMc.createEmptyMovieClip("player", 6);
inGameBackgroundParallaxMc = inGameActionMc.createEmptyMovieClip("inGameBackgroundParallaxMc2", 0);
inGameBackgroundMc = inGameContainerMc.createEmptyMovieClip("inGameBackgroundMc", 0);
inGameBackgroundGraphicsMc = inGameBackgroundMc.createEmptyMovieClip("inGameBackgroundGraphicsMc", 1);
groundMc = inGameBackgroundMc.createEmptyMovieClip("groundMc", 2);
inGameEnemyMc = inGameContainerMc.createEmptyMovieClip("inGameEnemysMc", 1);
inGameMissilesMc = inGameContainerMc.createEmptyMovieClip("inGameMissilesMc", 2);
inGameExplosionsMc = inGameContainerMc.createEmptyMovieClip("inGameExplosionsMc", 3);
inGameScoreMc = inGameContainerMc.createEmptyMovieClip("inGameScoresMc", 4);
inGameObjectsMc = inGameContainerMc.createEmptyMovieClip("inGameObjectsMc", 5);
inGamePickupsMc = inGameContainerMc.createEmptyMovieClip("inGamePickupsMc", 6);
missilesArray = new Array();
enemyArray = new Array();
goodGuysArray = new Array();
targetArray = new Array();
pickupsArray = new Array();
numberOfDropped = 0;
rightPanelGameObjects = new Array();
gameObjects = new Array();
backgroundSquaresArray = new Array();
currentPickedUp = undefined;
windVector = new Object();
score = 0;
sizeTarget = 0;
bestScore = 0;
starAnimDelay = 4;
lives = startLives;
meterLevel = 0;
meterLevelSpeed = 20;
gameStartDelay = 20;
meterLevelDir = meterLevelSpeed;
scoreIndex = 0;
xMidway = 0;
yMidway = 0;
starTrails = 0;
cannonManFlying = 0;
windRotation = rt.Useful1.RandomNumber(1, 180);
ballChainArray = new Array();
badGuysArray = new Array();
bonusCountArray = new Array();
spring = 0.1;
friction = 0.8;
gravity = 5;
springLength = 10;
ballCount = 3;
saucerChance = 50;
saucerDelay = -1;
saucerDelay = rt.Useful1.RandomNumber(50, 400);
left = -20;
right = movieWidth - 20;
top = 0;
bottom = movieHeight;
levelNumber = 1;
scaleSpeed = 8;
balloonPlotted = false;
extraPointsSound = false;
secDisplay = "00";
minDisplay = "00";
StartTimer = 1;
clockDelay = 10;
minutes = StartTimer;
sec = 0;
fulltime = 0;
setupPanel();
}
function setupPanel() {
var statsMc = inGameStatsMc.attachMovie("weapons", "ingamestatsmc", 1);
statsMc._y = movieHeight - (blockSize * 2);
var addd = statsMc.wg;
addd = addd.stats;
addd.musicBtn.myObject = this;
addd.musicBtn.myMc = addd;
addd.quitBtn.myObject = this;
trace(rt.musicPlaying);
addd.musicBtn.onRelease = function () {
if (this.myMc.music._currentframe == 1) {
this.myObject.rt.soundFade = "out";
this.myMc.music.gotoAndStop("off");
this.myObject.rt.musicPlaying = "off";
} else {
this.myObject.rt.soundFade = "in";
this.myMc.music.gotoAndStop("on");
this.myObject.rt.musicPlaying = "on";
}
};
addd.quitBtn.onRelease = function () {
this.myObject.rt.obj.vx = 0;
this.myObject.rt.obj.vy = 0;
this.myObject.rt.Game.balloonPlotted = false;
this.myObject.rt.obj.clip.removeMovieClip();
this.myObject.rt.Game.msgMc.removeMovieClip();
this.myObject.rt.Game.gameState = "game_over_restart";
};
}
function deleteMeter() {
powerMeter.removeMovieClip();
}
function displayMeter() {
rt.mousePointer.attachMovie("shotStrengthMeter", "meter", 2);
}
function setupMeter() {
powerMeter = playerMc.attachMovie("shotStrengthMeter", "meter", 2);
}
function gameOver(gameOverType) {
rt.clockSound.stop();
removeEnemies();
rt.saucerObject.stop();
extraPointsSound = false;
rt.obj.vx = 0;
rt.obj.vy = 0;
rt.obj.clip._rotation = 0;
if (gameOverType == "out_of_time") {
if (sizeTarget <= 0) {
gameOverType = "level_complete";
}
}
if (gameOverType == "out_of_time") {
var i = 0;
while (i < goodGuysArray.length) {
goodGuysArray[i].mC.gotoAndStop("falling");
i++;
}
gameState = "game_over";
msgMc = inGameMsgsMc.attachMovie("gameOverMsgAnim", "gameover", 1);
msgMc._x = movieWidth / 2;
msgMc._y = movieHeight / 2;
rt.sounds.doh.start(0, 1);
} else {
rt.sounds.cheer.start(0, 1);
if (levelNumber == 20) {
gameState = "game_over";
endScreenMc = presentationMc.attachMovie("endScreen", "gameComplete", 1);
endScreenMc._x = (movieWidth / 2) - 17;
endScreenMc._y = movieHeight / 2;
endScreenMc.balloon.balloon.furries._alpha = 100;
} else {
var i = 0;
while (i < goodGuysArray.length) {
goodGuysArray[i].mC.gotoAndStop("falling");
i++;
}
gameState = "level_complete";
msgMc = inGameMsgsMc.attachMovie("levelCompleteMsgAnim", "levelComplete", 1);
msgMc._x = movieWidth / 2;
msgMc._y = (movieHeight / 2) - 60;
currentTimeBonus = 0;
timeBonus = minutes * 60;
timeBonus = timeBonus + sec;
var orb3 = 20;
var orb2 = 30;
var orb1 = 46.1538461538462;
if (timeBonus < orb3) {
msgMc.howWellDone = 1;
}
if (timeBonus < orb2) {
msgMc.howWellDone = 2;
} else {
msgMc.howWellDone = 3;
}
}
}
}
function removeEnemies() {
var i = 0;
while (i < enemyArray.length) {
var ss = enemyArray[i].mC;
ss.swapDepths(1);
ss.removeMovieClip();
i++;
}
}
function removeGerms() {
var i = 0;
while (i < goodGuysArray.length) {
var ss = goodGuysArray[i].mC;
ss.swapDepths(1);
ss.removeMovieClip();
i++;
}
}
function fireGun(xStart, yStart, vx, vy, myParent) {
var missileName = "bullet";
var mc = inGameMissilesMc.attachMovie(missileName, "missile" + numberOfMissiles, numberOfMissiles);
numberOfMissiles++;
missilesArray.push(new Missile2(mc, xStart, yStart, rt, missileName, vx, vy, myParent, bonusCountArray.length - 1));
missilesArray[missilesArray.length - 1].updatePosition();
}
function setupEnemy(mCName, xStart, yStart, spX, spY) {
var enemyMc = inGameEnemyMc.attachMovie(mCName, "ee" + numberOfDropped, numberOfDropped);
enemyArray.push(new Enemy1(enemyMc, rt, xStart, yStart, spX, spY, mCName));
numberOfDropped++;
}
function setupPickup(mCName, xStart, yStart) {
var enemyMc = inGamePickupsMc.attachMovie(mCName, "ee" + numberOfDropped, numberOfDropped);
pickupsArray.push(new Pickup(enemyMc, rt, xStart, yStart, mCName));
numberOfDropped++;
}
function setupPickups() {
pickupsArray.splice(0);
var pickupData = rt.pickups[levelNumber - 1];
var ll = rt.Useful1.RandomNumber(1, 3);
var i = 0;
while (i < ll) {
var xStart = rt.Useful1.RandomNumber(100, 600);
var yStart = rt.Useful1.RandomNumber(100, 300);
setupPickup(rt.pickupMcs[rt.Useful1.RandomNumber(0, rt.pickupMcs.length - 1)], xStart, yStart);
i++;
}
}
function setupEnemies() {
enemyArray.splice(0);
var enemyData = rt.enemies[levelNumber - 1];
var i = 0;
while (i < int(enemyData.length / 5)) {
if (enemyData[(i * 5) + 1] == -1) {
var xStart = rt.Useful1.RandomNumber(100, 650);
} else {
var xStart = enemyData[(i * 5) + 1];
}
if (enemyData[(i * 5) + 2] == -1) {
if (levelNumber < 7) {
var yStart = rt.Useful1.RandomNumber(350, 400);
} else if (levelNumber < 12) {
var yStart = rt.Useful1.RandomNumber(250, 300);
} else if (levelNumber < 15) {
var yStart = rt.Useful1.RandomNumber(150, 300);
} else if (levelNumber < 20) {
var yStart = rt.Useful1.RandomNumber(50, 100);
}
} else {
var yStart = enemyData[(i * 5) + 2];
}
setupEnemy(enemyData[i * 5], xStart, yStart, enemyData[(i * 5) + 3], enemyData[(i * 5) + 4]);
i++;
}
}
function setupBackground() {
backgroundMc = inGameBackgroundMc.attachMovie("backgrounds", "background", 0);
var backgroundIndex = int((levelNumber - 1) / 2);
backgroundIndex++;
backgroundMc.gotoAndStop(backgroundIndex);
backgroundMc._x = 0;
backgroundMc._y = 0;
var i = 0;
while (i < 10) {
var i2 = 0;
while (i2 < 10) {
var sss = inGameBackgroundGraphicsMc.attachMovie(rt.backgroundTiles[backgroundIndex - 1], ("p" + (i * 10)) + i2, (i * 10) + i2);
sss._x = i2 * sss._width;
sss._y = i * sss._height;
sss.gotoAndStop(backgroundIndex - 1);
sss._alpha = 20;
i2++;
}
i++;
}
var groundMc2 = groundMc.attachMovie("backgroundGround1", "ground", 0);
groundMc2._x = 0;
groundMc2._y = 489;
groundMc2.gotoAndStop(backgroundIndex);
guageMc = inGameBackgroundGraphicsMc.attachMovie("windGuage", "guage", 1000);
guageMc._x = 350;
guageMc._y = 500;
var dir = rt.Useful1.RandomNumber(1, 10);
if (levelNumber < 7) {
if (dir < 6) {
guageMc.gotoAndStop("lowLeft");
} else {
guageMc.gotoAndStop("lowRight");
}
} else if (levelNumber < 12) {
if (dir < 4) {
guageMc.gotoAndStop("midLeft");
} else if (dir < 7) {
guageMc.gotoAndStop("midRight");
} else {
guageMc.gotoAndStop("midBothDir");
}
} else if (levelNumber < 15) {
if (dir < 4) {
guageMc.gotoAndStop("highLeft");
} else if (dir < 7) {
guageMc.gotoAndStop("highRight");
} else {
guageMc.gotoAndStop("midBothDir");
}
} else if (levelNumber < 20) {
guageMc.gotoAndStop("highBothDir");
}
hotAirBalloonMc = inGameBackgroundGraphicsMc.attachMovie("hotAirBalloon", "hab", 1100);
hotAirBalloonMc._x = rt.Useful1.RandomNumber(80, 570);
hotAirBalloonMc._y = -117;
}
function setupGoodGuy(mCName, xStart, yStart) {
var goodGuyMc = inGameObjectsMc.attachMovie(mCName, "gg" + numberOfDropped, numberOfDropped);
if (mCName == "dog_mc") {
var sp = rt.Useful1.RandomNumber(10, 25);
sp = sp / 10;
} else if (mCName == "bunny_mc") {
var sp = rt.Useful1.RandomNumber(14, 25);
sp = sp / 10;
} else if (mCName == "cat_mc") {
var sp = rt.Useful1.RandomNumber(15, 25);
sp = sp / 10;
} else if (mCName == "mouse_mc") {
var sp = rt.Useful1.RandomNumber(25, 35);
sp = sp / 10;
} else if (mCName == "racoon_mc") {
var sp = rt.Useful1.RandomNumber(20, 25);
sp = sp / 10;
}
goodGuysArray.push(new GoodGuy(goodGuyMc, rt, xStart, yStart, sp, mCName));
numberOfDropped++;
}
function setupGerms() {
removeGerms();
goodGuysArray.splice(0);
var furryData = rt.levelFurries[levelNumber - 1];
var i = 0;
while (i < furryData.length) {
var xStart = (-rt.Useful1.RandomNumber(40, 100));
var yStart = 300;
setupGoodGuy(furryData[i], xStart, yStart);
i++;
}
}
function checkForGameOver() {
if (goodGuysArray.length == 0) {
gameOver("out_of_time");
}
if (goodGuysArray.length < sizeTarget) {
gameOver("out_of_time");
}
}
function doWind() {
windRotation = guageMc.sock.sock._rotation;
trace("wind rotation");
trace(windRotation);
var rad = ((windRotation * Math.PI) / 180);
windVector.xVel = Math.cos(rad) * 5;
windVector.yVel = Math.sin(rad) * 5;
backgroundMc.wind.text = windVector.xVel;
trace("wind xVel");
trace(windVector.xVel);
}
function mainLoop() {
if (gameState == "play") {
if (rt.mouseButton == true) {
var i = 0;
while (i < goodGuysArray.length) {
var ball = goodGuysArray[i];
if ((ball.float == false) and (ball.falling == false)) {
trace(ball._x);
trace(ball._y);
trace(rt._xmouse);
trace(rt._ymouse);
if (ball.mC.hitTest(rt._xmouse, rt._ymouse, true)) {
ball.float = true;
ball.mC.gotoAndStop("balloon");
ball.mC.dog.balloon.gotoAndStop(rt.Useful1.RandomNumber(1, 5));
ball.mC.dog.dog.stop();
rt.mouseButton = false;
rt.sounds.fire.start(0, 1);
break;
}
}
i++;
}
}
doClock();
doWind();
checkForGameOver();
}
var i = 0;
while (i < goodGuysArray.length) {
goodGuysArray[i].main(i);
i++;
}
var i = 0;
while (i < enemyArray.length) {
enemyArray[i].main();
i++;
}
}
function decreaseScore() {
}
function decreaseSizeTarget(nn, spriteType) {
var ff = hotAirBalloonMc.balloon.balloon.inBasket.attachMovie(spriteType, "ff" + sizeTarget, sizeTarget);
ff.gotoAndStop("free");
ff._x = rt.Useful1.RandomNumber(0, 142);
ff._y = 0;
sizeTarget = sizeTarget - nn;
if (sizeTarget < 0) {
increaseScore(50);
} else {
increaseScore(10);
}
setTarget();
}
function increaseScore(increase) {
score = int(score + increase);
if (score > 0) {
setScore();
}
}
function turnMusicOff() {
var addd = inGameStatsMc.ingamestatsmc;
addd = addd.wg;
addd = addd.stats;
addd.music.gotoAndStop(2);
}
function turnMusicOn() {
var addd = inGameStatsMc.ingamestatsmc;
addd = addd.wg;
addd = addd.stats;
addd.music.gotoAndStop(1);
}
function setLives() {
var addd = inGameStatsMc.ingamestatsmc;
addd = addd.wg;
addd = addd.stats;
addd.lives.text = lives;
}
function setTarget() {
var addd = inGameStatsMc.ingamestatsmc;
addd = addd.wg;
addd = addd.stats;
addd.sizeTarget.text = sizeTarget;
}
function setLevel() {
var addd = inGameStatsMc.ingamestatsmc;
addd = addd.wg;
addd = addd.stats;
addd.level.text = levelNumber;
}
function setScore() {
var addd = inGameStatsMc.ingamestatsmc;
addd = addd.wg;
addd = addd.stats;
if (score < 10) {
addd.score.text = "0000" + score;
} else if (score < 100) {
addd.score.text = "000" + score;
} else if (score < 1000) {
addd.score.text = "00" + score;
} else if (score < 10000) {
addd.score.text = "0" + score;
} else {
addd.score.text = score;
}
}
function setBest() {
var addd = inGameStatsMc.ingamestatsmc;
addd = addd.wg;
addd = addd.stats;
if (bestScore < 10) {
addd.bestScore.text = "0000" + bestScore;
} else if (bestScore < 100) {
addd.bestScore.text = "000" + bestScore;
} else if (bestScore < 1000) {
addd.bestScore.text = "00" + bestScore;
} else if (bestScore < 10000) {
addd.bestScore.text = "0" + bestScore;
} else {
addd.bestScore.text = bestScore;
}
}
function doClock() {
clockDelay--;
if (clockDelay == 0) {
clockDelay = 20;
countDown();
}
}
function countDown() {
sec--;
if (minutes == 0) {
if (sec == 11) {
rt.clockSound.start(0, 5);
}
}
if (sec < 0) {
minutes--;
sec = 59;
if (minutes < 0) {
rt.clockSound.stop();
minutes = 0;
sec = 0;
gameOver("out_of_time");
}
}
displayTime();
}
function displayTime() {
if (sec < 10) {
secDisplay = "0" + sec;
} else {
secDisplay = String(sec);
}
if (minutes < 10) {
minDisplay = "0" + minutes;
} else {
minDisplay = String(minutes);
}
var addd = inGameStatsMc.ingamestatsmc;
addd = addd.wg;
trace(addd._name);
addd = addd.stats;
addd.time.text = ((minDisplay + ":") + secDisplay) + "s";
}
}
Symbol 619 MovieClip [__Packages.Missile2] Frame 0
class Missile2
{
var root, myParent, mC, mType, bonusCount, arrayIndex;
function Missile2 (clip, xStart, yStart, rt, type, xv, yv, pp, bonusC) {
root = rt;
xOrigin = xStart;
yOrigin = yStart;
myParent = pp;
xPos = 0;
yPos = 0;
xVel = xv;
yVel = yv;
mC = clip;
mType = type;
bonusCount = bonusC;
updatePosition();
}
function missileControl(ii) {
checkForOffStage(ii);
updatePosition();
collisionDetection();
}
function mCDeath() {
var explosion = root.Game.inGameExplosionsMc.attachMovie("explosion", "explosion" + root.Game.scoreIndex, root.Game.scoreIndex);
explosion._x = mC._x;
explosion._y = mC._y;
root.Game.scoreIndex++;
var bonusMcName = ("bonusMc" + root.Game.bonusCountArray[bonusCount]);
if (root.Game.bonusCountArray[bonusCount] == 4) {
root.sounds.extraPoints.start(0, 1);
}
root.Game.bonusCountArray[bonusCount]++;
var bonus = root.Game.inGameScoreMc.attachMovie(bonusMcName, "bonus" + root.Game.scoreIndex, root.Game.scoreIndex);
bonus._x = mC._x;
bonus._y = mC._y;
root.Game.scoreIndex++;
remove();
return(undefined);
}
function plotSticky(xx, yy) {
var sticky = root.inGameBackMc.attachMovie("StickyProjectile", "sticky" + root.stickies, root.stickies);
var x1 = ((root.inGameBackMc._x - root.inGameBackMc._x) - root.inGameBackMc._x);
sticky._x = mC._x + x1;
sticky._y = yy - root.inGameBackMc._y;
root.stickies++;
root.stickysArray.push(new Sticky(root, mC._x, mC._y, sticky));
}
function collisionDetection() {
var i = 0;
while (i < root.Game.badGuysArray.length) {
var ball = root.Game.badGuysArray[i];
if (myParent != ball) {
if (ball.collision.hitTest(mC)) {
root.Game.sizeTarget--;
root.Game.setTarget();
root.sounds.Explosion.start(0, 1);
ball.gotoAndPlay("hit");
root.Game.badGuysArray.splice(i, 1);
root.Game.increaseScore(10 * root.Game.bonusCountArray[bonusCount]);
mCDeath();
}
}
i++;
}
var i = 0;
while (i < root.Game.enemyArray.length) {
var saucer = root.Game.enemyArray[i].mC;
var saucer2 = saucer.collision;
if (saucer2.hitTest(mC)) {
root.saucerObject.stop();
root.sounds.GotSaucer.start(0, 1);
root.Game.doSaucerEffect(saucer);
}
i++;
}
}
function remove() {
var i1 = 0;
while (i1 < root.Game.missilesArray.length) {
if (this == root.Game.missilesArray[i1]) {
arrayIndex = i1;
}
i1++;
}
mC.removeMovieClip();
root.Game.missilesArray.splice(arrayIndex, 1);
}
function checkForOffStage(ii) {
if (mC._x < 0) {
remove();
}
if (mC._y < 0) {
remove();
}
if (mC._x > root.Game.movieWidth) {
remove();
}
if (mC._y > root.Game.movieHeight) {
remove();
}
}
function applyGravity() {
yVel = yVel + 1;
}
function updatePosition() {
xPos = xPos + xVel;
yPos = yPos + yVel;
var oldX = mC._x;
var oldY = mC._y;
mC._x = xOrigin + xPos;
mC._y = yOrigin + yPos;
var dx = (mC._x - oldX);
var dy = (mC._y - oldY);
var angle2 = Math.atan2(dy, dx);
mC._rotation = (angle2 * 180) / Math.PI;
trace("missile y");
trace(mC._y);
}
var xOrigin = 0;
var yOrigin = 0;
var xPos = 0;
var yPos = 0;
var xVel = 0;
var yVel = 0;
}
Symbol 620 MovieClip [__Packages.Sticky] Frame 0
class Sticky
{
var root, mC, arrayIndex;
function Sticky (rt, xStart, yStart, clip) {
root = rt;
xOrigin = xStart;
yOrigin = yStart;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
mC = clip;
mC.myObject = this;
}
function main() {
applyGravity();
collisionDetection();
updatePosition();
}
function mCDeath() {
remove();
return(undefined);
}
function collisionDetection() {
if (yVel > 0) {
trace("sticky");
var yVel2 = yVel;
var yVel3 = yVel;
if (yVel3 < 0) {
yVel3 = (yVel3 - yVel3) - yVel3;
}
var hit = false;
var yHit = 0;
trace(mC._x);
trace(mC._y);
trace(root.inGameBackMc._x);
trace(root.inGameBackMc._y);
trace(xOrigin);
trace(yOrigin);
var x1 = ((root.inGameBackMc._x - root.inGameBackMc._x) - root.inGameBackMc._x);
var xx = (xOrigin + x1);
var obg = new Object();
obg.x1 = mC._x;
obg.y1 = mC._y;
root.inGameBackMc.localToGlobal(obg.x1, obg.y1);
var i = 0;
while (i < int(yVel3)) {
var xm = (mC._x + root.inGameBackMc._x);
xm = xm + root.scrollIndexX;
var ym = ((mC._y = mC._y + root.inGameBackMc._y));
ym = ym + 10;
if (root.inGameBackMc.hitTest(xm, ym + i, true)) {
hit = true;
yHit = i;
i = int(yVel3);
}
i++;
}
if (hit == true) {
trace("yHit");
trace(yHit);
yVel = yVel - int(yVel2);
yVel = yHit + yVel;
}
}
}
function remove() {
var i = 0;
while (i < root.stickysArray.length) {
if (this == root.stickysArray[i]) {
arrayIndex = i;
}
i++;
}
mC.removeMovieClip();
root.stickysArray.splice(arrayIndex, 1);
}
function applyGravity() {
yVel = yVel + 16;
}
function updatePosition() {
xPos = xPos + xVel;
yPos = yPos + yVel;
var oldX = mC._x;
var oldY = mC._y;
var x1 = ((root.inGameBackMc._x - root.inGameBackMc._x) - root.inGameBackMc._x);
var xx = (xOrigin + x1);
var yy = (yOrigin - root.inGameBackMc._y);
mC._x = xx + xPos;
mC._y = yy + yPos;
}
var xOrigin = 0;
var yOrigin = 0;
var xPos = 0;
var yPos = 0;
var xVel = 0;
var yVel = 0;
}
Symbol 621 MovieClip [__Packages.Enemy1] Frame 0
class Enemy1
{
var root, currentRing, arrayIndex, hits, ringRadius, mcType, starAnimDelay, delayToFire, gotGold, energyBarOn, xDir, mC, homing, ringDrop, movingCloser;
function Enemy1 (clip, rt, xStart, yStart, spX, spY, ttype) {
root = rt;
currentRing = 1;
arrayIndex = 0;
hits = 0;
ringRadius = 255;
xOrigin = xStart;
yOrigin = yStart;
mcType = ttype;
starAnimDelay = 4;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
delayToFire = 100;
angle = 0.2;
gotGold = 0;
energyBarOn = 0;
degrees = 0;
radius = 255;
centerX = root.movieWidth / 2;
centerY = root.movieHeight / 2;
speed = spX;
speedY = spY;
xDir = 1;
mC = clip;
numberOfMissiles = 0;
energyStart = 100;
energy = energyStart;
homing = 0;
ringDrop = 20;
movingCloser = 0;
delayToFire = 50;
}
function main() {
moveEnemy();
collisionCheck();
if (mcType == "fallingStar") {
doStarTrail();
}
updatePosition();
}
function collisionCheck() {
var i = 0;
while (i < root.Game.goodGuysArray.length) {
if (root.Game.goodGuysArray[i].float == true) {
if (mC.collision.hitTest(root.Game.goodGuysArray[i].mC)) {
root.Game.goodGuysArray[i].hit();
}
}
i++;
}
}
function doStarTrail() {
starAnimDelay--;
if (starAnimDelay == 0) {
starAnimDelay = 8;
var msgMc = root.Game.inGameExplosionsMc.attachMovie("starAnim", "stars" + root.Game.starTrails, root.Game.starTrails);
msgMc._x = mC._x;
msgMc._y = mC._y;
root.Game.starTrails++;
}
}
function moveEnemy() {
xVel = xDir * speed;
if (mcType == "wheelMc") {
if ((yOrigin + yPos) > 560) {
speedY = -speedY;
yVel = speedY;
updatePosition();
} else if ((yOrigin + yPos) < -10) {
speedY = -speedY;
yVel = speedY;
updatePosition();
}
} else if ((yOrigin + yPos) > 600) {
xPos = root.Useful1.RandomNumber(100, 630);
xPos = xPos - 200;
yPos = 0;
} else if ((yOrigin + yPos) < -70) {
xPos = root.Useful1.RandomNumber(100, 630);
xPos = xPos - 200;
yPos = 590;
}
yVel = speedY;
if ((xOrigin + xPos) > 680) {
xDir = -1;
} else if ((xOrigin + xPos) < 40) {
xDir = 1;
}
if (xVel > 0) {
mC._xscale = -100;
} else {
mC._xscale = 100;
}
}
function changeDirection() {
if (xDir < 0) {
xDir = 1;
} else {
xDir = -1;
}
}
function remove(i, i3) {
var i = 0;
while (i < root.enemyArray.length) {
if (this == root.enemyArray[i]) {
arrayIndex = i;
}
i++;
}
mC.removeMovieClip();
root.enemyArray.splice(i, 1);
}
function updatePosition() {
xPos = xPos + xVel;
yPos = yPos + yVel;
mC._x = xOrigin + xPos;
mC._y = yOrigin + yPos;
}
var xOrigin = 0;
var yOrigin = 0;
var xPos = 0;
var yPos = 0;
var xVel = 0;
var yVel = 0;
var angle = 0;
var degrees = 0;
var centerX = 0;
var centerY = 0;
var radius = 0;
var speed = 0;
var speedY = 0;
var cost = 0;
var playerleft = 0;
var playerright = 0;
var gameObjectType = "";
var energyStart = 0;
var energy = 0;
var delayToFireMissile = 60;
var numberOfMissiles = 0;
}
Symbol 622 MovieClip [__Packages.Pickup] Frame 0
class Pickup
{
var root, mC, range, arrayIndex, hits, gravity, float, delayToFire, gotGold, energyBarOn, falling, xDir, target, homing, ringDrop, movingCloser, spriteType;
function Pickup (clip, rt, xStart, yStart, st) {
root = rt;
mC = clip;
range = 30;
arrayIndex = 0;
hits = 0;
gravity = 0.1;
xOrigin = xStart;
yOrigin = yStart;
float = false;
yPos = 0;
xVel = 0;
yVel = 0;
delayToFire = 30;
angle = 0.2;
gotGold = 0;
energyBarOn = 0;
degrees = 0;
radius = 255;
falling = false;
centerX = root.movieWidth / 2;
centerY = root.movieHeight / 2;
xDir = 1;
mC.gotoAndStop("run");
target = undefined;
numberOfMissiles = 0;
energyStart = 100;
energy = energyStart;
homing = 0;
ringDrop = 20;
movingCloser = 0;
delayToFire = 50;
spriteType = st;
updatePosition();
}
function applyGravity() {
yVel = yVel + 1;
}
function main(index1, index2) {
hotAirBalloonCollision();
updatePosition();
}
function hotAirBalloonCollision() {
if (root.Game.hotAirBalloonMc.balloon.collision.hitTest(mC)) {
root.Game.decreaseSizeTarget(1, spriteType);
remove();
}
}
function groundCollision() {
var yVel2 = yVel;
var yVel3 = yVel;
if (yVel3 < 0) {
yVel3 = (yVel3 - yVel3) - yVel3;
}
var xm = (mC._x + root.Background.mC._x);
var ym = (mC._y + root.Background.mC._y);
var i = 0;
while (i < int(yVel3)) {
if (root.Game.inGameBackgroundMc.hitTest(xm, ym + i, true)) {
trace("hit");
break;
}
i++;
}
trace(i);
yVel = yVel - int(yVel2);
yVel = i + yVel;
}
function hit() {
mC.dog.balloon.balloon.gotoAndPlay("pop");
falling = true;
float = false;
}
function moveEnemy() {
if (falling == true) {
if ((yOrigin + yPos) > 576) {
remove();
}
} else if (float == true) {
if (spriteType == "dog_mc") {
yVel = -4;
} else if (spriteType == "bunny_mc") {
yVel = -7;
} else if (spriteType == "cat_mc") {
yVel = -5;
} else if (spriteType == "mouse_mc") {
yVel = -9;
} else if (spriteType == "racoon_mc") {
yVel = -6;
}
if ((yOrigin + yPos) < -70) {
remove();
}
} else {
var yVel2 = yVel;
var yVel3 = yVel;
if (yVel3 < 0) {
yVel3 = (yVel3 - yVel3) - yVel3;
}
var xm = mC._x;
var ym = (mC._y + 30);
trace(root.Game.backgroundMc._name);
var i = 0;
while (i < int(yVel3)) {
if (root.Game.groundMc.hitTest(xm, ym + i, true)) {
trace("hit");
break;
}
i++;
}
trace(i);
yVel = yVel - int(yVel2);
yVel = i + yVel;
xVel = xDir * speed;
updatePosition();
var xm = mC._x;
var ym = (mC._y + 30);
if (root.Game.groundMc.hitTest(xm, ym + i, true)) {
var hit = 0;
var i = 0;
while (i < 10) {
yPos--;
mC._x = xOrigin + xPos;
mC._y = yOrigin + yPos;
if (root.Game.groundMc.hitTest(mC._x, mC._y, true) == false) {
trace("free");
hit = 1;
break;
}
i++;
}
if (hit == 0) {
changeDirection();
}
}
trace("cat x pos");
trace(xPos);
if ((xOrigin + xPos) > 690) {
xDir = -1;
} else if ((xOrigin + xPos) < 10) {
xDir = 1;
}
if (xVel > 0) {
mC._xscale = -100;
} else {
mC._xscale = 100;
}
}
}
function changeDirection() {
if (xDir < 0) {
xDir = 1;
} else {
xDir = -1;
}
}
function remove() {
var i = 0;
while (i < root.Game.pickupsArray.length) {
if (this == root.Game.pickupsArray[i]) {
arrayIndex = i;
}
i++;
}
mC.removeMovieClip();
root.Game.pickupsArray.splice(arrayIndex, 1);
}
function updatePosition() {
if (root.Game.gameState == "play") {
if (float == true) {
xVel = -root.Game.windVector.yVel;
}
}
xPos = xPos + xVel;
yPos = yPos + yVel;
mC._x = xOrigin + xPos;
mC._y = yOrigin + yPos;
}
var xOrigin = 0;
var yOrigin = 0;
var xPos = 0;
var yPos = 0;
var xVel = 0;
var yVel = 0;
var angle = 0;
var degrees = 0;
var centerX = 0;
var centerY = 0;
var radius = 0;
var speed = 0;
var cost = 0;
var playerleft = 0;
var playerright = 0;
var gameObjectType = "";
var energyStart = 0;
var energy = 0;
var delayToFireMissile = 60;
var numberOfMissiles = 0;
}
Symbol 623 MovieClip [__Packages.Useful] Frame 0
class Useful
{
function Useful () {
}
function getDistance(mc1, mc2) {
var dx2 = mc1._x;
var dy2 = mc1._y;
var dx = mc2._x;
var dy = mc2._y;
dx = dx2 - dx;
dy = dy2 - dy;
return(Math.sqrt((dx * dx) + (dy * dy)));
}
function RandomNumber(x, y) {
return(Math.round(Math.random() * (y - x)) + x);
}
function getArcVelocity(gravity, speed, xStart, yStart, xEnd, yEnd) {
var velocities = new Object();
var xd = (xEnd - xStart);
var yd = (yEnd - yStart);
var dist = Math.sqrt((xd * xd) + (yd * yd));
var steps = Math.ceil(dist / speed);
velocities.gravity = gravity;
velocities.steps = steps;
velocities.xStep = xd / steps;
velocities.yStep = yd / steps;
if (gravity > 0) {
velocities.yStep = velocities.yStep - ((steps * gravity) / 2);
}
return(velocities);
}
function localToGlobalXY(mc1) {
var temp = new Object();
temp.newX = 0;
temp.newY = 0;
var clip = mc1;
while (clip != _root) {
var xs = (temp.newX * (clip._xscale / 100));
var ys = (temp.newY * (clip._yscale / 100));
var r = (clip._rotation * (Math.PI/180));
temp.newX = (xs * Math.cos(r)) - (ys * Math.sin(r));
temp.newY = (xs * Math.sin(r)) + (ys * Math.cos(r));
temp.newX = temp.newX + clip._x;
temp.newY = temp.newY + clip._y;
clip = clip._parent;
}
return(temp);
}
function radian(degree) {
return((degree * Math.PI) / 180);
}
function addThrust(rot, speed) {
var thrustVectors = new Object();
thrustVectors.xVel = Math.cos(radian(rot)) * speed;
thrustVectors.yVel = Math.sin(radian(rot)) * speed;
return(thrustVectors);
}
function getVectorFromAngle(rotationVar) {
var vectorObject = new Object();
var angle = ((rotationVar * Math.PI) / 180);
vectorObject.vx = Math.cos(angle);
vectorObject.vy = Math.sin(angle);
return(vectorObject);
}
function capVectorSpeed(vx, vy, max) {
var vectorSpeedsCapped = new Object();
var len = Math.sqrt((vx * vx) + (vy * vy));
if (len > max) {
vx = vx * (max / len);
vy = vy * (max / len);
}
vectorSpeedsCapped.vx = vx;
vectorSpeedsCapped.vy = vy;
return(vectorSpeedsCapped);
}
}
Symbol 577 Button
on (release) {
gotoAndStop ("show_mj_anim");
}
Symbol 587 MovieClip Frame 1
this._visible = false;
Symbol 589 Button
on (release) {
_root.MindJoltSponsoredAPI.openLink(1);
}
Symbol 607 MovieClip Frame 38
stop();
Symbol 609 MovieClip Frame 1
_parent.stop();
Symbol 609 MovieClip Frame 54
mindlogo.stop();
Symbol 609 MovieClip Frame 60
mindlogo.play();
Symbol 609 MovieClip Frame 177
_parent.play();
stop();