Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
__com_mochibot__("dbbe90ad", this, 10301, true);
function check_domain() {
if (_root._url.indexOf("kongregate.com") > -1) {
_global.kongregate_site = true;
} else if (_root._url.indexOf("agame.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("EZA174FD", "2E045EBBF2E0DAA8");
MochiAd.showPreGameAd({id:"ccfd130e4c04dbf0", res:"700x576"});
sounds = new Object();
sounds.fire = new Sound(this);
sounds.fire.attachSound("ballFireFx");
sounds.fireMissile = new Sound(this);
sounds.fireMissile.attachSound("bing");
sounds.musicObject = new Sound(this);
sounds.musicObject.attachSound("music");
sounds.doh = new Sound(this);
sounds.doh.attachSound("doh");
sounds.cheer = new Sound(this);
sounds.cheer.attachSound("cheer");
sounds.popFX = new Sound(this);
sounds.popFX.attachSound("pop");
sounds.extraPoints = new Sound(this);
sounds.extraPoints.attachSound("bonusx4");
sounds.levelComplete = new Sound(this);
sounds.levelComplete.attachSound("gainlife");
sounds.Explosion = new Sound(this);
sounds.Explosion.attachSound("explosionFx");
sounds.GameOverRobot = new Sound(this);
sounds.GameOverRobot.attachSound("GameOverFx");
sounds.Appear = new Sound(this);
sounds.Appear.attachSound("Appear");
sounds.hitBlockFx = new Sound(this);
sounds.hitBlockFx.attachSound("hitBlockFx");
sounds.breakBlockFx = new Sound(this);
sounds.breakBlockFx.attachSound("breakBlockFx");
sounds.newBall = new Sound(this);
sounds.newBall.attachSound("newBallFx");
Frame 2
currentDomain = _root._url.split("/");
currentDomain = currentDomain[2];
if (currentDomain.indexOf("mindjolt.com") != -1) {
currentDomain = "mindjolt";
}
gotoAndPlay ("advert");
Frame 8
if (currentDomain == "mindjolt") {
gotoAndPlay ("mjintro_short");
} else {
gotoAndPlay ("mjintro_long");
}
Frame 15
gotoAndPlay ("start_game");
Instance of Symbol 482 MovieClip in Frame 23
/* no clip actions */
Frame 24
gotoAndStop ("start_game");
Frame 35
sounds.musicObject.start(0, 1000);
var levelBalls1 = new Array("ballMauve", "ballBlue", "ballGreen", "ballMauve", "ballBlue", "ballGreen", "ballMauve", "ballBlue", "ballGreen", "ballMauve", "ballBlue", "ballGreen", "ballMauve", "ballBlue", "ballGreen");
var levelBallsArray = new Array(levelBalls1, levelBalls1, levelBalls1, levelBalls1, levelBalls1, levelBalls1, levelBalls1, levelBalls1, levelBalls1, levelBalls1);
function setupGame() {
Mouse.hide();
Game = new GameGame(gameMc, this, 700, 560, 10, 20, startLives);
Presentation = new GamePresentation(this);
Presentation.setupSplashScreen(splashScreenElements);
this.onEnterFrame = mainLoop;
}
function runSounds() {
if (soundFade == "out") {
soundFadeControl = soundFadeControl - 2;
setAllSounds(soundFadeControl);
if (soundFadeControl == 0) {
soundSwitch = "off";
soundFade = "done";
}
} else if (soundFade == "in") {
soundFadeControl = soundFadeControl + 2;
setAllSounds(soundFadeControl);
if (soundFadeControl >= 50) {
soundSwitch = "on";
soundFade = "done";
}
}
}
function setAllSounds(soundFadeControl) {
sounds.fire.setVolume(soundFadeControl);
sounds.fireMissile.setVolume(soundFadeControl);
sounds.musicObject.setVolume(soundFadeControl);
sounds.doh.setVolume(soundFadeControl);
sounds.cheer.setVolume(soundFadeControl);
sounds.popFX.setVolume(soundFadeControl);
sounds.extraPoints.setVolume(soundFadeControl);
sounds.levelComplete.setVolume(soundFadeControl);
sounds.Explosion.setVolume(soundFadeControl);
sounds.GameOverRobot.setVolume(soundFadeControl);
sounds.Appear.setVolume(soundFadeControl);
sounds.GotSaucer.setVolume(soundFadeControl);
}
function quitGame() {
obj.vx = 0;
obj.vy = 0;
Game.score2 = 0;
Player.myCurrentScore = 0;
obj.clip.removeMovieClip();
Game.msgMc.removeMovieClip();
Game.gameState = "game_over_restart";
}
function clearSprites() {
var _local3 = Game.missilesArray.length - 1;
var _local1 = _local3;
while (_local1 >= 0) {
Game.missilesArray[_local1].remove();
_local1--;
}
var _local2 = Game.enemyArray.length - 1;
_local1 = _local2;
while (_local1 >= 0) {
Game.enemyArray[_local1].remove();
_local1--;
}
}
function mainLoop() {
runSounds();
if (Game.gameState == "setup") {
Game.setupGerms();
clearSprites();
Game.clockDelay = 20;
Player = new GamePlayer(Game.playerMc, this, 40, Game.movieHeight - 60, Key);
Presentation.splashScreenMc.removeMovieClip();
Game.levelLifeDone = false;
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 = balloonLevelSizes[Game.levelNumber - 1];
Game.lives = startLives;
Game.setLives();
Game.setTarget();
Game.setScore();
Game.setScore2();
Game.setLevel();
Player.xOrigin = _xmouse;
Player.xPos = 0;
Game.oldMouseX = _xmouse;
Game.oldMouseY = _ymouse;
if (musicPlaying == "off") {
Game.turnMusicOff();
} else {
Game.turnMusicOn();
}
Game.gameState = "pre_start";
} else if (Game.gameState == "start_new_level") {
Game.levelNumber++;
clearSprites();
Game.setupGerms();
Game.clockDelay = 20;
Game.saucerChance = 60;
Game.saucerDelay = -1;
if (Useful1.RandomNumber(1, 100) < (Game.saucerChance + Game.levelNumber)) {
Game.saucerDelay = Useful1.RandomNumber(50, 200);
}
Game.enemyArray.splice(0);
Game.sizeTarget = balloonLevelSizes[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.setLives();
Game.setTarget();
Game.setScore();
Game.setScore2();
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") {
this.Mouse.show();
Game.turnOffTip();
clearSprites();
Game.enemyArray.splice(0);
Game.clockDelay = 20;
Presentation.setupSplashScreen(splashScreenElements);
Game.score = 0;
Game.levelNumber = 1;
Game.levelLifeDone = false;
Game.bonusCountArray.splice(0);
Player.myCurrentScore = 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") {
if (Game.timeBonusDone == false) {
if (Game.timeBonus > Game.currentTimeBonus) {
Game.currentTimeBonus = Game.currentTimeBonus + 2;
Game.msgMc.msg.timeBonus.text = ("+" + Game.currentTimeBonus) + "x10";
Game.score = Game.score + 20;
Game.setScore();
var _local2 = Game.inGameStatsMc.ingamestatsmc;
_local2 = _local2.timer;
_local2.maskMc._y = _local2.maskMc._y + 2;
} else {
Game.msgMc.msg.totalScore.text = Game.score;
Game.timeBonusDone = true;
Game.setScore();
}
} else if (Game.accuracyBonus > Game.currentAccuracyBonus) {
Game.currentAccuracyBonus = Game.currentAccuracyBonus + 20;
Game.msgMc.msg.accuracyBonus.text = "+" + Game.currentAccuracyBonus;
Game.score = Game.score + 10;
Game.setScore();
} else {
Game.msgMc.msg.accuracyBonus.text = ("+" + Game.currentAccuracyBonus) + "%";
Game.msgMc.msg.totalScore.text = Game.score;
Game.msgMc.play();
Game.setScore();
}
} else if (Game.gameState == "play") {
Game.mainLoop();
}
}
function setupGoodGuy(mCName, xStart, yStart, grav, rg) {
var _local3 = Game.inGameObjectsMc.attachMovie(mCName, "gg" + Game.numberOfDropped, Game.numberOfDropped);
var _local2 = Useful1.RandomNumber(5, 10);
_local2 = _local2 / 10;
Game.goodGuysArray.push(new GoodGuy(_local3, this, xStart, yStart, _local2, mCName, grav, rg));
}
function setupPickups() {
var _local3 = 0;
while (_local3 < Game.levelHeightBlocks) {
var _local1 = 0;
while (_local1 < Game.levelWidthBlocks) {
var _local2 = (_local3 * Game.levelWidthBlocks) + _local1;
if ((_local3 == 0) or (_local3 == (Game.levelHeightBlocks - 3))) {
squareNamesArray[_local2] = "edgeSquare";
} else if ((_local1 == 0) or (_local1 == (Game.levelWidthBlocks - 1))) {
squareNamesArray[_local2] = "edgeSquare";
} else {
squareNamesArray[_local2] = "square";
}
_local1++;
}
_local3++;
}
}
function setupPanel() {
ix = 0;
iy = 0;
ii = 0;
var _local2 = 0;
while (_local2 < gameObjectNames.length) {
var _local1 = Game.inGameStatsMc.ingamestatsmc;
_local1 = _local1.wg;
_local1 = _local1["w" + (_local2 + 1)];
_local1 = _local1.wb;
Game.rightPanelGameObjects[_local2] = _local1;
Game.rightPanelGameObjects[_local2].indexA = _local2;
Game.rightPanelGameObjects[_local2].gameObjectBtn.onRelease = clickRightPanelObject;
Game.rightPanelGameObjects[_local2].gameObjectBtn.onRollOver = rollOverRightPanelObject;
Game.rightPanelGameObjects[_local2].gameObjectBtn.onRollOut = rollOutRightPanelObject;
_local2++;
}
}
function clickRightPanelObject() {
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() {
}
function rollOutRightPanelObject() {
}
function dropGameObject() {
var _local4 = _xmouse;
var _local3 = _ymouse;
if (Game.currentPickedUp != undefined) {
if (checkIfOverLapping() == true) {
var _local5 = 0;
var _local2 = gameObjectCost[Game.currentPickedUp.indexA];
var _local1 = Game.score;
_local1 = _local1 - _local2;
if (_local1 >= 0) {
setupGoodGuy("magnet1", _local4, _local3, 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 CollisionDetectionObj = new CollisionDetection();
var ballColour = new Array("orange", "purple", "green", "blue", "red");
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;
keyboard = new Object();
var PLAYER_STATUS = "";
var keypress = 0;
keyboard.onKeyDown = function () {
if (Game.pickupType != "multi") {
if (Key.isDown(38)) {
PLAYER_STATUS = "UP";
}
if (Key.isDown(40)) {
PLAYER_STATUS = "DOWN";
}
if (Key.getCode() == 65) {
keypress = 1;
} else if (Key.getCode() == 83) {
keypress = 2;
}
}
};
keyboard.onKeyUp = function () {
if (PLAYER_STATUS == "UP") {
if (Key.getCode() == 38) {
Player.currentColour--;
if (Player.currentColour < 0) {
Player.currentColour = 4;
}
Game.changeStatsColour();
Player.gun.bChar.gotoAndStop(ballColour[Player.currentColour]);
PLAYER_STATUS = "";
}
} else if (PLAYER_STATUS == "DOWN") {
if (Key.getCode() == 40) {
Player.currentColour++;
if (Player.currentColour > 4) {
Player.currentColour = 0;
}
Game.changeStatsColour();
Player.gun.bChar.gotoAndStop(ballColour[Player.currentColour]);
PLAYER_STATUS = "";
}
}
if (Key.getCode() == 80) {
if (Game.pauseSwitch == false) {
if (Game.gameState == "play") {
Game.pauseOn();
}
} else {
Game.pauseOff();
}
}
if (keypress == 1) {
if (Key.getCode() == 65) {
Player.currentColour--;
if (Player.currentColour < 0) {
Player.currentColour = 4;
}
Game.changeStatsColour();
Player.gun.bChar.gotoAndStop(ballColour[Player.currentColour]);
}
} else if (keypress == 2) {
if (Key.getCode() == 83) {
Player.currentColour++;
if (Player.currentColour > 4) {
Player.currentColour = 0;
}
Game.changeStatsColour();
Player.gun.bChar.gotoAndStop(ballColour[Player.currentColour]);
}
}
};
Key.addListener(keyboard);
var squareNamesArray = new Array();
var mousePointer = this.attachMovie("crosshair", "crosshair", 50);
mousePointer.yOld = 0;
var bonusCountDelay = 1;
var titleInfo = {mCName:"title", xPos:80, yPos:30};
var playInfo = {mCName:"playBtnAnim", xPos:170, yPos:120};
var instructionsInfo = {mCName:"instructionsBtnAnim", xPos:60, yPos:200};
var controlsInfo = {mCName:"controlsBtnAnim", xPos:80, yPos:240};
var highscoresInfo = {mCName:"highscoresBtnAnim", xPos:60, yPos:400};
var SplashMusicBtn = {mCName:"SplashMusicBtn", xPos:250, yPos:460};
var moreGamesBtn = {mCName:"moreGamesBtn", xPos:260, yPos:340};
if (_global.mindjolt_site == true) {
var splashScreenElements = [playInfo, instructionsInfo, controlsInfo, SplashMusicBtn, moreGamesBtn];
} else {
var splashScreenElements = [playInfo, instructionsInfo, controlsInfo, highscoresInfo, SplashMusicBtn, moreGamesBtn];
}
var startLives = 3;
mousePointer.onEnterFrame = function () {
this._x = _xmouse;
yOld = this._y;
this._y = _ymouse;
};
var mouseButton = false;
var mouseButtonUp = false;
this.onMouseUp = function () {
mouseButton = false;
mouseButtonUp = true;
};
this.onMouseDown = function () {
if (Player.ballFired == false) {
mouseButton = true;
} else {
Game.missilesArray[0].mCDeath();
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 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 [towerExplodeBit] Frame 1
gotoAndStop(_parent.ballColour);
Symbol 24 MovieClip [towerExplodeAnim] Frame 12
removeMovieClip("");
stop();
Symbol 25 MovieClip [explosion] Frame 1
var z = 0;
var Count = 0;
var particles = this.createEmptyMovieClip("particles", 0);
var mC = "";
var rot = 0;
var newMc;
particles.onEnterFrame = function () {
while (z < 20) {
Count++;
mC = "s" + Count;
rot = Number(random(360)) + 1;
newMc = attachMovie("towerExplodeAnim", mC, Count);
newMC._xscale = 20 + Number(Count * 0.5);
newMc._rotation = rot;
newMc.ballColour = ballColour;
z++;
}
z = 0;
if (Count > 20) {
removeMovieClip(this);
}
};
Symbol 26 MovieClip [explosionEnemy] Frame 1
var z = 0;
var Count = 0;
var particles = this.createEmptyMovieClip("particles", 0);
var mC = "";
var rot = 0;
var newMc;
particles.onEnterFrame = function () {
while (z < 6) {
Count++;
mC = "s" + Count;
rot = Number(random(360)) + 1;
newMc = attachMovie("rocket", mC, Count);
newMC._xscale = 20 + Number(Count * 0.5);
newMc._rotation = rot;
z++;
}
z = 0;
if (Count > 20) {
removeMovieClip(this);
}
};
Symbol 27 MovieClip [explosion2] Frame 1
var z = 0;
var Count = 0;
var particles = this.createEmptyMovieClip("particles", 0);
var mC = "";
var rot = 0;
var newMc;
particles.onEnterFrame = function () {
while (z < 35) {
Count++;
mC = "s" + Count;
rot = Number(random(360)) + 1;
newMc = attachMovie("towerExplodeAnim", mC, Count);
newMC._xscale = 20 + Number(Count * 0.5);
newMc._rotation = rot;
z++;
}
z = 0;
if (Count > 30) {
removeMovieClip(this);
}
};
Symbol 32 MovieClip Frame 1
stop();
Symbol 40 MovieClip Frame 8
_parent._visible = false;
Symbol 41 MovieClip [ballGreen] Frame 1
stop();
Symbol 44 MovieClip Frame 1
stop();
Symbol 45 MovieClip [ballMauve] Frame 1
stop();
Symbol 48 MovieClip Frame 1
stop();
Symbol 49 MovieClip [ballBlue] Frame 1
stop();
Symbol 65 MovieClip Frame 1
stop();
explosionDone = false;
Symbol 65 MovieClip Frame 15
explosionDone = true;
_visible = false;
stop();
Symbol 82 MovieClip Frame 1
stop();
Symbol 83 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 1
stop();
Symbol 93 MovieClip Frame 9
this._visible = false;
stop();
Symbol 102 MovieClip [block1] Frame 1
stop();
Symbol 129 MovieClip [backgrounds] Frame 1
stop();
Symbol 136 MovieClip Frame 1
stop();
Symbol 137 MovieClip [ballRed] Frame 1
stop();
Symbol 150 MovieClip Frame 1
stop();
Symbol 174 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 175 MovieClip [gameOverMsg] Frame 1
if (_root.Game.levelNumber >= 10) {
msg.endTitle.gotoAndStop(2);
}
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 176 MovieClip [gameOverMsgAnim] Frame 10
stop();
Symbol 176 MovieClip [gameOverMsgAnim] Frame 23
_parent._parent._parent._parent._parent.Game.gameState = "game_over_restart";
stop();
Symbol 185 MovieClip Frame 1
stop();
Symbol 185 MovieClip Frame 10
gotoAndStop (1);
Symbol 196 MovieClip [ballCharacter] Frame 1
stop();
Symbol 200 MovieClip [badBall] Frame 1
stop();
Symbol 200 MovieClip [badBall] Frame 5
stop();
Symbol 200 MovieClip [badBall] Frame 18
this.removeMovieClip();
Symbol 204 MovieClip [M_stars1] Frame 15
this.removeMovieClip();
Symbol 205 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 205 MovieClip [starAnim] Frame 24
this.removeMovieClip();
stop();
Symbol 217 MovieClip Frame 1
stop();
Symbol 221 MovieClip Frame 1
stop();
Symbol 223 MovieClip [loseLifeMsgAnim] Frame 48
if (_parent._parent._parent._parent._parent.Game.gameState != "restart") {
_parent._parent._parent._parent._parent.Game.gameState = "restart";
}
this.removeMovieClip();
Symbol 227 MovieClip [getReadyMsgAnim] Frame 11
msg.levelTxt.text = "Level " + _parent._parent._parent._parent._parent.Game.levelNumber;
Symbol 227 MovieClip [getReadyMsgAnim] Frame 74
_parent._parent._parent._parent._parent.Game.gameState = "play";
this.removeMovieClip();
Symbol 239 MovieClip [levelCompleteMsgs] Frame 1
stop();
Symbol 241 MovieClip [levelCompleteMsgAnim] Frame 15
msg.titleMc.gotoAndStop(howWellDone);
Symbol 241 MovieClip [levelCompleteMsgAnim] Frame 31
_parent._parent._parent._parent._parent.Game.gameState = "display_bonus";
_parent._parent._parent._parent._parent.sounds.levelComplete.start(0, 1);
stop();
Symbol 241 MovieClip [levelCompleteMsgAnim] Frame 81
_parent._parent._parent._parent._parent.Game.gameState = "start_new_level";
stop();
Symbol 245 MovieClip [pausedMsgAnim] Frame 33
stop();
Symbol 245 MovieClip [pausedMsgAnim] Frame 42
this.removeMovieClip();
Symbol 250 MovieClip [square] Frame 1
stop();
Symbol 263 MovieClip Frame 1
stop();
Symbol 271 MovieClip Frame 1
stop();
Symbol 294 MovieClip Frame 1
stop();
Symbol 295 MovieClip Frame 1
stop();
Symbol 297 MovieClip Frame 1
stop();
Symbol 298 MovieClip Frame 1
stop();
Symbol 300 MovieClip Frame 1
stop();
Symbol 301 MovieClip Frame 1
stop();
Symbol 308 Button
on (release) {
_root.MindJoltSponsoredAPI.openLink(6);
}
Symbol 317 Button
on (release) {
getURL ("http://www.flashgamemaker.com", _blank);
}
Symbol 348 MovieClip [splashInfo] Frame 1
stop();
Symbol 348 MovieClip [splashInfo] Frame 2
stop();
backBtn.onRelease = function () {
_root.Presentation.setupPresentationElements();
gotoAndStop (1);
};
nextBtn.onRelease = function () {
gotoAndStop (3);
};
Symbol 348 MovieClip [splashInfo] Frame 3
backBtn2.onRelease = function () {
gotoAndStop (2);
};
backBtn.onRelease = function () {
_root.Presentation.setupPresentationElements();
gotoAndStop (1);
};
nextBtn.onRelease = function () {
gotoAndStop (4);
};
Symbol 348 MovieClip [splashInfo] Frame 4
backBtn2.onRelease = function () {
gotoAndStop (3);
};
backBtn.onRelease = function () {
_root.Presentation.setupPresentationElements();
gotoAndStop (1);
};
Symbol 348 MovieClip [splashInfo] Frame 5
backBtn.onRelease = function () {
_root.Presentation.setupPresentationElements();
gotoAndStop (1);
};
Symbol 348 MovieClip [splashInfo] Frame 6
function moveOn() {
_root.Presentation.setupPresentationElements();
gotoAndStop (1);
}
backBtn.onRelease = function () {
_root.mochi.MochiScores.closeLeaderboard();
moveOn();
};
var leaderBoardMc = this.createEmptyMovieClip("leaderBoard", 1);
leaderBoardMc._x = -360;
leaderBoardMc._y = -200;
mochi.MochiScores.showLeaderboard({boardID:"e55af2c20016c000", clip:leaderBoardMc, onClose:moveOn, onError:moveOn});
stop();
Symbol 356 MovieClip [bonusMc1] Frame 16
this.removeMovieClip();
Symbol 361 MovieClip [bonusMc2] Frame 16
this.removeMovieClip();
Symbol 366 MovieClip [bonusMc3] Frame 16
this.removeMovieClip();
Symbol 371 MovieClip [bonusMc4] Frame 16
this.removeMovieClip();
Symbol 378 MovieClip [bonusMc1000] Frame 16
this.removeMovieClip();
Symbol 381 MovieClip Frame 1
stop();
Symbol 383 MovieClip Frame 1
stop();
Symbol 385 MovieClip Frame 1
stop();
Symbol 389 MovieClip Frame 1
stop();
Symbol 390 MovieClip [tiles] Frame 1
stop();
Symbol 394 MovieClip [points] Frame 27
this.removeMovieClip();
Symbol 395 MovieClip [ballFade] Frame 6
this.removeMovieClip();
Symbol 399 MovieClip [points50] Frame 13
this.removeMovieClip();
Symbol 405 MovieClip [previewMc] Frame 1
stop();
Symbol 415 MovieClip Frame 1
stop();
Symbol 417 MovieClip [SplashMusicBtn] Frame 1
if (_root.musicPlaying == "off") {
musicMc.gotoAndStop(2);
}
musicBtn.onRelease = function () {
if (musicMc._currentframe == 1) {
_root.soundFade = "out";
_root.musicPlaying = "off";
musicMc.gotoAndStop(2);
} else {
_root.soundFade = "in";
_root.musicPlaying = "on";
musicMc.gotoAndStop(1);
}
};
Symbol 433 MovieClip [splashscreenbuttons] Frame 1
if (_global.mindjolt_site == false) {
gotoAndStop (2);
}
stop();
Symbol 433 MovieClip [splashscreenbuttons] Frame 2
highscoresBtnAnim2.onRelease = function () {
_root.MindJoltSponsoredAPI.openLink(3);
};
moreGamesBtnAnim2.onRelease = function () {
_root.MindJoltSponsoredAPI.openLink(2);
};
Symbol 437 MovieClip [tipsMc] Frame 1
stop();
Symbol 442 MovieClip [strengthGuageMc] Frame 1
stop();
Symbol 447 MovieClip [tryAgainMsgAnim] Frame 75
_parent._parent._parent._parent._parent.Game.gameState = "play";
this.removeMovieClip();
Symbol 483 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 != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().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 closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
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 scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 484 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _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 get childClip() {
return(_clip);
}
static function getVersion() {
return("1.35");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.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) && (_clip == undefined)) {
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
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();
return(_clip);
}
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);
}
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:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.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 ((_clip == 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 function addLinkEvent(url, burl, btn, onClick) {
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
var _local3;
var _local2 = new LoadVars();
var timeout = 1500;
var t0 = getTimer();
var ping = this.createEmptyMovieClip("ping", 777);
this.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
delete this.ping;
getURL (url + s, "_blank");
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
delete this.ping;
getURL (burl, "_blank");
}
};
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
if (onClick != undefined) {
onClick();
}
};
}
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 485 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();
connected = true;
}
}
static function submitScore(name, score, mode) {
var _local4 = null;
if (flashCookie.data.userToken != null) {
_local4 = flashCookie.data.userToken;
} else {
_local4 = null;
}
var _local8 = new com.meychi.ascrypt.RC4();
var _local5 = com.meychi.ascrypt.RC4.encrypt((((("score=" + score) + "&name=") + escape(name)) + ((mode != null) ? ("&mode=" + escape(mode)) : "")) + ((_local4 != null) ? ("&userToken=" + escape(_local4)) : ""), key);
var _local3 = new LoadVars();
var _local6 = new LoadVars();
_local3.gameId = gameId;
_local3.session = _local5;
_local6.onLoad = function (success) {
if (success) {
var _local4 = this.session;
if (_local4 != null) {
var _local5 = new com.meychi.ascrypt.RC4();
var _local2 = new LoadVars();
_local2.decode(com.meychi.ascrypt.RC4.decrypt(_local4, com.mindjolt.api.as2.MindJoltSponsoredAPI.key));
var _local3 = _local2.userToken;
if (_local3 != null) {
com.mindjolt.api.as2.MindJoltSponsoredAPI.flashCookie.data.userToken = _local3;
com.mindjolt.api.as2.MindJoltSponsoredAPI.flashCookie.flush();
}
}
}
};
_local3.sendAndLoad("http://game.mindjolt.com/servlet/GameScore", _local6, "POST");
}
static function openLink(linkId, mode) {
var _local1 = ((((("http://game.mindjolt.com/servlet/GameLink?key=" + gameId) + "&link=") + linkId) + ((mode != null) ? ("&mode=" + escape(mode)) : "")) + "&httpref=") + escape(_url);
getURL (_local1, "_blank");
}
static var connected = false;
}
Symbol 486 MovieClip [__Packages.com.meychi.ascrypt.RC4] Frame 0
class com.meychi.ascrypt.RC4
{
function RC4 () {
}
static function encrypt(src, key) {
var _local3 = strToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToHex(_local2));
}
static function decrypt(src, key) {
var _local3 = hexToChars(src);
var _local1 = strToChars(key);
var _local2 = calculate(_local3, _local1);
return(charsToStr(_local2));
}
static function initialize(pwd) {
var _local2 = 0;
var _local3;
var _local4 = pwd.length;
var _local1 = 0;
while (_local1 <= 255) {
mykey[_local1] = pwd[_local1 % _local4];
sbox[_local1] = _local1;
_local1++;
}
_local1 = 0;
while (_local1 <= 255) {
_local2 = ((_local2 + sbox[_local1]) + mykey[_local1]) % 256;
_local3 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local3;
_local1++;
}
}
static function calculate(plaintxt, psw) {
initialize(psw);
var _local1 = 0;
var _local2 = 0;
var _local9 = new Array();
var _local7;
var _local5;
var _local6;
var _local3 = 0;
while (_local3 < plaintxt.length) {
_local1 = (_local1 + 1) % 256;
_local2 = (_local2 + sbox[_local1]) % 256;
_local5 = sbox[_local1];
sbox[_local1] = sbox[_local2];
sbox[_local2] = _local5;
var _local4 = (sbox[_local1] + sbox[_local2]) % 256;
_local7 = sbox[_local4];
_local6 = plaintxt[_local3] ^ _local7;
_local9.push(_local6);
_local3++;
}
return(_local9);
}
static function charsToHex(chars) {
var _local4 = new String("");
var _local3 = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
var _local1 = 0;
while (_local1 < chars.length) {
_local4 = _local4 + (_local3[chars[_local1] >> 4] + _local3[chars[_local1] & 15]);
_local1++;
}
return(_local4);
}
static function hexToChars(hex) {
var _local3 = new Array();
var _local1 = ((hex.substr(0, 2) == "0x") ? 2 : 0);
while (_local1 < hex.length) {
_local3.push(parseInt(hex.substr(_local1, 2), 16));
_local1 = _local1 + 2;
}
return(_local3);
}
static function charsToStr(chars) {
var _local3 = new String("");
var _local1 = 0;
while (_local1 < chars.length) {
_local3 = _local3 + String.fromCharCode(chars[_local1]);
_local1++;
}
return(_local3);
}
static function strToChars(str) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < str.length) {
_local3.push(str.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
static var sbox = new Array(255);
static var mykey = new Array(255);
}
Symbol 487 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.5");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 488 MovieClip [__Packages.GamePlayer] Frame 0
class GamePlayer
{
var KeyCheck, missileDistFromGun, root, currentColour, lastBallDone, shotsFired, shotsLimit, numberOfMissiles, keypress, jumpTime, mouseButton, mC, shotStrength, gun, gravitySpeed, speed, pickupDelay, myCurrentScore, movingArrow, ballFired, oldDist, arrowMc, targetX, ball;
function GamePlayer (clip, rt, xStart, yStart, k) {
KeyCheck = k;
missileDistFromGun = 40;
xOrigin = xStart;
yOrigin = yStart - 35;
dx = 0;
root = rt;
dy = 0;
currentColour = 0;
lastBallDone = false;
angle = 0;
shotsFired = 0;
shotsLimit = 2;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
xVelOld = 0;
numberOfMissiles = 0;
yVelOld = 0;
keypress = 0;
jump = 0;
jumpTime = 10;
mouseButton = 0;
mC = clip;
shotStrength = 6;
gun = mC.attachMovie("arrow", "BallMc", 1);
gravitySpeed = 2;
speed = 5;
pickupDelay = 0;
myCurrentScore = 0;
movingArrow = false;
ballFired = false;
vx = 0;
oldDist = root.Useful1.getDistance(mC._x, mC._y, root._xmouse, root._ymouse);
loadArrow();
updatePosition();
}
function getBallColour() {
var _local2 = 0;
while (_local2 < root.Game.gameBallsArray.length) {
var _local7 = false;
var _local3 = 0;
while (_local3 < root.Game.goodGuysArray.length) {
if (root.Game.goodGuysArray[_local3].spriteType != "wall") {
if (root.Game.goodGuysArray[_local3].spriteType != "bomb") {
if (root.Game.goodGuysArray[_local3].spriteType != "break") {
if (root.Game.goodGuysArray[_local3].spriteType != "clock") {
var _local5 = root.Game.goodGuysArray[_local3].spriteType;
var _local4 = "";
if (root.Game.gameBallsArray[_local2].spriteType == "ballRed") {
_local4 = "red";
} else if (root.Game.gameBallsArray[_local2].spriteType == "ballBlue") {
_local4 = "blue";
} else if (root.Game.gameBallsArray[_local2].spriteType == "ballGreen") {
_local4 = "green";
} else if (root.Game.gameBallsArray[_local2].spriteType == "ballMauve") {
_local4 = "purple";
}
if (_local4 == _local5) {
_local7 = true;
break;
}
}
}
}
}
_local3++;
}
if (_local7 == false) {
var _local6 = root.Game.inGameStatsMc.ingamestatsmc;
_local6 = _local6.holderMc;
_local3 = 0;
while (_local3 < root.Game.goodGuysArray.length) {
if (root.Game.goodGuysArray[_local3].spriteType != "wall") {
if (root.Game.goodGuysArray[_local3].spriteType != "bomb") {
if (root.Game.goodGuysArray[_local3].spriteType != "break") {
if (root.Game.goodGuysArray[_local3].spriteType != "clock") {
var _local5 = root.Game.goodGuysArray[_local3].spriteType;
root.Game.gameBallsArray[_local2].mC.removeMovieClip();
if (_local5 == "red") {
root.Game.gameBallsArray[_local2].spriteType = "ballRed";
root.Game.gameBallsArray[_local2].mC = _local6.attachMovie("ballRed", ("ball" + root.Game.tilesNumber) + 13000, root.Game.tilesNumber + 13000);
} else if (_local5 == "blue") {
root.Game.gameBallsArray[_local2].spriteType = "ballBlue";
root.Game.gameBallsArray[_local2].mC = _local6.attachMovie("ballBlue", ("ball" + root.Game.tilesNumber) + 13000, root.Game.tilesNumber + 13000);
} else if (_local5 == "green") {
root.Game.gameBallsArray[_local2].spriteType = "ballGreen";
root.Game.gameBallsArray[_local2].mC = _local6.attachMovie("ballGreen", ("ball" + root.Game.tilesNumber) + 13000, root.Game.tilesNumber + 13000);
} else if (_local5 == "purple") {
root.Game.gameBallsArray[_local2].spriteType = "ballMauve";
root.Game.gameBallsArray[_local2].mC = _local6.attachMovie("ballMauve", ("ball" + root.Game.tilesNumber) + 13000, root.Game.tilesNumber + 13000);
}
root.Game.gameBallsArray[_local2].updatePosition();
root.Game.tilesNumber++;
break;
}
}
}
}
_local3++;
}
}
_local2++;
}
}
function loadArrow() {
arrowMc = gun.arm.attachMovie("arrow2R", "arrowMc", 1);
arrowMc._x = -(arrowMc._width / 2);
arrowMc._y = 0;
targetX = 0;
if (root.Game.gameBallsArray.length > 0) {
ball = arrowMc.attachMovie(root.Game.gameBallsArray[0].spriteType, "ball", 1);
ball.spriteType = root.Game.gameBallsArray[0].spriteType;
ball._x = -50;
root.Game.gameBallsArray[0].mC.removeMovieClip();
root.Game.gameBallsArray.shift();
var _local2 = 0;
while (_local2 < root.Game.gameBallsArray.length) {
root.Game.gameBallsArray[_local2].xVel = -root.Game.gameBallsArray[_local2].mC._width;
root.Game.gameBallsArray[_local2].updatePosition();
root.Game.gameBallsArray[_local2].xVel = 0;
_local2++;
}
} else {
lastBallDone = true;
}
}
function mainLoop() {
var _local4 = root.Useful1.pointTowards(mC._x, mC._y, root._xmouse, root._ymouse);
var _local3 = _local4.spriteRotation;
var _local2 = _local3;
if (_local2 > 0) {
if (_local2 > 175) {
_local2 = 175;
} else if (_local2 < 80) {
_local2 = 80;
}
gun.head._rotation = (_local2 / 2) - 50;
}
gun.arm._rotation = _local3;
var _local5 = root.Useful1.getDistance(mC._x, mC._y, root._xmouse, root._ymouse);
if (root.mouseButton == true) {
if (root._ymouse < 540) {
movingArrow = true;
arrowMc.strengthGuage.gotoAndStop("on");
}
} else if (movingArrow == true) {
if (ballFired == false) {
root.Game.arrowFired++;
fireArrow(_local4);
ball.removeMovieClip();
arrowMc.strengthGuage.gotoAndStop(1);
ballFired = true;
movingArrow = false;
}
}
oldDist = _local5;
}
function fireArrow(spriteData) {
root.sounds.fire.start(0, 1);
var _local7 = "arrow2";
var _local5 = root.Game.inGameMissilesMc.attachMovie(ball.spriteType, "missile" + root.Game.numberOfMissiles, root.Game.numberOfMissiles);
var _local2 = "";
if (ball.spriteType == "ballRed") {
_local2 = "red";
} else if (ball.spriteType == "ballBlue") {
_local2 = "blue";
} else if (ball.spriteType == "ballGreen") {
_local2 = "green";
} else if (ball.spriteType == "ballMauve") {
_local2 = "purple";
} else if (ball._currentframe == 5) {
_local2 = "orange";
} else if (ball._currentframe == 6) {
_local2 = "grey";
} else if (ball._currentframe == 7) {
_local2 = "turq";
} else if (ball._currentframe == 8) {
_local2 = "pink";
} else if (ball._currentframe == 9) {
_local2 = "darkgreen";
} else if (ball._currentframe == 10) {
_local2 = "yellow";
}
var _local3 = arrowMc._width;
var _local6 = arrowMc._x;
_local6 = _local6 + arrowMc._width;
_local3 = arrowMc.strengthGuage._width / 100;
root.Game.numberOfMissiles++;
root.Game.missilesArray.push(new Missile2(_local5, mC._x + (-(spriteData.vx * 55)), mC._y + (-(spriteData.vy * 55)), root, -spriteData.vx, -spriteData.vy, _local3 * 43, _local2));
}
function updatePosition() {
var _local3 = mC._x;
var _local2 = mC._y;
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 s = 0;
var playerleft = 0;
var playerright = 0;
var jump = 0;
var moveplayerup = 0;
var playerdown = 0;
var playerup = 0;
var Oldplayerup = 0;
var Oldplayerdown = 0;
var Oldplayerright = 0;
var Oldplayerleft = 0;
var xVel = 0;
var yVel = 0;
var xVelOld = 0;
var yVelOld = 0;
var santaspeed = 2;
var multidirectional = 0;
var dx = 0;
var dy = 0;
var angle = 0;
var vx = 0;
var friction = 0.95;
}
Symbol 489 MovieClip [__Packages.Missile2] Frame 0
class Missile2
{
var root, spriteType, speed, mC, starTrails, starAnimDelay, numberOfBounces, spriteData, arrayIndex;
function Missile2 (clip, xStart, yStart, rt, xv, yv, sp, spriteT) {
root = rt;
xOrigin = xStart;
yOrigin = yStart;
spriteType = spriteT;
speed = sp;
xPos = 0;
yPos = 0;
xVel = xv * speed;
yVel = yv * speed;
mC = clip;
starTrails = 0;
starAnimDelay = 1;
numberOfBounces = 0;
mC._x = xOrigin + xPos;
mC._y = yOrigin + yPos;
updatePosition();
}
function mainLoop() {
starAnimDelay--;
if (starAnimDelay == 0) {
starAnimDelay = 1;
var _local2 = root.Game.inGameExplosionsMc.attachMovie("starAnim", "stars" + starTrails, starTrails);
_local2._x = mC._x;
_local2._y = mC._y;
_local2._xscale = (_local2._yscale = 20);
starTrails++;
}
checkForOffStage();
applyGravity();
collisionDetection();
updatePosition();
}
function mCDeath() {
var _local2 = root.Game.inGameExplosionsMc.attachMovie("explosion", "explosion" + root.Game.scoreIndex, root.Game.scoreIndex);
_local2._x = mC._x;
_local2._y = mC._y;
root.Game.scoreIndex++;
remove();
}
function collisionDetection() {
var _local2 = 0;
while (_local2 < root.Game.goodGuysArray.length) {
if (root.Game.goodGuysArray[_local2].spriteType == "wall") {
spriteData = root.CollisionDetectionObj.CheckMoving(mC, root.Game.goodGuysArray[_local2].mC.coll, xVel, yVel, root, "wall");
if (spriteData.hit == true) {
root.sounds.hitBlockFx.start(0, 1);
if (root.Game.levelNumber == 10) {
numberOfBounces++;
if (numberOfBounces > 10) {
remove();
} else {
var _local3 = xVel;
var _local4 = yVel;
xVel = spriteData.vx;
yVel = spriteData.vy;
updatePosition();
if (spriteData.hitEdge == "left") {
if (_local3 > 0) {
_local3 = -_local3;
} else {
_local3 = (_local3 - _local3) - _local3;
}
xVel = _local3 * 0.8;
} else if (spriteData.hitEdge == "right") {
if (_local3 > 0) {
_local3 = -_local3;
} else {
_local3 = (_local3 - _local3) - _local3;
}
xVel = _local3 * 0.8;
}
if (spriteData.hitEdge == "top") {
yVel = -(_local4 * 0.8);
} else if (spriteData.hitEdge == "bottom") {
if (_local4 < 0) {
_local4 = (_local4 - _local4) - _local4;
}
yVel = _local4 * 0.8;
}
}
} else {
numberOfBounces++;
if (numberOfBounces > 10) {
remove();
} else {
var _local3 = xVel;
var _local4 = yVel;
xVel = spriteData.vx;
yVel = spriteData.vy;
updatePosition();
if (spriteData.hitEdge == "left") {
if (_local3 > 0) {
_local3 = -_local3;
} else {
_local3 = (_local3 - _local3) - _local3;
}
xVel = _local3 * 0.8;
} else if (spriteData.hitEdge == "right") {
if (_local3 > 0) {
_local3 = -_local3;
} else {
_local3 = (_local3 - _local3) - _local3;
}
xVel = _local3 * 0.8;
}
if (spriteData.hitEdge == "top") {
yVel = -(_local4 * 0.8);
if (yVel >= 0) {
}
} else if (spriteData.hitEdge == "bottom") {
if (_local4 < 0) {
_local4 = (_local4 - _local4) - _local4;
}
yVel = _local4 * 0.8;
}
}
}
}
} else if (root.Game.goodGuysArray[_local2].spriteType == "break") {
spriteData = root.CollisionDetectionObj.CheckMoving(mC.coll, root.Game.goodGuysArray[_local2].mC, xVel, yVel, root, "wall");
if (spriteData.hit == true) {
root.Game.goodGuysArray[_local2].energy = root.Game.goodGuysArray[_local2].energy - 50;
root.sounds.breakBlockFx.start(0, 1);
if (root.Game.goodGuysArray[_local2].energy == 0) {
root.Game.goodGuysArray[_local2].removeBreakBlock();
} else {
root.Game.goodGuysArray[_local2].mC.gotoAndStop(2);
}
numberOfBounces++;
if (numberOfBounces > 10) {
remove();
} else {
var _local3 = xVel;
var _local4 = yVel;
xVel = spriteData.vx;
yVel = spriteData.vy;
updatePosition();
if (spriteData.hitEdge == "left") {
if (_local3 > 0) {
_local3 = -_local3;
} else {
_local3 = (_local3 - _local3) - _local3;
}
xVel = _local3 * 0.8;
} else if (spriteData.hitEdge == "right") {
if (_local3 > 0) {
_local3 = -_local3;
} else {
_local3 = (_local3 - _local3) - _local3;
}
xVel = _local3 * 0.8;
}
if (spriteData.hitEdge == "top") {
yVel = -(_local4 * 0.8);
if (yVel >= 0) {
}
} else if (spriteData.hitEdge == "bottom") {
if (_local4 < 0) {
_local4 = (_local4 - _local4) - _local4;
}
yVel = _local4 * 0.8;
}
}
}
} else if (root.Game.goodGuysArray[_local2].spriteType == "bomb") {
spriteData = root.CollisionDetectionObj.CheckMoving(mC, root.Game.goodGuysArray[_local2].mC, xVel, yVel, root, "");
if (spriteData.hit == true) {
if (root.Game.goodGuysArray[_local2].doBomb == false) {
root.sounds.Explosion.start(0, 1);
root.Game.goodGuysArray[_local2].mC.gotoAndPlay(2);
root.Game.goodGuysArray[_local2].doBomb = true;
root.Game.increaseScore(10);
}
}
} else if (root.Game.goodGuysArray[_local2].spriteType == "clock") {
spriteData = root.CollisionDetectionObj.CheckMoving(mC, root.Game.goodGuysArray[_local2].mC, xVel, yVel, root, "");
if (spriteData.hit == true) {
root.Game.levelLifeDone = true;
root.Game.lives++;
if (root.Game.lives > 6) {
root.Game.lives = 6;
}
root.Game.setLives();
root.Game.goodGuysArray[_local2].remove();
root.Game.increaseScore(10);
}
} else if (root.Game.goodGuysArray[_local2].spriteType == spriteType) {
spriteData = root.CollisionDetectionObj.CheckMoving(mC.coll, root.Game.goodGuysArray[_local2].mC.coll, xVel, yVel, root, "");
if (spriteData.hit == true) {
spriteData.hit = false;
root.Game.goodGuysArray[_local2].remove();
root.Game.increaseScore(10);
if (root.Game.checkForMoreColour(spriteType)) {
var _local5 = root.Game.inGameScoreMc.attachMovie("points", "msg" + root.Game.tilesNumber, root.Game.tilesNumber);
_local5._x = mC._x;
_local5._y = mC._y;
_local5.txt.pointsTxt.text = "Extra Ball!";
root.Game.increaseScore(100);
root.Game.newBall();
} else {
root.Game.bonusCheck++;
if (root.Game.bonusCheck == 5) {
root.sounds.extraPoints.start(0, 1);
var _local5 = root.Game.inGameScoreMc.attachMovie("points", "msg" + root.Game.tilesNumber, root.Game.tilesNumber);
_local5._x = mC._x;
_local5._y = mC._y;
_local5.txt.pointsTxt.text = "+50";
root.Game.increaseScore(50);
root.Game.increaseTime(10);
root.Game.tilesNumber++;
} else if (root.Game.bonusCheck == 10) {
root.Game.increaseTime(40);
root.sounds.extraPoints.start(0, 1);
var _local5 = root.Game.inGameScoreMc.attachMovie("points", "msg" + root.Game.tilesNumber, root.Game.tilesNumber);
_local5._x = mC._x;
_local5._y = mC._y;
_local5.txt.pointsTxt.text = "+100";
root.Game.increaseScore(100);
root.Game.tilesNumber++;
} else if (root.Game.bonusCheck == 15) {
root.Game.increaseTime(100);
root.sounds.extraPoints.start(0, 1);
var _local5 = root.Game.inGameScoreMc.attachMovie("points", "msg" + root.Game.tilesNumber, root.Game.tilesNumber);
_local5._x = mC._x;
_local5._y = mC._y;
_local5.txt.pointsTxt.text = "+500";
root.Game.increaseScore(500);
root.Game.tilesNumber++;
}
}
}
}
_local2++;
}
}
function remove() {
root.Player.getBallColour();
root.Player.ballFired = false;
var _local4 = false;
var _local2 = 0;
while (_local2 < root.Game.goodGuysArray.length) {
if (root.Game.goodGuysArray[_local2].spriteType != "wall") {
if (root.Game.goodGuysArray[_local2].spriteType != "break") {
if (root.Game.goodGuysArray[_local2].spriteType != "clock") {
if (root.Game.goodGuysArray[_local2].toKill == false) {
_local4 = true;
}
}
}
}
_local2++;
}
if (_local4 == true) {
root.Player.loadArrow();
}
root.Game.bonusCheck = 0;
var _local3 = 0;
while (_local3 < root.Game.missilesArray.length) {
if (this == root.Game.missilesArray[_local3]) {
arrayIndex = _local3;
}
_local3++;
}
mC.removeMovieClip();
root.Game.missilesArray.splice(arrayIndex, 1);
}
function checkForOffStage(ii) {
if (mC._x < 0) {
remove();
}
if (mC._x > root.Game.movieWidth) {
remove();
}
if (mC._y > 470) {
mCDeath();
}
}
function applyGravity() {
yVel = yVel + 1.2;
}
function updatePosition() {
xPos = xPos + xVel;
yPos = yPos + yVel;
var _local3 = mC._x;
var _local2 = mC._y;
mC._x = xOrigin + xPos;
mC._y = yOrigin + yPos;
var _local6 = mC._x - _local3;
var _local4 = mC._y - _local2;
var _local5 = Math.atan2(_local4, _local6);
mC._rotation = (_local5 * 180) / Math.PI;
}
var xOrigin = 0;
var yOrigin = 0;
var xPos = 0;
var yPos = 0;
var xVel = 0;
var yVel = 0;
}
Symbol 490 MovieClip [__Packages.CollisionDetection] Frame 0
class CollisionDetection
{
var rect_1a, rect_1b, rect_1c, rect_2a, rect_2b, rect_2c, intersectingArea, Overlap, side, hoz, left, right, yd, clipBounds, clipBounds2;
function CollisionDetection () {
rect_1a = new flash.geom.Rectangle();
rect_1b = new flash.geom.Rectangle();
rect_1c = new flash.geom.Rectangle();
rect_2a = new flash.geom.Rectangle();
rect_2b = new flash.geom.Rectangle();
rect_2c = new flash.geom.Rectangle();
intersectingArea = new flash.geom.Rectangle();
Overlap = 0;
xOverlap = 0;
yOverlap = 0;
xOverlap2 = 0;
yOverlap2 = 0;
side = 0;
hoz = 0;
left = 0;
right = 0;
yd = 0;
}
function CheckMoving(sprite1, sprite2, vx, vy, origin, collType) {
var _local2 = new Object();
_local2.vx = vx;
_local2.vy = vy;
CheckBounds(origin, sprite1, sprite2, vx, vy, 0, 0);
xOverlap2 = xOverlap;
yOverlap2 = yOverlap;
if (Overlap == 2) {
if (collType == "wall") {
AdjustSprite(_local2);
}
_local2.hit = true;
return(_local2);
}
_local2.hit = false;
return(_local2);
}
function whichSegment() {
var _local3 = rect_1a.x + (rect_1a.width / 2);
_local3 = _local3 - rect_2a.x;
var _local2 = rect_1a.y + (rect_1a.height / 2);
_local2 = _local2 - rect_2a.y;
var _local6 = rect_2a.width;
var _local8 = rect_2a.height;
var _local10 = rect_2a.x;
var _local11 = rect_2a.y;
var _local4 = rect_2a.width / rect_2a.height;
var _local5 = _local3 / _local4;
if (_local5 > _local2) {
var _local9 = (_local6 - _local3) / _local4;
if (_local9 > _local2) {
return("top");
}
return("right");
}
var _local7 = _local8 - _local2;
if (_local5 > _local7) {
return("bottom");
}
return("left");
}
function AdjustSprite(sprite1) {
var _local3 = whichSegment();
if ((_local3 == "top") or (_local3 == "bottom")) {
if (rect_1a.y > rect_2a.y) {
var _local4 = rect_1c.top;
_local4 = rect_2c.bottom - _local4;
sprite1.vy = int(sprite1.vy + _local4) + 1;
sprite1.hitEdge = "bottom";
} else {
var _local5 = rect_1c.top + rect_1c.height;
_local5 = _local5 - rect_2c.top;
sprite1.vy = int(sprite1.vy - _local5) - 1;
if (sprite1.vy < 0) {
}
sprite1.hitEdge = "top";
}
} else if ((_local3 == "left") or (_local3 == "right")) {
if (rect_1a.x > rect_2a.x) {
var _local4 = rect_2c.left + rect_2c.width;
_local4 = _local4 - rect_1c.left;
sprite1.vx = int(sprite1.vx + _local4) + 1;
sprite1.hitEdge = "right";
} else {
sprite1.vx = int(sprite1.vx - intersectingArea.width) - 1;
sprite1.hitEdge = "left";
}
} else {
sprite1.vx = int(sprite1.vx - intersectingArea.width) + 1;
sprite1.vy = int(sprite1.vy - intersectingArea.height) + 1;
sprite1.hitEdge = "corner";
}
}
function CheckBounds(origin, obj, obj2, xVel, yVel, xVel2, yVel2) {
Overlap = 0;
clipBounds = obj.getBounds(origin);
rect_1a.x = clipBounds.xMin;
rect_1a.y = clipBounds.yMin;
rect_1a.width = 24;
rect_1a.height = 24;
rect_1b.x = clipBounds.xMin;
rect_1b.y = clipBounds.yMin;
rect_1b.width = 24;
rect_1b.height = 24;
rect_1b.offset(xVel, yVel);
rect_1c = rect_1a.union(rect_1b);
clipBounds2 = obj2.getBounds(origin);
rect_2a.x = clipBounds2.xMin;
rect_2a.y = clipBounds2.yMin;
rect_2a.width = clipBounds2.xMax - clipBounds2.xMin;
rect_2a.height = clipBounds2.yMax - clipBounds2.yMin;
rect_2b.x = clipBounds2.xMin;
rect_2b.y = clipBounds2.yMin;
rect_2b.width = clipBounds2.xMax - clipBounds2.xMin;
rect_2b.height = clipBounds2.yMax - clipBounds2.yMin;
rect_2b.offset(xVel2, yVel2);
rect_2c = rect_2a.union(rect_2b);
intersectingArea = rect_1c.intersection(rect_2c);
if ((intersectingArea.width != 0) or (intersectingArea.height != 0)) {
Overlap = 2;
}
}
var xOverlap = 0;
var yOverlap = 0;
var xOverlap2 = 0;
var yOverlap2 = 0;
}
Symbol 491 MovieClip [__Packages.GoodGuy] Frame 0
class GoodGuy
{
var root, mC, arrayIndex, hits, delayToFire, gapAngle, gotGold, energyBarOn, ringNumber, xDir, target, homing, ringDrop, toKill, dropping, doBomb, movingCloser, rotationDirection, spriteType, edgeBall, dropRingNumber, dropAngle, holeX, holeY, globalAngle;
function GoodGuy (clip, rt, xStart, yStart, spriteT) {
root = rt;
mC = clip;
arrayIndex = 0;
hits = 0;
xOrigin = xStart;
yOrigin = yStart;
xPos = 0;
yPos = 0;
xVel = 0;
yVel = 0;
delayToFire = 30;
var _local3 = 0;
gapAngle = 360 / _local3;
angle = 0;
gotGold = 0;
energyBarOn = 0;
degrees = 0;
ringNumber = 0;
radius = 0;
centerX = root.Game.gameWindowWidth / 2;
centerY = root.Game.movieHeight / 2;
xDir = 1;
target = undefined;
numberOfMissiles = 0;
energyStart = 100;
energy = energyStart;
homing = 0;
ringDrop = 20;
toKill = false;
dropping = false;
doBomb = false;
movingCloser = 0;
delayToFire = 50;
rotationDirection = "";
root.Game.numberOfBalls++;
if (spriteT == 1) {
spriteType = "red";
} else if (spriteT == 2) {
spriteType = "blue";
} else if (spriteT == 3) {
spriteType = "green";
} else if (spriteT == 4) {
spriteType = "purple";
} else if (spriteT == 5) {
spriteType = "orange";
} else if (spriteT == 6) {
root.Game.numberOfBalls--;
spriteType = "clock";
} else if (spriteT == 7) {
} else if (spriteT == 8) {
} else if (spriteT == 9) {
spriteType = "darkgreen";
} else if (spriteT == 10) {
spriteType = "yellow";
} else if (spriteT == 11) {
root.Game.numberOfBalls--;
spriteType = "wall";
} else if (spriteT == 12) {
root.Game.numberOfBalls--;
spriteType = "bomb";
} else if (spriteT == 13) {
root.Game.numberOfBalls--;
spriteType = "break";
}
edgeBall = false;
}
function mainLoop(i2) {
if (doBomb == true) {
runBomb();
}
}
function runBomb() {
if (mC.explosionDone == true) {
root.sounds.popFX.start(0, 1);
toKill = true;
var _local3 = 0;
while (_local3 < root.Game.goodGuysArray.length) {
if (this == root.Game.goodGuysArray[_local3]) {
arrayIndex = _local3;
}
_local3++;
}
root.Game.goodGuysArray.splice(arrayIndex, 1);
} else {
var _local2 = 0;
while (_local2 < root.Game.goodGuysArray.length) {
if (mC.hitTest(root.Game.goodGuysArray[_local2].mC)) {
if (root.Game.goodGuysArray[_local2].spriteType != "wall") {
if (root.Game.goodGuysArray[_local2] != this) {
if (root.Game.goodGuysArray[_local2].spriteType == "bomb") {
if (root.Game.goodGuysArray[_local2].mC._currentframe == 1) {
root.sounds.Explosion.start(0, 1);
root.Game.goodGuysArray[_local2].mC.gotoAndPlay(2);
root.Game.goodGuysArray[_local2].doBomb = true;
root.Game.increaseScore(10);
}
} else {
root.Game.goodGuysArray[_local2].remove();
root.Game.increaseScore(10);
}
}
}
}
_local2++;
}
}
}
function removeBreakBlock() {
root.sounds.breakFX.start(0, 1);
mC.gotoAndPlay(2);
toKill = true;
var _local2 = 0;
while (_local2 < root.Game.goodGuysArray.length) {
if (this == root.Game.goodGuysArray[_local2]) {
arrayIndex = _local2;
}
_local2++;
}
root.Game.goodGuysArray.splice(arrayIndex, 1);
}
function remove() {
root.sounds.popFX.start(0, 1);
mC.gotoAndStop(2);
toKill = true;
var _local2 = 0;
while (_local2 < root.Game.goodGuysArray.length) {
if (this == root.Game.goodGuysArray[_local2]) {
arrayIndex = _local2;
}
_local2++;
}
root.Game.goodGuysArray.splice(arrayIndex, 1);
}
function calcFinishPosition() {
var _local2 = root.Game.ringsAngleArray[dropRingNumber - 1];
var _local3 = _local2 + dropAngle;
if (_local3 >= 360) {
_local3 = _local3 - 360;
}
_local2 = (Math.PI * _local3) / 180;
var _local4 = dropRingNumber * root.Game.ballRadius;
holeX = centerX + (Math.cos(_local2) * _local4);
holeY = centerY + (Math.sin(_local2) * _local4);
}
function updateRotation() {
var _local2 = root.Game.ringsAngleArray[ringNumber - 1];
globalAngle = _local2 + angle;
if (globalAngle >= 360) {
globalAngle = globalAngle - 360;
}
_local2 = (Math.PI * globalAngle) / 180;
radius = ringNumber * root.Game.ballRadius;
mC._x = centerX + (Math.cos(_local2) * radius);
mC._y = centerY + (Math.sin(_local2) * radius);
}
function updateEdgeRotation() {
var _local2 = root.Game.ringsAngleArray[ringNumber - 1];
globalAngle = angle;
if (globalAngle >= 360) {
globalAngle = globalAngle - 360;
}
_local2 = (Math.PI * globalAngle) / 180;
mC._x = centerX + (Math.cos(_local2) * radius);
mC._y = centerY + (Math.sin(_local2) * radius);
}
function updatePosition() {
xPos = xPos + xVel;
yPos = yPos + yVel;
mC._x = mC._x + xPos;
mC._y = mC._y + 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 492 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 493 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);
setupPresentationElements();
}
function setupPresentationElements() {
optionsMc = splashScreenMc.createEmptyMovieClip("options", 1);
var _local4 = optionsMc.attachMovie("splashscreenbuttons", "splashscreenbtns", 1);
_local4._x = 70;
_local4._y = 150;
var _local2 = 0;
while (_local2 < rt.splashScreenElements.length) {
var _local3 = rt.splashScreenElements;
elementMc = _local4[_local3[_local2].mCName];
elementMc.btn.btnType = _local3[_local2].mCName;
elementMc.btn.splashScreenMc = splashScreenMc;
elementMc.btn.myObject = this;
elementMc.btn.onRelease = clickRightSplashSceenBtn;
elementMc.btn.onRollOver = rollOverSplashSceenBtn;
elementMc.btn.onRollOut = rollOutSplashSceenBtn;
_local2++;
}
}
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") {
} else if (btnType == "moreGamesBtn") {
}
}
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 _local1 = new Object();
var _local3 = xEnd - xStart;
var _local4 = yEnd - yStart;
var _local6 = Math.sqrt((_local3 * _local3) + (_local4 * _local4));
var _local2 = Math.ceil(_local6 / speed);
_local1.gravity = gravity;
_local1.steps = _local2;
_local1.xStep = _local3 / _local2;
_local1.yStep = _local4 / _local2;
if (gravity > 0) {
_local1.yStep = _local1.yStep - ((_local2 * gravity) / 2);
}
return(_local1);
}
function localToGlobalXY(mc1) {
var _local3 = new Object();
_local3.newX = 0;
_local3.newY = 0;
var _local2 = mc1;
while (_local2 != _root) {
var _local6 = _local3.newX * (_local2._xscale / 100);
var _local5 = _local3.newY * (_local2._yscale / 100);
var _local4 = _local2._rotation * (Math.PI/180);
_local3.newX = (_local6 * Math.cos(_local4)) - (_local5 * Math.sin(_local4));
_local3.newY = (_local6 * Math.sin(_local4)) + (_local5 * Math.cos(_local4));
_local3.newX = _local3.newX + _local2._x;
_local3.newY = _local3.newY + _local2._y;
_local2 = _local2._parent;
}
return(_local3);
}
function radian(degree) {
return((Math.PI/180) * degree);
}
function addThrust(rot, speed) {
var _local2 = new Object();
_local2.xVel = Math.cos(radian(rot)) * speed;
_local2.yVel = Math.sin(radian(rot)) * speed;
return(_local2);
}
}
Symbol 494 MovieClip [__Packages.GameGame] Frame 0
class GameGame
{
var mC, rt, numBalls, startBallsNumber, movieWidth, gameWindowWidth, movieHeight, blockSize, blockSizeY, ballRadius, SNOW_LEVEL, levelLifeDone, levelWidthBlocks, levelHeightBlocks, levelWidth, levelHeight, gameState, lostGold, numberOfMissiles, inGameMc, presentationMc, inGameActionMc, inGameStatsMc, inGameContainerMc, ballMc, inGameMsgsMc, playerMc, inGameBackgroundParallaxMc, inGameBackgroundMc, inGameEnemyMc, inGameMissilesMc, inGameExplosionsMc, inGameScoreMc, inGameObjectsMc, missilesArray, enemyArray, goodGuysArray, targetArray, numberOfDropped, rightPanelGameObjects, gameObjects, backgroundSquaresArray, currentPickedUp, ringsAngleArray, score, score2, sizeTarget, bestScore, starAnimDelay, lives, meterLevel, meterLevelSpeed, gameStartDelay, meterLevelDir, scoreIndex, xMidway, yMidway, starTrails, cannonManFlying, ballDeleted, 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, mouseButton, moveUpSpeed, gameCounter, tileLevelHeight, tilesArray, dragBalls, starAnims, levelCountdown, pauseSwitch, currentPickup, pickupType, pickupAdded, numberOfRings, statsMc, timerStartY, msgMc, currentTimeBonus, currentAccuracyBonus, timeBonusDone, accuracyBonus, arrowFired, numberOfBalls, timeBonus, gameBallsArray, oldMouseX, oldMouseY, backgroundMc, dropShadow, tilesNumber, bonusCheck, holesFound, scoreArray, ballsDropping, ballsDroppingNumber, stored, tip, snowDelay, backgroundLevelMc, ringsArray, pauseMc;
function GameGame (mc, rt2, sw, sh, levelW, levelH, startLives) {
mC = mc;
rt = rt2;
numBalls = 15;
startBallsNumber = 8;
movieWidth = sw;
gameWindowWidth = movieWidth - 140;
movieHeight = sh;
blockSize = 70;
blockSizeY = 28;
ballRadius = 32;
SNOW_LEVEL = 5;
levelLifeDone = false;
levelWidthBlocks = levelW;
levelHeightBlocks = levelH;
levelWidth = levelWidthBlocks * blockSize;
levelHeight = levelHeightBlocks * blockSizeY;
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);
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);
missilesArray = new Array();
enemyArray = new Array();
goodGuysArray = new Array();
targetArray = new Array();
numberOfDropped = 0;
rightPanelGameObjects = new Array();
gameObjects = new Array();
backgroundSquaresArray = new Array();
currentPickedUp = undefined;
ringsAngleArray = new Array();
score = 0;
score2 = 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;
ballDeleted = false;
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 = 13;
minutes = StartTimer;
sec = 0;
fulltime = 0;
mouseButton = false;
moveUpSpeed = 180;
gameCounter = moveUpSpeed;
tileLevelHeight = 0;
tilesArray = new Array();
dragBalls = false;
starAnims = 0;
levelCountdown = 1000;
pauseSwitch = false;
currentPickup = "";
pickupType = "";
pickupAdded = false;
numberOfRings = 6;
setupPanel();
}
function setupPanel() {
statsMc = inGameStatsMc.attachMovie("weapons", "ingamestatsmc", 1);
statsMc._y = movieHeight - 40;
var _local2 = inGameStatsMc.ingamestatsmc;
_local2 = _local2.timer;
timerStartY = _local2.maskMc._y;
_local2 = statsMc.wg;
_local2 = _local2.stats;
_local2.musicBtn.myObject = this;
_local2.musicBtn.myMc = _local2;
_local2.quitBtn.myObject = this;
if (rt.musicPlaying == "off") {
_local2.musicBtn._parent.music.gotoAndStop(2);
}
_local2.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";
}
};
_local2.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.levelLifeDone = false;
this.myObject.rt.Game.gameOver("out_of_time");
};
}
function gameOver(gameOverType) {
turnOffTip();
if (gameOverType == "out_of_time") {
gameState = "game_over";
msgMc = inGameMsgsMc.attachMovie("gameOverMsgAnim", "gameover", 1);
msgMc._x = movieWidth / 2;
msgMc._y = movieHeight / 2;
rt.sounds.doh.start(0, 1);
} else if (gameOverType == "level_complete") {
if (levelNumber == 10) {
gameState = "game_over";
msgMc = inGameMsgsMc.attachMovie("gameOverMsgAnim", "gameComplete", 1);
msgMc._x = movieWidth / 2;
msgMc._y = movieHeight / 2;
} else {
gameState = "level_complete";
msgMc = inGameMsgsMc.attachMovie("levelCompleteMsgAnim", "levelComplete", 1);
msgMc._x = movieWidth / 2;
msgMc._y = movieHeight / 2;
currentTimeBonus = 0;
currentAccuracyBonus = 0;
timeBonusDone = false;
accuracyBonus = (numberOfBalls / arrowFired) * 100;
timeBonus = gameBallsArray.length;
var _local4 = rt.levelBallsArray[levelNumber - 1];
var _local2 = _local4.length;
var _local5 = _local2 / 3;
var _local6 = _local2 / 2;
var _local7 = _local2 / 1.3;
if (timeBonus < _local5) {
msgMc.howWellDone = 1;
} else if (timeBonus < _local6) {
msgMc.howWellDone = 2;
} else {
msgMc.howWellDone = 3;
}
}
} else if (gameOverType == "game_complete") {
rt.sounds.cheer.start(0, 1);
levelLifeDone = false;
gameState = "game_over";
msgMc = inGameMsgsMc.attachMovie("gameOverMsgAnim", "gameComplete", 1);
msgMc._x = movieWidth / 2;
msgMc._y = movieHeight / 2;
} else if (gameOverType == "try_again") {
lives--;
if (lives == 0) {
setLives();
gameState = "game_over";
msgMc = inGameMsgsMc.attachMovie("gameOverMsgAnim", "gameover", 1);
msgMc._x = movieWidth / 2;
msgMc._y = movieHeight / 2;
rt.sounds.doh.start(0, 1);
levelLifeDone = false;
} else {
score = score2;
setupGerms();
rt.clearSprites();
msgMc = inGameMsgsMc.attachMovie("tryAgainMsgAnim", "getready", 1);
msgMc._x = movieWidth / 2;
msgMc._y = (movieHeight / 2) - 40;
setLives();
setTarget();
setScore();
setScore2();
setLevel();
rt.Player.xOrigin = rt._xmouse;
rt.Player.xPos = 0;
oldMouseX = rt._xmouse;
oldMouseY = rt._ymouse;
if (rt.musicPlaying == "off") {
turnMusicOff();
} else {
turnMusicOn();
}
gameState = "pre_start";
}
} else {
rt.sounds.cheer.start(0, 1);
gameState = "game_over";
msgMc = inGameMsgsMc.attachMovie("gameOverMsgAnim", "gameComplete", 1);
msgMc._x = movieWidth / 2;
msgMc._y = movieHeight / 2;
}
}
function removeGerms() {
var _local2 = 0;
while (_local2 < badGuysArray.length) {
var _local3 = badGuysArray[_local2];
_local3.swapDepths(1);
_local3.removeMovieClip();
_local2++;
}
}
function setupGerms() {
pickupType = "";
numberOfMissiles = 0;
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);
backgroundMc = inGameBackgroundMc.attachMovie("backgrounds", "background", 0);
dropShadow = new flash.filters.DropShadowFilter(4, 45, 0, 0.25, 10, 10, 2, 3);
dropShadow.distance = 5;
dropShadow.blurX = 2;
dropShadow.blurY = 2;
inGameEnemyMc.filters = [dropShadow];
moveUpSpeed = 180;
score2 = score;
gameCounter = moveUpSpeed;
tileLevelHeight = 0;
levelCountdown = 1000;
tilesNumber = 0;
pickupAdded = false;
arrowFired = 0;
bonusCheck = 0;
removeGerms();
tilesArray.splice(0);
badGuysArray.splice(0);
goodGuysArray.splice(0);
holesFound = false;
ringsAngleArray = new Array();
var _local2 = 0;
while (_local2 < gameBallsArray.length) {
gameBallsArray[_local2].mC.swapDepths(0);
gameBallsArray[_local2].mC.removeMovieClip();
_local2++;
}
gameBallsArray = new Array();
scoreArray = new Array();
ballsDropping = false;
ballsDroppingNumber = 0;
currentAccuracyBonus = 0;
rt.Player.lastBallDone = false;
stored = false;
numberOfBalls = 0;
clearExplosionMcs();
setupBackgroundTiles();
setupLevelBalls();
tip = false;
var _local3 = inGameStatsMc.ingamestatsmc;
_local3 = _local3.timer;
_local3.maskMc._y = timerStartY;
snowDelay = rt.Useful1.RandomNumber(10, 100);
setupHolder();
rt.Player.loadArrow();
tileLevelHeight = 19;
}
function getBallColour() {
var _local7 = "";
var _local4 = new Array();
var _local3 = 0;
while (_local3 < goodGuysArray.length) {
if (goodGuysArray[_local3].spriteType != "wall") {
if (goodGuysArray[_local3].spriteType != "bomb") {
if (goodGuysArray[_local3].spriteType != "break") {
if (goodGuysArray[_local3].spriteType != "clock") {
var _local5 = goodGuysArray[_local3].spriteType;
if (_local4.length == 0) {
_local4.push(_local5);
} else {
var _local6 = false;
var _local2 = 0;
while (_local2 < _local4.length) {
if (_local5 == _local4[_local2]) {
_local6 = true;
}
_local2++;
}
if (_local6 == false) {
_local4.push(_local5);
}
}
}
}
}
}
_local3++;
}
_local7 = _local4[0];
if (_local7 == "red") {
_local7 = "ballRed";
} else if (_local7 == "blue") {
_local7 = "ballBlue";
} else if (_local7 == "green") {
_local7 = "ballGreen";
} else if (_local7 == "purple") {
_local7 = "ballMauve";
}
return(_local7);
}
function newBall() {
var _local3 = inGameStatsMc.ingamestatsmc;
_local3 = _local3.holderMc;
var _local4 = getBallColour();
var _local2 = _local3.attachMovie(_local4, "ball" + tilesNumber, tilesNumber + 10600);
_local2._x = _local2._width * gameBallsArray.length;
_local2._y = 0;
gameBallsArray.push(new GamePanelBalls(_local2, _local2._x, _local2._y, rt, _local4));
tilesNumber++;
}
function checkForMoreColour(col) {
var _local2 = 0;
while (_local2 < goodGuysArray.length) {
if (goodGuysArray[_local2].spriteType != "wall") {
if (goodGuysArray[_local2].spriteType != "bomb") {
if (goodGuysArray[_local2].spriteType != "break") {
if (goodGuysArray[_local2].spriteType != "clock") {
if (goodGuysArray[_local2].spriteType == col) {
return(false);
}
}
}
}
}
_local2++;
}
return(true);
}
function setupHolder() {
var _local5 = inGameStatsMc.ingamestatsmc;
_local5 = _local5.holderMc;
var _local4 = rt.levelBallsArray[levelNumber - 1];
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local5.attachMovie(_local4[_local2], "ball" + _local2, _local2);
_local3._x = _local3._width * _local2;
_local3._y = 0;
gameBallsArray.push(new GamePanelBalls(_local3, _local3._x, _local3._y, rt, _local4[_local2]));
_local2++;
}
}
function setupLevelBalls() {
backgroundLevelMc.gotoAndStop(levelNumber);
var _local3 = rt.Useful1.countMcs(backgroundLevelMc.levelMc);
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].tag._totalframes == 6) {
if (levelLifeDone == false) {
goodGuysArray.push(new GoodGuy(_local3[_local2], rt, _local3[_local2]._x, _local3[_local2]._y, _local3[_local2].tag._totalframes));
} else {
_local3[_local2]._visible = false;
}
} else {
goodGuysArray.push(new GoodGuy(_local3[_local2], rt, _local3[_local2]._x, _local3[_local2]._y, _local3[_local2].tag._totalframes));
}
_local2++;
}
}
function runSnow() {
snowDelay--;
if (snowDelay == 0) {
snowDelay = rt.Useful1.RandomNumber(10, 100);
var _local2 = inGameExplosionsMc.attachMovie("snowBallAnim", "snowBall" + starAnims, starAnims + 10000);
_local2._x = rt.Useful1.RandomNumber(40, movieWidth - 40);
_local2._y = -20;
_local2.rt = rt;
_local2.speed = rt.Useful1.RandomNumber(1, 5);
_local2._xscale = rt.Useful1.RandomNumber(50, 100);
_local2._yscale = _local2._xscale;
_local2.onEnterFrame = function () {
this._y = this._y + this.speed;
if (this._x > 600) {
this.removeMovieClip();
}
};
starAnims++;
}
}
function setupBackgroundTiles() {
var _local2 = 0;
var _local3 = backgroundMc.attachMovie("backgrounds", "backgroundGrad", _local2 + 1);
_local3._x = 0;
_local3._y = 0;
_local3.gotoAndStop(rt.Useful1.RandomNumber(1, 10));
var _local4 = backgroundMc.createEmptyMovieClip("frameMc", _local2 + 2);
backgroundLevelMc = backgroundMc.attachMovie("backgroundMc", "backgroundMc", _local2 + 3);
backgroundLevelMc._x = 0;
backgroundLevelMc._y = 0;
}
function startBalls() {
ringsArray = new Array();
var _local4 = 0;
while (_local4 < 8) {
var _local3 = 0;
while (_local3 < 16) {
var _local5 = (_local4 * 16) + _local3;
var _local2 = inGameEnemyMc.attachMovie("tiles", "tile" + _local5, _local5);
_local2._x = _local3 * _local2._width;
_local2._x = _local2._x + 200;
_local2._y = _local4 * _local2._height;
_local2._y = _local2._y + 100;
_local2.gotoAndStop(rt.Useful1.RandomNumber(1, 10));
badGuysArray.push(new GoodGuy(_local2, rt, _local2._x, _local2._y, _local4, _local3));
_local3++;
}
_local4++;
}
}
function moveBallsDown() {
var _local2 = 0;
while (_local2 < goodGuysArray.length) {
goodGuysArray[_local2].yVel = goodGuysArray[_local2].mC._height;
goodGuysArray[_local2].updatePosition();
goodGuysArray[_local2].yVel = 0;
_local2++;
}
}
function clearExplosionMcs() {
var _local2 = 0;
for (_local2 in inGameExplosionsMc) {
if (typeof(inGameExplosionsMc[_local2]) == "movieclip") {
inGameExplosionsMc[_local2].swapDepths(0);
inGameExplosionsMc[_local2].removeMovieClip();
}
}
for (_local2 in inGameMissilesMc) {
if (typeof(inGameMissilesMc[_local2]) == "movieclip") {
inGameMissilesMc[_local2].swapDepths(0);
inGameMissilesMc[_local2].removeMovieClip();
}
}
}
function checkForNewLevel() {
var _local3 = false;
var _local2 = 0;
while (_local2 < goodGuysArray.length) {
if (goodGuysArray[_local2].spriteType != "wall") {
if (goodGuysArray[_local2].spriteType != "break") {
if (goodGuysArray[_local2].spriteType != "clock") {
if (goodGuysArray[_local2].toKill == false) {
_local3 = true;
}
}
}
}
_local2++;
}
if (_local3 == false) {
if (rt.Player.ballFired == false) {
gameOver("level_complete");
}
}
if (rt.Player.lastBallDone == true) {
gameOver("try_again");
}
}
function mainLoop() {
if (gameState == "play") {
var _local2 = 0;
while (_local2 < missilesArray.length) {
missilesArray[_local2].mainLoop();
_local2++;
}
}
checkForNewLevel();
if (gameState == "play") {
var _local2 = 0;
while (_local2 < goodGuysArray.length) {
goodGuysArray[_local2].mainLoop(_local2);
_local2++;
}
if (levelNumber >= SNOW_LEVEL) {
runSnow();
}
rt.Player.mainLoop();
}
}
function turnOnTip(tipType) {
if (tip == false) {
tip = true;
rt.mousePointer.attachMovie("tipsMc", "tipMc", 1);
rt.mousePointer.gotoAndStop(tipType);
}
}
function turnOffTip() {
if (tip == true) {
tip = false;
rt.mousePointer.tipMc.removeMovieClip();
}
}
function pauseOn() {
pauseSwitch = true;
gameState = "pause";
pauseMc = inGameMc.attachMovie("pauseMc", "pauseMc", 3);
}
function pauseOff() {
pauseSwitch = false;
gameState = "play";
pauseMc.removeMovieClip();
}
function decreaseScore() {
}
function increaseScore(increase) {
score = int(score + increase);
if (score > 0) {
if (score > 999999) {
score = 999999 /* 0x0F423F */;
}
setScore();
}
}
function increaseScore2(increase) {
score2 = int(score2 + increase);
if (score2 > 0) {
if (score2 > 10240) {
score2 = 10240;
}
setScore2();
}
}
function setLives() {
var _local2 = inGameStatsMc.ingamestatsmc;
_local2 = _local2.wg;
_local2 = _local2.stats;
_local2.pandas.gotoAndStop(lives + 1);
}
function setTarget() {
var _local2 = inGameStatsMc.ingamestatsmc;
_local2 = _local2.wg;
_local2 = _local2.stats;
_local2.sizeTarget.text = sizeTarget;
}
function setLevel() {
var _local2 = inGameStatsMc.ingamestatsmc;
_local2 = _local2.wg;
_local2 = _local2.stats;
_local2.level.text = levelNumber;
}
function setScore() {
var _local2 = inGameStatsMc.ingamestatsmc;
_local2 = _local2.wg;
_local2 = _local2.stats;
if (score > 999999) {
score = 999999 /* 0x0F423F */;
}
if (score < 10) {
_local2.score.text = "00000" + score;
} else if (score < 100) {
_local2.score.text = "0000" + score;
} else if (score < 1000) {
_local2.score.text = "000" + score;
} else if (score < 10000) {
_local2.score.text = "00" + score;
} else if (score < 100000) {
_local2.score.text = "0" + score;
} else {
_local2.score.text = score;
}
}
function setScore2() {
var _local2 = inGameStatsMc.ingamestatsmc;
_local2 = _local2.wg;
_local2 = _local2.stats;
if (score2 > 10240) {
score2 = 10240;
}
if (score2 < 10) {
_local2.score2.text = "00000" + score2;
} else if (score2 < 100) {
_local2.score2.text = "0000" + score2;
} else if (score2 < 1000) {
_local2.score2.text = "000" + score2;
} else if (score2 < 10000) {
_local2.score2.text = "00" + score2;
} else if (score2 < 100000) {
_local2.score2.text = "0" + score2;
} else {
_local2.score2.text = score2;
}
}
function setBest() {
var _local2 = inGameStatsMc.ingamestatsmc;
_local2 = _local2.wg;
_local2 = _local2.stats;
if (bestScore < 10) {
_local2.bestScore.text = "0000" + bestScore;
} else if (bestScore < 100) {
_local2.bestScore.text = "000" + bestScore;
} else if (bestScore < 1000) {
_local2.bestScore.text = "00" + bestScore;
} else if (bestScore < 10000) {
_local2.bestScore.text = "0" + bestScore;
} else {
_local2.bestScore.text = bestScore;
}
}
function decreaseTime(dd) {
var _local2 = inGameStatsMc.ingamestatsmc;
_local2 = _local2.timer;
_local2.maskMc._y = _local2.maskMc._y + dd;
if (_local2.maskMc._y > _local2.maskMc._height) {
gameOver("out_of_time");
}
}
function increaseTime(incr) {
var _local2 = inGameStatsMc.ingamestatsmc;
_local2 = _local2.timer;
_local2.maskMc._y = _local2.maskMc._y - incr;
if (_local2.maskMc._y < timerStartY) {
_local2.maskMc._y = timerStartY;
}
}
function doClock() {
clockDelay--;
if (clockDelay == 0) {
clockDelay = 13;
countDown();
}
}
function countDown() {
var _local2 = inGameStatsMc.ingamestatsmc;
_local2 = _local2.timer;
var _local3 = int(levelNumber / 8);
_local2.maskMc._y = _local2.maskMc._y + (_local3 + 2);
if (_local2.maskMc._y > _local2.maskMc._height) {
gameOver("out_of_time");
}
}
function turnMusicOff() {
var _local2 = inGameStatsMc.ingamestatsmc;
_local2 = _local2.wg;
_local2 = _local2.stats;
_local2.music.gotoAndStop(2);
}
function turnMusicOn() {
var _local2 = inGameStatsMc.ingamestatsmc;
_local2 = _local2.wg;
_local2 = _local2.stats;
_local2.music.gotoAndStop(1);
}
}
Symbol 495 MovieClip [__Packages.GamePanelBalls] Frame 0
class GamePanelBalls
{
var rt, spriteType, mC;
function GamePanelBalls (clip, xStart, yStart, rt2, spriteT) {
rt = rt2;
xOrigin = xStart;
yOrigin = yStart;
spriteType = spriteT;
xPos = 0;
yPos = 0;
mC = clip;
updatePosition();
}
function mainLoop() {
updatePosition();
}
function mCDeath() {
var _local2 = rt.Game.inGameExplosionsMc.attachMovie("explosion", "explosion" + rt.Game.scoreIndex, rt.Game.scoreIndex);
_local2._x = mC._x;
_local2._y = mC._y;
rt.Game.scoreIndex++;
remove();
}
function remove() {
rt.Player.ballFired = false;
var _local5 = false;
var _local2 = 0;
while (_local2 < rt.Game.goodGuysArray.length) {
if (rt.Game.goodGuysArray[_local2].spriteType != "wall") {
if (rt.Game.goodGuysArray[_local2].spriteType != "break") {
if (rt.Game.goodGuysArray[_local2].spriteType != "clock") {
if (rt.Game.goodGuysArray[_local2].toKill == false) {
_local5 = true;
}
}
}
}
_local2++;
}
if (_local5 == true) {
rt.Player.loadArrow();
}
rt.Game.bonusCheck = 0;
var _local4 = 0;
var _local3 = 0;
while (_local3 < rt.Game.missilesArray.length) {
if (this == rt.Game.missilesArray[_local3]) {
_local4 = _local3;
}
_local3++;
}
mC.removeMovieClip();
rt.Game.missilesArray.splice(_local4, 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;
}
Symbol 496 MovieClip [__Packages.Useful] Frame 0
class Useful
{
function Useful () {
}
function countMcs(mC) {
var _local2 = new Array();
var _local3 = 0;
for (_local3 in mC) {
if (typeof(mC[_local3]) == "movieclip") {
_local2.push(mC[_local3]);
}
}
return(_local2);
}
function bounce(mc, targetX, targetY, spring, vx, vy, friction) {
var _local4 = (targetX - mc._xscale) * spring;
var _local3 = (targetY - mc._xscale) * spring;
vx = vx + _local4;
vy = vy + _local3;
vx = vx * friction;
vy = vy * friction;
mc._xscale = mc._xscale + vx;
mc._yscale = mc._xscale;
}
function getDistance(xx1, yy1, xx2, yy2) {
var _local4 = xx1;
var _local3 = yy1;
var _local2 = xx2;
var _local1 = yy2;
_local2 = _local4 - _local2;
_local1 = _local3 - _local1;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
function RandomNumber(x, y) {
return(Math.round(Math.random() * (y - x)) + x);
}
function getArcVelocity(gravity, speed, xStart, yStart, xEnd, yEnd) {
var _local1 = new Object();
var _local3 = xEnd - xStart;
var _local4 = yEnd - yStart;
var _local6 = Math.sqrt((_local3 * _local3) + (_local4 * _local4));
var _local2 = Math.ceil(_local6 / speed);
_local1.gravity = gravity;
_local1.steps = _local2;
_local1.xStep = _local3 / _local2;
_local1.yStep = _local4 / _local2;
if (gravity > 0) {
_local1.yStep = _local1.yStep - ((_local2 * gravity) / 2);
}
return(_local1);
}
function localToGlobalXY(mc1) {
var _local3 = new Object();
_local3.newX = 0;
_local3.newY = 0;
var _local2 = mc1;
while (_local2 != _root) {
var _local6 = _local3.newX * (_local2._xscale / 100);
var _local5 = _local3.newY * (_local2._yscale / 100);
var _local4 = _local2._rotation * (Math.PI/180);
_local3.newX = (_local6 * Math.cos(_local4)) - (_local5 * Math.sin(_local4));
_local3.newY = (_local6 * Math.sin(_local4)) + (_local5 * Math.cos(_local4));
_local3.newX = _local3.newX + _local2._x;
_local3.newY = _local3.newY + _local2._y;
_local2 = _local2._parent;
}
return(_local3);
}
function radian(degree) {
return((degree * Math.PI) / 180);
}
function addThrust(rot, speed) {
var _local2 = new Object();
_local2.xVel = Math.cos(radian(rot)) * speed;
_local2.yVel = Math.sin(radian(rot)) * speed;
return(_local2);
}
function getVectorFromAngle(rotationVar) {
var _local1 = new Object();
var _local2 = (rotationVar * Math.PI) / 180;
_local1.vx = Math.cos(_local2);
_local1.vy = Math.sin(_local2);
return(_local1);
}
function capVectorSpeed(vx, vy, max) {
var _local2 = new Object();
var _local1 = Math.sqrt((vx * vx) + (vy * vy));
if (_local1 > max) {
vx = vx * (max / _local1);
vy = vy * (max / _local1);
}
_local2.vx = vx;
_local2.vy = vy;
return(_local2);
}
function pointTowards(xx, yy, xx2, yy2) {
var _local1 = new Object();
var _local3 = xx - xx2;
var _local2 = yy - yy2;
_local1.spriteAngle = Math.atan2(_local2, _local3);
_local1.spriteRotation = (_local1.spriteAngle * 180) / Math.PI;
_local1.vx = Math.cos(_local1.spriteAngle);
_local1.vy = Math.sin(_local1.spriteAngle);
return(_local1);
}
function rotateXY(centerX, centerY, radius, ringAngle) {
var _local2 = (Math.PI * ringAngle) / 180;
var _local1 = new Object();
_local1.xPos = centerX + (Math.cos(_local2) * radius);
_local1.yPos = centerY + (Math.sin(_local2) * radius);
return(_local1);
}
function dashTo(startx, starty, endx, endy, len, gap, mC) {
if (arguments.length < 6) {
return(false);
}
var _local12;
var _local9;
var _local8;
var _local10;
var _local3;
var _local2;
_local12 = len + gap;
_local9 = endx - startx;
_local8 = endy - starty;
var _local11 = Math.sqrt((_local9 * _local9) + (_local8 * _local8));
_local10 = Math.floor(Math.abs(_local11 / _local12));
var _local5 = Math.atan2(_local8, _local9);
_local3 = startx;
_local2 = starty;
_local9 = Math.cos(_local5) * _local12;
_local8 = Math.sin(_local5) * _local12;
var _local4 = 0;
while (_local4 < _local10) {
mC.moveTo(_local3, _local2);
mC.lineTo(_local3 + (Math.cos(_local5) * len), _local2 + (Math.sin(_local5) * len));
_local3 = _local3 + _local9;
_local2 = _local2 + _local8;
_local4++;
}
mC.moveTo(_local3, _local2);
_local11 = Math.sqrt(((endx - _local3) * (endx - _local3)) + ((endy - _local2) * (endy - _local2)));
if (_local11 > len) {
mC.lineTo(_local3 + (Math.cos(_local5) * len), _local2 + (Math.sin(_local5) * len));
} else if (_local11 > 0) {
mC.lineTo(_local3 + (Math.cos(_local5) * _local11), _local2 + (Math.sin(_local5) * _local11));
}
mC.moveTo(endx, endy);
}
function drawDash(startx, starty, endx, endy, len, gap) {
_root.clear();
_root.lineStyle(2, 6719658);
_root.dashTo(startx, starty, endx, endy, len, gap);
updateAfterEvent();
}
}
Symbol 458 MovieClip Frame 1
this.visible = false;
Symbol 460 Button
on (release) {
_root.MindJoltSponsoredAPI.openLink(1);
}
Symbol 479 MovieClip Frame 38
stop();
Symbol 481 MovieClip Frame 1
marker._visible = false;
_parent.stop();
Symbol 481 MovieClip Frame 54
mindlogo.stop();
Symbol 481 MovieClip Frame 60
mindlogo.play();
Symbol 481 MovieClip Frame 177
_parent.play();
stop();
Symbol 482 MovieClip Frame 1
marker._visible = false;
_parent.stop();
Symbol 482 MovieClip Frame 10
mindlogo.stop();
Symbol 482 MovieClip Frame 16
mindlogo.play();
Symbol 482 MovieClip Frame 73
_parent.play();
stop();