Frame 1
function initLoader() {
var _local2 = ((result_lv.b == undefined) ? "false" : (result_lv.b));
trace(("b ::" + _local2) + "::");
trace(("result_lv.h ::" + result_lv.h) + "::");
if (result_lv.h == "true") {
isHome = true;
}
if (_local2 == "true") {
bannedSign._alpha = 100;
} else {
this.onEnterFrame = function () {
createNewParticle();
mcLoadLogoBg.bar._xscale = 100 * (1 - (getBytesLoaded() / getBytesTotal()));
emitter._x = (mcLoadLogoBg._x + (96 - mcLoadLogoBg.bar._width)) + 15;
emitter._y = mcLoadLogoBg._y + 44;
if (getBytesLoaded() == getBytesTotal()) {
kill();
this.onEnterFrame = undefined;
if (isHome) {
this.gotoAndStop(3);
} else {
this.gotoAndStop(2);
}
}
};
bannedSign.onRelease = function () {
if (!isHome) {
openKingPage(LINK_TYPE_LOADER_PROGRESS);
}
};
}
}
function openKingPage(type, page) {
trace(type);
var _local4 = _root._url;
var _local3 = (((((("game=" + GAME_NAME) + "&from=") + _local4) + "&type=") + type) + "&session=") + sessionID;
if (page != undefined) {
_local3 = _local3 + ("&redirect=" + page);
}
var _local2 = "_blank";
if (isHome) {
_local2 = "_top";
}
getURL ((bounceURL + "?") + _local3, _local2);
}
function openOtherGamesLink() {
openKingPage(LINK_TYPE_OTHER_GAMES);
}
function openHighscoresLink() {
openKingPage(LINK_TYPE_HIGHSCORES, ("game/" + GAME_NAME) + "/highscores");
}
function openSignLink() {
if (!isHome) {
openKingPage(LINK_TYPE_SIGN);
}
}
function openAddToWebsiteLink() {
openKingPage(LINK_TYPE_ADD_GAME, "website_content.jsp");
}
function openLoaderMovieLink() {
openKingPage(LINK_TYPE_LOADER_MOVIE);
}
function openRightClickLink() {
openKingPage(LINK_TYPE_RIGHT_CLICK);
}
function openOfflineProtectionLink() {
openKingPage(LINK_TYPE_PROTECT);
}
function addScore(points) {
checkScore();
var _local1 = (iscore - 123) / 2;
_local1 = _local1 + points;
iscore = (_local1 * 2) + 123;
var _local2 = new md5();
checkStr = _local2.hash((((iscore + ":") + GAME_NAME) + ":") + SK);
return(_local1);
}
function resetScore() {
iscore = 123;
checkStr = null;
}
function submitInternalScore() {
checkScore();
var _local1 = (iscore - 123) / 2;
submitScore(_local1);
}
function checkScore() {
if (checkStr != null) {
var _local1 = new md5();
if (checkStr != _local1.hash((((iscore + ":") + GAME_NAME) + ":") + SK)) {
SSK = "ng41ui54hy35tdsnd6f54rews";
}
}
}
function submitScore(score) {
var _local3 = new md5();
var _local2 = _local3.hash((((score + ":") + GAME_NAME) + ":") + SSK);
try {
if (isHome) {
flash.external.ExternalInterface.call("submitScore", score, _local2);
trace("submitting score at home address");
} else {
openKingPage(LINK_TYPE_HIGHSCORES, (((("game/" + GAME_NAME) + "/submit/") + score) + ":") + _local2);
trace("SCORE: " + score);
trace("submitting score at other location");
}
} catch(e:Error) {
trace(e);
}
}
function submitLevel(level) {
var _local1 = new md5();
var _local2 = _local1.hash((((level + ":") + GAME_NAME) + ":") + SSK);
try {
if (isHome) {
flash.external.ExternalInterface.call("submitLevel", level, _local2);
}
} catch(e:Error) {
trace(e);
}
}
function submitAchievement(achievement) {
var _local1 = new md5();
var _local2 = _local1.hash((((achievement + ":") + GAME_NAME) + ":") + SAK);
try {
if (isHome) {
flash.external.ExternalInterface.call("submitAchievement", achievement, _local2);
}
} catch(e:Error) {
trace(e);
}
}
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
function createNewParticle() {
var _local4 = emitter.attachMovie("libGlow", "newLibGlow", emitter.getNextHighestDepth());
var _local3 = new Particle(_local4, -10, -7, _root._width, _root._height);
_local3.setVel(randRange(minXVel, maxXVel), randRange(minYVel, maxYVel));
_local3.setSize(randRange(minSize, maxSize));
particles.push(_local3);
while (particles.length > numParticles) {
_local3 = particles.shift();
_local3.destroy();
}
var _local2 = 0;
while (_local2 < particles.length) {
particles[_local2].update();
_local2++;
}
}
function kill() {
var _local1 = 0;
while (_local1 < particles.length) {
particles[_local1].destroy();
_local1++;
}
}
function randRange(min, max) {
var _local1 = (Math.random() * (max - min)) + min;
return(_local1);
}
stop();
var GAME_NAME = "kinetica";
var MOCHI_SIGNATURE = "";
var gameWidth = 768;
var gameHeight = 500;
if (GAME_NAME == "") {
trace("You need to input the game name! Check the code in the instructions layer.");
}
var loadCountURL = "http://www.mygame.com/king/loadcount.jsp";
var bounceURL = "http://www.mygame.com/king/bounce.jsp";
var loadHomeParametersURL = "http://www.king.com/servlet/FreeGameServlet?action=load";
var LINK_TYPE_LOADER_MOVIE = "loader_movie";
var LINK_TYPE_LOADER_PROGRESS = "loader_progress";
var LINK_TYPE_PROTECT = "protect";
var LINK_TYPE_OTHER_GAMES = "other_games";
var LINK_TYPE_HIGHSCORES = "highscores";
var LINK_TYPE_SIGN = "sign";
var LINK_TYPE_ADD_GAME = "add_game";
var LINK_TYPE_RIGHT_CLICK = "rightclick";
var LINK_TYPE_RIGHT_CLICK = "rightclick";
var SSK = "ng43ui54hy35tdsnd6f54rews";
var SAK = "ggfd7sday923mdsfd8csfds34";
var SK = "vf78hxcsjak77cxzhjkwad87s";
var iscore = 123;
var checkStr = null;
var USER_TYPE_UNREGISTERED = 0;
var USER_TYPE_REGISTERED = 1;
var USER_TYPE_GOLD = 2;
var USER_TYPE_SUBSCRIPTION = 3;
var SessionID = "";
var isHome = false;
bannedSign._alpha = 0;
bannedSign._x = (bannedSign._y = 0);
bannedSign.bg._width = gameWidth;
bannedSign.bg._height = gameHeight;
mcLoadLogoBg._x = gameWidth - (mcLoadLogoBg._width + 10);
mcLoadLogoBg._y = gameHeight - (mcLoadLogoBg._height + 10);
preloaderMov._x = gameWidth * 0.5;
preloaderMov._y = gameHeight * 0.5;
var result_lv = new LoadVars();
result_lv.onLoad = function (success) {
_root.initLoader();
};
var my_lv = new LoadVars();
my_lv.game = GAME_NAME;
my_lv.from = _root._url;
var so = SharedObject.getLocal("session");
if (so.data.sessionID == null) {
var rnd1 = Math.floor(Math.random() * 4294967295);
var rnd2 = Math.floor(Math.random() * 4294967295);
so.data.sessionID = rnd1.toString(16) + rnd2.toString(16);
so.flush();
}
sessionID = so.data.sessionID;
my_lv.session = sessionID;
my_lv.sendAndLoad(loadCountURL, result_lv, "GET");
if (MOCHI_SIGNATURE != "") {
__com_mochibot__(MOCHI_SIGNATURE, this, 10301, true);
}
var numParticles = 20;
var minXVel = -1;
var maxXVel = 1;
var minYVel = -1;
var maxYVel = 1;
var minSize = 12;
var maxSize = 29;
var minAlpha = 10;
var maxAlpha = 20;
var particles = new Array();
var emitter = _root.createEmptyMovieClip("p_holder", _root.getNextHighestDepth());
Frame 2
function launchGame() {
gotoAndStop ("MainMenu");
}
preloaderMov._x = gameWidth * 0.5;
preloaderMov._y = gameHeight * 0.5;
Frame 3
mc_logo.onRelease = function () {
openSignLink();
_root.SFX_Menu();
};
mc_logo2.onRelease = function () {
openSignLink();
_root.SFX_Menu();
};
mc_highscores.onRelease = function () {
_root.openAddToWebsiteLink();
_root.SFX_Menu();
};
mc_play.onRelease = function () {
_root.gotoAndStop("Game");
_root.SFX_Menu();
};
mc_credits.onRelease = function () {
_root.gotoAndStop("Credits");
_root.SFX_Menu();
};
mc_moregames.onRelease = function () {
_root.SFX_Menu();
_root.openOtherGamesLink();
};
_root.SFX_Music = function () {
_root.SoundCount = _root.SoundCount + 1;
_root["Sound" + _root.SoundCount] = new Sound();
_root["Sound" + _root.SoundCount].attachSound("SFX_Music");
_root["Sound" + _root.SoundCount].start(0, 999);
};
_root.SFX_Menu = function () {
_root.SoundCount = _root.SoundCount + 1;
_root["Sound" + _root.SoundCount] = new Sound();
_root["Sound" + _root.SoundCount].attachSound("SFX_Menu");
_root["Sound" + _root.SoundCount].start();
};
_root.SFX_Explosion = function () {
_root.SoundCount = _root.SoundCount + 1;
_root["Sound" + _root.SoundCount] = new Sound();
_root["Sound" + _root.SoundCount].attachSound("SFX_Explosion");
_root["Sound" + _root.SoundCount].start();
};
_root.SFX_Pickup = function () {
_root.SoundCount = _root.SoundCount + 1;
_root["Sound" + _root.SoundCount] = new Sound();
_root["Sound" + _root.SoundCount].attachSound("SFX_Pickup");
_root["Sound" + _root.SoundCount].start();
};
_root.SFX_Bounce = function () {
_root.SoundCount = _root.SoundCount + 1;
_root["Sound" + _root.SoundCount] = new Sound();
_root["Sound" + _root.SoundCount].attachSound("SFX_Bounce");
_root["Sound" + _root.SoundCount].start();
};
if (_root.firstPlay != false) {
_root.firstPlay = false;
_root.SFX_Music();
}
Frame 4
function BuildNewGame() {
_root.createEmptyMovieClip("MC_World", _root.getNextHighestDepth());
_root.MC_World.attachMovie("Player", "MC_Player", _root.MC_World.getNextHighestDepth());
_root.MC_World.MC_Player._y = 480;
_root.MC_World.MC_Player._x = Stage.width / 2;
_root.BallArray = new Array();
mc_out.onRollOut = function () {
_root.Paused = true;
};
mc_out.onRollOver = function () {
_root.Paused = false;
};
SpawnNewBall("Real", Stage.width / 2, 50, 0, -5);
}
function SpawnNewBall(BallType, SpawnX, SpawnY, SpawnXvel, SpawnYvel) {
i = 0;
while (i <= 999) {
if (_root.MC_World["Ball" + i] == undefined) {
NextBall = i;
i = 1000;
}
i++;
}
_root.MC_World.attachMovie("Ball", "Ball" + NextBall, _root.MC_World.getNextHighestDepth());
ball = _root.MC_World["Ball" + NextBall];
ball._x = SpawnX;
ball._y = SpawnY;
ball.xVel = SpawnXvel;
ball.yVel = -5;
ball.ballType = BallType;
switch (BallType) {
case "Real" :
ball.gotoAndStop(1);
break;
case "Extra" :
ball.gotoAndStop(2);
break;
case "Bomb" :
ball.yVel = -5;
ball.gotoAndStop(3);
break;
case "YellowStar" :
ball.yVel = -5;
ball.gotoAndStop(4);
break;
case "Health" :
ball.yVel = -5;
ball.gotoAndStop(5);
break;
case "AntiGrav" :
ball.yVel = -5;
ball.gotoAndStop(6);
break;
default :
ball.gotoAndStop(2);
}
_root.BallArray[NextBall] = ball;
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function MainGameLoop() {
_root.GameTimer = _root.GameTimer + 1;
mc_score.text = int(_root.Score);
if (_root.Score1000 == false) {
if (_root.Score >= 1000) {
_root.alerter._alpha = 300;
_root.alerter.mc_word.text = "1000 Score Well Done";
_root.Score1000 = true;
}
}
if (_root.Score2500 == false) {
if (_root.Score >= 2500) {
_root.alerter._alpha = 300;
_root.alerter.mc_word.text = "2500 Score Keep It Up";
_root.Score2500 = true;
}
}
if (_root.Score7500 == false) {
if (_root.Score >= 7500) {
_root.alerter._alpha = 300;
_root.alerter.mc_word.text = "7500 Score Fantastic";
_root.Score7500 = true;
}
}
if (_root.Score15000 == false) {
if (_root.Score >= 15000) {
_root.alerter._alpha = 300;
_root.alerter.mc_word.text = "15000 Score Awesome";
_root.Score15000 = true;
}
}
if (_root.Score25000 == false) {
if (_root.Score >= 25000) {
_root.alerter._alpha = 300;
_root.alerter.mc_word.text = "25000 Score Thats Insane";
_root.Score25000 = true;
}
}
_root.alerter._alpha = _root.alerter._alpha - 2;
_root.MC_World.MC_Player._x = _root._xmouse;
updateAfterEvent();
if ((_root.MC_World.MC_Player._x - (_root.MC_World.MC_Player._width / 2)) <= 0) {
_root.MC_World.MC_Player._x = 0 + (_root.MC_World.MC_Player._width / 2);
}
if ((_root.MC_World.MC_Player._x + (_root.MC_World.MC_Player._width / 2)) >= Stage.width) {
_root.MC_World.MC_Player._x = Stage.width - (_root.MC_World.MC_Player._width / 2);
}
if (_root.GameTimer == 450) {
SpawnNewBall("Health", Stage.width / 2, 50, 0, -5);
}
if (_root.GameTimer == 900) {
SpawnNewBall("YellowStar", Stage.width / 2, 50, 0, -5);
SpawnNewBall("YellowStar", (Stage.width / 2) + 32, 30, 0, -5);
SpawnNewBall("YellowStar", (Stage.width / 2) - 32, 30, 0, -5);
SpawnNewBall("YellowStar", (Stage.width / 2) + 64, 10, 0, -5);
SpawnNewBall("YellowStar", (Stage.width / 2) - 64, 10, 0, -5);
}
if (_root.GameTimer == 1350) {
SpawnNewBall("Health", Stage.width / 2, 50, 0, -5);
}
if (_root.GameTimer == 1800) {
SpawnNewBall("Real", Stage.width / 2, 50, 0, -5);
_root.alerter._alpha = 300;
_root.Score = _root.Score + 5000;
_root.alerter.mc_word.text = "Survived 60 Seconds 2000 POINTS";
}
if (_root.GameTimer == 2250) {
SpawnNewBall("Health", Stage.width / 2, 50, 0, -5);
}
if (_root.GameTimer == 2700) {
SpawnNewBall("Bomb", Stage.width / 2, 50, 0, -5);
SpawnNewBall("Bomb", (Stage.width / 2) + 32, 30, 0, -5);
SpawnNewBall("Bomb", (Stage.width / 2) - 32, 30, 0, -5);
SpawnNewBall("YellowStar", (Stage.width / 2) + 64, 10, 0, -5);
SpawnNewBall("YellowStar", (Stage.width / 2) - 64, 10, 0, -5);
}
if (_root.GameTimer == 3150) {
SpawnNewBall("Health", Stage.width / 2, 50, 0, -5);
}
if (_root.GameTimer == 3600) {
SpawnNewBall("Real", Stage.width / 2, 50, 0, -5);
_root.alerter._alpha = 300;
_root.Score = _root.Score + 5000;
_root.alerter.mc_word.text = "Survived 120 Seconds 5000 POINTS";
}
if (_root.GameTimer == 4050) {
SpawnNewBall("Health", Stage.width / 2, 50, 0, -5);
}
if (_root.GameTimer == 4500) {
SpawnNewBall("YellowStar", Stage.width / 2, 50, 0, -5);
SpawnNewBall("Bomb", (Stage.width / 2) + 32, 30, 0, -5);
SpawnNewBall("YellowStar", (Stage.width / 2) - 32, 30, 0, -5);
SpawnNewBall("Bomb", (Stage.width / 2) + 64, 10, 0, -5);
SpawnNewBall("YellowStar", (Stage.width / 2) - 64, 10, 0, -5);
}
if (_root.GameTimer == 4950) {
SpawnNewBall("Health", Stage.width / 2, 50, 0, -5);
}
if (_root.GameTimer == 5400) {
SpawnNewBall("Bomb", Stage.width / 2, 50, 0, -5);
SpawnNewBall("YellowStar", (Stage.width / 2) + 32, 30, 0, -5);
SpawnNewBall("Bomb", (Stage.width / 2) - 32, 30, 0, -5);
SpawnNewBall("YellowStar", (Stage.width / 2) + 64, 10, 0, -5);
SpawnNewBall("Bomb", (Stage.width / 2) - 64, 10, 0, -5);
}
if (_root.GameTimer == 5850) {
SpawnNewBall("Health", Stage.width / 2, 50, 0, -5);
}
if (_root.GameTimer == 6300) {
SpawnNewBall("Health", Stage.width / 2, 50, 0, -5);
}
if (_root.GameTimer == 7200) {
SpawnNewBall("Real", Stage.width / 2, 50, 0, -5);
_root.alerter._alpha = 300;
_root.Score = _root.Score + 10000;
_root.alerter.mc_word.text = "Survived 240 Seconds 10000 POINTS";
}
i = 0;
while (i <= _root.BallArray.length) {
obj = _root.MC_World["Ball" + i];
if (obj != undefined) {
if (_root.GravityTimeRemaining > 0) {
_root.GravityTimeRemaining = _root.GravityTimeRemaining - 1;
_root.GravityMultiplier = 0.2;
} else {
_root.GravityMultiplier = 1;
}
obj.yVel = obj.yVel + (0.3 * _root.GravityMultiplier);
SpeedLimit = 20;
xSpeedLimit = 10;
if (obj.yVel > SpeedLimit) {
obj.yVel = SpeedLimit;
}
if (obj.xVel > xSpeedLimit) {
obj.xVel = xSpeedLimit;
}
if (obj.yVel < (-1 * SpeedLimit)) {
obj.yVel = -1 * SpeedLimit;
}
if (obj.xVel < (-1 * xSpeedLimit)) {
obj.xVel = -1 * xSpeedLimit;
}
obj._x = obj._x + (obj.xVel * _root.GravityMultiplier);
obj._y = obj._y + (obj.yVel * _root.GravityMultiplier);
obj._rotation = obj._rotation + 2;
RunBallAI(obj);
_root.Score = _root.Score + 0.1;
if (obj.hitTest(_root.MC_World.MC_Player) == true) {
BallHitThePlayer(obj);
}
if ((obj._x - (obj._height / 2)) <= 0) {
obj.xVel = obj.xVel * -1.1;
obj._x = obj._x + 3;
}
if ((obj._x + (obj._height / 2)) >= Stage.width) {
obj.xVel = obj.xVel * -1.1;
obj._x = obj._x - 3;
}
if (obj._y >= Stage.height) {
BallFallsOffBottom(obj);
}
}
i++;
}
}
function BallFallsOffBottom(ball) {
switch (ball.ballType) {
case "Real" :
_root.MC_World.removeMovieClip();
_root.onEnterFrame = null;
Mouse.show();
_root.gotoAndStop("EndGame");
break;
case "Bomb" :
_root.BombsAvoided = _root.BombsAvoided + 1;
obj.removeMovieClip();
obj = undefined;
if (_root.BombsAvoided == 10) {
_root.alerter._alpha = 300;
_root.Score = _root.Score + 200;
_root.alerter.mc_word.text = "Avoided 10 Bombs 500 POINTS";
}
if (_root.BombsAvoided == 25) {
_root.alerter._alpha = 300;
_root.Score = _root.Score + 1500;
_root.alerter.mc_word.text = "Avoided 25 Bombs 1500 POINTS";
}
if (_root.BombsAvoided == 50) {
_root.alerter._alpha = 300;
_root.Score = _root.Score + 5000;
_root.alerter.mc_word.text = "Avoided 50 Bombs 5000 POINTS";
}
break;
case "YellowStar" :
_root.StarComboBonus = 0;
obj.removeMovieClip();
obj = undefined;
break;
default :
obj.removeMovieClip();
obj = undefined;
}
}
function BallHitThePlayer(ball) {
addSparkles(ball._x, _root.MC_World.MC_Player._y, 5, 25, 100);
switch (ball.ballType) {
case "Real" :
ball.yVel = -16 + randRange(-3, 3);
PlayerX = _root.MC_World.MC_Player._x;
NewVel = (ball._x - PlayerX) / 10;
if (NewVel > 2) {
NewVel = 2;
}
if (NewVel < -2) {
NewVel = -2;
}
ball.xVel = ball.xVel + NewVel;
_root.REALBALLBOUNCE = _root.REALBALLBOUNCE + 1;
if (_root.REALBALLBOUNCE == 10) {
_root.alerter._alpha = 300;
_root.Score = _root.Score + 200;
_root.alerter.mc_word.text = "Bounced 10 Times 200 POINTS";
}
if (_root.REALBALLBOUNCE == 50) {
_root.alerter._alpha = 300;
_root.Score = _root.Score + 1000;
_root.alerter.mc_word.text = "Bounced 50 Times 1000 POINTS";
}
if (_root.REALBALLBOUNCE == 200) {
_root.alerter._alpha = 300;
_root.Score = _root.Score + 5000;
_root.alerter.mc_word.text = "Bounced 200 Times 5000 POINTS";
}
_root.SFX_Bounce();
break;
case "Extra" :
ball.yVel = -16 + randRange(-6, 6);
PlayerX = _root.MC_World.MC_Player._x;
NewVel = (ball._x - PlayerX) / 10;
ball.xVel = ball.xVel + NewVel;
if (NewVel > 2) {
NewVel = 2;
}
if (NewVel < -2) {
NewVel = -2;
}
_root.SFX_Bounce();
break;
case "YellowStar" :
_root.Score = _root.Score + 50;
ball.removeMovieClip();
ball = undefined;
_root.alerter._alpha = 110;
_root.alerter.mc_word.text = "Star Pickup 50 POINTS";
_root.StarComboBonus = _root.StarComboBonus + 1;
if (_root.StarComboBonus == 5) {
_root.alerter._alpha = 300;
_root.Score = _root.Score + 500;
_root.alerter.mc_word.text = "5 Stars In A Row 500 POINTS";
}
if (_root.StarComboBonus == 10) {
_root.alerter._alpha = 300;
_root.Score = _root.Score + 2000;
_root.alerter.mc_word.text = "10 Stars In A Row 2000 POINTS";
}
_root.SFX_Pickup();
break;
case "Bomb" :
_root.BombsAvoided = 0;
createExplosion(ball._x, ball._y, _root, 25, 50, 100, 3, 5);
ball.removeMovieClip();
ball = undefined;
if (_root.MC_World.MC_Player._xscale > 10) {
_root.MC_World.MC_Player._xscale = _root.MC_World.MC_Player._xscale - 10;
}
_root.alerter._alpha = 110;
_root.alerter.mc_word.text = "Bomb Penalty Lost Some Width";
_root.SFX_Explosion();
break;
case "Health" :
ball.removeMovieClip();
ball = undefined;
if (_root.MC_World.MC_Player._xscale < 100) {
_root.MC_World.MC_Player._xscale = _root.MC_World.MC_Player._xscale + 10;
}
_root.alerter._alpha = 110;
_root.alerter.mc_word.text = "Bar Length Restored";
_root.SFX_Pickup();
break;
case "AntiGrav" :
ball.removeMovieClip();
ball = undefined;
_root.alerter._alpha = 200;
_root.alerter.mc_word.text = "Gravity Reduction Pickup";
_root.GravityTimeRemaining = _root.GravityTimeRemaining + 1000;
_root.SFX_Pickup();
}
}
function RunBallAI(ball) {
switch (ball.ballType) {
case "Real" :
addSparkles(ball._x, ball._y, sparkNumber, sparkDistance, sparkSize);
RandomVal = randRange(0, 10000);
if ((RandomVal > 9900) && (RandomVal < 10000)) {
SpawnNewBall("Extra", ball._x, ball._y, ball.xVel, ball.yVel);
}
if (randRange(0, 100) < 1) {
SpawnNewBall("Bomb", ball._x, ball._y, ball.xVel * 0.75, ball.yVel * 0.75);
}
if (randRange(0, 750) < 1) {
SpawnNewBall("AntiGrav", ball._x, ball._y, ball.xVel * 0.75, ball.yVel * 0.75);
}
if ((RandomVal > 0) && (RandomVal < 100)) {
SpawnNewBall("YellowStar", ball._x, ball._y, ball.xVel * 0.75, ball.yVel * 0.75);
}
break;
case "YellowStar" :
addSparkles(ball._x, ball._y, 1, sparkDistance, sparkSize);
break;
}
}
function addSparkles(_targetX, _targetY, _sparkNumber, _distance, _sparkSize) {
var _local6 = 0;
while (_local6 < _sparkNumber) {
var _local4 = _root.attachMovie("spark", "spark_" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
var _local3 = _root.attachMovie("spark2", "spark2_" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local4._x = (_targetX + random(_distance)) - (_distance / 2);
_local4._y = (_targetY + random(_distance)) - (_distance / 2);
_local3._x = (_targetX + random(_distance)) - (_distance / 2);
_local3._y = (_targetY + random(_distance)) - (_distance / 2);
var _local5 = random(_sparkSize) + (_sparkSize / 4);
_local4._xscale = _local5;
_local4._yscale = _local5;
_local5 = random(_sparkSize) + (_sparkSize / 4);
_local3._xscale = _local5;
_local3._yscale = _local5;
_local3._rotation = random(359);
_local4._alpha = random(sparkAlpha) + (sparkAlpha / 4);
_local3._alpha = random(sparkAlpha) + (sparkAlpha / 4);
_local6++;
}
}
function createExplosion(targetX, targetY, targetPath, explosionParticleAmount, explosionParticleRange, particleSize, speed, speedAlpha) {
var _local7 = 0;
while (_local7 < explosionParticleAmount) {
var _local8 = bitmapsArray[random(bitmapsArray.length)];
var _local4 = flash.display.BitmapData.loadBitmap(_local8);
var _local2 = targetPath.createEmptyMovieClip("main_holder" + targetPath.getNextHighestDepth(), targetPath.getNextHighestDepth());
var _local3 = _local2.createEmptyMovieClip("internal_holder", _local2.getNextHighestDepth());
_local3._x = (-_local4.width) / 2;
_local3._y = (-_local4.height) / 2;
_local3.attachBitmap(_local4, _local3.getNextHighestDepth(), "never");
_local2._x = (targetX + random(explosionParticleRange)) - (explosionParticleRange / 2);
_local2._y = (targetY + random(explosionParticleRange)) - (explosionParticleRange / 2);
var _local6 = random(particleSize);
_local2._xscale = _local6;
_local2._yscale = _local6;
_local2.speed = random(speed) + speed;
_local2.speedAlpha = random(speedAlpha) + speedAlpha;
_local2.onEnterFrame = function () {
this._xscale = this._xscale + this.speed;
this._yscale = this._yscale + this.speed;
this._alpha = this._alpha - this.speedAlpha;
if (this._alpha <= 0) {
delete this.onEnterFrame;
removeMovieClip(this);
}
};
_local7++;
}
}
function createParticles(targetX, targetY, targetPath, tempParticle_mcAmount, tempParticle_mcRange, particleSize, tempParticle_mcMaxSpeed, tempParticle_mcMaxFadeSpeed) {
var _local7 = 0;
while (_local7 < tempParticle_mcAmount) {
var _local8 = particleBitmapsArray[random(particleBitmapsArray.length)];
var _local5 = flash.display.BitmapData.loadBitmap(_local8);
var _local2 = targetPath.createEmptyMovieClip("main_holder", targetPath.getNextHighestDepth());
var _local3 = _local2.createEmptyMovieClip("internal_holder", _local2.getNextHighestDepth());
_local3._x = (-_local5.width) / 2;
_local3._y = (-_local5.height) / 2;
_local3.attachBitmap(_local5, _local3.getNextHighestDepth(), "never");
_local2._x = targetX;
_local2._y = targetY;
_local2._rotation = random(360);
_local2._alpha = random(50) + 50;
_local2._xscale = particleSize;
_local2._yscale = particleSize;
_local2.boundyLeft = target._x - tempParticle_mcRange;
_local2.boundyTop = target._y - tempParticle_mcRange;
_local2.boundyRight = target._x + tempParticle_mcRange;
_local2.boundyBottom = target._y + tempParticle_mcRange;
_local2.speedX = Math.random(tempParticle_mcMaxSpeed) - Math.random(tempParticle_mcMaxSpeed);
_local2.speedY = Math.random(tempParticle_mcMaxSpeed) - Math.random(tempParticle_mcMaxSpeed);
_local2.speedX = _local2.speedX * tempParticle_mcMaxSpeed;
_local2.speedY = _local2.speedY * tempParticle_mcMaxSpeed;
_local2.fadeSpeed = Math.random(tempParticle_mcMaxFadeSpeed) * tempParticle_mcMaxFadeSpeed;
_local2.onEnterFrame = function () {
this._alpha = this._alpha - this.fadeSpeed;
this._x = this._x + this.speedX;
this._y = this._y + this.speedY;
if (((((this._alpha <= 0) || (this._x < this.boundyLeft)) || (this._x > this.boundyRight)) || (this._y < this.boundyTop)) || (this._y > this.boundyBottom)) {
this.removeMovieClip();
}
};
_local7++;
}
}
stop();
BuildNewGame();
var Score = 0;
_root.GameTimer = 0;
_root.Paused = false;
_root.GravityTimeRemaining = 0;
_root.resetScore();
_root.onEnterFrame = function () {
if (_root.Paused == false) {
_root.mc_out._alpha = 0;
MainGameLoop();
} else {
_root.mc_out._alpha = 100;
}
};
_root.Score1000 = false;
_root.Score2500 = false;
_root.Score7500 = false;
_root.Score15000 = false;
_root.Score25000 = false;
_root.BombsAvoided = 0;
_root.REALBALLBOUNCE = 0;
_root.StarComboBonus = 0;
var bitmapsArray;
var particleBitmapsArray;
bitmapsArray = ["effect-fire5.png", "effect-fire6.png", "effect-fire7.png", "effect-fire8.png", "effect-fire9.png"];
particleBitmapsArray = ["particle.jpg", "particle1.png", "particle5.png"];
var sparkNumber = 2;
var sparkDistance = 10;
var sparkSize = 50;
var sparkAlpha = 100;
Frame 5
var THESCORE = Math.floor(_root.Score);
if (_root.isHome == true) {
_root.submitScore(THESCORE);
_root.gotoAndStop("MainMenu");
}
mc_score.text = int(_root.Score);
_root.mc_playername.onSetFocus = function () {
_root.HighlightName = true;
};
_root.onEnterFrame = function () {
if (_root.HighlightName == true) {
Selection.setSelection(0, _root.mc_playername.text.length);
_root.HighlightName = false;
}
};
mc_submit.onRelease = function () {
_root.submitScore(THESCORE);
_root.gotoAndStop("MainMenu");
};
mc_again.onRelease = function () {
_root.gotoAndStop("Game");
_root.SFX_Menu();
};
Frame 6
mc_ok.onRelease = function () {
_root.gotoAndStop("MainMenu");
_root.SFX_Menu();
};
Frame 7
mc_ok.onRelease = function () {
_root.gotoAndStop("MainMenu");
_root.SFX_Menu();
};
Symbol 117 MovieClip Frame 193
stop();
Symbol 160 MovieClip Frame 189
stop();
Symbol 165 MovieClip Frame 40
stop();
Symbol 166 MovieClip [mcKingActionIntro] Frame 279
stop();
btnPlay.onRelease = _parent.launchGame;
btnOtherGames.onRelease = _parent.openOtherGamesLink;
brandingMc.onRelease = _parent.openSignLink;
Symbol 405 MovieClip [__Packages.md5] Frame 0
class md5
{
function md5 (b64pad, chrsz) {
if (b64pad != undefined) {
this.b64pad = b64pad;
}
if (((chrsz != undefined) && (chrsz == 8)) || (chrsz == 16)) {
this.chrsz = chrsz;
}
}
function hash(s) {
return(hex_md5(s));
}
function hex_md5(s) {
return(binl2hex(core_md5(str2binl(s), s.length * chrsz)));
}
function b64_md5(s) {
return(binl2b64(core_md5(str2binl(s), s.length * chrsz)));
}
function str_md5(s) {
return(binl2str(core_md5(str2binl(s), s.length * chrsz)));
}
function hex_hmac_md5(key, data) {
return(binl2hex(core_hmac_md5(key, data)));
}
function b64_hmac_md5(key, data) {
return(binl2b64(core_hmac_md5(key, data)));
}
function str_hmac_md5(key, data) {
return(binl2str(core_hmac_md5(key, data)));
}
function md5_cmn(q, a, b, x, s, t) {
return(safe_add(bit_rol(safe_add(safe_add(a, q), safe_add(x, t)), s), b));
}
function md5_ff(a, b, c, d, x, s, t) {
return(md5_cmn((b & c) | ((~b) & d), a, b, x, s, t));
}
function md5_gg(a, b, c, d, x, s, t) {
return(md5_cmn((b & d) | (c & (~d)), a, b, x, s, t));
}
function md5_hh(a, b, c, d, x, s, t) {
return(md5_cmn((b ^ c) ^ d, a, b, x, s, t));
}
function md5_ii(a, b, c, d, x, s, t) {
return(md5_cmn(c ^ (b | (~d)), a, b, x, s, t));
}
function core_md5(x, len) {
x[len >> 5] = x[len >> 5] | (128 << (len % 32));
x[(((len + 64) >>> 9) << 4) + 14] = len;
var _local5 = 1732584193 /* 0x67452301 */;
var _local4 = -271733879;
var _local3 = -1732584194;
var _local2 = 271733878 /* 0x10325476 */;
var _local6 = 0;
while (_local6 < x.length) {
var _local11 = _local5;
var _local10 = _local4;
var _local9 = _local3;
var _local8 = _local2;
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 0], 7, -680876936);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 1], 12, -389564586);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 2], 17, 606105819);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 3], 22, -1044525330);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 4], 7, -176418897);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 5], 12, 1200080426);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 6], 17, -1473231341);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 7], 22, -45705983);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 8], 7, 1770035416);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 9], 12, -1958414417);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 10], 17, -42063);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 11], 22, -1990404162);
_local5 = md5_ff(_local5, _local4, _local3, _local2, x[_local6 + 12], 7, 1804603682);
_local2 = md5_ff(_local2, _local5, _local4, _local3, x[_local6 + 13], 12, -40341101);
_local3 = md5_ff(_local3, _local2, _local5, _local4, x[_local6 + 14], 17, -1502002290);
_local4 = md5_ff(_local4, _local3, _local2, _local5, x[_local6 + 15], 22, 1236535329);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 1], 5, -165796510);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 6], 9, -1069501632);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 11], 14, 643717713);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 0], 20, -373897302);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 5], 5, -701558691);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 10], 9, 38016083);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 15], 14, -660478335);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 4], 20, -405537848);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 9], 5, 568446438);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 14], 9, -1019803690);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 3], 14, -187363961);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 8], 20, 1163531501);
_local5 = md5_gg(_local5, _local4, _local3, _local2, x[_local6 + 13], 5, -1444681467);
_local2 = md5_gg(_local2, _local5, _local4, _local3, x[_local6 + 2], 9, -51403784);
_local3 = md5_gg(_local3, _local2, _local5, _local4, x[_local6 + 7], 14, 1735328473);
_local4 = md5_gg(_local4, _local3, _local2, _local5, x[_local6 + 12], 20, -1926607734);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 5], 4, -378558);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 8], 11, -2022574463);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 11], 16, 1839030562);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 14], 23, -35309556);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 1], 4, -1530992060);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 4], 11, 1272893353);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 7], 16, -155497632);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 10], 23, -1094730640);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 13], 4, 681279174);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 0], 11, -358537222);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 3], 16, -722521979);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 6], 23, 76029189);
_local5 = md5_hh(_local5, _local4, _local3, _local2, x[_local6 + 9], 4, -640364487);
_local2 = md5_hh(_local2, _local5, _local4, _local3, x[_local6 + 12], 11, -421815835);
_local3 = md5_hh(_local3, _local2, _local5, _local4, x[_local6 + 15], 16, 530742520);
_local4 = md5_hh(_local4, _local3, _local2, _local5, x[_local6 + 2], 23, -995338651);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 0], 6, -198630844);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 7], 10, 1126891415);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 14], 15, -1416354905);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 5], 21, -57434055);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 12], 6, 1700485571);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 3], 10, -1894986606);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 10], 15, -1051523);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 1], 21, -2054922799);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 8], 6, 1873313359);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 15], 10, -30611744);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 6], 15, -1560198380);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 13], 21, 1309151649);
_local5 = md5_ii(_local5, _local4, _local3, _local2, x[_local6 + 4], 6, -145523070);
_local2 = md5_ii(_local2, _local5, _local4, _local3, x[_local6 + 11], 10, -1120210379);
_local3 = md5_ii(_local3, _local2, _local5, _local4, x[_local6 + 2], 15, 718787259);
_local4 = md5_ii(_local4, _local3, _local2, _local5, x[_local6 + 9], 21, -343485551);
_local5 = safe_add(_local5, _local11);
_local4 = safe_add(_local4, _local10);
_local3 = safe_add(_local3, _local9);
_local2 = safe_add(_local2, _local8);
_local6 = _local6 + 16;
}
return(Array(_local5, _local4, _local3, _local2));
}
function core_hmac_md5(key, data) {
var _local3 = new Array(str2binl(key));
if (_local3.length > 16) {
_local3 = core_md5(_local3, key.length * chrsz);
}
var _local4 = new Array(16);
var _local5 = new Array(16);
var _local2 = 0;
while (_local2 < 16) {
_local4[_local2] = _local3[_local2] ^ 909522486;
_local5[_local2] = _local3[_local2] ^ 1549556828;
_local2++;
}
var _local6 = new Array(core_md5(_local4.concat(str2binl(data)), 512 + (data.length * chrsz)));
return(core_md5(_local5.concat(_local6), 640));
}
function safe_add(x, y) {
var _local1 = new Number((x & 65535) + (y & 65535));
var _local2 = new Number(((x >> 16) + (y >> 16)) + (_local1 >> 16));
return((_local2 << 16) | (_local1 & 65535));
}
function bit_rol(num, cnt) {
return((num << cnt) | (num >>> (32 - cnt)));
}
function str2binl(str) {
var _local4 = new Array();
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (str.length * chrsz)) {
_local4[_local2 >> 5] = _local4[_local2 >> 5] | ((str.charCodeAt(_local2 / chrsz) & _local5) << (_local2 % 32));
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2str(bin) {
var _local4 = new String("");
var _local5 = (1 << chrsz) - 1;
var _local2 = 0;
while (_local2 < (bin.length * 32)) {
_local4 = _local4 + String.fromCharCode((bin[_local2 >> 5] >>> (_local2 % 32)) & _local5);
_local2 = _local2 + chrsz;
}
return(_local4);
}
function binl2hex(binarray) {
var _local3 = "0123456789abcdef";
var _local4 = new String("");
var _local1 = 0;
while (_local1 < (binarray.length * 4)) {
_local4 = _local4 + (_local3.charAt((binarray[_local1 >> 2] >> (((_local1 % 4) * 8) + 4)) & 15) + _local3.charAt((binarray[_local1 >> 2] >> ((_local1 % 4) * 8)) & 15));
_local1++;
}
return(_local4);
}
function binl2b64(binarray) {
var _local7 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
var _local5 = new String("");
var _local3 = 0;
while (_local3 < (binarray.length * 4)) {
var _local6 = ((((binarray[_local3 >> 2] >> (8 * (_local3 % 4))) & 255) << 16) | (((binarray[(_local3 + 1) >> 2] >> (8 * ((_local3 + 1) % 4))) & 255) << 8)) | ((binarray[(_local3 + 2) >> 2] >> (8 * ((_local3 + 2) % 4))) & 255);
var _local2 = 0;
while (_local2 < 4) {
if (((_local3 * 8) + (_local2 * 6)) > (binarray.length * 32)) {
_local5 = _local5 + b64pad;
} else {
_local5 = _local5 + _local7.charAt((_local6 >> (6 * (3 - _local2))) & 63);
}
_local2++;
}
_local3 = _local3 + 3;
}
return(_local5);
}
var b64pad = new String("");
var chrsz = new Number(8);
}
Symbol 406 MovieClip [__Packages.Particle] Frame 0
class Particle
{
var _stageWidth, _stageHeight, clip, _xVel, _yVel;
function Particle (libParticle, xpos, ypos, stageWidth, stageHeight) {
_stageWidth = stageWidth;
_stageHeight = stageHeight;
clip = libParticle;
clip._x = xpos;
clip._y = ypos;
}
function setVel(xvel, yvel) {
_xVel = xvel;
_yVel = yvel;
}
function setSize(size) {
clip._width = size;
clip._height = size;
}
function setAlphaDecr(val) {
_alphaDecr = val;
}
function update() {
clip._x = clip._x + _xVel;
clip._y = clip._y + _yVel;
clip._alpha = clip._alpha - _alphaDecr;
}
function destroy() {
removeMovieClip(clip);
}
var _alphaDecr = 0;
}
Symbol 274 MovieClip [spark] Frame 16
this.removeMovieClip();
Symbol 275 MovieClip [spark2] Frame 16
this.removeMovieClip();
Symbol 276 MovieClip [SND_Bounce] Frame 84
this.removeMovieClip();
Symbol 277 MovieClip [SND_Explosion] Frame 42
this.removeMovieClip();
Symbol 278 MovieClip [SND_Menu] Frame 66
this.removeMovieClip();
Symbol 279 MovieClip [SND_Music] Frame 3631
this.gotoAndPlay(1);
Symbol 280 MovieClip [SND_Pickup] Frame 26
this.removeMovieClip();
Symbol 286 MovieClip [SND_HOLDER] Frame 1
stop();
Symbol 364 MovieClip Frame 1
stop();
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
Symbol 382 MovieClip Frame 302
stop();
Symbol 402 MovieClip Frame 1
stop();
_global.volumeOn = true;
_global.globalVolume = new Sound();
_global.globalVolume.setVolume(75);
Muted = false;
_global.MutedVolumeStore = 0;
this.onRollOver = function () {
if (Muted == false) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(3);
}
};
this.onRollOut = function () {
if (Muted == false) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(3);
}
};
this.onRelease = function () {
if (Muted == false) {
Muted = true;
_global.MutedVolumeStore = _global.globalVolume.getVolume();
_global.globalVolume.setVolume(0);
this.gotoAndStop(3);
} else {
Muted = false;
_global.globalVolume.setVolume(_global.MutedVolumeStore);
this.gotoAndStop(1);
}
};