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__("1304bf53", this, 10301, true);
heyzap.as2.HeyzapTools.load({game_key:"a6c6c21669353dc7941c28217d3b9e84"});
Frame 2
Stage.showMenu = false;
Stage.scaleMode = "noScale";
_global.plays = 0;
_global.write_game_cookie = function (game_id, playerName, lp, bs, ls, blev, bronze, silver, gold, AudioPlaying) {
name = "game" + game_id;
so = SharedObject.getLocal(name, "/");
so.data.game_id = game_id;
so.data.playerName = playerName;
so.data.lp = lp;
so.data.bs = bs;
so.data.ls = ls;
so.data.blev = blev;
so.data.bronze = bronze;
so.data.silver = silver;
so.data.gold = gold;
so.data.AudioPlaying = AudioPlaying;
so.flush();
};
_global.reset_game_cookie_variables = function () {
_global.playerName = "Enter Name";
_global.lp = 222222222222;
_global.bs = 0;
_global.ls = 0;
_global.blev = 0;
_global.bronze = false;
_global.silver = false;
_global.gold = false;
_global.AudioPlaying = true;
};
_global.read_game_cookie = function (game_id) {
name = "game" + game_id;
so = SharedObject.getLocal(name, "/");
if (so.data.game_id == null) {
result = false;
reset_game_cookie_variables();
write_game_cookie(game_id, playerName, lp, bs, ls, blev, bronze, silver, gold, AudioPlaying);
} else {
result = true;
_global.game_id = so.data.game_id;
_global.playerName = so.data.playerName;
_global.lp = so.data.lp;
_global.bs = so.data.bs;
_global.ls = so.data.ls;
_global.blev = so.data.blev;
_global.bronze = so.data.bronze;
_global.silver = so.data.silver;
_global.gold = so.data.gold;
_global.AudioPlaying = so.data.AudioPlaying;
}
return(result);
};
_global.game_id = "slugger_v1.09";
var exists = read_game_cookie(game_id);
_global.calcFPS = function (intitalise) {
if (intitalise) {
_global.startTime = getTimer();
this.frmCtr = 0;
}
this.frmCtr++;
var _local4 = getTimer();
var _local3 = (_local4 - startTime) / 1000;
_global.actualFPS = frmCtr / _local3;
};
Frame 4
Stage.showMenu = false;
Stage.scaleMode = "noScale";
var total;
var my_loaded;
var the_perc;
progresss.onEnterFrame = function () {
total = getBytesTotal();
my_loaded = getBytesLoaded();
if (isNaN(my_loaded) || (isNaN(total))) {
the_perc = 0;
} else {
the_perc = (my_loaded / total) * 100;
}
progresss.bar._xscale = the_perc;
if (the_perc > 99) {
gotoAndPlay ("check4ani");
}
};
progresss.bar._xscale = 0;
stop();
Instance of Symbol 220 MovieClip [success] in Frame 9
/* no clip actions */
Frame 12
var my_date = new Date();
var now = my_date.getTime();
var diff = (now - _global.lp);
if (diff < 14000000) {
gotoAndPlay ("welcome");
} else {
gotoAndPlay ("theAni");
}
stop();
Frame 13
play();
Frame 182
play();
Frame 184
newGame.onPress = function () {
gotoAndPlay ("setLevel");
};
more.onPress = function () {
getURL ("http://www.mousebreaker.com/", "_blank");
};
stop();
sfx.onPress = function () {
if (sfx._currentframe == 1) {
sfx.gotoAndStop(2);
_global.AudioPlaying = false;
} else {
sfx.gotoAndStop(1);
_global.AudioPlaying = true;
}
};
if (_global.AudioPlaying) {
sfx.gotoAndStop(1);
} else {
sfx.gotoAndStop(2);
}
sfx.onRollOver = function () {
sfx.theBut.gotoAndStop(2);
};
sfx.onRollOut = (sfx.onReleaseOutside = function () {
sfx.theBut.gotoAndStop(1);
});
Frame 185
play();
Frame 187
function impicked(num) {
_global.startLev = num;
_root.gotoAndPlay("playGame");
}
function checkPlayaName() {
var _local4 = _root.playa;
if ((((((_local4.text.indexOf("Enter ") > -1) || (_local4.text.indexOf("Name") > -1)) || (_local4.text == "")) || (_local4.text == " ")) || (_local4.text == " ")) || (_local4.text.indexOf(" ") > -1)) {
var _local3 = 1;
while (_local3 <= 30) {
_root["pick_" + _local3]._visible = false;
_local3++;
}
} else {
_global.playerName = _local4.text;
var _local3 = 1;
while (_local3 <= 30) {
_root["pick_" + _local3]._visible = true;
_local3++;
}
}
}
stop();
var i = 1;
while (i <= 30) {
var pick = _root["pick_" + i];
pick.theNum.text = i;
if ((i <= _global.blev) || (i == 1)) {
pick.theBut._alpha = 100;
pick.theNum.textColor = 16777215 /* 0xFFFFFF */;
} else {
pick.theBut._alpha = 0;
pick.theNum.textColor = 2302755 /* 0x232323 */;
}
pick._id = i;
pick.theBut.onPress = function () {
if (this._alpha == 100) {
_root.impicked(this._parent._id);
}
};
pick.theBut.onRollOver = function () {
_root.describer.text = _root.levelData[this._parent._id].main;
};
i++;
}
_root.playa.onChanged = function () {
checkPlayaName();
};
_root.describer.text = "";
_root.playa.text = _global.playerName;
checkPlayaName();
var levelData = [];
levelData[1] = {main:"Easy Peasy", desc:"Hit the star to move on.", screen:"L_1", timer:-1, balllimit:-1, bonus:0};
levelData[2] = {main:"Two To Go", desc:"Now there's two stars to get.", screen:"L_2", timer:-1, balllimit:-1, bonus:0};
levelData[3] = {main:"Between the Walls", desc:"Bounce up to hit the smaller star.", screen:"L_3", timer:-1, balllimit:-1, bonus:0};
levelData[4] = {main:"A Little Less Easy Peasy", desc:"Hit the (smaller) star to move on.", screen:"L_4", timer:15, balllimit:-1, bonus:0};
levelData[5] = {main:"Two Clusters", desc:"A few more small stars for you...", screen:"L_5", timer:30, balllimit:-1, bonus:0};
levelData[6] = {main:"Easy Peasy, Easy Peasy", desc:"You've hit this star before,\nnow hit it twice.", screen:"L_6", timer:15, balllimit:-1, bonus:0};
levelData[7] = {main:"Two To Go (revisited)", desc:"You've hit these 2 stars already.\nNow they need three hits each!", screen:"L_7", timer:30, balllimit:-1, bonus:0};
levelData[8] = {main:"No Deposits, No Returns", desc:"Bounce the ball back to hit the lowest star.", screen:"L_8", timer:30, balllimit:-1, bonus:0};
levelData[9] = {main:"Hi/Lo", desc:"Hit the ball at both extremes.", screen:"L_9", timer:20, balllimit:-1, bonus:0};
levelData[10] = {main:"Gaps", desc:"You've hit these two stars already,/n can you avoidthe obstructions.", screen:"L_10", timer:20, balllimit:-1, bonus:0};
levelData[11] = {main:"Tricky Trio", desc:"Bouncing & slicing are the order of the day here", screen:"L_12", timer:35, balllimit:-1, bonus:0};
levelData[12] = {main:"Thru the wall", desc:"Two stars, avoiding the obstructions.", screen:"L_11", timer:20, balllimit:-1, bonus:0};
levelData[13] = {main:"Bouncing through", desc:"Bounce the ball between the walls to clear this level.", screen:"L_13", timer:25, balllimit:-1, bonus:0};
levelData[14] = {main:"Misflake", desc:"Not too tricky...\nIf you're accurate!", screen:"L_14", timer:55, balllimit:-1, bonus:0};
levelData[15] = {main:"Midway", desc:"A fairly easy screen, to celebrate the half way mark!", screen:"L_15", timer:45, balllimit:-1, bonus:0};
levelData[16] = {main:"Bounceback", desc:"Only one star, but not in a convenient spot.\nAbd you need to hit it 3 times!", screen:"L_16", timer:20, balllimit:-1, bonus:0};
levelData[17] = {main:"Cantilever", desc:"You'll need to cover all the angles to complete this...", screen:"L_17", timer:40, balllimit:-1, bonus:0};
levelData[18] = {main:"Thru the wall (revisited)", desc:"You've made it through these gaps before,/nNow you need to hit them 3 times!", screen:"L_18", timer:40, balllimit:-1, bonus:0};
levelData[27] = {main:"Triangle!", desc:"Try to get around the angles.", screen:"L_19", timer:40, balllimit:-1, bonus:0};
levelData[20] = {main:"Smiley!", desc:"Really rather easy\nConsider it a small gift for\ngetting this far.", screen:"L_20", timer:60, balllimit:-1, bonus:0};
levelData[21] = {main:"... (Ellipsis)", desc:"Can you get between the dots.", screen:"L_21", timer:35, balllimit:-1, bonus:0};
levelData[22] = {main:"Into the Box!", desc:"Some fiddly corners in there...", screen:"L_22", timer:35, balllimit:-1, bonus:0};
levelData[24] = {main:"Boxed In", desc:"Bounce the ball around the box.", screen:"L_23", timer:25, balllimit:-1, bonus:0};
levelData[23] = {main:"Cantilever (revisited)", desc:"You've completed a similar screen...\nCan you reach the new stars?", screen:"L_24", timer:50, balllimit:-1, bonus:0};
levelData[25] = {main:"Grid!", desc:"Yes, you've guessed it.\nThe top right star is very tricky!\n(But possible!)", screen:"L_25", timer:40, balllimit:-1, bonus:0};
levelData[26] = {main:"177!", desc:"Bounce the ball around the corners/n to complete this level.", screen:"L_26", timer:40, balllimit:-1, bonus:0};
levelData[19] = {main:"3..2..1..", desc:"Two Clusters of a three, a two and a one.", screen:"L_27", timer:45, balllimit:-1, bonus:0};
levelData[28] = {main:"1+1=2", desc:"Not crazy maths, just crazy time limits!", screen:"L_28", timer:15, balllimit:-1, bonus:0};
levelData[29] = {main:"\"Oh my God, it's full of stars...\"", desc:"Well, not quite 2001 stars...\nCan you get them in the time limit?", screen:"L_29", timer:60, balllimit:-1, bonus:0};
levelData[30] = {main:"The End", desc:"Well done for making it this far!\nAll you need to do is hit one star\n... But you've only got time for 3 shots!", screen:"L_30", timer:12.65, balllimit:-1, bonus:0};
if (_global.bronze) {
_bronze._visible = true;
} else {
_bronze._visible = false;
}
if (_global.silver) {
_silver._visible = true;
} else {
_silver._visible = false;
}
if (_global.gold) {
_gold._visible = true;
} else {
_gold._visible = false;
}
Frame 188
play();
Frame 190
stop();
stop();
function returnWcommas(num) {
var _local4 = num.toString();
var _local3 = _local4.split(".");
var _local1 = "";
var _local2 = _local3[0].length;
while (_local2--) {
if ((_local2 < (_local3[0].length - 1)) && ((((_local3[0].length - _local2) - 1) % 3) == 0)) {
_local1 = "," + _local1;
}
_local1 = _local3[0].substr(_local2, 1) + _local1;
}
if (_local3.length > 1) {
_local1 = _local1 + ("." + _local3[1]);
}
return(_local1);
}
function returnHyp(xxx, yyy) {
var _local2 = xxx * xxx;
var _local3 = yyy * yyy;
var _local1 = _local2 + _local3;
var _local4 = Math.sqrt(_local1);
return(_local4);
}
function moveTitle(autoMoveon) {
var _local3 = game.clip2.leveller;
if (_local3._x > 0) {
_local3._x = _local3._x - game.moveLev;
game.moveLev = Math.floor(game.moveLev / game.moveAm);
game.moveLev = Math.max(game.moveLev, 1);
} else if (autoMoveon) {
} else if (game.moveOn) {
_local3._x = _local3._x - game.moveLev;
game.moveLev = Math.floor(game.moveLev * game.moveAm);
if ((_local3._x + _local3._width) < 0) {
game.beat = 0;
game.phase = 2;
if (_global.AudioPlaying) {
if (game.phase == 2) {
_root.bell.start();
} else {
_root.bell2.start();
}
}
game.moveOn = false;
return(undefined);
}
}
}
function checkStart() {
var levMC = game.clip2.leveller.attachMovie("levDesc", levv, 1);
levMC.levelNumber.text = "Level " + game.lev;
levMC.levelDesc.text = game.levelData[game.lev].main;
levMC.what2do.text = game.levelData[game.lev].desc;
levMC.what2do.text = levMC.what2do.text + String.fromCharCode(13, 13);
if (game.levelData[game.lev].timer == -1) {
levMC.what2do.text = levMC.what2do.text + "No time limit";
} else {
levMC.what2do.text = levMC.what2do.text + (("Time limit of " + game.levelData[game.lev].timer) + " seconds.");
}
game.clip.leveller2._x = Stage.width;
game.clip.leveller2._y = 0;
game.moveAm = 2;
game.moveLev = Math.floor(Stage.width / game.moveAm);
game.moveOn = false;
levMC._next.onPress = function () {
levMC._next._visible = false;
game.moveOn = true;
};
}
function checkPlayaName(tf) {
var _local1 = tf.text.toLowerCase();
var _local2;
if ((((((_local1.indexOf("enter ") > -1) || (_local1.indexOf("name") > -1)) || (_local1 == "")) || (ptxt == " ")) || (_local1 == " ")) || (_local1.indexOf(" ") > -1)) {
_local2 = false;
} else {
_local2 = true;
}
return(_local2);
}
function goNext(succeeded) {
var _local5 = false;
levMC.medalliser.gotoAndStop(1);
var _local4;
if (succeeded) {
game.lev++;
hero.levelCount++;
if (game.lev <= 30) {
_local4 = "success";
} else {
_local4 = "finished";
}
} else {
hero.lives--;
_root.livesDesc.desc.text = "Lives " + hero.lives;
if (hero.lives <= 0) {
_local4 = "gameOver";
} else {
_local4 = "fail";
}
}
var levMC = game.clip2.leveller.attachMovie(_local4, _local4, 1);
var _local3;
if ((_local4 == "gameOver") || (_local4 == "finished")) {
if (_local4 == "finished") {
_local3 = "You've made it to the end of the game!" + String.fromCharCode(13);
if ((!_global.gold) && (hero.levelCount >= 30)) {
_global.gold = true;
levMC.medalliser.gotoAndStop(4);
_local3 = "You've achieved the Gold Medal for completing all levels consecutively!" + String.fromCharCode(13);
if (_global.AudioPlaying) {
_local5 = true;
_root.fanfare2.start();
}
}
if (!_global.bronze) {
_global.bronze = true;
levMC.medalliser.gotoAndStop(2);
_local3 = "You've achieved the Bronze Medal for completing the game!" + String.fromCharCode(13);
if (_global.AudioPlaying) {
_local5 = true;
_root.fanfare2.start();
}
}
} else {
_local3 = String.fromCharCode(13);
}
heyzap.as2.HeyzapTools.shareScore({score:_root.hero.score});
_local3 = _local3 + (((("Well done " + _global.playerName) + ", you scored ") + _root.hero.score) + "!");
_local3 = _local3 + String.fromCharCode(13, 13);
_local3 = _local3 + ((("Click [Menu] to start a new game," + String.fromCharCode(13)) + "or") + String.fromCharCode(13));
_local3 = _local3 + "Click [Play More Games] to go to Mousebreaker.com!";
} else if (_local4 == "fail") {
_local3 = ("You need to remove all the stars" + String.fromCharCode(13)) + "within the time limit!";
_local3 = _local3 + String.fromCharCode(13, 13);
if (hero.lives > 1) {
_local3 = _local3 + ((("You have " + hero.lives) + " lives remaining.") + String.fromCharCode(13));
} else {
_local3 = _local3 + ((("You have " + hero.lives) + " life remaining.") + String.fromCharCode(13));
}
_local3 = _local3 + "Click [Next] to try again!";
if (_global.AudioPlaying) {
_root.boo.start();
}
} else if (game.timer > 0) {
_local3 = ("You got a time bonus of " + (Math.floor(game.timer) * 10)) + "!";
} else {
_local3 = "";
}
if (game.timer > 0) {
hero.score = hero.score + (Math.floor(game.timer) * 10);
}
levMC.feedback.text = _local3;
levMC._next._visible = true;
if ((_local4 != "gameOver") && (_local4 != "finished")) {
if ((!_global.silver) && (hero.levelCount >= 15)) {
_local3 = "You've achieved the Silver Medal for completing 15 levels consecutively!" + String.fromCharCode(13);
levMC.medalliser.gotoAndStop(3);
if (_global.AudioPlaying) {
_local5 = true;
_root.fanfare2.start();
}
}
levMC.feedback.text = _local3;
levMC._next.onPress = function () {
levMC._next._visible = false;
_root.buildLev(game.lev);
};
} else {
levMC._next.onPress = function () {
_root.gotoAndPlay("welcome");
};
levMC._submit.onPress = function () {
getURL ("http://www.mousebreaker.com", "_blank");
};
}
game.clip2.leveller._x = Stage.width;
game.clip2.leveller._y = 0;
game.moveAm = 2;
game.moveLev = Math.floor(Stage.width / game.moveAm);
write_game_cookie(game_id, playerName, lp, bs, ls, blev, bronze, silver, gold, AudioPlaying);
if ((_global.AudioPlaying && (succeeded)) && (!_local5)) {
_root.fanfare1.start();
}
}
game = {pausing:false, frameRt:30, pi_r:57.29577, pi:3.14159, pi2:6.28318, rut2:1.41421};
game.pidiv2 = game.pi / 2;
game.pidiv4 = game.pi / 4;
game.pidiv5 = game.pi / 5;
game.pidiv6 = game.pi / 6;
game.pi_radians = 57.2958;
game.locale = null;
game.brain = null;
game.fr_second = 1 / game.frameRt;
var i = 1;
while (i <= 5) {
_root["hit" + i] = new Sound();
_root["hit" + i].attachSound("hit" + i);
i++;
}
_root.ping = new Sound();
_root.ping.attachSound("ping");
_root.fanfare1 = new Sound();
_root.fanfare1.attachSound("fanfare1");
_root.fanfare2 = new Sound();
_root.fanfare2.attachSound("fanfare2");
_root.boo = new Sound();
_root.boo.attachSound("boo");
game.ballTypes = [];
game.ballTypes[1] = {startypos:-17.4, speed:26, gravity:0.27, friction:0.98};
game.ballTypes[2] = {startypos:-8.445, speed:16, gravity:0.25, friction:0.995};
game.levelData = [];
game.levelData[1] = {main:"Easy Peasy", desc:"Hit the star to move on.", screen:"L_1", timer:-1, balllimit:-1, bonus:0};
game.levelData[2] = {main:"Two To Go", desc:"Now there's two stars to get.", screen:"L_2", timer:-1, balllimit:-1, bonus:0};
game.levelData[3] = {main:"Between the Walls", desc:"Bounce up to hit the smaller star.", screen:"L_3", timer:-1, balllimit:-1, bonus:0};
game.levelData[4] = {main:"A Little Less Easy Peasy", desc:"Hit the (smaller) star to move on.", screen:"L_4", timer:15, balllimit:-1, bonus:0};
game.levelData[5] = {main:"Two Clusters", desc:"A few more small stars for you...", screen:"L_5", timer:30, balllimit:-1, bonus:0};
game.levelData[6] = {main:"Easy Peasy, Easy Peasy", desc:"You've hit this star before,\nnow hit it twice.", screen:"L_6", timer:15, balllimit:-1, bonus:0};
game.levelData[7] = {main:"Two To Go (revisited)", desc:"You've hit these 2 stars already.\nNow they need three hits each!", screen:"L_7", timer:30, balllimit:-1, bonus:0};
game.levelData[8] = {main:"No Deposits, No Returns", desc:"Bounce the ball back to hit the lowest star.", screen:"L_8", timer:35, balllimit:-1, bonus:0};
game.levelData[9] = {main:"Hi/Lo", desc:"Hit the ball at both extremes.", screen:"L_9", timer:20, balllimit:-1, bonus:0};
game.levelData[10] = {main:"Gaps", desc:"You've hit these two stars already,\n can you avoidthe obstructions.", screen:"L_10", timer:20, balllimit:-1, bonus:0};
game.levelData[11] = {main:"Tricky Trio", desc:"Bouncing & slicing are the order of the day here", screen:"L_12", timer:30, balllimit:-1, bonus:0};
game.levelData[12] = {main:"Thru the wall", desc:"Two stars, avoiding the obstructions.", screen:"L_11", timer:20, balllimit:-1, bonus:0};
game.levelData[13] = {main:"Bouncing through", desc:"Bounce the ball between the walls to clear this level.", screen:"L_13", timer:20, balllimit:-1, bonus:0};
game.levelData[14] = {main:"Misflake", desc:"Not too tricky...\nIf you're accurate!", screen:"L_14", timer:35, balllimit:-1, bonus:0};
game.levelData[15] = {main:"Midway", desc:"A fairly easy screen, to celebrate the half way mark!", screen:"L_15", timer:40, balllimit:-1, bonus:0};
game.levelData[16] = {main:"Bounceback", desc:"Only one star, but not in a convenient spot.\nAnd you need to hit it 3 times!", screen:"L_16", timer:18, balllimit:-1, bonus:0};
game.levelData[17] = {main:"Cantilever", desc:"You'll need to cover all the angles to complete this...", screen:"L_17", timer:30, balllimit:-1, bonus:0};
game.levelData[18] = {main:"Thru the wall (revisited)", desc:"You've made it through these gaps before,\nNow you need to hit them 3 times!", screen:"L_18", timer:40, balllimit:-1, bonus:0};
game.levelData[27] = {main:"Triangle!", desc:"Try to get around the angles.", screen:"L_19", timer:40, balllimit:-1, bonus:0};
game.levelData[20] = {main:"Smiley!", desc:"Really rather easy\nConsider it a small gift for\ngetting this far.", screen:"L_20", timer:5, balllimit:-1, bonus:0};
game.levelData[21] = {main:"... (Ellipsis)", desc:"Can you get between the dots.", screen:"L_21", timer:25, balllimit:-1, bonus:0};
game.levelData[22] = {main:"Into the Box!", desc:"Some fiddly corners in there...", screen:"L_22", timer:30, balllimit:-1, bonus:0};
game.levelData[24] = {main:"Boxed In", desc:"Bounce the ball around the box.", screen:"L_23", timer:15, balllimit:-1, bonus:0};
game.levelData[23] = {main:"Cantilever (revisited)", desc:"You've completed a similar screen...\nCan you reach the new stars?", screen:"L_24", timer:30, balllimit:-1, bonus:0};
game.levelData[25] = {main:"Grid!", desc:"Yes, you've guessed it.\nThe top right star is very tricky!\n(But possible!)", screen:"L_25", timer:40, balllimit:-1, bonus:0};
game.levelData[26] = {main:"177!", desc:"Bounce the ball around the corners\n to complete this level.", screen:"L_26", timer:30, balllimit:-1, bonus:0};
game.levelData[19] = {main:"3..2..1..", desc:"Two Clusters of a three, a two and a one.", screen:"L_27", timer:30, balllimit:-1, bonus:0};
game.levelData[28] = {main:"1+1=2", desc:"Not crazy maths, just crazy time limits!", screen:"L_28", timer:15, balllimit:-1, bonus:0};
game.levelData[29] = {main:"\"Oh my God, it's full of stars...\"", desc:"Well, not quite 2001 stars...\nCan you get them all in the time?", screen:"L_29", timer:5, balllimit:-1, bonus:0};
game.levelData[30] = {main:"The End", desc:"Well done for making it this far!\nAll you need to do is hit one star\n... But you've only got time for 3 shots!", screen:"L_30", timer:12.65, balllimit:-1, bonus:0};
function prepGame() {
game.brain = "game";
game.debug = false;
game.clip = _root.game_stuff;
game.clip2 = _root.game_stuff2;
game.clip.attachMovie("bg", "bg", -100);
game.clip2.attachMovie("empty", "leveller", 10001);
game.lev = _global.startLev;
hero = {};
hero.score = 0;
hero.lives = 3;
hero.levelCount = 0;
hero._frame = 1;
hero._frameMax = 12;
hero._frameTotal = 28;
hero.hit = false;
game.over = false;
buildLev(game.lev);
}
function buildLev(lev) {
game.over = false;
game.phase = 1;
game.timer = 0;
_root.levelliser.text = (("Level " + game.lev) + " | ") + game.levelData[game.lev].main;
_root.livesDesc.desc.text = "Lives " + hero.lives;
checkStart();
hero.clip = game.clip.attachMovie("hero", "hero", 13);
hero.clip.cacheAsBitmap = true;
hero._xpos = 110;
hero._ypos = 430;
hero._xHitpos = hero._xpos + 20;
hero._yHitpos = hero._ypos - 90;
hero.clip._x = hero._xpos;
hero.clip._y = hero._ypos;
game.clip.bg.onPress = heroHit;
var _local28 = game.clip.attachMovie("heroLine", "lines", 12);
_local28._x = hero._xpos - 40;
_local28._y = hero._yHitpos;
hero.hitRange = _local28._height / 2;
var _local27 = game.clip.attachMovie("ground", "ground", -10);
_local27._x = 0;
_local27._y = hero._ypos;
_local27._alpha = 50;
_local27.blendMode = 13;
game.bCtrTotal = 130;
game.bCtr = Math.round((game.bCtrTotal / 3) * 2.75);
var _local30 = game.clip.attachMovie("empty", "balls", 10);
_local30._x = 0;
_local30._y = 0;
var _local29 = game.clip.attachMovie("empty", "ballsHit", 9);
_local29._x = 0;
_local29._y = 0;
game.balls = [];
game.ballCtr = 0;
game.ballPower = 30;
game.grid = 100;
var _local14 = -4;
while (_local14 < Math.ceil(Stage.height / game.grid)) {
var _local9 = 0;
while (_local9 < Math.ceil(Stage.width / game.grid)) {
game[(("grid_" + _local9) + "_") + _local14] = [];
_local9++;
}
_local14++;
}
var _local15 = game.clip.attachMovie(game.levelData[lev].screen, "levvel", 0);
_local15._x = 0;
_local15._y = 0;
game.brickCount = 0;
for (var _local26 in _local15) {
if (String(_local15[_local26]).indexOf("brick") > -1) {
var _local3 = _local15[_local26];
_local3._id = game.brickCount;
_local3.hits = _local3.star._totalframes;
_local3.timer = _local3.hits * 2;
_local3.star.gotoAndStop(_local3.hits);
_local3.hitBy = [];
_local3.pts = _local3.hits * Math.ceil(2000 / (_local3.hA._height + _local3.hA._width));
_local3.tf.text = "";
_local3.hA._alpha = 0;
var _local23 = _local3.hA._width / 2;
var _local20 = _local3.hA._height / 2;
var _local21 = _local3._x - _local23;
var _local22 = _local3._y - _local20;
var _local24 = _local3._x + _local23;
var _local25 = _local3._y + _local20;
var _local6 = Math.floor(_local22 / game.grid);
var _local11 = Math.floor(_local25 / game.grid);
var _local7 = Math.floor(_local21 / game.grid);
var _local10 = Math.floor(_local24 / game.grid);
_local3._arrays = [];
if (_local6 == _local11) {
if (_local7 == _local10) {
game[(("grid_" + _local7) + "_") + _local6].push(_local3);
_local3._arrays.push(game[(("grid_" + _local7) + "_") + _local6]);
} else {
game[(("grid_" + _local7) + "_") + _local6].push(_local3);
game[(("grid_" + _local10) + "_") + _local6].push(_local3);
_local3._arrays.push(game[(("grid_" + _local7) + "_") + _local6]);
_local3._arrays.push(game[(("grid_" + _local10) + "_") + _local6]);
}
} else if (_local7 == _local10) {
game[(("grid_" + _local7) + "_") + _local6].push(_local3);
game[(("grid_" + _local7) + "_") + _local11].push(_local3);
_local3._arrays.push(game[(("grid_" + _local7) + "_") + _local6]);
_local3._arrays.push(game[(("grid_" + _local7) + "_") + _local11]);
} else {
game[(("grid_" + _local7) + "_") + _local6].push(_local3);
game[(("grid_" + _local7) + "_") + _local11].push(_local3);
game[(("grid_" + _local10) + "_") + _local6].push(_local3);
game[(("grid_" + _local10) + "_") + _local11].push(_local3);
_local3._arrays.push(game[(("grid_" + _local7) + "_") + _local6]);
_local3._arrays.push(game[(("grid_" + _local7) + "_") + _local11]);
_local3._arrays.push(game[(("grid_" + _local10) + "_") + _local6]);
_local3._arrays.push(game[(("grid_" + _local10) + "_") + _local11]);
}
game.brickCount++;
}
if (String(_local15[_local26]).indexOf("wall") > -1) {
var _local4 = _local15[_local26];
var _local18 = _local4._width;
var _local16 = _local4._height;
_local4._wide = _local18;
_local4._high = _local16;
_local4.hA._alpha = 0;
var _local13 = _local18 / 10;
var _local12 = _local16 / 10;
var _local17 = 6 / _local13;
var _local19 = 6 / _local12;
_local4.hA._x = -_local17;
_local4.hA._y = -_local19;
_local4.hA._width = (_local18 / _local13) + (2 * _local17);
_local4.hA._height = (_local16 / _local12) + (2 * _local19);
var _local23 = _local4.hA._width;
var _local20 = _local4.hA._height;
var _local21 = _local4._x - _local17;
var _local22 = _local4._y - _local19;
var _local24 = _local4._x + (_local23 * _local13);
var _local25 = _local4._y + (_local20 * _local12);
var _local6 = Math.floor(_local22 / game.grid);
var _local11 = Math.floor(_local25 / game.grid);
var _local7 = Math.floor(_local21 / game.grid);
var _local10 = Math.floor(_local24 / game.grid);
if (_local6 == _local11) {
if (_local7 == _local10) {
game[(("grid_" + _local7) + "_") + _local6].push(_local4);
} else {
var _local8 = _local7;
while (_local8 <= _local10) {
game[(("grid_" + _local8) + "_") + _local6].push(_local4);
_local8++;
}
}
} else if (_local7 == _local10) {
var _local5 = _local6;
while (_local5 <= _local11) {
game[(("grid_" + _local7) + "_") + _local5].push(_local4);
_local5++;
}
} else {
var _local8 = _local7;
while (_local8 <= _local10) {
var _local5 = _local6;
while (_local5 <= _local11) {
game[(("grid_" + _local8) + "_") + _local5].push(_local4);
_local5++;
}
_local8++;
}
}
_local4.hilite.attachMovie("hilite", "hl", 101);
_local4.hilite._x = (-_local4._x) / _local13;
_local4.hilite._y = (-_local4._y) / _local12;
_local4.hilite._width = _local4.hilite._width / _local13;
_local4.hilite._height = _local4.hilite._height / _local12;
_local4.hilite.setMask(_local4.masker);
}
}
game.deadBricks = [];
game.deadShadows = [];
game.timer = game.levelData[lev].timer;
if (game.timer == -1) {
_root.timer.score1._visible = false;
_root.timer.score10._visible = false;
_root.timer.inf._visible = true;
} else {
_root.timer.score1._visible = true;
_root.timer.score10._visible = true;
_root.timer.inf._visible = false;
game.timer = game.timer + 0.99;
}
hero.displayscore = hero.score;
updateDisplays();
var _local32 = new Date();
_global.lp = _local32.getTime();
if (lev > _global.blev) {
_global.blev = lev;
}
write_game_cookie(game_id, playerName, lp, bs, ls, blev, bronze, silver, gold, AudioPlaying);
}
function heroHit() {
if (hero._frame <= hero._frameMax) {
hero.hit = true;
var _local8 = 0;
while (_local8 < game.balls.length) {
var _local3 = game.balls[_local8];
var _local4 = game.clip.lines;
var _local11 = _local3._y;
var _local12 = Math.atan2(_local3._y - _local4._y, _local3._x - _local4._x);
var _local15 = _local12 - _local4._rot;
var _local17 = _local11 - hero._yHitpos;
var _local16 = game.pidiv6;
if (_local4.hA.hitTest(_local3._x, _local3._y, true) && (!_local3.hit)) {
_local3.hit = true;
var _local7 = _local15 / _local16;
var _local13 = 1 - Math.abs(_local7);
var _local6 = Math.ceil(Math.abs(_local7) * 5);
_local6 = Math.max(1, _local6);
if (_global.AudioPlaying) {
_root["hit" + _local6].start();
}
var _local14 = 0.6 + (_local13 * 0.3);
var _local10 = (_local4._rot + game.pidiv2) - (0.04 - (_local7 / 3));
var _local9 = _local3._speed * _local14;
_local3._xspd = Math.sin(_local10) * _local9;
_local3._yspd = (-Math.cos(_local10)) * _local9;
_local3._id;
_local3.speed1 = (Math.random() * 2) * Math.pow(-1, random(2));
_local3.speed2 = (Math.random() * 4) * Math.pow(-1, random(2));
var _local5 = game.clip.ballsHit["ball" + _local3._id];
_local5._x = _local3._x;
_local5._y = _local3._y;
_local5.detailing.lines._x = _local3.detailing.lines._x;
_local5.detailing._rotation = _local3.detailing._rotation;
game.deadShadows.push(_local5);
}
_local8++;
}
}
}
function animateHero() {
hero._frame++;
text_3x.text = hero.hit;
if (hero.hit) {
if (hero._frame < (hero._frameMax + 1)) {
hero._frame = hero._frameMax + 1;
} else if (hero._frame >= hero._frameTotal) {
hero._frame = 1;
hero.hit = false;
}
} else if (hero._frame > hero._frameMax) {
hero._frame = 1;
}
hero.clip.torso._rotation = game.clip.lines._rotation / 2;
hero.clip.torso.gotoAndStop(hero._frame);
hero.clip.gotoAndStop(hero._frame);
}
function brainPitcher() {
game.bCtr++;
if (game.bCtr >= game.bCtrTotal) {
_root.bHit._visible = false;
throwBall();
game.bCtr = 0;
}
}
function throwBall() {
var _local2 = game.clip.balls.attachMovie("ball", "ball" + game.ballCtr, 1000 + game.ballCtr);
_local2.cacheAsBitmap = true;
_local2._d = _local2.fill._width;
_local2._r = _local2._d / 2;
_local2._gravity = game.ballTypes[1].gravity;
_local2._friction = game.ballTypes[1].friction;
_local2._speed = game.ballTypes[1].speed;
_local2._xpos = hero._xHitpos;
_local2.speed1 = (Math.random() * 2) * Math.pow(-1, random(2));
_local2.speed2 = (Math.random() * 3) * Math.pow(-1, random(2));
if (!game.debug) {
var _local4 = game.clip.lines;
_local2._ypos = game.ballTypes[1].startypos - (Math.atan(_local4._rot) * (_local2._x - _local4._x));
} else {
_local2._ypos = hero._yHitpos + _root.pos[_root._pos];
_root._pos--;
if (_root._pos < 0) {
_root._pos = _root.pos.length - 1;
}
game.clip.ballsHit.createEmptyMovieClip("balltrail" + _root._pos, game.clip.ballsHit.getNextHighestDepth());
_local2._trail = _root._pos;
heroHit();
}
_local2._id = game.ballCtr;
_local2._xspd = 0;
_local2._yspd = 0;
_local2._x = _local2._xpos;
_local2._y = _local2._ypos;
_local2._bounce = 3;
_local2._hitCount = 0;
_local2._hit = false;
game.balls.push(_local2);
var _local3 = game.clip.ballsHit.attachMovie("ball", "ball" + game.ballCtr, game.clip.ballsHit.getNextHighestDepth());
_local3._alpha = 50;
_local3._blur._visible = false;
_local3._x = _local2._xpos;
_local3._y = _local2._ypos;
game.ballCtr++;
}
function moveBalls() {
var _local22 = 0;
while (_local22 < game.balls.length) {
var _local3 = game.balls[_local22];
var _local37 = _local3._x;
var _local35 = _local3._y;
var _local34 = _local3._r;
_local3.detailing.lines._x = _local3.detailing.lines._x + _local3.speed1;
_local3.detailing._rotation = _local3.detailing._rotation + _local3.speed2;
if (_local3.detailing.lines._x > 21.5) {
_local3.detailing.lines._x = _local3.detailing.lines._x - 21.5;
} else if (_local3.detailing.lines._x < 0) {
_local3.detailing.lines._x = _local3.detailing.lines._x + 21.5;
}
var _local41 = _local35 - game.clip.lines._y;
_local3._xspd = _local3._xspd * _local3._friction;
if (_local3._hit || (!game.debug)) {
_local3._yspd = _local3._yspd + _local3._gravity;
}
var _local13 = _local3._x;
var _local12 = _local3._y;
var _local9 = _local13 + _local3._xspd;
var _local7 = _local12 + _local3._yspd;
var _local33 = hero._ypos - _local3._r;
if (_local7 > _local33) {
_local7 = _local33;
_local3._xspd = _local3._xspd * 0.8;
_local3._yspd = _local3._yspd * -0.565;
_local3.speed1 = _local3.speed1 * 0.8;
_local3.speed2 = _local3.speed2 * 0.8;
_local3.speed2 = _local3.speed2 + _local3._xspd;
_local3._bounce = Math.max(1, _local3._bounce - 1);
}
var _local40 = Math.floor(_local3._x / game.grid);
var _local39 = Math.floor(_local3._y / game.grid);
var _local14 = game[(("grid_" + _local40) + "_") + _local39];
var _local4;
var _local10;
var _local11 = 0;
while (_local11 < _local14.length) {
if (_local14[_local11].hA.hitTest(_local9, _local7, true)) {
if (String(_local14[_local11]).indexOf("wall") > -1) {
_local10 = _local14[_local11];
var _local16 = _local10._x;
var _local26 = _local10._y;
var _local15 = _local10._x + _local10._wide;
var _local21 = _local10._y + _local10._high;
var _local20 = (_local12 + _local3._r) > _local21;
var _local19 = (_local12 - _local3._r) < _local26;
var _local18 = (_local13 + _local3._r) > _local15;
var _local17 = (_local13 - _local3._r) < _local16;
var _local8 = 0;
(_local20 ? (_local8 = _local8 + 1) : (_local8 = _local8 + 0));
(_local19 ? (_local8 = _local8 + 1) : (_local8 = _local8 + 0));
(_local18 ? (_local8 = _local8 + 1) : (_local8 = _local8 + 0));
(_local17 ? (_local8 = _local8 + 1) : (_local8 = _local8 + 0));
if (_local8 == 1) {
if (_local20) {
_local7 = _local21 + _local3._r;
_local9 = (_local9 + _local13) / 2;
_local3._yspd = _local3._yspd * -0.522;
_local3.speed1 = _local3.speed1 * 0.8;
_local3.speed2 = _local3.speed2 * 0.8;
} else if (_local19) {
_local7 = _local10._y - _local3._r;
_local9 = (_local9 + _local13) / 2;
_local3._yspd = _local3._yspd * -0.522;
_local3.speed1 = _local3.speed1 * 0.8;
_local3.speed2 = _local3.speed2 * 0.8;
_local3.speed2 = _local3.speed2 + _local3._xspd;
if ((Math.abs(_local3._xspd) < 0.11) && (Math.abs(_local3._yspd) < 0.2)) {
game.balls.splice(_local22, 1);
_local3.removeMovieClip();
}
} else if (_local18) {
_local9 = _local15 + _local3._r;
_local7 = (_local7 + _local12) / 2;
_local3._xspd = _local3._xspd * -0.8;
_local3.speed1 = _local3.speed1 * 0.8;
_local3.speed2 = _local3.speed2 * 0.8;
} else if (_local17) {
_local9 = _local16 - _local3._r;
_local7 = (_local7 + _local12) / 2;
_local3._xspd = _local3._xspd * -0.8;
_local3.speed1 = _local3.speed1 * 0.8;
_local3.speed2 = _local3.speed2 * 0.8;
}
} else {
var _local24;
var _local23;
if (_local20) {
_local24 = Math.abs((_local12 + _local3._r) - _local21);
_local23 = Math.abs(_local3._yspd);
} else if (_local19) {
_local24 = Math.abs((_local12 - _local3._r) - _local26);
_local23 = Math.abs(_local3._yspd);
}
var _local27;
var _local25;
if (_local18) {
_local27 = Math.abs((_local13 + _local3._r) - _local15);
_local25 = Math.abs(_local3._xspd);
} else if (_local17) {
_local27 = Math.abs((_local13 - _local3._r) - _local16);
_local25 = Math.abs(_local3._xspd);
}
var _local29 = Math.round(_local27 + _local25);
var _local28 = Math.round(_local24 + _local23);
if (_local29 < _local28) {
if (_local20) {
_local7 = _local21 + _local3._r;
_local3._yspd = _local3._yspd * -0.522;
_local3.speed1 = _local3.speed1 * 0.8;
_local3.speed2 = _local3.speed2 * 0.8;
} else if (_local19) {
_local7 = _local10._y - _local3._r;
_local3._yspd = _local3._yspd * -0.522;
_local3.speed1 = _local3.speed1 * 0.8;
_local3.speed2 = _local3.speed2 * 0.8;
_local3.speed2 = _local3.speed2 + _local3._xspd;
if ((Math.abs(_local3._xspd) < 0.11) && (Math.abs(_local3._yspd) < 0.2)) {
game.balls.splice(_local22, 1);
_local3.removeMovieClip();
}
}
} else if (_local18) {
_local9 = _local15 + _local3._r;
_local3._xspd = _local3._xspd * -0.8;
_local3.speed1 = _local3.speed1 * 0.8;
_local3.speed2 = _local3.speed2 * 0.8;
} else if (_local17) {
_local9 = _local16 - _local3._r;
_local3._xspd = _local3._xspd * -0.8;
_local3.speed1 = _local3.speed1 * 0.8;
_local3.speed2 = _local3.speed2 * 0.8;
}
}
} else if (String(_local14[_local11]).indexOf("brick") > -1) {
_local4 = _local14[_local11];
if (_local4.hitBy.toString().indexOf(String(_local3._id)) > -1) {
} else {
_local4.hits--;
_local4.star.gotoAndStop(_local4.hits);
_local4.hitBy.push(_local3._id);
}
if (_local4.hits <= 0) {
game.brickCount--;
_local3._hitCount++;
_local4.setScore(_local3._bounce, _local3._hitCount);
if (_global.AudioPlaying) {
_root.ping.start();
}
if (game.brickCount <= 0) {
_root.goNext(true);
game.phase = 3;
}
game.deadBricks.push(_local4);
var _local6 = 0;
while (_local6 < _local4._arrays.length) {
var _local5 = 0;
while (_local5 < _local4._arrays[_local6].length) {
if (_local4._id == _local4._arrays[_local6][_local5]._id) {
_local4._arrays[_local6].splice(_local5, 1);
}
_local5++;
}
_local6++;
}
break;
}
}
}
_local11++;
}
var _local30 = _local7 - _local35;
var _local31 = _local9 - _local37;
var _local38 = Math.sqrt((_local30 * _local30) + (_local31 * _local31));
var _local32 = Math.atan2(_local30, _local31) + game.pidiv2;
_local3._blur._x = _local34 * Math.sin(_local32);
_local3._blur._y = _local34 * (-Math.cos(_local32));
_local3._blur._rotation = 0;
var _local36 = _local34 + (2 * _local38);
_local3._blur._height = _local36;
_local3._blur._rotation = _local32 * game.pi_radians;
_local3._x = _local9;
_local3._y = _local7;
if (((Math.abs(_local3._xspd) < 0.09) && (Math.abs(_local3._yspd) < 0.2)) && (_local3._y == _local33)) {
game.balls.splice(_local22, 1);
_local3.removeMovieClip();
}
_local22++;
}
}
function updateDisplays() {
if (((game.timer != -1) && (game.brickCount > 0)) && (game.phase == 2)) {
game.timer = game.timer - game.fr_second;
if (game.timer <= 0) {
game.timer = 0;
_root.goNext(false);
game.phase = 3;
}
}
var _local13 = Math.floor(game.timer);
var _local11 = String(_local13);
var _local6 = [];
var _local12 = Math.floor(hero.score);
if (hero.displayscore < _local12) {
if (hero.displayscore <= (_local12 - 10)) {
hero.displayscore = hero.displayscore + 10;
} else {
hero.displayscore++;
}
} else if (hero.displayscore > _local12) {
if (hero.displayscore >= (_local12 + 10)) {
hero.displayscore = hero.displayscore - 10;
} else {
hero.displayscore--;
}
}
var _local14 = hero.displayscore;
var _local10 = String(_local14);
var _local7 = [];
var _local2 = 0;
while (_local2 < 6) {
var _local4 = Math.pow(10, _local2);
var _local3 = _local10.charAt(_local10.length - (_local2 + 1));
if (_local3) {
_local7[_local2] = _local3;
} else {
_local7[_local2] = 0;
}
var _local9 = "f" + _local7[_local2];
_root.score["score" + _local4].gotoAndStop(_local9);
var _local5 = _local11.charAt(_local11.length - (_local2 + 1));
if (_local5) {
_local6[_local2] = _local5;
} else {
_local6[_local2] = 0;
}
var _local8 = "f" + _local6[_local2];
_root.timer["score" + _local4].gotoAndStop(_local8);
_local2++;
}
}
function movelines() {
var _local1 = game.clip.lines;
_local1._rot = Math.atan2(game.clip._ymouse - _local1._y, game.clip._xmouse - _local1._x);
_local1._rot = Math.max(_local1._rot, -0.85);
_local1._rot = Math.min(_local1._rot, 0.1);
_local1._rotation = _local1._rot * game.pi_radians;
}
function animateDeadBricks() {
var _local2 = 0;
while (_local2 < game.deadBricks.length) {
var _local1 = game.deadBricks[_local2];
var _local3 = _local1._currentframe + 1;
var _local4 = _local1._totalframes;
if (_local3 > _local4) {
_local1._visible = false;
game.deadBricks.splice(_local2, 1);
} else {
_local1.gotoAndStop(_local3);
}
_local2++;
}
}
function animateDeadShadows() {
var _local1 = 0;
while (_local1 < game.deadShadows.length) {
var _local2 = game.deadShadows[_local1];
_local2._alpha--;
if (_local2._alpha <= 0) {
_local2.removeMovieClip();
game.deadShadows.splice(_local1, 1);
}
_local1++;
}
}
function gameBrain() {
if (game.phase == 1) {
moveTitle(false);
animateHero();
movelines();
} else if (game.phase == 2) {
animateHero();
movelines();
brainPitcher();
moveBalls();
animateDeadBricks();
animateDeadShadows();
updateDisplays();
} else if (game.phase == 3) {
moveTitle(false);
animateHero();
moveBalls();
animateDeadBricks();
animateDeadShadows();
updateDisplays();
}
}
function theBrain() {
_root[game.brain + "Brain"]();
}
prepGame();
_root.createEmptyMovieClip("_brain", 9999);
_brain.onEnterFrame = function () {
theBrain();
};
_root.pos = [-27.25, -13.75, 0, 14, 28.3, 29.15, 23.5, 18.15, 13.05, 8.25, 3.69999999999999, -0.600000000000023, -4.60000000000002, -8.35000000000002, -11.8, -15, -17.95, -20.6, -23, -25.1, -26.95, -28.55, -29.85, -29.5, -28.1, -26.45, -24.5, -22.3, -19.85, -17.1, -14.1, -10.8, -7.25, -3.44999999999999, 0.649999999999977, 5, 9.64999999999998, 14.55, 19.7, 25.15];
_root._pos = _root.pos.length - 1;
stop();
Symbol 4 MovieClip Frame 1
stop();
Symbol 10 MovieClip [brick1] Frame 1
function setScore(bounces, hits) {
var _local3;
tf.text = (((this.pts + "x") + bounces) + "x") + hits;
_local3 = (this.pts * bounces) * hits;
_root.hero.score = _root.hero.score + _local3;
if ((_root.game.timer > 0) && (_root.game.brickCount > 0)) {
_root.game.timer = _root.game.timer + this.timer;
}
}
stop();
Symbol 18 MovieClip Frame 1
stop();
Symbol 29 Button
on (release) {
getURL ("http://www.mousebreaker.com/games/sluggerwalkthrough/playgame", "_self");
}
Symbol 40 MovieClip [gameOver] Frame 1
stop();
fader.onPress = function () {
};
fader.useHandCursor = false;
Symbol 328 MovieClip [__Packages.heyzap.as2.HeyzapTools] Frame 0
class heyzap.as2.HeyzapTools
{
static var popup, gameKey, mask, slc_name, rlc_name;
function HeyzapTools () {
}
static function load(options) {
if (options.game_key == undefined) {
throw new Error("[Heyzap] You must provide your 'game_key' as a parameter.");
}
getPopup(options);
}
static function checkItem(options) {
if (options.item_key == undefined) {
throw new Error("[Heyzap] You must provide an 'item_key' as a parameter.");
}
if (options.callback == undefined) {
throw new Error("[Heyzap] You must provide a 'callback' function as a parameter.");
}
checkGameKey(options);
sendMessage("checkOwned", options, options.callback);
}
static function sellItem(options) {
if (options.item_key == undefined) {
throw new Error("[Heyzap] You must provide an 'item_key' as a parameter.");
}
if (options.callback == undefined) {
throw new Error("[Heyzap] You must provide a 'callback' function as a parameter.");
}
checkGameKey(options);
sendMessage("sellItem", options, options.callback);
}
static function showShop(options) {
if (options.boughtCallback == undefined) {
throw new Error("[Heyzap] You must provide a 'boughtCallback' function as a parameter.");
}
checkGameKey(options);
sendMessageMulti("showShop", options, {shopClosed:options.closedCallback, boughtShopItem:options.boughtCallback});
}
static function setUserData(options) {
if (options.user_data == undefined) {
throw new Error("[Heyzap] You must provide a 'user_data' object as a parameter.");
}
checkGameKey(options);
sendMessage("setUserData", options, options.callback);
}
static function getUserData(options) {
if (options.callback == undefined) {
throw new Error("[Heyzap] You must provide a 'callback' function as a parameter.");
}
checkGameKey(options);
sendMessage("getUserData", options, options.callback);
}
static function shareScore(options) {
if (options.score == undefined) {
throw new Error("[Heyzap] You must provide a 'score' string as a parameter.");
}
checkGameKey(options);
sendMessage("shareScore", options, options.callback);
}
static function shareStatus(options) {
if (options.status == undefined) {
throw new Error("[Heyzap] You must provide a 'status' string as a parameter.");
}
checkGameKey(options);
sendMessage("shareStatus", options, options.callback);
}
static function version() {
return("2.0.0");
}
static function checkOwned(options) {
checkItem(options);
}
static function randomString() {
return((new Date().getTime() + "_") + random(99999));
}
static function checkGameKey(options) {
if (!popup) {
throw new Error("[Heyzap] Error: You must call heyzap.as2.HeyzapTools.load({game_key: \"yourgamekeyhere\"}) first.");
}
}
static function getPopup(options) {
function showPopup() {
new mx.transitions.Tween(heyzap.as2.HeyzapTools.mask, "_alpha", mx.transitions.easing.Strong.easeOut, 0, 50, 0.3, true);
if (!heyzap.as2.HeyzapTools.alreadyScaled) {
var _local5 = Stage.width;
var _local3 = Stage.height;
var _local4 = heyzap.as2.HeyzapTools.popup.background._width;
var _local2 = heyzap.as2.HeyzapTools.popup.background._height;
var _local1 = 1;
if (_local4 > _local5) {
_local1 = 0.95 * (_local5 / _local4);
} else if (_local2 > _local3) {
_local1 = 0.95 * (_local3 / _local2);
}
heyzap.as2.HeyzapTools.popup._width = Math.floor(_local1 * _local4);
heyzap.as2.HeyzapTools.popup._height = Math.floor(_local1 * _local2);
heyzap.as2.HeyzapTools.popup._x = Math.floor((_local5 - heyzap.as2.HeyzapTools.popup._width) / 2);
heyzap.as2.HeyzapTools.popup._y = Math.floor((_local3 - heyzap.as2.HeyzapTools.popup._height) / 2);
heyzap.as2.HeyzapTools.alreadyScaled = true;
}
heyzap.as2.HeyzapTools.mask._visible = true;
heyzap.as2.HeyzapTools.popup._visible = true;
heyzap.as2.HeyzapTools.mask._x = 0;
heyzap.as2.HeyzapTools.mask._y = 0;
}
function hidePopup() {
heyzap.as2.HeyzapTools.popup._visible = false;
heyzap.as2.HeyzapTools.mask._visible = false;
}
function destroyPopup() {
if (heyzap.as2.HeyzapTools.popup) {
heyzap.as2.HeyzapTools.popup = undefined;
heyzap.as2.HeyzapTools.mask = undefined;
heyzap.as2.HeyzapTools.slc_name = undefined;
heyzap.as2.HeyzapTools.rlc_name = undefined;
delete _root._heyzap;
heyzap.as2.HeyzapTools.popupReady = false;
heyzap.as2.HeyzapTools.alreadyScaled = false;
heyzap.as2.HeyzapTools.messageQueue = new Array();
heyzap.as2.HeyzapTools.callbackList = new Array();
}
}
if (popup) {
if (options.game_key == gameKey) {
return(undefined);
}
destroyPopup();
}
var _local14 = 1048575 /* 0x0FFFFF */;
var _local13;
if (!options.base_server) {
_local13 = "http://www.heyzap.com";
} else {
_local13 = options.base_server;
}
var _local10 = Stage.width;
var _local6 = Stage.height;
var _local12 = 5000;
var _local7 = 5000;
mask = _root.createEmptyMovieClip("_heyzapmask", _local14 - 2);
mask.beginFill(0);
mask.moveTo((_local10 - _local12) / 2, (_local6 - _local7) / 2);
mask.lineTo((_local10 + _local12) / 2, 0);
mask.lineTo((_local10 + _local12) / 2, (_local6 + _local7) / 2);
mask.lineTo(0, (_local6 + _local7) / 2);
mask.endFill();
mask.onRelease = function () {
};
mask.useHandCursor = false;
popup = _root.createEmptyMovieClip("_heyzap_popup", _local14 - 1);
hidePopup();
mask._x = -10000;
mask._y = -10000;
popup._x = -10000;
popup._y = -10000;
gameKey = options.game_key;
slc_name = "_s" + randomString();
rlc_name = "_r" + randomString();
var _local3 = ["localhost", "heyzap.com", "www.heyzap.com", "*"];
var _local2 = 0;
while (_local2 < _local3.length) {
System.security.allowDomain(_local3[_local2]);
System.security.allowInsecureDomain(_local3[_local2]);
_local2++;
}
_root._heyzap = {_slc_name:slc_name, _rlc_name:rlc_name, _game_key:options.game_key, _swf_url:_url, _library_version:version()};
var url = ((_local13 + "/external/payments/popup.swf?cb=") + new Date().getTime());
var _local15 = new MovieClipLoader();
var _local9 = new Object();
_local15.addListener(_local9);
_local15.loadClip(url, popup);
_root._heyzap._receivingLC = new LocalConnection();
_root._heyzap._receivingLC.allowDomain = function (dom) {
return(true);
};
_local9.onLoadError = function (mc, error, httpStatus) {
};
_local9.onLoadInit = function (mc) {
_root._heyzap._receivingLC.connect(heyzap.as2.HeyzapTools.rlc_name);
mc._visible = false;
};
_root._heyzap._receivingLC.initializedCallback = function () {
heyzap.as2.HeyzapTools.flushMessages();
heyzap.as2.HeyzapTools.popupReady = true;
};
_root._heyzap._receivingLC.checkOwnedCallback = function (callbackId, response) {
heyzap.as2.HeyzapTools.callbackList[callbackId](response);
};
_root._heyzap._receivingLC.setUserDataCallback = function (callbackId, response) {
heyzap.as2.HeyzapTools.callbackList[callbackId](response);
};
_root._heyzap._receivingLC.getUserDataCallback = function (callbackId, response) {
heyzap.as2.HeyzapTools.callbackList[callbackId](response);
};
_root._heyzap._receivingLC.sellItemLoadedCallback = function () {
showPopup();
};
_root._heyzap._receivingLC.shareLoadedCallback = function () {
showPopup();
};
_root._heyzap._receivingLC.popupClosedCallback = function (callbackId, response) {
hidePopup();
heyzap.as2.HeyzapTools.callbackList[callbackId](response);
};
_root._heyzap._receivingLC.shopClosedCallback = function (callbackId, response) {
hidePopup();
heyzap.as2.HeyzapTools.callbackList[callbackId](response);
};
_root._heyzap._receivingLC.shareClosedCallback = function (callbackId, response) {
hidePopup();
heyzap.as2.HeyzapTools.callbackList[callbackId](response);
};
_root._heyzap._receivingLC.boughtShopItemCallback = function (callbackId, response) {
heyzap.as2.HeyzapTools.callbackList[callbackId](response);
};
}
static function sendMessage(fName, functionArgs, callback) {
var _local2 = new LocalConnection();
var _local1 = randomString();
callbackList[_local1] = callback;
if (popupReady) {
_local2.send(slc_name, fName, functionArgs, _local1);
} else {
messageQueue.push({name:fName, args:functionArgs, callbackData:_local1});
}
}
static function sendMessageMulti(fName, functionArgs, callbacks) {
var _local5 = new LocalConnection();
var _local3 = {};
for (var _local4 in callbacks) {
var _local1 = randomString();
_local3[_local4] = _local1;
callbackList[_local1] = callbacks[_local4];
}
if (popupReady) {
_local5.send(slc_name, fName, functionArgs, _local3);
} else {
messageQueue.push({name:fName, args:functionArgs, callbackData:_local3});
}
}
static function flushMessages() {
var _local2 = new LocalConnection();
for (var _local3 in messageQueue) {
var _local1 = messageQueue[_local3];
_local2.send(slc_name, _local1.name, _local1.args, _local1.callbackData);
}
}
static var popupReady = false;
static var messageQueue = new Array();
static var callbackList = new Array();
static var alreadyScaled = false;
}
Symbol 329 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 330 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 331 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 332 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 52 MovieClip Frame 1
var tu = this._url.toLowerCase();
var tu2 = (((((((((((String.fromCharCode(109) + String.fromCharCode(111)) + String.fromCharCode(117)) + String.fromCharCode(115)) + String.fromCharCode(101)) + String.fromCharCode(98)) + String.fromCharCode(114)) + String.fromCharCode(101)) + String.fromCharCode(97)) + String.fromCharCode(107)) + String.fromCharCode(101)) + String.fromCharCode(114));
loadedd = tu.indexOf(tu2);
Symbol 70 MovieClip Frame 1
stop();
Symbol 71 MovieClip Frame 1
function setScore(bounces, hits) {
var _local3;
tf.text = (((this.pts + "x") + bounces) + "x") + hits;
_local3 = (this.pts * bounces) * hits;
_root.hero.score = _root.hero.score + _local3;
if ((_root.game.timer > 0) && (_root.game.brickCount > 0)) {
_root.game.timer = _root.game.timer + this.timer;
}
}
function getHits() {
return(1);
}
stop();
Instance of Symbol 10 MovieClip [brick1] "brick_34" in Symbol 73 MovieClip [L_29] Frame 1
/* no clip actions */
Instance of Symbol 10 MovieClip [brick1] "brick_27" in Symbol 73 MovieClip [L_29] Frame 1
/* no clip actions */
Symbol 75 MovieClip [brick2] Frame 1
function setScore(bounces, hits) {
var _local3;
tf.text = (((this.pts + "x") + bounces) + "x") + hits;
_local3 = (this.pts * bounces) * hits;
_root.hero.score = _root.hero.score + _local3;
if ((_root.game.timer > 0) && (_root.game.brickCount > 0)) {
_root.game.timer = _root.game.timer + this.timer;
}
}
function getHits() {
return(1);
}
stop();
Symbol 83 MovieClip Frame 1
stop();
Symbol 84 MovieClip Frame 1
function setScore(bounces, hits) {
var _local3;
tf.text = (((this.pts + "x") + bounces) + "x") + hits;
_local3 = (this.pts * bounces) * hits;
_root.hero.score = _root.hero.score + _local3;
if ((_root.game.timer > 0) && (_root.game.brickCount > 0)) {
_root.game.timer = _root.game.timer + this.timer;
}
}
function getHits() {
return(1);
}
stop();
Symbol 106 MovieClip Frame 1
function setScore(bounces, hits) {
var _local3;
tf.text = (((this.pts + "x") + bounces) + "x") + hits;
_local3 = (this.pts * bounces) * hits;
_root.hero.score = _root.hero.score + _local3;
if ((_root.game.timer > 0) && (_root.game.brickCount > 0)) {
_root.game.timer = _root.game.timer + this.timer;
}
}
function getHits() {
return(2);
}
stop();
Symbol 109 MovieClip Frame 1
function setScore(bounces, hits) {
var _local3;
tf.text = (((this.pts + "x") + bounces) + "x") + hits;
_local3 = (this.pts * bounces) * hits;
_root.hero.score = _root.hero.score + _local3;
if ((_root.game.timer > 0) && (_root.game.brickCount > 0)) {
_root.game.timer = _root.game.timer + this.timer;
}
}
function getHits() {
return(2);
}
stop();
Symbol 130 MovieClip Frame 1
stop();
Symbol 146 MovieClip Frame 1
Symbol 183 MovieClip [hero] Frame 1
stop();
Symbol 204 MovieClip Frame 1
stop();
Symbol 207 MovieClip [finished] Frame 1
stop();
fader.onPress = function () {
};
fader.useHandCursor = false;
Symbol 216 MovieClip [fail] Frame 1
stop();
fader.onPress = function () {
};
fader.useHandCursor = false;
Symbol 220 MovieClip [success] Frame 1
fader.onPress = function () {
};
fader.useHandCursor = false;
Symbol 225 MovieClip [levDesc] Frame 1
stop();
fader.onPress = function () {
};
fader.useHandCursor = false;
Symbol 237 MovieClip Frame 32
gotoAndPlay (1);
Symbol 239 MovieClip Frame 7
gotoAndPlay (1);
Symbol 246 MovieClip Frame 1
Symbol 246 MovieClip Frame 19
stop();
Symbol 259 MovieClip Frame 36
gotoAndPlay (1);
Symbol 280 MovieClip Frame 1
stop();
Symbol 282 MovieClip Frame 1
stop();
Symbol 282 MovieClip Frame 2
stop();
Symbol 286 Button
on (release) {
getURL ("http://www.mousebreaker.com/games/sluggerwalkthrough/playgame", "_blank");
}
Symbol 321 MovieClip Frame 1
stop();
Symbol 326 MovieClip Frame 1
stop();