Frame 1
var countDownTime = 5;
var lastTime = getTimer();
splashButton._alpha = 0;
stop();
onEnterFrame = function () {
if ((countDownTime > 0) && (splashButton._alpha < 100)) {
splashButton._alpha = splashButton._alpha + 2;
}
splashButton.onRelease = function () {
getURL ("http://www.gameforcharity.com/events.aspx", "_blank");
};
if (getTimer() >= (lastTime + 1000)) {
lastTime = lastTime + 1000;
countDownTime--;
}
if (countDownTime <= 0) {
splashButton._alpha = splashButton._alpha - 2;
if (splashButton._alpha < 0) {
splashButton._alpha = 0;
}
}
if ((countDownTime <= 0) && (splashButton._alpha == 0)) {
delete onEnterFrame;
gotoAndStop (2);
}
};
Frame 2
MochiAd.showPreGameAd({id:"70d8a239692dd202", res:"750x450"});
Frame 3
gotoAndStop (5);
Frame 5
stop();
movieLoaded = this.getBytesLoaded();
movieTotal = this.getBytesTotal();
percentage = Math.floor((movieLoaded / movieTotal) * 100);
var pauseTime = 0;
var muteSound = false;
var backgroundMusic = null;
var GameSeed = Math.floor(Math.random() * 6987326897);
var GameSeed2 = Math.floor(Math.random() * 2678415982);
var BallSeed = Math.floor(Math.random() * 1203520147);
var CannonSeed = Math.floor(Math.random() * 7628459184);
onEnterFrame = function () {
movieLoaded = this.getBytesLoaded();
percentage = Math.floor((movieLoaded / movieTotal) * 100);
if (loadPill._currentFrame > percentage) {
loadPill.stop();
}
if (loadPill._currentFrame < percentage) {
loadPill.play();
}
if ((antFire._currentFrame > percentage) && (percentage < 99)) {
antFire.stop();
}
if ((antFire._currentFrame < percentage) || (percentage >= 100)) {
antFire.play();
}
if ((percentage >= 100) && (antFire._currentFrame >= 119)) {
pauseTime = 0;
delete onEnterFrame;
gotoAndStop (8);
}
};
Frame 6
this.gotoAndPlay(5);
Frame 8
com.novelgames.flashgames.common.MainDevelopment.initialize(this);
pauseScreen._visible = false;
btnFramePause.enabled = false;
var pauseGame = false;
cursor._visible = false;
if (!backgroundMusic) {
backgroundMusic = new Sound();
backgroundMusic.attachSound("backgroundMusic");
backgroundMusic.start(0, 1000);
backgroundMusic.setVolume(50);
}
Frame 14
btnFramePause.enabled = false;
Frame 24
stop();
btnFramePause.enabled = true;
pauseScreen._visible = false;
startDrag ("_root.cursor", true);
Mouse.hide();
Frame 31
this.gotoAndStop("game");
Symbol 16 MovieClip [Load Pill MC] Frame 100
stop();
Symbol 676 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 677 MovieClip [__Packages.com.novelgames.flashgames.marble.Cannon] Frame 0
class com.novelgames.flashgames.marble.Cannon extends MovieClip
{
var possibleBallTypes, canShoot, ballFront, ballBack, _rotation, _ymouse, _xmouse, _parent, intervalID;
function Cannon () {
super();
}
function initialize(noOfBallTypes) {
var _local2;
possibleBallTypes = new Array();
_local2 = 0;
while (_local2 < noOfBallTypes) {
possibleBallTypes[_local2] = _local2;
_local2++;
}
canShoot = true;
ballFront.__proto__ = com.novelgames.flashgames.marble.Ball.prototype;
ballFront.initialize(GetPieceNumberForceNew(noOfBallTypes), 1);
ballFront.bonusType = 0;
ballFront.antBomb._visible = false;
ballBack.__proto__ = com.novelgames.flashgames.marble.Ball.prototype;
ballBack.initialize(GetPieceNumberForceNew(noOfBallTypes), 1);
ballBack.bonusType = 0;
ballBack.antBomb._visible = false;
updateRotation();
}
function GetPieceNumberForceNew(modAmount) {
var _local2 = "0";
var _local3 = "0";
_local2 = String(_root.CannonSeed).substr(8, 2);
if ((_local2 % 10) == 0) {
_local2 = 31;
}
if (((_local2 == "01") || (_local2 == "00")) || (_local2 == "10")) {
_local2 = 37;
}
_local3 = _root.CannonSeed * _local2;
_root.CannonSeed = String(_local3).substr(0, 10);
return(_root.CannonSeed % modAmount);
}
function updateRotation() {
_rotation = _rotation + ((Math.atan2(_ymouse, _xmouse) * 180) / Math.PI);
}
function swapFrontBack() {
var _local2 = ballFront.type;
var _local3 = ballFront.bonusType;
ballFront.setType(ballBack.type);
ballFront.bonusType = ballBack.bonusType;
if (ballFront.bonusType == 6) {
ballFront.antBomb._visible = true;
} else {
ballFront.antBomb._visible = false;
}
ballBack.setType(_local2);
ballBack.bonusType = _local3;
if (ballBack.bonusType == 6) {
ballBack.antBomb._visible = true;
} else {
ballBack.antBomb._visible = false;
}
}
function shoot() {
if (!canShoot) {
return(undefined);
}
_parent._parent.shoot();
ballFront._visible = false;
canShoot = false;
intervalID = setInterval(this, "finishedShooting", com.novelgames.flashgames.marble.Config.BALL_SHOOTINTERVAL);
}
function setPossibleBallTypes(possibleBallTypes) {
var _local5 = false;
var _local4 = false;
var _local2;
this.possibleBallTypes = possibleBallTypes;
_local2 = 0;
while (_local2 < possibleBallTypes.length) {
if (ballFront.type == possibleBallTypes[_local2]) {
_local5 = true;
}
if (ballBack.type == possibleBallTypes[_local2]) {
_local4 = true;
}
_local2++;
}
if (!_local5) {
ballFront.setType(possibleBallTypes[GetPieceNumberForceNew(possibleBallTypes.length)]);
}
if (!_local4) {
ballBack.setType(possibleBallTypes[GetPieceNumberForceNew(possibleBallTypes.length)]);
}
}
function finishedShooting() {
clearInterval(intervalID);
ballFront.setType(ballBack.type);
ballFront.bonusType = ballBack.bonusType;
if (ballFront.bonusType == 6) {
ballFront.antBomb._visible = true;
} else {
ballFront.antBomb._visible = false;
}
ballFront._visible = true;
ballBack.setType(possibleBallTypes[GetPieceNumberForceNew(possibleBallTypes.length)]);
var _local2 = GetPieceNumberForceNew(1000);
if (_local2 <= 5) {
ballBack.bonusType = 6;
ballBack.bonusTimer = 1000;
ballBack.antBomb._visible = true;
} else {
ballBack.bonusType = -1;
ballBack.bonusTimer = 0;
ballBack.antBomb._visible = false;
}
canShoot = true;
}
}
Symbol 678 MovieClip [__Packages.com.novelgames.flashgames.marble.Ball] Frame 0
class com.novelgames.flashgames.marble.Ball extends MovieClip
{
var stop, pointIndex, isOnPath, cannotHit, bonusType, bonusTimer, bonusTimeTracker, letterP, letterL, letterA, letterY, letterZ, letterI, slowMove, fastMove, antBomb, slowFire, fastFire, matrixM, xyPoint, cacheAsBitmap, type, gotoAndStop, _x, _y, maskName, mask, setMask, _parent, removeMovieClip;
function Ball () {
super();
stop();
}
function initialize(type, generator) {
setType(type);
pointIndex = 0;
isOnPath = false;
cannotHit = false;
bonusType = -1;
bonusTimer = 0;
bonusTimeTracker = 0;
letterP._visible = false;
letterL._visible = false;
letterA._visible = false;
letterY._visible = false;
letterZ._visible = false;
letterI._visible = false;
slowMove._visible = false;
fastMove._visible = false;
antBomb._visible = false;
slowFire._visible = false;
fastFire._visible = false;
matrixM._visible = false;
if (generator == 0) {
var _local2 = GetPieceNumberForceNew(80);
if (_local2 == 0) {
bonusType = _local2;
letterP._visible = true;
bonusTimer = GetPieceNumberForceNew(15) + 10;
bonusTimeTracker = getTimer();
} else if (_local2 == 1) {
bonusType = _local2;
letterL._visible = true;
bonusTimer = GetPieceNumberForceNew(15) + 10;
bonusTimeTracker = getTimer();
} else if (_local2 == 2) {
bonusType = _local2;
letterA._visible = true;
bonusTimer = GetPieceNumberForceNew(15) + 10;
bonusTimeTracker = getTimer();
} else if (_local2 == 3) {
bonusType = _local2;
letterY._visible = true;
bonusTimer = GetPieceNumberForceNew(15) + 10;
bonusTimeTracker = getTimer();
} else if (_local2 == 4) {
bonusType = _local2;
letterZ._visible = true;
bonusTimer = GetPieceNumberForceNew(15) + 10;
bonusTimeTracker = getTimer();
} else if (_local2 == 5) {
bonusType = _local2;
letterI._visible = true;
bonusTimer = GetPieceNumberForceNew(15) + 10;
bonusTimeTracker = getTimer();
} else if (_local2 == 6) {
bonusType = _local2 + 1;
slowFire._visible = true;
bonusTimer = GetPieceNumberForceNew(15) + 10;
bonusTimeTracker = getTimer();
} else if (_local2 == 7) {
bonusType = _local2 + 1;
fastFire._visible = true;
bonusTimer = GetPieceNumberForceNew(15) + 10;
bonusTimeTracker = getTimer();
} else if (_local2 == 8) {
bonusType = _local2 + 1;
slowMove._visible = true;
bonusTimer = GetPieceNumberForceNew(15) + 10;
bonusTimeTracker = getTimer();
} else if (_local2 == 9) {
bonusType = _local2 + 1;
fastMove._visible = true;
bonusTimer = GetPieceNumberForceNew(15) + 10;
bonusTimeTracker = getTimer();
} else if (_local2 == 10) {
bonusType = _local2 + 1;
matrixM._visible = true;
bonusTimer = GetPieceNumberForceNew(15) + 10;
bonusTimeTracker = getTimer();
}
} else if (generator == 1) {
var _local2 = GetPieceNumberForceNew(10);
if (_local2 == 0) {
bonusType = 6;
}
}
xyPoint = new flash.geom.Point(0, 0);
cacheAsBitmap = true;
}
function GetPieceNumberForceNew(modAmount) {
var _local2 = "0";
var _local3 = "0";
_local2 = String(_root.BallSeed).substr(8, 2);
if ((_local2 % 10) == 0) {
_local2 = 31;
}
if (((_local2 == "01") || (_local2 == "00")) || (_local2 == "10")) {
_local2 = 37;
}
_local3 = _root.BallSeed * _local2;
_root.BallSeed = String(_local3).substr(0, 10);
return(_root.BallSeed % modAmount);
}
function setType(type) {
this.type = type;
gotoAndStop(type + 1);
}
function setXY(x, y) {
xyPoint.x = x;
xyPoint.y = y;
_x = x;
_y = y;
}
function updateMask(maskName) {
var _local3;
if (maskName == this.maskName) {
return(undefined);
}
this.maskName = maskName;
if (((maskName == undefined) || (maskName == null)) || (maskName == "")) {
mask.removeMovieClip();
mask = null;
setMask(null);
} else {
_local3 = _parent.getNextHighestDepth();
mask = _parent.attachMovie(maskName, "mask" + _local3, _local3);
setMask(mask);
}
}
function destroy() {
if (mask) {
mask.removeMovieClip();
}
removeMovieClip();
}
}
Symbol 679 MovieClip [__Packages.com.novelgames.flashgames.marble.Config] Frame 0
class com.novelgames.flashgames.marble.Config
{
function Config () {
}
static var BALL_TYPES = 9;
static var BALL_RADIUS = 20;
static var BALL_CREATESPEED = 400;
static var BALL_CREATEPERCENT = 30;
static var BALL_SHOOTSPEED = 400;
static var BALL_SHOOTINTERVAL = 200;
static var BALL_INSERTTIME = 100;
static var BALL_CONNECTTTOLERANCE = 5;
static var BALL_DROPACCELERATION = 1000;
static var BALL_LOSESPEED = 500;
static var BALL_SAMEPOSSIBILITY = 10;
static var EXPLODE_TIME = 1000;
static var EXPLODE_DISTANCE = 10;
static var STAR_SPACING = BALL_RADIUS * 3;
static var STAR_APPEARTIME = 800;
static var STAR_TIMEDIFFERENCE = 100;
static var MINGROUPSIZE = 3;
static var STAGE_NOOFBACKGROUNDS = 4;
static var STAGE_INITIALBALLTYPES = 3;
static var STAGE_BALLTYPESINCREASE = 1;
static var STAGE_INITIALMOVESPEED = 15;
static var STAGE_MOVESPEEDINCREASE = 8;
static var STAGE_INITIALNOOFBALLS = 20;
static var STAGE_NOOFBALLSINCREASE = 15;
static var STAGE_CLEARSHOWTIME = 2500;
static var STAGEBACKGROUND_BALLMASKS = [null, [[]], null];
static var STAGEBACKGROUND_BALLCANNOTHITS = [null, [[]], null];
static var SCORE_DESTROY = 20;
static var SCORE_EXTRABALL = 10;
static var SCORE_COMBO = 10;
static var SCORE_STAR = 100;
}
Symbol 680 MovieClip [__Packages.com.novelgames.flashgames.marble.Dialog] Frame 0
class com.novelgames.flashgames.marble.Dialog extends MovieClip
{
var stop, gotoAndStop, level, background, lives, gotoAndPlay, stopDrag, _parent, finalscore, finallevel, finalbackground, playAgainButton, mainMenuButton, playForCharityButton;
function Dialog () {
super();
stop();
}
function showStageBegin(level, background, lives) {
gotoAndStop("stageBegin");
this.level = level;
this.background = background;
this.lives = lives;
}
function showStageClear() {
gotoAndStop("stageClear");
}
function showGameOver() {
gotoAndPlay("gameOver");
}
function hide() {
gotoAndStop("hide");
}
function gameOverFinished() {
stop();
stopDrag();
_root.cursor._visible = false;
Mouse.show();
finalscore.text = _parent.score;
finallevel.text = _parent.currentLevel;
finalbackground.text = _parent.currentBackground;
playAgainButton.onRelease = function () {
this._parent._parent._parent.gotoAndPlay(24);
};
mainMenuButton.onRelease = function () {
this._parent._parent._parent.gotoTitlePage();
};
playForCharityButton.onRelease = function () {
this._parent._parent._parent.getURL("http://www.gameforcharity.com/events.aspx", "_blank");
};
_parent.showEnterHighScore();
}
}
Symbol 681 MovieClip [__Packages.com.novelgames.flashgames.marble.Explode] Frame 0
class com.novelgames.flashgames.marble.Explode extends MovieClip
{
var pieces, totalSeconds;
function Explode () {
super();
var _local3;
pieces = new Array();
_local3 = 0;
while (this["piece" + _local3]) {
pieces[_local3] = this["piece" + _local3];
_local3++;
}
totalSeconds = 0;
}
function move(seconds) {
var _local5 = false;
var _local4;
var _local3;
var _local2;
totalSeconds = totalSeconds + seconds;
if ((totalSeconds * 1000) >= com.novelgames.flashgames.marble.Config.EXPLODE_TIME) {
_local4 = 1;
_local5 = true;
} else {
_local4 = (totalSeconds * 1000) / com.novelgames.flashgames.marble.Config.EXPLODE_TIME;
}
_local3 = _local4 * com.novelgames.flashgames.marble.Config.EXPLODE_DISTANCE;
_local2 = 0;
while (_local2 < pieces.length) {
pieces[_local2]._alpha = (1 - _local4) * 100;
pieces[_local2]._x = _local3 * Math.cos((pieces[_local2]._rotation * Math.PI) / 180);
pieces[_local2]._y = _local3 * Math.sin((pieces[_local2]._rotation * Math.PI) / 180);
_local2++;
}
return(_local5);
}
}
Symbol 682 MovieClip [__Packages.com.novelgames.flashgames.marble.StageBackground] Frame 0
class com.novelgames.flashgames.marble.StageBackground extends MovieClip
{
var stop, pathInfos, gotoAndStop, _totalframes, _currentframe, nextFrame, cacheAsBitmap;
function StageBackground () {
super();
stop();
}
function initialize() {
var _local3 = new Array();
var _local2;
_local2 = 0;
while (this["ball" + _local2]) {
_local3[_local2] = this["ball" + _local2];
_local3[_local2]._visible = false;
_local2++;
}
pathInfos = new Array();
_local2 = 0;
while (_local2 < _local3.length) {
pathInfos.push(new com.novelgames.flashgames.marble.PathInfo());
_local2++;
}
gotoAndStop(1);
while (true) {
_local2 = 0;
while (_local2 < _local3.length) {
pathInfos[_local2].addPoint(_local3[_local2]._x, _local3[_local2]._y);
_local2++;
}
if (_currentframe >= _totalframes) {
break;
}
nextFrame();
}
_local2 = 0;
while (_local2 < _local3.length) {
pathInfos[_local2].updateBallSpacing();
_local2++;
}
cacheAsBitmap = true;
}
}
Symbol 683 MovieClip [__Packages.com.novelgames.flashgames.marble.PathInfo] Frame 0
class com.novelgames.flashgames.marble.PathInfo
{
var points, masks, cannotHits, maxPointSpacing, ballSpacing, connectedBallSpacing;
function PathInfo () {
points = new Array();
masks = new Array();
cannotHits = new Array();
maxPointSpacing = 0;
ballSpacing = 0;
}
function addPoint(x, y) {
points.push(new flash.geom.Point(x, y));
masks.push(null);
cannotHits.push(false);
}
function updateMask(infos) {
var _local2;
var _local3;
_local2 = 0;
while (_local2 < infos.length) {
_local3 = infos[_local2][0];
while (_local3 < infos[_local2][1]) {
masks[_local3] = infos[_local2][2];
_local3++;
}
_local2++;
}
}
function updateCannotHits(infos) {
var _local3;
var _local2;
_local3 = 0;
while (_local3 < infos.length) {
_local2 = infos[_local3][0];
while (_local2 < infos[_local3][1]) {
cannotHits[_local2] = true;
_local2++;
}
_local3++;
}
}
function updateBallSpacing() {
var _local4 = Number.MIN_VALUE;
var _local5 = 0;
var _local3;
var _local2;
_local2 = 1;
while (_local2 < points.length) {
_local3 = flash.geom.Point.distance(points[_local2 - 1], points[_local2]);
if (_local3 > _local4) {
_local4 = _local3;
_local5 = _local2;
}
_local2++;
}
maxPointSpacing = _local4;
ballSpacing = (com.novelgames.flashgames.marble.Config.BALL_RADIUS * 2) / _local4;
connectedBallSpacing = ((com.novelgames.flashgames.marble.Config.BALL_RADIUS * 2) + com.novelgames.flashgames.marble.Config.BALL_CONNECTTTOLERANCE) / _local4;
}
function getXY(index) {
var _local6;
var _local5;
var _local2;
var _local3;
if (index <= 0) {
return(points[0]);
}
if (index >= (points.length - 1)) {
return(points[points.length - 1]);
}
_local2 = Math.floor(index);
_local3 = index - _local2;
_local6 = (points[_local2].x * (1 - _local3)) + (points[_local2 + 1].x * _local3);
_local5 = (points[_local2].y * (1 - _local3)) + (points[_local2 + 1].y * _local3);
return(new flash.geom.Point(_local6, _local5));
}
function getMask(index) {
if (index <= 0) {
return(masks[0]);
}
if (index >= (masks.length - 1)) {
return(masks[masks.length - 1]);
}
return(masks[Math.floor(index)]);
}
function getCannotHit(index) {
if (index <= 0) {
return(cannotHits[0]);
}
if (index >= (cannotHits.length - 1)) {
return(cannotHits[cannotHits.length - 1]);
}
return(cannotHits[Math.floor(index)]);
}
}
Symbol 684 MovieClip [__Packages.com.novelgames.flashgames.marble.Game] Frame 0
class com.novelgames.flashgames.marble.Game extends MovieClip
{
var score, soundBomb, soundCrumbs, soundDecFire, soundDecMove, soundExplode, soundFire, soundGameOver, soundIncFire, soundIncMove, soundLevelComplete, soundLifeLost, soundLifeUp, soundMatrixMode, soundPlayziBall, soundStartLevel, stopCountDownTime, circleCount, lives, cirInc, letterP, letterL, letterA, letterY, letterZ, letterI, letterPBool, letterLBool, letterABool, letterYBool, letterZBool, letterIBool, fireSpeedAdjust, fireSpeedAdjustTimer, fireSpeedTimeTracker, moveSpeedAdjust, moveSpeedAdjustTimer, moveSpeedTimeTracker, bonusAdd, bonusAddTracker, MatrixMode, ballsHolder, cannon, stageBackground, shootingBalls, _parent, showingWin, showingLose, _ymouse, playingStarted, currentLevel, currentBackground, gotoAndStop, noOfBallTypes, moveSpeed, maxNoOfBalls, noOfBallsCreated, maskOne, dropInfos, ballLines, lastDestroyPointIndexes, explodes, dialog, lastMoveTime, intervalID, pauseTimer, explodesHolder, starLines, starsHolder;
function Game () {
super();
score = 0;
_root.cursor._visible = true;
soundBomb = new com.novelgames.flashgames.common.NewSound(this, "soundBomb");
soundCrumbs = new com.novelgames.flashgames.common.NewSound(this, "soundCrumbs");
soundDecFire = new com.novelgames.flashgames.common.NewSound(this, "soundDecFire");
soundDecMove = new com.novelgames.flashgames.common.NewSound(this, "soundDecMove");
soundExplode = new com.novelgames.flashgames.common.NewSound(this, "soundExplode");
soundFire = new com.novelgames.flashgames.common.NewSound(this, "soundFire");
soundGameOver = new com.novelgames.flashgames.common.NewSound(this, "soundGameOver");
soundIncFire = new com.novelgames.flashgames.common.NewSound(this, "soundIncFire");
soundIncMove = new com.novelgames.flashgames.common.NewSound(this, "soundIncMove");
soundLevelComplete = new com.novelgames.flashgames.common.NewSound(this, "soundLevelComplete");
soundLifeLost = new com.novelgames.flashgames.common.NewSound(this, "soundLifeLost");
soundLifeUp = new com.novelgames.flashgames.common.NewSound(this, "soundLifeUp");
soundMatrixMode = new com.novelgames.flashgames.common.NewSound(this, "soundMatrixMode");
soundPlayziBall = new com.novelgames.flashgames.common.NewSound(this, "soundPlayziBall");
soundStartLevel = new com.novelgames.flashgames.common.NewSound(this, "soundStartLevel");
stopCountDownTime = 0;
circleCount = 0;
lives = 2;
cirInc = 0;
letterP.gotoAndStop(1);
letterL.gotoAndStop(1);
letterA.gotoAndStop(1);
letterY.gotoAndStop(1);
letterZ.gotoAndStop(1);
letterI.gotoAndStop(1);
letterPBool = false;
letterLBool = false;
letterABool = false;
letterYBool = false;
letterZBool = false;
letterIBool = false;
fireSpeedAdjust = 0;
fireSpeedAdjustTimer = 0;
fireSpeedTimeTracker = 0;
moveSpeedAdjust = 0;
moveSpeedAdjustTimer = 0;
moveSpeedTimeTracker = 0;
bonusAdd = 1;
bonusAddTracker = 0;
MatrixMode = false;
Key.addListener(this);
startLevel(1, 1);
}
function GetPieceNumberForceNew(modAmount) {
var _local2 = "0";
var _local3 = "0";
_local2 = String(_root.GameSeed).substr(8, 2);
if ((_local2 % 10) == 0) {
_local2 = 31;
}
if (((_local2 == "01") || (_local2 == "00")) || (_local2 == "10")) {
_local2 = 37;
}
_local3 = _root.GameSeed * _local2;
_root.GameSeed = String(_local3).substr(0, 10);
return(_root.GameSeed % modAmount);
}
function GetPieceNumberForceNew2(modAmount) {
var _local2 = "0";
var _local3 = "0";
_local2 = String(_root.GameSeed2).substr(8, 2);
if ((_local2 % 10) == 0) {
_local2 = 31;
}
if (((_local2 == "01") || (_local2 == "00")) || (_local2 == "10")) {
_local2 = 37;
}
_local3 = _root.GameSeed2 * _local2;
_root.GameSeed2 = String(_local3).substr(0, 10);
return(_root.GameSeed2 % modAmount);
}
function shoot() {
var _local6 = ballsHolder.getNextHighestDepth();
var _local7 = ballsHolder.attachMovie("ball", "ball" + _local6, _local6);
var _local4 = _local7;
var _local5 = new flash.geom.Point(0, 0);
_local4.initialize(cannon.ballFront.type, 2);
_local4.bonusType = cannon.ballFront.bonusType;
if (_local4.bonusType == 6) {
_local4.antBomb._visible = true;
_local4.bonusTimer = 1000;
}
cannon.ballFront.localToGlobal(_local5);
stageBackground.cannon.shooting.gotoAndPlay(7);
_local4._x = _local5.x;
_local4._y = _local5.y;
_local4.speedX = Math.cos((cannon._rotation * Math.PI) / 180) * (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED + fireSpeedAdjust);
_local4.speedY = Math.sin((cannon._rotation * Math.PI) / 180) * (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED + fireSpeedAdjust);
shootingBalls.push(_local4);
var _local3 = 0;
while (_local3 < shootingBalls.length) {
shootingBalls[_local3].ant.gotoAndPlay("Launched");
_local3++;
}
if (!_root.muteSound) {
soundFire.start();
}
}
function showEnterHighScore() {
_parent.showEnterHighScore(score);
}
function onMouseMove() {
if (showingWin) {
return(undefined);
}
if (showingLose) {
_root.cursor._visible = false;
Mouse.show();
return(undefined);
}
if (_root.pauseGame) {
return(undefined);
}
if ((_ymouse > 400) || (_ymouse < 10)) {
_root.cursor._visible = false;
Mouse.show();
} else {
Mouse.hide();
_root.cursor._visible = true;
}
cannon.updateRotation();
}
function onMouseDown() {
if (!playingStarted) {
return(undefined);
}
if (showingWin) {
return(undefined);
}
if (showingLose) {
return(undefined);
}
if ((_ymouse > 400) || (_ymouse < 10)) {
return(undefined);
}
if (_root.pauseGame) {
return(undefined);
}
cannon.shoot();
}
function onKeyDown() {
if (!playingStarted) {
return(undefined);
}
if (showingWin) {
return(undefined);
}
if (showingLose) {
return(undefined);
}
if (_root.pauseGame) {
return(undefined);
}
if (Key.getCode() == 32) {
cannon.swapFrontBack();
}
}
function startLevel(level, background) {
var _local6;
var _local7;
var _local3;
currentLevel = level;
currentBackground = background;
if (!_root.muteSound) {
soundStartLevel.start();
}
com.novelgames.flashgames.marble.Config.SCORE_DESTROY = 20 + ((currentLevel - 1) * (currentBackground + 2));
com.novelgames.flashgames.marble.Config.SCORE_EXTRABALL = 10 + ((currentLevel - 1) * (currentBackground + 2));
gotoAndStop("background" + background);
if (currentBackground == 2) {
com.novelgames.flashgames.marble.Config.BALL_CREATEPERCENT = 40;
com.novelgames.flashgames.marble.Config.STAGE_INITIALNOOFBALLS = 25;
com.novelgames.flashgames.marble.Config.BALL_SHOOTINTERVAL = 100;
com.novelgames.flashgames.marble.Config.STAGE_INITIALMOVESPEED = 15;
com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED = 650;
} else if (currentBackground == 3) {
com.novelgames.flashgames.marble.Config.BALL_CREATEPERCENT = 35;
com.novelgames.flashgames.marble.Config.STAGE_INITIALNOOFBALLS = 35;
com.novelgames.flashgames.marble.Config.BALL_SHOOTINTERVAL = 200;
com.novelgames.flashgames.marble.Config.STAGE_INITIALMOVESPEED = 25;
com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED = 500;
} else if (currentBackground == 4) {
com.novelgames.flashgames.marble.Config.BALL_CREATEPERCENT = 30;
com.novelgames.flashgames.marble.Config.STAGE_INITIALNOOFBALLS = 20;
com.novelgames.flashgames.marble.Config.BALL_SHOOTINTERVAL = 100;
com.novelgames.flashgames.marble.Config.STAGE_INITIALMOVESPEED = 15;
com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED = 400;
} else {
com.novelgames.flashgames.marble.Config.BALL_CREATEPERCENT = 30;
com.novelgames.flashgames.marble.Config.STAGE_INITIALNOOFBALLS = 20;
com.novelgames.flashgames.marble.Config.BALL_SHOOTINTERVAL = 200;
com.novelgames.flashgames.marble.Config.STAGE_INITIALMOVESPEED = 15;
com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED = 400;
}
noOfBallTypes = com.novelgames.flashgames.marble.Config.STAGE_INITIALBALLTYPES + ((level - 1) * com.novelgames.flashgames.marble.Config.STAGE_BALLTYPESINCREASE);
if (noOfBallTypes > com.novelgames.flashgames.marble.Config.BALL_TYPES) {
noOfBallTypes = com.novelgames.flashgames.marble.Config.BALL_TYPES;
}
moveSpeed = com.novelgames.flashgames.marble.Config.STAGE_INITIALMOVESPEED + ((level - 1) * com.novelgames.flashgames.marble.Config.STAGE_MOVESPEEDINCREASE);
maxNoOfBalls = com.novelgames.flashgames.marble.Config.STAGE_INITIALNOOFBALLS + ((level - 1) * com.novelgames.flashgames.marble.Config.STAGE_NOOFBALLSINCREASE);
noOfBallsCreated = 0;
playingStarted = false;
showingWin = false;
showingLose = false;
MatrixMode = false;
fireSpeedAdjust = 0;
fireSpeedAdjustTimer = 0;
fireSpeedTimeTracker = 0;
moveSpeedAdjust = 0;
moveSpeedAdjustTimer = 0;
moveSpeedTimeTracker = 0;
maskOne.swapDepths(1000);
bonusAdd = 1;
bonusAddTracker = 0;
shootingBalls = new Array();
dropInfos = new Array();
ballLines = new Array();
lastDestroyPointIndexes = new Array();
_local3 = 0;
while (_local3 < explodes.length) {
explodes[_local3].removeMovieClip();
explodes[_local3] = null;
_local3++;
}
explodes = new Array();
stageBackground.__proto__ = com.novelgames.flashgames.marble.StageBackground.prototype;
stageBackground.initialize();
cannon = stageBackground.cannon;
cannon.__proto__ = com.novelgames.flashgames.marble.Cannon.prototype;
cannon.initialize(noOfBallTypes + 1);
_local3 = 0;
while (_local3 < stageBackground.pathInfos.length) {
stageBackground.pathInfos[_local3].updateCannotHits(com.novelgames.flashgames.marble.Config.STAGEBACKGROUND_BALLCANNOTHITS[background - 1][_local3]);
ballLines[_local3] = new Array();
_local3++;
}
dialog.__proto__ = com.novelgames.flashgames.marble.Dialog.prototype;
dialog.showStageBegin(level, background, lives);
lastMoveTime = getTimer();
intervalID = setInterval(this, "doCreateMove", 1);
}
function doCreateMove() {
_root.btnFramePause.enabled = false;
var _local5 = getTimer();
var _local6 = (_local5 - lastMoveTime) / 1000;
var _local8;
var _local4 = false;
var _local3;
var _local7;
moveBalls(_local6, com.novelgames.flashgames.marble.Config.BALL_CREATESPEED);
_local3 = 0;
while (_local3 < ballLines.length) {
if (ballLines[_local3][ballLines[_local3].length - 1].pointIndex >= ((stageBackground.pathInfos[_local3].points.length * com.novelgames.flashgames.marble.Config.BALL_CREATEPERCENT) / 100)) {
_local4 = true;
}
_local3++;
}
lastMoveTime = _local5;
updateAfterEvent();
if (_local4) {
clearInterval(intervalID);
dialog.hide();
_root.btnFramePause.enabled = true;
startPlaying();
}
}
function startPlaying() {
playingStarted = true;
_root.btnFramePause.enabled = true;
lastMoveTime = getTimer();
intervalID = setInterval(this, "doPlayMove", 1);
}
function doPlayMove() {
if (_root.pauseGame) {
if (!pauseTimer) {
pauseTimer = getTimer();
}
return(undefined);
}
if (pauseTimer) {
var _local5 = getTimer() - pauseTimer;
lastMoveTime = lastMoveTime + _local5;
pauseTimer = 0;
}
var _local4 = getTimer();
var _local3 = (_local4 - lastMoveTime) / 1000;
moveShootingBalls(_local3);
moveBalls(_local3, moveSpeed);
dropBalls(_local3);
moveExplodes(_local3);
checkWinLose();
lastMoveTime = _local4;
updateAfterEvent();
}
function moveShootingBalls(seconds) {
var _local4;
var _local6;
var _local5;
var _local10;
var _local9;
var _local8;
var _local12;
var _local11;
var _local3;
var _local7;
_local3 = 0;
while (_local3 < shootingBalls.length) {
_local4 = shootingBalls[_local3];
_local6 = _local4._x;
_local5 = _local4._y;
if ((cirInc % 4) == 0) {
circleCount++;
if (MatrixMode) {
_root.circle.duplicateMovieClip("circle" + circleCount, circleCount);
_root["circle" + circleCount]._x = _local4._x;
_root["circle" + circleCount]._y = _local4._y;
}
}
cirInc++;
_local10 = _local4.speedX * seconds;
_local9 = _local4.speedY * seconds;
_local8 = Math.ceil(Math.max(Math.abs(_local10), Math.abs(_local9)) / (com.novelgames.flashgames.marble.Config.BALL_RADIUS * 2));
_local12 = _local10 / _local8;
_local11 = _local9 / _local8;
_local7 = 0;
while (_local7 < _local8) {
_local6 = _local6 + _local12;
_local5 = _local5 + _local11;
_local4.setXY(_local6, _local5);
if ((((_local6 < (-com.novelgames.flashgames.marble.Config.BALL_RADIUS)) || (_local6 > 750)) || (_local5 < (-com.novelgames.flashgames.marble.Config.BALL_RADIUS))) || (_local5 > 450)) {
_local4.destroy();
shootingBalls.splice(_local3, 1);
_local3--;
break;
}
if (landBallOnPath(_local4)) {
circleCount = 0;
cirInc = 0;
shootingBalls[_local3].ant.gotoAndPlay("Walk");
shootingBalls.splice(_local3, 1);
_local3--;
break;
}
_local7++;
}
_local3++;
}
}
function landBallOnPath(ball) {
var _local9;
var _local6;
var _local8;
var _local10;
var _local2;
var _local3;
var _local5;
_local2 = 0;
while (_local2 < ballLines.length) {
_local3 = 0;
while (_local3 < ballLines[_local2].length) {
if (ballLines[_local2][_local3].cannotHit) {
} else {
_local9 = flash.geom.Point.distance(ball.xyPoint, ballLines[_local2][_local3].xyPoint);
if (_local9 > (com.novelgames.flashgames.marble.Config.BALL_RADIUS * 2)) {
} else {
_local8 = stageBackground.pathInfos[_local2].getXY(ballLines[_local2][_local3].pointIndex - stageBackground.pathInfos[_local2].ballSpacing);
_local10 = stageBackground.pathInfos[_local2].getXY(ballLines[_local2][_local3].pointIndex + stageBackground.pathInfos[_local2].ballSpacing);
if (flash.geom.Point.distance(ball.xyPoint, _local8) >= flash.geom.Point.distance(ball.xyPoint, _local10)) {
ball.pointIndex = ballLines[_local2][_local3].pointIndex + stageBackground.pathInfos[_local2].ballSpacing;
_local6 = _local3 + 1;
} else {
ball.pointIndex = ballLines[_local2][_local3].pointIndex;
_local6 = _local3;
}
ball.insertTime = getTimer();
ball.insertX = ball._x;
ball.insertY = ball._y;
ballLines[_local2].splice(_local6, 0, ball);
if (_local6 > _local3) {
_local5 = 0;
while (_local5 < dropInfos.length) {
if (dropInfos[_local5].ball == ballLines[_local2][_local3]) {
dropInfos[_local5].ball = ball;
break;
}
_local5++;
}
}
var _local7 = ball.getDepth();
_local2 = 0;
while (_local2 < ballLines.length) {
_local3 = _local6;
while (_local3 < ballLines[_local2].length) {
ballLines[_local2][_local3].swapDepths(_local7++);
_local7++;
_local3++;
}
_local2++;
}
return(true);
}
}
_local3++;
}
_local2++;
}
return(false);
}
function moveBalls(seconds, speed) {
var _local5;
var _local2;
var _local3;
var _local6 = speed + moveSpeedAdjust;
if (_local6 <= 1) {
_local6 = 5;
}
_local2 = 0;
while (_local2 < ballLines.length) {
pushBalls(_local2, 0, (_local6 * seconds) / stageBackground.pathInfos[_local2].maxPointSpacing);
while ((noOfBallsCreated < maxNoOfBalls) && ((ballLines[_local2].length == 0) || (ballLines[_local2][0].pointIndex >= stageBackground.pathInfos[_local2].ballSpacing))) {
createBall(_local2);
_local5 = stageBackground.pathInfos[_local2].getXY(ballLines[_local2][0].pointIndex);
ballLines[_local2][0].setXY(_local5.x, _local5.y);
ballLines[_local2][0].updateMask(stageBackground.pathInfos[_local2].getMask(ballLines[_local2][0].pointIndex));
ballLines[_local2][0].cannotHit = stageBackground.pathInfos[_local2].getCannotHit(ballLines[_local2][0].pointIndex);
ballLines[_local2][0].ant.gotoAndPlay("Walk");
}
_local2++;
}
if ((getTimer() - bonusAddTracker) > 1000) {
bonusAdd++;
bonusAddTracker = getTimer();
if (bonusAdd > 25) {
bonusAdd = 0;
}
}
_local2 = 0;
while (_local2 < ballLines.length) {
_local3 = 0;
while (_local3 < ballLines[_local2].length) {
if (ballLines[_local2][_local3].bonusType > -1) {
if ((getTimer() - ballLines[_local2][_local3].bonusTimeTracker) > 1000) {
ballLines[_local2][_local3].bonusTimer--;
ballLines[_local2][_local3].bonusTimeTracker = getTimer();
}
if (ballLines[_local2][_local3].bonusTimer <= 0) {
ballLines[_local2][_local3].bonusType = -1;
ballLines[_local2][_local3].bonusTimeTracker = 0;
ballLines[_local2][_local3].letterP._visible = false;
ballLines[_local2][_local3].letterL._visible = false;
ballLines[_local2][_local3].letterA._visible = false;
ballLines[_local2][_local3].letterY._visible = false;
ballLines[_local2][_local3].letterZ._visible = false;
ballLines[_local2][_local3].letterI._visible = false;
ballLines[_local2][_local3].slowMove._visible = false;
ballLines[_local2][_local3].fastMove._visible = false;
ballLines[_local2][_local3].antBomb._visible = false;
ballLines[_local2][_local3].slowFire._visible = false;
ballLines[_local2][_local3].fastFire._visible = false;
ballLines[_local2][_local3].matrixM._visible = false;
}
} else if ((GetPieceNumberForceNew2(100) > 90) && (!bonusAdd)) {
bonusAdd++;
var _local4 = GetPieceNumberForceNew2(20);
if (_local4 == 0) {
ballLines[_local2][_local3].bonusType = _local4;
ballLines[_local2][_local3].letterP._visible = true;
ballLines[_local2][_local3].bonusTimer = GetPieceNumberForceNew2(15) + 10;
ballLines[_local2][_local3].bonusTimeTracker = getTimer();
} else if (_local4 == 1) {
ballLines[_local2][_local3].bonusType = _local4;
ballLines[_local2][_local3].letterL._visible = true;
ballLines[_local2][_local3].bonusTimer = GetPieceNumberForceNew2(15) + 10;
ballLines[_local2][_local3].bonusTimeTracker = getTimer();
} else if (_local4 == 2) {
ballLines[_local2][_local3].bonusType = _local4;
ballLines[_local2][_local3].letterA._visible = true;
ballLines[_local2][_local3].bonusTimer = GetPieceNumberForceNew2(15) + 10;
ballLines[_local2][_local3].bonusTimeTracker = getTimer();
} else if (_local4 == 3) {
ballLines[_local2][_local3].bonusType = _local4;
ballLines[_local2][_local3].letterY._visible = true;
ballLines[_local2][_local3].bonusTimer = GetPieceNumberForceNew2(15) + 10;
ballLines[_local2][_local3].bonusTimeTracker = getTimer();
} else if (_local4 == 4) {
ballLines[_local2][_local3].bonusType = _local4;
ballLines[_local2][_local3].letterZ._visible = true;
ballLines[_local2][_local3].bonusTimer = GetPieceNumberForceNew2(15) + 10;
ballLines[_local2][_local3].bonusTimeTracker = getTimer();
} else if (_local4 == 5) {
ballLines[_local2][_local3].bonusType = _local4;
ballLines[_local2][_local3].letterI._visible = true;
ballLines[_local2][_local3].bonusTimer = GetPieceNumberForceNew2(15) + 10;
ballLines[_local2][_local3].bonusTimeTracker = getTimer();
} else if (_local4 == 6) {
ballLines[_local2][_local3].bonusType = _local4 + 1;
ballLines[_local2][_local3].slowFire._visible = true;
ballLines[_local2][_local3].bonusTimer = GetPieceNumberForceNew2(15) + 10;
ballLines[_local2][_local3].bonusTimeTracker = getTimer();
} else if (_local4 == 7) {
ballLines[_local2][_local3].bonusType = _local4 + 1;
ballLines[_local2][_local3].fastFire._visible = true;
ballLines[_local2][_local3].bonusTimer = GetPieceNumberForceNew2(15) + 10;
ballLines[_local2][_local3].bonusTimeTracker = getTimer();
} else if (_local4 == 8) {
ballLines[_local2][_local3].bonusType = _local4 + 1;
ballLines[_local2][_local3].slowMove._visible = true;
ballLines[_local2][_local3].bonusTimer = GetPieceNumberForceNew2(15) + 10;
ballLines[_local2][_local3].bonusTimeTracker = getTimer();
} else if (_local4 == 9) {
ballLines[_local2][_local3].bonusType = _local4 + 1;
ballLines[_local2][_local3].fastMove._visible = true;
ballLines[_local2][_local3].bonusTimer = GetPieceNumberForceNew2(15) + 10;
ballLines[_local2][_local3].bonusTimeTracker = getTimer();
} else if (_local4 == 10) {
ballLines[_local2][_local3].bonusType = _local4 + 1;
ballLines[_local2][_local3].matrixM._visible = true;
ballLines[_local2][_local3].bonusTimer = GetPieceNumberForceNew2(15) + 10;
ballLines[_local2][_local3].bonusTimeTracker = getTimer();
}
}
_local3++;
}
_local2++;
}
if (fireSpeedAdjustTimer) {
if ((getTimer() - fireSpeedTimeTracker) > 1000) {
fireSpeedAdjustTimer--;
fireSpeedTimeTracker = getTimer();
}
if (fireSpeedAdjustTimer == 0) {
fireSpeedTimeTracker = 0;
fireSpeedAdjust = 0;
MatrixMode = false;
}
}
if (moveSpeedAdjustTimer) {
if ((getTimer() - moveSpeedTimeTracker) > 1000) {
moveSpeedAdjustTimer--;
moveSpeedTimeTracker = getTimer();
}
if (moveSpeedAdjustTimer == 0) {
moveSpeedTimeTracker = 0;
moveSpeedAdjust = 0;
MatrixMode = false;
}
}
}
function pushBalls(lineIndex, ballIndex, amount) {
var _local9 = stageBackground.pathInfos[lineIndex].ballSpacing;
var _local4 = ballLines[lineIndex];
var _local2;
var _local6;
var _local11;
var _local10;
var _local15;
var _local8;
var _local3;
var _local14 = moveSpeed + moveSpeedAdjust;
if (_local14 <= 1) {
_local14 = 30;
}
_local3 = ballIndex;
while (_local3 < _local4.length) {
_local2 = _local4[_local3];
_local6 = stageBackground.pathInfos[lineIndex].getXY(_local2.pointIndex);
var _local13 = _local6.x - _local4[_local3]._x;
var _local12 = _local6.y - _local4[_local3]._y;
var _local16 = Math.atan2(_local12, _local13);
var _local5 = ((_local16 * 180) / Math.PI) + 190;
_local5 = _local5 - _local4[_local3]._rotation;
while (_local5 > 180) {
_local5 = _local5 - 360;
}
while (_local5 < -180) {
_local5 = _local5 + 360;
}
if ((!MatrixMode) || (moveSpeedAdjust < 0)) {
_local4[_local3]._rotation = _local4[_local3]._rotation + (_local5 / _local14);
}
_local4[_local3]._x = _local4[_local3]._x + (_local13 / _local14);
_local4[_local3]._y = _local4[_local3]._y + (_local12 / _local14);
_local2 = _local4[_local3];
_local2.pointIndex = _local2.pointIndex + amount;
_local11 = stageBackground.pathInfos[lineIndex].getMask(_local2.pointIndex);
_local10 = stageBackground.pathInfos[lineIndex].getCannotHit(_local2.pointIndex);
if (_local2.isOnPath) {
_local2.setXY(_local6.x, _local6.y);
_local2.updateMask(_local11);
_local2.cannotHit = _local10;
if ((_local3 < (_local4.length - 1)) && (_local4[_local3 + 1].pointIndex > (_local2.pointIndex + _local9))) {
pushBalls(lineIndex, _local3 + 1, 0);
return(undefined);
}
} else {
_local15 = getTimer();
if ((_local15 - _local2.insertTime) >= com.novelgames.flashgames.marble.Config.BALL_INSERTTIME) {
_local2.isOnPath = true;
_local2.setXY(_local6.x, _local6.y);
_local2.updateMask(_local11);
_local2.cannotHit = _local10;
if ((_local3 < (_local4.length - 1)) && (_local4[_local3 + 1].pointIndex <= (_local2.pointIndex + _local9))) {
pushBalls(lineIndex, _local3 + 1, (_local2.pointIndex + _local9) - _local4[_local3 + 1].pointIndex);
}
checkDestroy(lineIndex, _local3, 0);
return(undefined);
}
_local8 = (_local15 - _local2.insertTime) / com.novelgames.flashgames.marble.Config.BALL_INSERTTIME;
_local2.setXY((_local2.insertX * (1 - _local8)) + (_local6.x * _local8), (_local2.insertY * (1 - _local8)) + (_local6.y * _local8));
_local2.updateMask(_local11);
_local2.cannotHit = _local10;
if ((_local3 < (_local4.length - 1)) && (_local4[_local3 + 1].pointIndex <= (_local2.pointIndex + (_local9 * _local8)))) {
pushBalls(lineIndex, _local3 + 1, (_local2.pointIndex + (_local9 * _local8)) - _local4[_local3 + 1].pointIndex);
}
return(undefined);
}
_local3++;
}
}
function createBall(lineIndex) {
var _local4 = ballsHolder.getNextHighestDepth();
var _local5 = ballsHolder.attachMovie("ball", "ball" + _local4, _local4);
var _local2 = _local5;
if (ballLines[lineIndex].length == 0) {
_local2.initialize(GetPieceNumberForceNew(noOfBallTypes) + 1, 0);
_local2.pointIndex = 0;
} else {
_local2.initialize(((GetPieceNumberForceNew(250) < com.novelgames.flashgames.marble.Config.BALL_SAMEPOSSIBILITY) ? (ballLines[lineIndex][0].type) : (GetPieceNumberForceNew(noOfBallTypes) + 1)), 0);
_local2.pointIndex = ballLines[lineIndex][0].pointIndex - stageBackground.pathInfos[lineIndex].ballSpacing;
}
_local2.isOnPath = true;
ballLines[lineIndex].unshift(_local2);
noOfBallsCreated++;
}
function checkDestroy(lineIndex, ballIndex, combo) {
var _local10 = stageBackground.pathInfos[lineIndex].connectedBallSpacing;
var _local3 = ballLines[lineIndex];
var _local20 = _local3[ballIndex].type;
var _local7 = ballIndex;
var _local9 = ballIndex;
var _local25 = 0;
var _local26 = 0;
var _local11 = 0;
var _local21;
var _local5 = 0;
var _local4;
var _local24 = false;
var _local17 = false;
var _local12 = false;
var _local16 = false;
var _local15 = false;
var _local13 = false;
var _local14 = false;
_local4 = ballIndex - 1;
while (_local4 >= 0) {
if (_local3[_local4].type != _local20) {
break;
}
if (_local3[_local4].pointIndex < (_local3[_local4 + 1].pointIndex - _local10)) {
break;
}
_local7 = _local4;
_local4--;
}
_local4 = ballIndex + 1;
while (_local4 < _local3.length) {
if (_local3[_local4].type != _local20) {
break;
}
if (_local3[_local4].pointIndex > (_local3[_local4 - 1].pointIndex + _local10)) {
break;
}
_local9 = _local4;
_local4++;
}
if (_local3[ballIndex].bonusType == 6) {
_local24 = true;
} else {
if (_local20 == 0) {
var _local19;
var _local22;
if (ballIndex == 0) {
_local19 = _local3[ballIndex].type;
} else {
_local19 = _local3[ballIndex - 1].type;
}
_local22 = _local3[ballIndex + 1].type;
if (_local19 == _local22) {
_local4 = ballIndex - 1;
while (_local4 >= 0) {
if ((_local3[_local4].type != _local19) && (_local3[_local4].type != 0)) {
break;
}
if (_local3[_local4].pointIndex < (_local3[_local4 + 1].pointIndex - _local10)) {
break;
}
_local11++;
_local7 = _local4;
_local4--;
}
_local4 = ballIndex + 1;
while (_local4 < _local3.length) {
if ((_local3[_local4].type != _local19) && (_local3[_local4].type != 0)) {
break;
}
if (_local3[_local4].pointIndex > (_local3[_local4 - 1].pointIndex + _local10)) {
break;
}
_local11++;
_local9 = _local4;
_local4++;
}
} else {
if (ballIndex == 0) {
_local7 = 0;
} else {
_local4 = ballIndex - 1;
while (_local4 >= 0) {
if ((_local3[_local4].type != _local19) && (_local3[_local4].type != 0)) {
break;
}
if (_local3[_local4].pointIndex < (_local3[_local4 + 1].pointIndex - _local10)) {
break;
}
_local7 = _local4;
_local11++;
_local4--;
}
}
_local4 = ballIndex + 1;
while (_local4 < _local3.length) {
if ((_local3[_local4].type != _local22) && (_local3[_local4].type != 0)) {
break;
}
if (_local3[_local4].pointIndex > (_local3[_local4 - 1].pointIndex + _local10)) {
break;
}
_local9 = _local4;
_local11++;
_local4++;
}
}
}
if ((((_local9 - _local7) + 1) < com.novelgames.flashgames.marble.Config.MINGROUPSIZE) && (_local20 != 0)) {
return(undefined);
}
if (_local20 == 0) {
if ((_local11 + 2) < com.novelgames.flashgames.marble.Config.MINGROUPSIZE) {
return(undefined);
}
}
}
_local5 = _local5 + com.novelgames.flashgames.marble.Config.SCORE_DESTROY;
if ((_local20 != 0) && (!_local24)) {
if (((_local9 - _local7) + 1) > com.novelgames.flashgames.marble.Config.MINGROUPSIZE) {
_local5 = _local5 + ((((_local9 - _local7) + 1) - com.novelgames.flashgames.marble.Config.MINGROUPSIZE) * com.novelgames.flashgames.marble.Config.SCORE_EXTRABALL);
}
_local5 = _local5 + (combo * com.novelgames.flashgames.marble.Config.SCORE_COMBO);
score = score + _local5;
lastDestroyPointIndexes[lineIndex] = _local3[_local9].pointIndex;
_local4 = _local7;
while (_local4 <= _local9) {
if (_local4 == (ballIndex + 1)) {
var _local18 = stageBackground.pathInfos[lineIndex].getXY(_local3[_local4].pointIndex - 8);
addExplode(_local18.x, _local18.y);
} else {
addExplode(_local3[_local4]._x, _local3[_local4]._y);
}
if (_local3[_local4].bonusType > -1) {
if (_local3[_local4].bonusType == 0) {
_local17 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 1) {
_local12 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 2) {
_local16 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 3) {
_local15 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 4) {
_local13 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 5) {
_local14 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 7) {
if (!MatrixMode) {
fireSpeedAdjust = (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED - (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED * 0.5)) * -1;
fireSpeedAdjustTimer = 10;
fireSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundDecFire.start();
}
}
_local5 = _local5 + 17;
} else if (_local3[_local4].bonusType == 8) {
if (!MatrixMode) {
fireSpeedAdjust = com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED * 2;
fireSpeedAdjustTimer = 10;
fireSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundIncFire.start();
}
}
_local5 = _local5 + 19;
} else if (_local3[_local4].bonusType == 9) {
if (!MatrixMode) {
moveSpeedAdjust = (moveSpeed - (moveSpeed * 0.5)) * -1;
moveSpeedAdjustTimer = 5;
moveSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundDecMove.start();
}
_local5 = _local5 + 150;
}
} else if (_local3[_local4].bonusType == 10) {
if (!MatrixMode) {
moveSpeedAdjust = moveSpeed * 2;
moveSpeedAdjustTimer = 10;
moveSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundIncMove.start();
}
}
_local5 = _local5 + 24;
} else if (_local3[_local4].bonusType == 11) {
MatrixMode = true;
moveSpeedAdjust = (com.novelgames.flashgames.marble.Config.STAGE_INITIALMOVESPEED - 1) * -1;
moveSpeedAdjustTimer = 10;
moveSpeedTimeTracker = getTimer();
fireSpeedAdjust = (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED - 100) * -1;
fireSpeedAdjustTimer = 10;
fireSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundMatrixMode.start();
}
_local5 = _local5 + 28;
}
}
_local3[_local4].destroy();
_local4++;
}
_local3.splice(_local7, (_local9 - _local7) + 1);
if ((_local7 > 0) && (_local7 < _local3.length)) {
_local21 = new com.novelgames.flashgames.marble.DropInfo(lineIndex, _local3[_local7 - 1], combo + 1);
_local4 = 0;
while (_local4 < dropInfos.length) {
if (dropInfos[_local4].lineIndex > lineIndex) {
break;
}
if (dropInfos[_local4].lineIndex < lineIndex) {
} else if (getBallIndex(lineIndex, dropInfos[_local4].ball) > (_local7 - 1)) {
break;
}
_local4++;
}
dropInfos.splice(_local4, 0, _local21);
}
checkRemainingTypes();
if (!_root.muteSound) {
soundExplode.start();
}
} else if (_local24) {
_local7 = ballIndex - 5;
if (_local7 < 0) {
_local7 = 0;
}
_local9 = ballIndex + 5;
if (_local9 > _local3.length) {
_local9 = _local3.length;
}
if (!_root.muteSound) {
soundBomb.start();
}
lastDestroyPointIndexes[lineIndex] = _local3[lineIndex].pointIndex;
_local4 = _local7;
while (_local4 <= _local9) {
if (_local4 == (ballIndex + 1)) {
var _local18 = stageBackground.pathInfos[lineIndex].getXY(_local3[_local4].pointIndex - 8);
addExplode(_local18.x, _local18.y);
} else {
addExplode(_local3[_local4]._x, _local3[_local4]._y);
}
if (_local3[_local4].bonusType > -1) {
if (_local3[_local4].bonusType == 0) {
_local17 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 1) {
_local12 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 2) {
_local16 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 3) {
_local15 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 4) {
_local13 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 5) {
_local14 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 7) {
if (!MatrixMode) {
fireSpeedAdjust = (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED - (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED * 0.5)) * -1;
fireSpeedAdjustTimer = 10;
fireSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundDecFire.start();
}
}
_local5 = _local5 + 17;
} else if (_local3[_local4].bonusType == 8) {
if (!MatrixMode) {
fireSpeedAdjust = com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED * 2;
fireSpeedAdjustTimer = 10;
fireSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundIncFire.start();
}
}
_local5 = _local5 + 19;
} else if (_local3[_local4].bonusType == 9) {
if (!MatrixMode) {
moveSpeedAdjust = (moveSpeed - (moveSpeed * 0.5)) * -1;
moveSpeedAdjustTimer = 5;
moveSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundDecMove.start();
}
_local5 = _local5 + 150;
}
} else if (_local3[_local4].bonusType == 10) {
if (!MatrixMode) {
moveSpeedAdjust = moveSpeed * 2;
moveSpeedAdjustTimer = 10;
moveSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundIncMove.start();
}
}
_local5 = _local5 + 24;
} else if (_local3[_local4].bonusType == 11) {
MatrixMode = true;
moveSpeedAdjust = (com.novelgames.flashgames.marble.Config.STAGE_INITIALMOVESPEED - 1) * -1;
moveSpeedAdjustTimer = 10;
moveSpeedTimeTracker = getTimer();
fireSpeedAdjust = (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED - 100) * -1;
fireSpeedAdjustTimer = 10;
fireSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundMatrixMode.start();
}
_local5 = _local5 + 28;
}
}
_local3[_local4].destroy();
_local4++;
}
_local3.splice(_local7, (_local9 - _local7) + 1);
if ((_local7 > 0) && (_local7 < _local3.length)) {
_local21 = new com.novelgames.flashgames.marble.DropInfo(lineIndex, _local3[_local7 - 1], combo + 1);
_local4 = 0;
while (_local4 < dropInfos.length) {
if (dropInfos[_local4].lineIndex > lineIndex) {
break;
}
if (dropInfos[_local4].lineIndex < lineIndex) {
} else if (getBallIndex(lineIndex, dropInfos[_local4].ball) > (_local7 - 1)) {
break;
}
_local4++;
}
dropInfos.splice(_local4, 0, _local21);
}
checkRemainingTypes();
} else {
if ((_local11 + 2) >= com.novelgames.flashgames.marble.Config.MINGROUPSIZE) {
lastDestroyPointIndexes[lineIndex] = _local3[_local9].pointIndex;
_local4 = _local7;
while (_local4 <= _local9) {
if (_local4 == (ballIndex + 1)) {
var _local18 = stageBackground.pathInfos[lineIndex].getXY(_local3[_local4].pointIndex - 8);
addExplode(_local18.x, _local18.y);
} else {
addExplode(_local3[_local4]._x, _local3[_local4]._y);
}
if (_local3[_local4].bonusType > -1) {
if (_local3[_local4].bonusType == 0) {
_local17 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 1) {
_local12 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 2) {
_local16 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 3) {
_local15 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 4) {
_local13 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 5) {
_local14 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 7) {
if (!MatrixMode) {
fireSpeedAdjust = (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED - (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED * 0.5)) * -1;
fireSpeedAdjustTimer = 10;
fireSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundDecFire.start();
}
}
_local5 = _local5 + 17;
} else if (_local3[_local4].bonusType == 8) {
if (!MatrixMode) {
fireSpeedAdjust = com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED * 2;
fireSpeedAdjustTimer = 10;
fireSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundIncFire.start();
}
}
_local5 = _local5 + 19;
} else if (_local3[_local4].bonusType == 9) {
if (!MatrixMode) {
moveSpeedAdjust = (moveSpeed - (moveSpeed * 0.5)) * -1;
moveSpeedAdjustTimer = 5;
moveSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundDecMove.start();
}
_local5 = _local5 + 150;
}
} else if (_local3[_local4].bonusType == 10) {
if (!MatrixMode) {
moveSpeedAdjust = moveSpeed * 2;
moveSpeedAdjustTimer = 10;
moveSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundIncMove.start();
}
}
_local5 = _local5 + 24;
} else if (_local3[_local4].bonusType == 11) {
MatrixMode = true;
moveSpeedAdjust = (com.novelgames.flashgames.marble.Config.STAGE_INITIALMOVESPEED - 1) * -1;
moveSpeedAdjustTimer = 10;
moveSpeedTimeTracker = getTimer();
fireSpeedAdjust = (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED - 100) * -1;
fireSpeedAdjustTimer = 10;
fireSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundMatrixMode.start();
}
_local5 = _local5 + 28;
}
}
_local3[_local4].destroy();
_local4++;
}
_local3.splice(_local7, (_local9 - _local7) + 1);
if ((_local7 > 0) && (_local7 < _local3.length)) {
_local21 = new com.novelgames.flashgames.marble.DropInfo(lineIndex, _local3[_local7 - 1], combo + 1);
_local4 = 0;
while (_local4 < dropInfos.length) {
if (dropInfos[_local4].lineIndex > lineIndex) {
break;
}
if (dropInfos[_local4].lineIndex < lineIndex) {
} else if (getBallIndex(lineIndex, dropInfos[_local4].ball) > (_local7 - 1)) {
break;
}
_local4++;
}
dropInfos.splice(_local4, 0, _local21);
}
_local5 = _local5 + 200;
score = score + _local5;
} else {
lastDestroyPointIndexes[lineIndex] = _local3[_local9].pointIndex;
_local4 = _local7;
while (_local4 <= _local9) {
if (_local4 == (ballIndex + 1)) {
var _local18 = stageBackground.pathInfos[lineIndex].getXY(_local3[_local4].pointIndex - 8);
addExplode(_local18.x, _local18.y);
} else {
addExplode(_local3[_local4]._x, _local3[_local4]._y);
}
if (_local3[_local4].bonusType > -1) {
if (_local3[_local4].bonusType == 0) {
_local17 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 1) {
_local12 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 2) {
_local16 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 3) {
_local15 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 4) {
_local13 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 5) {
_local14 = true;
_local5 = _local5 + 13;
} else if (_local3[_local4].bonusType == 7) {
if (!MatrixMode) {
fireSpeedAdjust = (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED - (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED * 0.5)) * -1;
fireSpeedAdjustTimer = 10;
fireSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundDecFire.start();
}
}
_local5 = _local5 + 17;
} else if (_local3[_local4].bonusType == 8) {
if (!MatrixMode) {
fireSpeedAdjust = com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED * 2;
fireSpeedAdjustTimer = 10;
fireSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundIncFire.start();
}
}
_local5 = _local5 + 19;
} else if (_local3[_local4].bonusType == 9) {
if (!MatrixMode) {
moveSpeedAdjust = (moveSpeed - (moveSpeed * 0.5)) * -1;
moveSpeedAdjustTimer = 5;
moveSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundDecMove.start();
}
_local5 = _local5 + 150;
}
} else if (_local3[_local4].bonusType == 10) {
if (!MatrixMode) {
moveSpeedAdjust = moveSpeed * 2;
moveSpeedAdjustTimer = 10;
moveSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundIncMove.start();
}
}
_local5 = _local5 + 24;
} else if (_local3[_local4].bonusType == 11) {
MatrixMode = true;
moveSpeedAdjust = (com.novelgames.flashgames.marble.Config.STAGE_INITIALMOVESPEED - 1) * -1;
moveSpeedAdjustTimer = 10;
moveSpeedTimeTracker = getTimer();
fireSpeedAdjust = (com.novelgames.flashgames.marble.Config.BALL_SHOOTSPEED - 100) * -1;
fireSpeedAdjustTimer = 10;
fireSpeedTimeTracker = getTimer();
if (!_root.muteSound) {
soundMatrixMode.start();
}
_local5 = _local5 + 28;
}
}
_local3[_local4].destroy();
_local4++;
}
_local3.splice(ballIndex, (_local9 - ballIndex) + 1);
if ((ballIndex > 0) && (ballIndex < _local3.length)) {
_local21 = new com.novelgames.flashgames.marble.DropInfo(lineIndex, _local3[ballIndex - 1], combo + 1);
_local4 = 0;
while (_local4 < dropInfos.length) {
if (dropInfos[_local4].lineIndex > lineIndex) {
break;
}
if (dropInfos[_local4].lineIndex < lineIndex) {
} else if (getBallIndex(lineIndex, dropInfos[_local4].ball) > (ballIndex - 1)) {
break;
}
_local4++;
}
dropInfos.splice(_local4, 0, _local21);
}
_local5 = _local5 + 500;
score = score + _local5;
}
checkRemainingTypes();
if (!_root.muteSound) {
soundExplode.start();
}
}
if ((!letterPBool) && (_local17)) {
letterP.gotoAndStop(2);
letterPBool = true;
if (!_root.muteSound) {
soundPlayziBall.start();
}
}
if ((!letterLBool) && (_local12)) {
letterL.gotoAndStop(2);
letterLBool = true;
if (!_root.muteSound) {
soundPlayziBall.start();
}
}
if ((!letterABool) && (_local16)) {
letterA.gotoAndStop(2);
letterABool = true;
if (!_root.muteSound) {
soundPlayziBall.start();
}
}
if ((!letterYBool) && (_local15)) {
letterY.gotoAndStop(2);
letterYBool = true;
if (!_root.muteSound) {
soundPlayziBall.start();
}
}
if ((!letterZBool) && (_local13)) {
letterZ.gotoAndStop(2);
letterZBool = true;
if (!_root.muteSound) {
soundPlayziBall.start();
}
}
if ((!letterIBool) && (_local14)) {
letterI.gotoAndStop(2);
letterIBool = true;
if (!_root.muteSound) {
soundPlayziBall.start();
}
}
if (((((letterPBool && (letterLBool)) && (letterABool)) && (letterYBool)) && (letterZBool)) && (letterIBool)) {
if (!_root.muteSound) {
soundLifeUp.start();
}
lives++;
letterP.gotoAndStop(1);
letterL.gotoAndStop(1);
letterA.gotoAndStop(1);
letterY.gotoAndStop(1);
letterZ.gotoAndStop(1);
letterI.gotoAndStop(1);
letterPBool = false;
letterLBool = false;
letterABool = false;
letterYBool = false;
letterZBool = false;
letterIBool = false;
}
checkRemainingTypes();
}
function getBallIndex(lineIndex, ball) {
var _local3 = ballLines[lineIndex];
var _local2;
_local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2] == ball) {
return(_local2);
}
_local2++;
}
return(-1);
}
function dropBalls(seconds) {
var _local4;
var _local3;
var _local6;
var _local11;
var _local14;
var _local7;
var _local10;
var _local8;
var _local13;
var _local12;
var _local9;
var _local2;
var _local5;
if (dropInfos.length == 0) {
return(undefined);
}
_local2 = 0;
while (_local2 < dropInfos.length) {
_local4 = dropInfos[_local2].lineIndex;
_local6 = getBallIndex(_local4, dropInfos[_local2].ball);
if ((_local6 == -1) || (dropInfos[_local2].ballIndex >= (ballLines[_local4].length - 1))) {
dropInfos.splice(_local2, 1);
_local2--;
} else {
dropInfos[_local2].ballIndex = _local6;
}
_local2++;
}
_local9 = new Array();
_local2 = 0;
while (_local2 < dropInfos.length) {
_local14 = false;
_local4 = dropInfos[_local2].lineIndex;
_local3 = ballLines[_local4];
dropInfos[_local2].speed = dropInfos[_local2].speed + (com.novelgames.flashgames.marble.Config.BALL_DROPACCELERATION * seconds);
_local11 = (dropInfos[_local2].speed * seconds) / stageBackground.pathInfos[_local4].ballSpacing;
_local7 = dropInfos[_local2].ballIndex + 1;
if (_local2 < (dropInfos.length - 1)) {
if (dropInfos[_local2 + 1].lineIndex != _local4) {
_local10 = _local3.length;
} else {
_local10 = dropInfos[_local2 + 1].ballIndex + 1;
}
} else {
_local10 = _local3.length;
}
if ((_local3[_local7].pointIndex - _local11) <= (_local3[_local7 - 1].pointIndex + stageBackground.pathInfos[_local4].ballSpacing)) {
_local11 = (_local3[_local7].pointIndex - _local3[_local7 - 1].pointIndex) - stageBackground.pathInfos[_local4].ballSpacing;
_local14 = true;
}
_local5 = _local7;
while (_local5 < _local10) {
_local3[_local5].pointIndex = _local3[_local5].pointIndex - _local11;
_local8 = stageBackground.pathInfos[_local4].getXY(_local3[_local5].pointIndex);
_local13 = stageBackground.pathInfos[_local4].getMask(_local3[_local5].pointIndex);
_local12 = stageBackground.pathInfos[_local4].getCannotHit(_local3[_local5].pointIndex);
_local3[_local5].setXY(_local8.x, _local8.y);
_local3[_local5].updateMask(_local13);
_local3[_local5].cannotHit = _local12;
_local5++;
}
if (_local14) {
_local9.push(dropInfos[_local2]);
dropInfos.splice(_local2, 1);
_local2--;
}
_local2++;
}
_local2 = 0;
while (_local2 < _local9.length) {
_local4 = _local9[_local2].lineIndex;
_local6 = getBallIndex(_local4, _local9[_local2].ball);
if (ballLines[_local4][_local6 + 1].type == ballLines[_local4][_local6].type) {
checkDestroy(_local4, _local6, _local9[_local2].combo);
}
_local2++;
}
}
function addExplode(x, y) {
var _local3 = explodesHolder.getNextHighestDepth();
var _local4 = explodesHolder.attachMovie("explode", "explode" + _local3, _local3);
var _local2 = _local4;
_local2._x = x;
_local2._y = y;
explodes.push(_local2);
}
function moveExplodes(seconds) {
var _local2;
_local2 = 0;
while (_local2 < explodes.length) {
if (explodes[_local2].move(seconds)) {
explodes[_local2].removeMovieClip();
explodes[_local2] = null;
explodes.splice(_local2, 1);
_local2--;
}
_local2++;
}
}
function checkRemainingTypes() {
var _local4;
var _local5;
var _local2;
var _local3;
if (noOfBallsCreated < maxNoOfBalls) {
return(undefined);
}
_local4 = new Array();
_local2 = 0;
while (_local2 < ballLines.length) {
_local3 = 0;
while (_local3 < ballLines[_local2].length) {
_local4[ballLines[_local2][_local3].type] = true;
_local3++;
}
_local2++;
}
_local5 = new Array();
_local2 = 0;
while (_local2 < _local4.length) {
if (_local4[_local2]) {
_local5.push(_local2);
}
_local2++;
}
if (_local5.length > 0) {
cannon.setPossibleBallTypes(_local5);
}
}
function checkWinLose() {
var _local4 = true;
var _local3;
_local3 = 0;
while (_local3 < ballLines.length) {
if (ballLines[_local3].length == 0) {
} else {
_local4 = false;
if (ballLines[_local3][ballLines[_local3].length - 1].pointIndex >= (stageBackground.pathInfos[_local3].points.length - 1)) {
showLose();
return(undefined);
}
}
_local3++;
}
if (_local4) {
_root.btnFramePause.enabled = false;
showWin();
}
}
function showWin() {
var _local10;
var _local7;
var _local9;
var _local4;
var _local8;
var _local5;
var _local6;
var _local2;
var _local3;
clearInterval(intervalID);
showingWin = true;
destroyShootingBalls();
starLines = new Array();
_local2 = 0;
while (_local2 < lastDestroyPointIndexes.length) {
_local10 = ((stageBackground.pathInfos[_local2].points.length - 1) - lastDestroyPointIndexes[_local2]) * stageBackground.pathInfos[_local2].maxPointSpacing;
_local7 = Math.floor(_local10 / com.novelgames.flashgames.marble.Config.STAR_SPACING) + 1;
_local9 = com.novelgames.flashgames.marble.Config.STAR_SPACING / stageBackground.pathInfos[_local2].maxPointSpacing;
starLines[_local2] = new Array();
_local3 = 0;
while (_local3 < _local7) {
_local4 = starsHolder.getNextHighestDepth();
_local8 = starsHolder.attachMovie("star", "star" + _local4, _local4);
_local5 = _local8;
_local6 = stageBackground.pathInfos[_local2].getXY((stageBackground.pathInfos[_local2].points.length - 1) - (_local3 * _local9));
_local5.initialize((_local7 - _local3) - 1, _local6.x, _local6.y);
starLines[_local2].push(_local5);
_local3++;
}
_local2++;
}
lastMoveTime = getTimer();
intervalID = setInterval(this, "doWinMove", 1);
}
function showLose() {
clearInterval(intervalID);
showingLose = true;
_root.btnFramePause.enabled = false;
if (!_root.muteSound) {
soundLifeLost.start();
}
destroyShootingBalls();
lastMoveTime = getTimer();
intervalID = setInterval(this, "doLoseMove", 1);
}
function destroyShootingBalls() {
var _local2;
_local2 = 0;
while (_local2 < shootingBalls.length) {
addExplode(shootingBalls[_local2]._x, shootingBalls[_local2]._y);
shootingBalls[_local2].destroy();
_local2++;
}
shootingBalls = new Array();
}
function doLoseMove() {
var _local7 = getTimer();
var _local5 = (_local7 - lastMoveTime) / 1000;
var _local6 = true;
var _local3;
var _local4;
dialog.gotoAndStop("lifeLost");
moveExplodes(_local5);
_local3 = 0;
while (_local3 < ballLines.length) {
pushBalls(_local3, 0, (com.novelgames.flashgames.marble.Config.BALL_LOSESPEED * _local5) / stageBackground.pathInfos[_local3].maxPointSpacing);
_local4 = 0;
while (_local4 < ballLines[_local3].length) {
if (ballLines[_local3][_local4].pointIndex >= (stageBackground.pathInfos[_local3].points.length - 1)) {
ballLines[_local3][_local4].destroy();
ballLines[_local3].splice(_local4, 1);
_local4--;
}
_local4++;
}
if (ballLines[_local3].length > 0) {
_local6 = false;
}
_local3++;
}
lastMoveTime = _local7;
if (_local6) {
if (lives == 0) {
clearInterval(intervalID);
Key.removeListener(this);
dialog.showGameOver();
if (!_root.muteSound) {
soundGameOver.start();
}
updateAfterEvent();
} else {
clearInterval(intervalID);
lives--;
startLevel(currentLevel, currentBackground);
updateAfterEvent();
}
}
}
function doWinMove() {
var _local6 = getTimer();
var _local8 = (_local6 - lastMoveTime) / 1000;
var _local7 = true;
var _local5;
var _local4;
var _local3;
moveExplodes(_local8);
_local4 = 0;
while (_local4 < starLines.length) {
_local3 = 0;
while (_local3 < starLines[_local4].length) {
_local5 = starLines[_local4][_local3]._visible;
if (!starLines[_local4][_local3].move(_local6)) {
_local7 = false;
if ((!_local5) && (starLines[_local4][_local3]._visible)) {
score = score + com.novelgames.flashgames.marble.Config.SCORE_STAR;
if (!_root.muteSound) {
soundCrumbs.start();
}
}
} else {
starLines[_local4][_local3].removeMovieClip();
starLines[_local4][_local3] = null;
starLines[_local4].splice(_local3, 1);
_local3--;
}
_local3++;
}
_local4++;
}
lastMoveTime = _local6;
if (_local7) {
clearInterval(intervalID);
dialog.showStageClear();
if (!_root.muteSound) {
soundLevelComplete.start();
}
intervalID = setInterval(this, "finishedShowingClear", com.novelgames.flashgames.marble.Config.STAGE_CLEARSHOWTIME);
}
updateAfterEvent();
}
function finishedShowingClear() {
clearInterval(intervalID);
dialog.hide();
if (currentBackground >= com.novelgames.flashgames.marble.Config.STAGE_NOOFBACKGROUNDS) {
startLevel(currentLevel + 1, 1);
} else {
startLevel(currentLevel, currentBackground + 1);
}
}
}
Symbol 685 MovieClip [__Packages.com.novelgames.flashgames.common.NewSound] Frame 0
class com.novelgames.flashgames.common.NewSound extends Sound
{
var attachSound, setVolume, target, symbolName;
function NewSound (target, symbolName) {
super(target);
var _local3;
attachSound(symbolName);
setVolume(volumeAll);
this.target = target;
this.symbolName = symbolName;
sounds.push(this);
_local3 = 0;
while (_local3 < sounds.length) {
if (sounds[_local3] == this) {
} else if ((sounds[_local3].target == target) && (sounds[_local3].symbolName == symbolName)) {
sounds.splice(_local3, 1);
_local3--;
}
_local3++;
}
}
static function setVolumeAll(volume) {
var _local1;
volumeAll = volume;
_local1 = 0;
while (_local1 < sounds.length) {
sounds[_local1].setVolume(volume);
_local1++;
}
}
static function muteAll() {
setVolumeAll(0);
}
static function unmuteAll() {
setVolumeAll(100);
}
static function getIsMuteAll() {
return(volumeAll == 0);
}
static var sounds = new Array();
static var volumeAll = 100;
}
Symbol 686 MovieClip [__Packages.com.novelgames.flashgames.marble.DropInfo] Frame 0
class com.novelgames.flashgames.marble.DropInfo
{
var lineIndex, ball, combo, ballIndex, speed;
function DropInfo (lineIndex, ball, combo) {
this.lineIndex = lineIndex;
this.ball = ball;
this.combo = combo;
ballIndex = 0;
speed = 0;
}
}
Symbol 687 MovieClip [__Packages.com.novelgames.flashgames.marble.Star] Frame 0
class com.novelgames.flashgames.marble.Star extends MovieClip
{
var index, _x, _y, startTime, _visible, _alpha;
function Star () {
super();
}
function initialize(index, x, y) {
this.index = index;
_x = x;
_y = y;
startTime = getTimer() + (index * com.novelgames.flashgames.marble.Config.STAR_TIMEDIFFERENCE);
_visible = false;
}
function move(time) {
if (time < startTime) {
return(false);
}
if (time >= (startTime + com.novelgames.flashgames.marble.Config.STAR_APPEARTIME)) {
_visible = false;
return(true);
}
_alpha = 100 - (((time - startTime) * 100) / com.novelgames.flashgames.marble.Config.STAR_APPEARTIME);
_visible = true;
return(false);
}
}
Symbol 688 MovieClip [__Packages.com.novelgames.flashgames.common.MainDevelopment] Frame 0
class com.novelgames.flashgames.common.MainDevelopment extends MovieClip
{
var gotoAndStop, startButton, highScoresButton, moreGamesButton;
function MainDevelopment () {
super();
}
static function initialize(movieClip) {
movieClip.__proto__ = com.novelgames.flashgames.common.MainDevelopment.prototype;
movieClip.gotoTitlePage();
}
function gotoTitlePage() {
gotoAndStop("title");
startButton.onRelease = function () {
this._parent.gotoInstructionsPage();
};
highScoresButton.onRelease = function () {
this._parent.showHighScores();
};
moreGamesButton.onRelease = function () {
this._parent.getURL("http://www.playzi.com/default.aspx?lnkid=110342", "_blank");
};
}
function gotoInstructionsPage() {
gotoAndStop("instructions");
startButton.onRelease = function () {
this._parent.gotoGamePage();
};
}
function gotoGamePage() {
gotoAndStop("game");
}
function showHighScores() {
trace("showHighScores()");
}
function showEnterHighScore(score) {
trace(("showEnterHighScore(" + score) + ")");
}
}
Symbol 287 MovieClip [newAnt] Frame 46
this.gotoAndPlay("Prelaunch");
Symbol 287 MovieClip [newAnt] Frame 110
this.gotoAndPlay("Walk");
Symbol 287 MovieClip [newAnt] Frame 128
stop();
Symbol 466 MovieClip [ball] Frame 1
#initclip 20
Object.registerClass("ball", com.novelgames.flashgames.marble.Ball);
#endinitclip
Symbol 473 MovieClip Frame 6
stop();
Symbol 474 MovieClip [cannon] Frame 1
#initclip 14
Object.registerClass("cannon", com.novelgames.flashgames.marble.Cannon);
#endinitclip
Symbol 477 MovieClip [circle] Frame 21
this.removeMovieClip();
Symbol 527 MovieClip [dialog] Frame 1
#initclip 15
Object.registerClass("dialog", com.novelgames.flashgames.marble.Dialog);
#endinitclip
Symbol 527 MovieClip [dialog] Frame 55
gameOverFinished();
Symbol 540 MovieClip [explode] Frame 1
#initclip 16
Object.registerClass("explode", com.novelgames.flashgames.marble.Explode);
#endinitclip
Symbol 540 MovieClip [explode] Frame 13
stop();
Symbol 544 MovieClip [stageBackground0] Frame 1
#initclip 17
Object.registerClass("stageBackground0", com.novelgames.flashgames.marble.StageBackground);
#endinitclip
Symbol 602 MovieClip [game] Frame 1
#initclip 18
Object.registerClass("game", com.novelgames.flashgames.marble.Game);
#endinitclip
Symbol 606 MovieClip [star] Frame 1
#initclip 19
Object.registerClass("star", com.novelgames.flashgames.marble.Star);
#endinitclip
Symbol 632 MovieClip Frame 1
stop();
Symbol 635 Button
on (release) {
delete onEnterFrame;
gotoAndStop ("instructions");
}
Symbol 639 Button
on (release) {
_root.pauseGame = false;
_root.pauseScreen._visible = false;
}
Symbol 643 Button
on (release) {
getURL ("http://www.playzi.com/default.aspx?lnkid=110342", "_blank");
}
Symbol 648 Button
on (release) {
if (!pauseTime) {
pauseTime = backgroundMusic.position;
backgroundMusic.stop();
} else {
backgroundMusic.start(pauseTime / 1000, 9000);
backgroundMusic.setVolume(50);
pauseTime = 0;
}
}
Symbol 650 Button
on (release) {
if (!muteSound) {
muteSound = true;
} else {
muteSound = false;
}
}
Symbol 658 Button
on (release) {
gotoAndStop ("title");
}
Symbol 663 Button
on (release) {
if (pauseGame) {
pauseScreen._visible = false;
pauseGame = false;
} else {
pauseScreen._visible = true;
pauseGame = true;
}
}
Symbol 664 Button
on (release) {
delete onEnterFrame;
gotoAndStop ("game");
}