Frame 1
function preloadSite() {
var _local4 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
var _local2 = Math.round((_local4 / _local3) * 100);
loadingBar._xscale = _local2;
loader_bar.gotoAndStop(_local2);
bytesDisplay.text = _local2 + "%";
if (_local4 >= _local3) {
clearInterval(loadingCall);
_root.loader22_mc.adestart_btn._visible = true;
_root.loader_bar._visible = false;
_root.bytesDisplay._visible = false;
_root.a123_txt._visible = false;
}
}
function highScore() {
getURL ("http://www.adegames.com/Score/samuraiballs/index.php", "_blank");
}
function moreGames() {
getURL ("http://www.adegames.com", "_blank");
}
function deadClick() {
getURL ("http://www.adegames.com", "_blank");
}
function gotoMySite() {
getURL ("http://www.adegames.com", "_blank");
}
stop();
_root.tempLevel = 1;
var loadingCall = setInterval(preloadSite, 50);
var myMenu = new ContextMenu();
myMenu.hideBuiltInItems();
var copyrightNotice = new ContextMenuItem("\u00A9 Copyright @ ", deadClick);
myMenu.customItems.push(copyrightNotice);
_root.menu = myMenu;
_root.playerDetails = SharedObject.getLocal("SamuraiBalls");
if (_root.playerDetails.data.lev == undefined) {
_root.playerDetails.data.lev = _root.tempLevel;
} else {
_root.tempLevel = _root.playerDetails.data.lev;
trace(_root.playerDetails.data.lev + " playerDetails.data.lev");
}
Frame 2
com.gamecode.flashgames.common.MainDevelopment.initialize(this);
_root.tempScore = 0;
stop();
var bg = new Sound();
bg.attachSound("bg");
bg.start(0, 999);
var a_sound = false;
_global.allsound = new Sound(_root);
var btn1Snd = new Sound();
btn1Snd.attachSound("btn1");
var winSnd = new Sound();
winSnd.attachSound("winSnd");
play_btn._visible = false;
hScore._visible = false;
more1._visible = false;
help._visible = false;
Instance of Symbol 10 MovieClip [muteButton] in Frame 2
on (rollOver) {
_root.shootCheck = false;
}
on (rollOut) {
_root.shootCheck = true;
}
Frame 16
var shootCheck = true;
this.onEnterFrame = function () {
_root.tempScore = score_mc.score;
};
stopAllSounds();
stop();
var soundStatus = true;
var playbg_sound = new Sound();
playbg_sound.attachSound("bgsnd");
playbg_sound.setVolume(50);
playbg_sound.start(0, 999);
Frame 24
function submit() {
var _local4 = name_txt.text;
var _local3 = score_txt.text;
var _local1 = "";
if (_local3 == "") {
_local1 = _local1 + "The score is required\n";
}
if (_local1 != "") {
status_txt.text = _local1;
trace("hello1231233");
return(undefined);
}
var _local2 = new LoadVars();
_local2.name = _local4;
_local2.score = _local3;
_local2.send(path, "_blank", "POST");
gotoAndStop ("title");
}
stop();
var gameover_sound = new Sound();
gameover_sound.attachSound("gameoverSnd");
if (soundStatus) {
gameover_sound.start(0, 1);
}
score_txt.text = _root.score_txt1.text;
gameOverFinished();
var path = "http://adegames.com/Score/samuraiballs/submit.php";
Frame 25
function submitscore() {
var _local4 = name_txt.text;
var _local3 = score_txt.text;
var _local1 = "";
if (_local3 == "") {
_local1 = _local1 + "The score is required\n";
}
if (_local1 != "") {
status_txt.text = _local1;
trace("hello1231233");
return(undefined);
}
var _local2 = new LoadVars();
_local2.name = _local4;
_local2.score = _local3;
_local2.send(path, "_blank", "POST");
gotoAndStop ("title");
}
stop();
var gameover1_sound = new Sound();
gameover1_sound.attachSound("gameoverSnd");
if (soundStatus) {
gameover1_sound.start(0, 1);
}
score_txt.text = _root.score_txt2.text;
gameOverFinished();
var path = "http://adegames.com/Score/samuraiballs/submit.php";
Frame 26
stop();
trace(_root.tempLevel + " 1223566");
_root.levels_sound.start();
trace(_root.mytemp + " _root.mytemp");
if (_root.a_sound) {
a1_sound.gotoAndStop(1);
a2_sound.gotoAndStop(1);
}
var i = 1;
while (i <= 10) {
var mc = eval ("ab_" + i);
trace(mc + " mc");
mc.num = i;
mc.gotoAndStop(1);
mc.enabled = false;
mc.useHandCursor = false;
mc.onPress = function () {
_root.tempLevel = this.num;
fNewGame = true;
_root.gotoAndStop("game");
};
i++;
}
j = 1;
while (j <= _root.tempLevel) {
var mc1 = eval ("ab_" + j);
mc1.gotoAndStop(2);
mc1.enabled = true;
mc1.useHandCursor = true;
j++;
}
Symbol 10 MovieClip [muteButton] Frame 1
#initclip 16
Object.registerClass("muteButton", com.gamecode.flashgames.common.MuteButton);
#endinitclip
_root.sound_txt.text = 1;
_global.allsound.setVolume(100);
Symbol 10 MovieClip [muteButton] Frame 6
_root.sound_txt.text = 2;
_global.allsound.setVolume(0);
Symbol 21 MovieClip [ball] Frame 1
#initclip 14
Object.registerClass("ball", com.gamecode.flashgames.marble.Ball);
#endinitclip
Symbol 25 MovieClip [cannon] Frame 1
#initclip 15
Object.registerClass("cannon", com.gamecode.flashgames.marble.Cannon);
#endinitclip
Symbol 50 MovieClip Frame 1
_parent.adestart_btn._visible = false;
Symbol 50 MovieClip Frame 35
stop();
Symbol 56 MovieClip Frame 1
stop();
adestart_btn.onRelease = function () {
_root.gotoAndStop("title");
};
Symbol 64 MovieClip Frame 1
stop();
Symbol 64 MovieClip Frame 100
stop();
Symbol 306 MovieClip [__Packages.com.gamecode.flashgames.marble.Ball] Frame 0
class com.gamecode.flashgames.marble.Ball extends MovieClip
{
var stop, pointIndex, isOnPath, cannotHit, xyPoint, cacheAsBitmap, type, gotoAndStop, _x, _y, maskName, mask, setMask, _parent, removeMovieClip;
function Ball () {
super();
stop();
}
function initialize(type) {
setType(type);
pointIndex = 0;
isOnPath = false;
cannotHit = false;
xyPoint = new flash.geom.Point(0, 0);
cacheAsBitmap = true;
}
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 307 MovieClip [__Packages.com.gamecode.flashgames.marble.Cannon] Frame 0
class com.gamecode.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.gamecode.flashgames.marble.Ball.prototype;
ballFront.initialize(Math.floor(Math.random() * noOfBallTypes));
ballBack.__proto__ = com.gamecode.flashgames.marble.Ball.prototype;
ballBack.initialize(Math.floor(Math.random() * noOfBallTypes));
updateRotation();
}
function updateRotation() {
_rotation = _rotation + ((Math.atan2(_ymouse, _xmouse) * 180) / 3.141593);
}
function swapFrontBack() {
var _local2 = ballFront.type;
ballFront.setType(ballBack.type);
ballBack.setType(_local2);
}
function shoot() {
if (!canShoot) {
return(undefined);
}
_parent._parent.shoot();
ballFront._visible = false;
canShoot = false;
intervalID = setInterval(this, "finishedShooting", com.gamecode.flashgames.marble.Config.BALL_SHOOTINTERVAL);
}
function setPossibleBallTypes(possibleBallTypes) {
var _local4 = false;
var _local5 = false;
var _local2;
this.possibleBallTypes = possibleBallTypes;
_local2 = 0;
while (_local2 < possibleBallTypes.length) {
if (ballFront.type == possibleBallTypes[_local2]) {
_local4 = true;
}
if (ballBack.type == possibleBallTypes[_local2]) {
_local5 = true;
}
_local2++;
}
if (!_local4) {
ballFront.setType(possibleBallTypes[Math.floor(Math.random() * possibleBallTypes.length)]);
}
if (!_local5) {
ballBack.setType(possibleBallTypes[Math.floor(Math.random() * possibleBallTypes.length)]);
}
}
function finishedShooting() {
clearInterval(intervalID);
ballFront.setType(ballBack.type);
ballFront._visible = true;
ballBack.setType(possibleBallTypes[Math.floor(Math.random() * possibleBallTypes.length)]);
canShoot = true;
}
}
Symbol 308 MovieClip [__Packages.com.gamecode.flashgames.marble.Config] Frame 0
class com.gamecode.flashgames.marble.Config
{
function Config () {
}
static var BALL_TYPES = 5;
static var BALL_RADIUS = 13;
static var BALL_CREATESPEED = 1500;
static var BALL_CREATEPERCENT = 1;
static var BALL_SHOOTSPEED = 1000;
static var BALL_SHOOTINTERVAL = 100;
static var BALL_INSERTTIME = 100;
static var BALL_CONNECTTTOLERANCE = 5;
static var BALL_DROPACCELERATION = 1000;
static var BALL_LOSESPEED = 1500;
static var BALL_SAMEPOSSIBILITY = 2E-5;
static var EXPLODE_TIME = 200;
static var EXPLODE_DISTANCE = 30;
static var STAR_SPACING = BALL_RADIUS * 2;
static var STAR_APPEARTIME = 500;
static var STAR_TIMEDIFFERENCE = 50;
static var MINGROUPSIZE = 3;
static var STAGE_NOOFBACKGROUNDS = 10;
static var STAGE_INITIALBALLTYPES = 10;
static var STAGE_BALLTYPESINCREASE = 5;
static var STAGE_INITIALMOVESPEED = 5;
static var STAGE_MOVESPEEDINCREASE = 100;
static var STAGE_INITIALNOOFBALLS = 40;
static var STAGE_NOOFBALLSINCREASE = 10;
static var STAGE_CLEARSHOWTIME = 500;
static var STAGEBACKGROUND_BALLMASKS = [null, null, [[[915, 940, "stageMask1_0"]]], null, [[[148, 170, "stageMask1_1"], [238, 290, "stageMask1_0"]]], [[[955, 975, "stageMask1_1"]]], [[[760, 783, "stageMask1_1"]]], [[[283, 308, "stageMask1_1"], [495, 515, "stageMask1_1"], [763, 783, "stageMask1_1"], [843, 865, "stageMask1_1"]]], null, null];
static var STAGEBACKGROUND_BALLCANNOTHITS = [[[[0, 10]]], [[[0, 10]]], [[[0, 10], [900, 955]]], [[[0, 10]]], [[[0, 10], [140, 175], [230, 300]]], [[[0, 10], [945, 985]]], [[[0, 10][795]]], [[[0, 10][320], [485, 525], [750, 795], [830, 875]]], [[[0, 10]]], [[[0, 10]]]];
static var SCORE_DESTROY = 20;
static var SCORE_EXTRABALL = 10;
static var SCORE_COMBO = 10;
static var SCORE_STAR = 50;
}
Symbol 309 MovieClip [__Packages.com.gamecode.flashgames.common.MuteButton] Frame 0
class com.gamecode.flashgames.common.MuteButton extends MovieClip
{
var gotoAndStop;
function MuteButton () {
super();
if (com.gamecode.flashgames.common.NewSound.getIsMuteAll()) {
showOff();
} else {
showOn();
}
}
function onPress() {
_root.soundStatus = true;
if (com.gamecode.flashgames.common.NewSound.getIsMuteAll()) {
com.gamecode.flashgames.common.NewSound.unmuteAll();
_root.playbg_sound.start(0, 999);
showOn();
} else {
_root.soundStatus = false;
com.gamecode.flashgames.common.NewSound.muteAll();
_root.playbg_sound.stop();
showOff();
}
}
function showOff() {
gotoAndStop("off");
}
function showOn() {
gotoAndStop("on");
}
}
Symbol 310 MovieClip [__Packages.com.gamecode.flashgames.common.NewSound] Frame 0
class com.gamecode.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 311 MovieClip [__Packages.com.gamecode.flashgames.common.MainDevelopment] Frame 0
class com.gamecode.flashgames.common.MainDevelopment extends MovieClip
{
var gotoAndStop, help, hScore, more1, gj_btn, play_btn, startButton, url1;
function MainDevelopment () {
super();
}
static function initialize(movieClip) {
movieClip.__proto__ = com.gamecode.flashgames.common.MainDevelopment.prototype;
movieClip.gotoTitlePage();
}
function gotoTitlePage() {
gotoAndStop("title");
help.onRelease = function () {
this._parent.gotoInstructionsPage();
};
hScore.onRelease = function () {
this.getURL("http://www.gamesjolly.com/scores/BallsAttack/", "_blank");
};
more1.onRelease = function () {
this.getURL("http://www.gamesjolly.com", "_blank");
};
gj_btn.onRelease = function () {
this.getURL("http://www.gamesjolly.com", "_blank");
};
play_btn.onRelease = function () {
_root.gotoAndStop("game");
};
}
function gotoInstructionsPage() {
gotoAndStop("instructions");
startButton.onRelease = function () {
this._parent.gotoGamePage();
};
}
function gotoGamePage() {
gotoAndStop("game");
url1.onRelease = function () {
this.getURL("http://www.gamesjolly.com", "_blank");
};
}
function showEnterHighScore(score) {
trace(("showEnterHighScore(" + score) + ")");
}
}
Symbol 312 MovieClip [__Packages.com.gamecode.flashgames.marble.StageBackground] Frame 0
class com.gamecode.flashgames.marble.StageBackground extends MovieClip
{
var stop, pathInfos, gotoAndStop, _totalframes, _currentframe, nextFrame, cacheAsBitmap;
function StageBackground () {
super();
stop();
}
function initialize() {
var _local2 = new Array();
var _local3;
_local3 = 0;
while (this["ball" + _local3]) {
_local2[_local3] = this["ball" + _local3];
_local2[_local3]._visible = false;
_local3++;
}
pathInfos = new Array();
_local3 = 0;
while (_local3 < _local2.length) {
pathInfos.push(new com.gamecode.flashgames.marble.PathInfo());
_local3++;
}
gotoAndStop(1);
while (true) {
_local3 = 0;
while (_local3 < _local2.length) {
pathInfos[_local3].addPoint(_local2[_local3]._x, _local2[_local3]._y);
_local3++;
}
if (_currentframe >= _totalframes) {
break;
}
nextFrame();
}
_local3 = 0;
while (_local3 < _local2.length) {
pathInfos[_local3].updateBallSpacing();
_local3++;
}
cacheAsBitmap = true;
}
}
Symbol 313 MovieClip [__Packages.com.gamecode.flashgames.marble.PathInfo] Frame 0
class com.gamecode.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 _local3;
var _local2;
_local3 = 0;
while (_local3 < infos.length) {
_local2 = infos[_local3][0];
while (_local2 < infos[_local3][1]) {
masks[_local2] = infos[_local3][2];
_local2++;
}
_local3++;
}
}
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.gamecode.flashgames.marble.Config.BALL_RADIUS * 2) / _local4;
connectedBallSpacing = ((com.gamecode.flashgames.marble.Config.BALL_RADIUS * 2) + com.gamecode.flashgames.marble.Config.BALL_CONNECTTTOLERANCE) / _local4;
}
function getXY(index) {
var _local5;
var _local6;
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;
_local5 = (points[_local2].x * (1 - _local3)) + (points[_local2 + 1].x * _local3);
_local6 = (points[_local2].y * (1 - _local3)) + (points[_local2 + 1].y * _local3);
return(new flash.geom.Point(_local5, _local6));
}
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 314 MovieClip [__Packages.com.gamecode.flashgames.marble.Game] Frame 0
class com.gamecode.flashgames.marble.Game extends MovieClip
{
var score, soundShoot, soundDestroy, soundStar, soundWin, soundGameOver, hole, winshow_snd, gamewinSnd, gameoverSnd, ballsHolder, cannon, shootingBalls, _parent, showingWin, showingLose, playingStarted, bgSnd, currentLevel, currentBackground, gotoAndStop, noOfBallTypes, moveSpeed, maxNoOfBalls, noOfBallsCreated, dropInfos, ballLines, lastDestroyPointIndexes, explodes, stageBackground, dialog, getNextHighestDepth, levelnum, lastMoveTime, intervalID, santa_mc, explodesHolder, starLines, starsHolder;
function Game () {
super();
score = 0;
soundShoot = new com.gamecode.flashgames.common.NewSound(this, "soundShoot");
soundDestroy = new com.gamecode.flashgames.common.NewSound(this, "soundDestroy");
soundStar = new com.gamecode.flashgames.common.NewSound(this, "soundStar");
soundWin = new com.gamecode.flashgames.common.NewSound(this, "soundWin");
soundGameOver = new com.gamecode.flashgames.common.NewSound(this, "soundGameOver");
hole = new com.gamecode.flashgames.common.NewSound(this, "hole");
winshow_snd = new com.gamecode.flashgames.common.NewSound(this, "winshow_snd");
gamewinSnd = new com.gamecode.flashgames.common.NewSound(this, "gamewinSnd");
gameoverSnd = new com.gamecode.flashgames.common.NewSound(this, "gameoverSnd");
Key.addListener(this);
trace("_root.tempLevel " + _root.tempLevel);
startLevel(1, _root.tempLevel);
}
function shoot() {
var _local4 = ballsHolder.getNextHighestDepth();
var _local5 = ballsHolder.attachMovie("ball", "ball" + _local4, _local4);
var _local2 = _local5;
var _local3 = new flash.geom.Point(0, 0);
_local2.initialize(cannon.ballFront.type);
cannon.ballFront.localToGlobal(_local3);
_local2._x = _local3.x;
_local2._y = _local3.y;
_local2.speedX = Math.cos((cannon._rotation * 3.141593) / 180) * com.gamecode.flashgames.marble.Config.BALL_SHOOTSPEED;
_local2.speedY = Math.sin((cannon._rotation * 3.141593) / 180) * com.gamecode.flashgames.marble.Config.BALL_SHOOTSPEED;
shootingBalls.push(_local2);
soundShoot.start();
}
function showEnterHighScore() {
_parent.showEnterHighScore(score);
trace("hi score my + " + score);
}
function onMouseMove() {
if (showingWin) {
return(undefined);
}
if (showingLose) {
return(undefined);
}
cannon.updateRotation();
}
function onMouseDown() {
if (!playingStarted) {
return(undefined);
}
if (showingWin) {
return(undefined);
}
if (showingLose) {
return(undefined);
}
if (_root.shootCheck) {
cannon.shoot();
}
}
function onKeyDown() {
if (!playingStarted) {
return(undefined);
}
if (showingWin) {
return(undefined);
}
if (showingLose) {
return(undefined);
}
if (Key.getCode() == 32) {
cannon.swapFrontBack();
}
}
function startLevel(level, background) {
if (_root.currentFrame >= 5) {
trace(" soundsound --");
soundStar.start(0, 999);
bgSnd.stop();
} else {
trace(" sound sound -----++");
bgSnd.start(0, 999);
soundStar.stop();
}
var _local7;
var _local6;
var _local3;
currentLevel = level;
currentBackground = background;
trace("_firsr " + background);
gotoAndStop("background" + background);
noOfBallTypes = com.gamecode.flashgames.marble.Config.STAGE_INITIALBALLTYPES + ((level - 1) * com.gamecode.flashgames.marble.Config.STAGE_BALLTYPESINCREASE);
if (noOfBallTypes > com.gamecode.flashgames.marble.Config.BALL_TYPES) {
noOfBallTypes = com.gamecode.flashgames.marble.Config.BALL_TYPES;
}
moveSpeed = (com.gamecode.flashgames.marble.Config.STAGE_INITIALMOVESPEED + ((level - 1) * com.gamecode.flashgames.marble.Config.STAGE_MOVESPEEDINCREASE)) + 40;
maxNoOfBalls = com.gamecode.flashgames.marble.Config.STAGE_INITIALNOOFBALLS + ((level - 1) * com.gamecode.flashgames.marble.Config.STAGE_NOOFBALLSINCREASE);
noOfBallsCreated = 0;
playingStarted = false;
showingWin = false;
showingLose = false;
shootingBalls = new Array();
dropInfos = new Array();
ballLines = new Array();
lastDestroyPointIndexes = new Array();
explodes = new Array();
stageBackground.__proto__ = com.gamecode.flashgames.marble.StageBackground.prototype;
stageBackground.initialize();
cannon = stageBackground.cannon;
cannon.__proto__ = com.gamecode.flashgames.marble.Cannon.prototype;
cannon.initialize(noOfBallTypes);
_local3 = 0;
while (_local3 < stageBackground.pathInfos.length) {
stageBackground.pathInfos[_local3].updateMask(com.gamecode.flashgames.marble.Config.STAGEBACKGROUND_BALLMASKS[background - 1][_local3]);
stageBackground.pathInfos[_local3].updateCannotHits(com.gamecode.flashgames.marble.Config.STAGEBACKGROUND_BALLCANNOTHITS[background - 1][_local3]);
ballLines[_local3] = new Array();
_local3++;
}
winshow_snd.stop();
dialog.__proto__ = com.gamecode.flashgames.marble.Dialog.prototype;
dialog.showStageBegin(level, background);
dialog.swapDepths(getNextHighestDepth());
levelnum = background;
lastMoveTime = getTimer();
intervalID = setInterval(this, "doCreateMove", 1);
}
function doCreateMove() {
var _local4 = getTimer();
var _local5 = (_local4 - lastMoveTime) / 1000;
var _local6;
var _local3 = false;
var _local2;
var _local7;
moveBalls(_local5, com.gamecode.flashgames.marble.Config.BALL_CREATESPEED);
_local2 = 0;
while (_local2 < ballLines.length) {
if (ballLines[_local2][ballLines[_local2].length - 1].pointIndex >= ((stageBackground.pathInfos[_local2].points.length * com.gamecode.flashgames.marble.Config.BALL_CREATEPERCENT) / 100)) {
_local3 = true;
}
_local2++;
}
lastMoveTime = _local4;
updateAfterEvent();
if (_local3) {
clearInterval(intervalID);
dialog.hide();
startPlaying();
}
}
function startPlaying() {
playingStarted = true;
lastMoveTime = getTimer();
intervalID = setInterval(this, "doPlayMove", 1);
}
function doPlayMove() {
var _local3 = getTimer();
var _local2 = (_local3 - lastMoveTime) / 1000;
moveShootingBalls(_local2);
moveBalls(_local2, moveSpeed);
dropBalls(_local2);
moveExplodes(_local2);
checkWinLose();
lastMoveTime = _local3;
updateAfterEvent();
}
function moveShootingBalls(seconds) {
var _local5;
var _local3;
var _local4;
var _local9;
var _local11;
var _local7;
var _local8;
var _local10;
var _local2;
var _local6;
_local2 = 0;
while (_local2 < shootingBalls.length) {
_local5 = shootingBalls[_local2];
_local3 = _local5._x;
_local4 = _local5._y;
_local9 = _local5.speedX * seconds;
_local11 = _local5.speedY * seconds;
_local7 = Math.ceil(Math.max(Math.abs(_local9), Math.abs(_local11)) / (com.gamecode.flashgames.marble.Config.BALL_RADIUS * 2));
_local8 = _local9 / _local7;
_local10 = _local11 / _local7;
_local6 = 0;
while (_local6 < _local7) {
_local3 = _local3 + _local8;
_local4 = _local4 + _local10;
_local5.setXY(_local3, _local4);
if ((((_local3 < (-com.gamecode.flashgames.marble.Config.BALL_RADIUS)) || (_local3 > (Stage.width + com.gamecode.flashgames.marble.Config.BALL_RADIUS))) || (_local4 < (-com.gamecode.flashgames.marble.Config.BALL_RADIUS))) || (_local4 > (Stage.height + com.gamecode.flashgames.marble.Config.BALL_RADIUS))) {
_local5.destroy();
shootingBalls.splice(_local2, 1);
_local2--;
break;
}
if (landBallOnPath(_local5)) {
shootingBalls.splice(_local2, 1);
_local2--;
break;
}
_local6++;
}
_local2++;
}
}
function landBallOnPath(ball) {
var _local8;
var _local6;
var _local9;
var _local7;
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 {
_local8 = flash.geom.Point.distance(ball.xyPoint, ballLines[_local2][_local3].xyPoint);
if (_local8 > (com.gamecode.flashgames.marble.Config.BALL_RADIUS * 2)) {
} else {
_local9 = stageBackground.pathInfos[_local2].getXY(ballLines[_local2][_local3].pointIndex - stageBackground.pathInfos[_local2].ballSpacing);
_local7 = stageBackground.pathInfos[_local2].getXY(ballLines[_local2][_local3].pointIndex + stageBackground.pathInfos[_local2].ballSpacing);
if (flash.geom.Point.distance(ball.xyPoint, _local9) >= flash.geom.Point.distance(ball.xyPoint, _local7)) {
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++;
}
}
return(true);
}
}
_local3++;
}
_local2++;
}
return(false);
}
function moveBalls(seconds, speed) {
var _local3;
var _local2;
var _local6;
_local2 = 0;
while (_local2 < ballLines.length) {
pushBalls(_local2, 0, (speed * seconds) / stageBackground.pathInfos[_local2].maxPointSpacing);
while ((noOfBallsCreated < maxNoOfBalls) && ((ballLines[_local2].length == 0) || (ballLines[_local2][0].pointIndex >= stageBackground.pathInfos[_local2].ballSpacing))) {
createBall(_local2);
_local3 = stageBackground.pathInfos[_local2].getXY(ballLines[_local2][0].pointIndex);
ballLines[_local2][0].setXY(_local3.x, _local3.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);
}
_local2++;
}
}
function pushBalls(lineIndex, ballIndex, amount) {
var _local8 = stageBackground.pathInfos[lineIndex].ballSpacing;
var _local4 = ballLines[lineIndex];
var _local2;
var _local6;
var _local9;
var _local10;
var _local11;
var _local7;
var _local3;
_local3 = ballIndex;
while (_local3 < _local4.length) {
_local2 = _local4[_local3];
_local2.pointIndex = _local2.pointIndex + amount;
_local6 = stageBackground.pathInfos[lineIndex].getXY(_local2.pointIndex);
_local9 = stageBackground.pathInfos[lineIndex].getMask(_local2.pointIndex);
_local10 = stageBackground.pathInfos[lineIndex].getCannotHit(_local2.pointIndex);
if (_local2.isOnPath) {
_local2.setXY(_local6.x, _local6.y);
_local2.updateMask(_local9);
_local2.cannotHit = _local10;
if ((_local3 < (_local4.length - 1)) && (_local4[_local3 + 1].pointIndex > (_local2.pointIndex + _local8))) {
pushBalls(lineIndex, _local3 + 1, 0);
return(undefined);
}
} else {
_local11 = getTimer();
if ((_local11 - _local2.insertTime) >= com.gamecode.flashgames.marble.Config.BALL_INSERTTIME) {
_local2.isOnPath = true;
_local2.setXY(_local6.x, _local6.y);
_local2.updateMask(_local9);
_local2.cannotHit = _local10;
if ((_local3 < (_local4.length - 1)) && (_local4[_local3 + 1].pointIndex <= (_local2.pointIndex + _local8))) {
pushBalls(lineIndex, _local3 + 1, (_local2.pointIndex + _local8) - _local4[_local3 + 1].pointIndex);
}
checkDestroy(lineIndex, _local3, 0);
return(undefined);
}
_local7 = (_local11 - _local2.insertTime) / com.gamecode.flashgames.marble.Config.BALL_INSERTTIME;
_local2.setXY((_local2.insertX * (1 - _local7)) + (_local6.x * _local7), (_local2.insertY * (1 - _local7)) + (_local6.y * _local7));
_local2.updateMask(_local9);
_local2.cannotHit = _local10;
if ((_local3 < (_local4.length - 1)) && (_local4[_local3 + 1].pointIndex <= (_local2.pointIndex + (_local8 * _local7)))) {
pushBalls(lineIndex, _local3 + 1, (_local2.pointIndex + (_local8 * _local7)) - _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(Math.floor(Math.random() * noOfBallTypes));
_local2.pointIndex = 0;
} else {
_local2.initialize(((Math.random() < com.gamecode.flashgames.marble.Config.BALL_SAMEPOSSIBILITY) ? (ballLines[lineIndex][0].type) : (Math.floor(Math.random() * noOfBallTypes))));
_local2.pointIndex = ballLines[lineIndex][0].pointIndex - stageBackground.pathInfos[lineIndex].ballSpacing;
}
_local2.isOnPath = true;
ballLines[lineIndex].unshift(_local2);
noOfBallsCreated++;
if (noOfBallsCreated == 30) {
santa_mc.gotoAndStop(22);
} else {
santa_mc.gotoAndPlay(1);
}
}
function checkDestroy(lineIndex, ballIndex, combo) {
var _local9 = stageBackground.pathInfos[lineIndex].connectedBallSpacing;
var _local2 = ballLines[lineIndex];
var _local8 = _local2[ballIndex].type;
var _local4 = ballIndex;
var _local6 = ballIndex;
var _local11;
var _local10 = 0;
var _local3;
_local3 = ballIndex - 1;
while (_local3 >= 0) {
if (_local2[_local3].type != _local8) {
break;
}
if (_local2[_local3].pointIndex < (_local2[_local3 + 1].pointIndex - _local9)) {
break;
}
_local4 = _local3;
_local3--;
}
_local3 = ballIndex + 1;
while (_local3 < _local2.length) {
if (_local2[_local3].type != _local8) {
break;
}
if (_local2[_local3].pointIndex > (_local2[_local3 - 1].pointIndex + _local9)) {
break;
}
_local6 = _local3;
_local3++;
}
if (((_local6 - _local4) + 1) < com.gamecode.flashgames.marble.Config.MINGROUPSIZE) {
return(undefined);
}
_local10 = _local10 + com.gamecode.flashgames.marble.Config.SCORE_DESTROY;
if (((_local6 - _local4) + 1) > com.gamecode.flashgames.marble.Config.MINGROUPSIZE) {
_local10 = _local10 + ((((_local6 - _local4) + 1) - com.gamecode.flashgames.marble.Config.MINGROUPSIZE) * com.gamecode.flashgames.marble.Config.SCORE_EXTRABALL);
}
_local10 = _local10 + (combo * com.gamecode.flashgames.marble.Config.SCORE_COMBO);
score = score + _local10;
lastDestroyPointIndexes[lineIndex] = _local2[_local6].pointIndex;
_local3 = _local4;
while (_local3 <= _local6) {
addExplode(_local2[_local3]._x, _local2[_local3]._y);
_local2[_local3].destroy();
_local3++;
}
_local2.splice(_local4, (_local6 - _local4) + 1);
if ((_local4 > 0) && (_local4 < _local2.length)) {
_local11 = new com.gamecode.flashgames.marble.DropInfo(lineIndex, _local2[_local4 - 1], combo + 1);
_local3 = 0;
while (_local3 < dropInfos.length) {
if (dropInfos[_local3].lineIndex > lineIndex) {
break;
}
if (dropInfos[_local3].lineIndex < lineIndex) {
} else if (getBallIndex(lineIndex, dropInfos[_local3].ball) > (_local4 - 1)) {
break;
}
_local3++;
}
dropInfos.splice(_local3, 0, _local11);
}
checkRemainingTypes();
soundDestroy.start();
}
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 _local10;
var _local14;
var _local5;
var _local11;
var _local8;
var _local12;
var _local13;
var _local9;
var _local7;
var _local2;
if (dropInfos.length == 0) {
return(undefined);
}
_local7 = 0;
while (_local7 < dropInfos.length) {
_local4 = dropInfos[_local7].lineIndex;
_local6 = getBallIndex(_local4, dropInfos[_local7].ball);
if ((_local6 == -1) || (dropInfos[_local7].ballIndex >= (ballLines[_local4].length - 1))) {
dropInfos.splice(_local7, 1);
_local7--;
} else {
dropInfos[_local7].ballIndex = _local6;
}
_local7++;
}
_local9 = new Array();
_local7 = 0;
while (_local7 < dropInfos.length) {
_local14 = false;
_local4 = dropInfos[_local7].lineIndex;
_local3 = ballLines[_local4];
dropInfos[_local7].speed = dropInfos[_local7].speed + (com.gamecode.flashgames.marble.Config.BALL_DROPACCELERATION * seconds);
_local10 = (dropInfos[_local7].speed * seconds) / stageBackground.pathInfos[_local4].ballSpacing;
_local5 = dropInfos[_local7].ballIndex + 1;
if (_local7 < (dropInfos.length - 1)) {
if (dropInfos[_local7 + 1].lineIndex != _local4) {
_local11 = _local3.length;
} else {
_local11 = dropInfos[_local7 + 1].ballIndex + 1;
}
} else {
_local11 = _local3.length;
}
if ((_local3[_local5].pointIndex - _local10) <= (_local3[_local5 - 1].pointIndex + stageBackground.pathInfos[_local4].ballSpacing)) {
_local10 = (_local3[_local5].pointIndex - _local3[_local5 - 1].pointIndex) - stageBackground.pathInfos[_local4].ballSpacing;
_local14 = true;
}
_local2 = _local5;
while (_local2 < _local11) {
_local3[_local2].pointIndex = _local3[_local2].pointIndex - _local10;
_local8 = stageBackground.pathInfos[_local4].getXY(_local3[_local2].pointIndex);
_local12 = stageBackground.pathInfos[_local4].getMask(_local3[_local2].pointIndex);
_local13 = stageBackground.pathInfos[_local4].getCannotHit(_local3[_local2].pointIndex);
_local3[_local2].setXY(_local8.x, _local8.y);
_local3[_local2].updateMask(_local12);
_local3[_local2].cannotHit = _local13;
_local2++;
}
if (_local14) {
_local9.push(dropInfos[_local7]);
dropInfos.splice(_local7, 1);
_local7--;
}
_local7++;
}
_local7 = 0;
while (_local7 < _local9.length) {
_local4 = _local9[_local7].lineIndex;
_local6 = getBallIndex(_local4, _local9[_local7].ball);
if (ballLines[_local4][_local6 + 1].type == ballLines[_local4][_local6].type) {
checkDestroy(_local4, _local6, _local9[_local7].combo);
}
_local7++;
}
}
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.splice(_local2, 1);
_local2--;
}
_local2++;
}
}
function checkRemainingTypes() {
var _local4;
var _local5;
var _local3;
var _local2;
if (noOfBallsCreated < maxNoOfBalls) {
return(undefined);
}
_local4 = new Array();
_local3 = 0;
while (_local3 < ballLines.length) {
_local2 = 0;
while (_local2 < ballLines[_local3].length) {
_local4[ballLines[_local3][_local2].type] = true;
_local2++;
}
_local3++;
}
_local5 = new Array();
_local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3]) {
_local5.push(_local3);
}
_local3++;
}
if (_local5.length > 0) {
cannon.setPossibleBallTypes(_local5);
}
}
function checkWinLose() {
var _local3 = true;
var _local2;
_local2 = 0;
while (_local2 < ballLines.length) {
if (ballLines[_local2].length == 0) {
} else {
_local3 = false;
if (ballLines[_local2][ballLines[_local2].length - 1].pointIndex >= (stageBackground.pathInfos[_local2].points.length - 1)) {
showLose();
return(undefined);
}
}
_local2++;
}
if (_local3) {
showWin();
}
}
function showWin() {
winshow_snd.start(0, 3);
var _local10;
var _local7;
var _local9;
var _local6;
var _local8;
var _local5;
var _local4;
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.gamecode.flashgames.marble.Config.STAR_SPACING) + 1;
_local9 = com.gamecode.flashgames.marble.Config.STAR_SPACING / stageBackground.pathInfos[_local2].maxPointSpacing;
starLines[_local2] = new Array();
_local3 = 0;
while (_local3 < _local7) {
_local6 = starsHolder.getNextHighestDepth();
_local8 = starsHolder.attachMovie("star", "star" + _local6, _local6);
_local5 = _local8;
_local4 = stageBackground.pathInfos[_local2].getXY((stageBackground.pathInfos[_local2].points.length - 1) - (_local3 * _local9));
_local5.initialize((_local7 - _local3) - 1, _local4.x, _local4.y);
starLines[_local2].push(_local5);
_local3++;
}
_local2++;
}
lastMoveTime = getTimer();
intervalID = setInterval(this, "doWinMove", 1);
}
function showLose() {
hole.start(0, 10);
clearInterval(intervalID);
showingLose = true;
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 _local6 = (_local7 - lastMoveTime) / 1000;
var _local5 = true;
var _local3;
var _local4;
moveExplodes(_local6);
_local3 = 0;
while (_local3 < ballLines.length) {
pushBalls(_local3, 0, (com.gamecode.flashgames.marble.Config.BALL_LOSESPEED * _local6) / 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) {
_local5 = false;
}
_local3++;
}
lastMoveTime = _local7;
if (_local5) {
trace("game over");
trace("final score :- " + score);
_root.score_txt1.text = score;
clearInterval(intervalID);
Key.removeListener(this);
dialog.showGameOver();
gameoverSnd.start();
soundGameOver.start();
}
updateAfterEvent();
}
function doWinMove() {
var _local5 = getTimer();
var _local7 = (_local5 - lastMoveTime) / 1000;
var _local6 = true;
var _local4;
var _local3;
var _local2;
moveExplodes(_local7);
_local3 = 0;
while (_local3 < starLines.length) {
_local2 = 0;
while (_local2 < starLines[_local3].length) {
_local4 = starLines[_local3][_local2]._visible;
if (!starLines[_local3][_local2].move(_local5)) {
_local6 = false;
if ((!_local4) && (starLines[_local3][_local2]._visible)) {
score = score + com.gamecode.flashgames.marble.Config.SCORE_STAR;
}
} else {
starLines[_local3][_local2].removeMovieClip();
starLines[_local3].splice(_local2, 1);
_local2--;
}
_local2++;
}
_local3++;
}
lastMoveTime = _local5;
if (_local6) {
gamewinSnd.start();
clearInterval(intervalID);
dialog.showStageClear();
winshow_snd.stop();
soundWin.start();
}
updateAfterEvent();
}
function finishedShowingClear() {
_root.score_txt2.text = score;
dialog.hide();
if (currentBackground == com.gamecode.flashgames.marble.Config.STAGE_NOOFBACKGROUNDS) {
_root.score_txt2.text = score;
startLevel(currentLevel + 1, 1);
} else {
startLevel(currentLevel, currentBackground + 1);
_root.tempLevel = currentBackground;
_root.playerDetails.data.lev = _root.tempLevel;
trace(_root.playerDetails.data.lev + " currentBackground");
}
}
}
Symbol 315 MovieClip [__Packages.com.gamecode.flashgames.marble.Dialog] Frame 0
class com.gamecode.flashgames.marble.Dialog extends MovieClip
{
var stop, gotoAndStop, level, background, nextbtn, moregames123, gotoAndPlay, playAgainButton, _parent;
function Dialog () {
super();
stop();
}
function showStageBegin(level, background) {
trace("showStageBegin called");
gotoAndStop("stageBegin");
this.level = level;
this.background = background;
}
function showStageClear() {
gotoAndStop("stageClear");
if (background == 10) {
stopAllSounds();
_root.gotoAndStop(25);
trace(background);
} else {
nextbtn.onPress = function () {
this._parent._parent.finishedShowingClear();
};
moregames123.onPress = function () {
_root.getURL("http://www.gamesjolly.com", "_blank");
};
}
}
function showGameOver() {
stopAllSounds();
gotoAndPlay("gameOver");
_root.gotoAndStop(24);
}
function hide() {
gotoAndStop("hide");
}
function gameOverFinished() {
stop();
trace("hello world finesh");
playAgainButton.onRelease = function () {
};
_parent.showEnterHighScore();
}
}
Symbol 316 MovieClip [__Packages.com.gamecode.flashgames.marble.DropInfo] Frame 0
class com.gamecode.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 = 5;
}
}
Symbol 317 MovieClip [__Packages.com.gamecode.flashgames.marble.Star] Frame 0
class com.gamecode.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.gamecode.flashgames.marble.Config.STAR_TIMEDIFFERENCE);
_visible = false;
}
function move(time) {
if (time < startTime) {
return(false);
}
if (time >= (startTime + com.gamecode.flashgames.marble.Config.STAR_APPEARTIME)) {
_visible = false;
return(true);
}
_alpha = 100 - (((time - startTime) * 100) / com.gamecode.flashgames.marble.Config.STAR_APPEARTIME);
_visible = true;
return(false);
}
}
Symbol 318 MovieClip [__Packages.com.gamecode.flashgames.marble.Explode] Frame 0
class com.gamecode.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.gamecode.flashgames.marble.Config.EXPLODE_TIME) {
_local4 = 1;
_local5 = true;
} else {
_local4 = (totalSeconds * 1000) / com.gamecode.flashgames.marble.Config.EXPLODE_TIME;
}
_local3 = _local4 * com.gamecode.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 * 3.141593) / 180);
pieces[_local2]._y = _local3 * Math.sin((pieces[_local2]._rotation * 3.141593) / 180);
_local2++;
}
return(_local5);
}
}
Symbol 79 Button
on (release) {
getURL ("http://www.adegames.com", "_blank");
}
on (rollOver) {
_root.shootCheck = false;
_root.btn1Snd.start(0, 1);
}
on (rollOut) {
_root.shootCheck = true;
}
Symbol 80 Button
on (release) {
getURL ("http://www.adegames.com", "_blank");
}
on (rollOver) {
_root.shootCheck = false;
_root.btn1Snd.start(0, 1);
}
on (rollOut) {
_root.shootCheck = true;
}
Symbol 108 Button
on (rollOver) {
_root.btn1Snd.start(0, 1);
}
Symbol 113 Button
on (release) {
_root.moreGames();
}
on (rollOver) {
_root.btn1Snd.start(0, 1);
}
Symbol 117 MovieClip Frame 13
stop();
Symbol 118 MovieClip [dialog] Frame 1
#initclip 21
Object.registerClass("dialog", com.gamecode.flashgames.marble.Dialog);
#endinitclip
Symbol 118 MovieClip [dialog] Frame 16
_root.sou_txt.text = 1;
stop();
stopAllSounds();
var level_sound = new Sound();
level_sound.attachSound("winSnd");
if (_root.soundStatus) {
level_sound.start(0, 1);
}
_root.playbg_sound.start(0, 999);
Symbol 122 MovieClip [stageBackground0] Frame 1
#initclip 17
Object.registerClass("stageBackground0", com.gamecode.flashgames.marble.StageBackground);
#endinitclip
Symbol 150 MovieClip [game] Frame 1
#initclip 18
Object.registerClass("game", com.gamecode.flashgames.marble.Game);
#endinitclip
stop();
dialog.swapDepths(maskmovie12_mc);
maskmovie12_mc.gotoAndStop(1);
this.onEnterFrame = function () {
_root.tempScore = score;
};
Instance of Symbol 118 MovieClip [dialog] "dialog" in Symbol 150 MovieClip [game] Frame 1
onClipEvent (load) {
this.swapDepths(this.getNextHighestDepth() + 100000);
}
Symbol 150 MovieClip [game] Frame 10
stop();
maskmovie12_mc.swapDepths(dialog.getNextHighestDepth());
maskmovie12_mc.gotoAndStop(2);
this.onEnterFrame = function () {
_root.tempScore = score;
};
Symbol 150 MovieClip [game] Frame 20
stop();
maskmovie12_mc.swapDepths(dialog.getNextHighestDepth());
maskmovie12_mc.gotoAndStop(3);
trace(_root.score_mc.stageBackground.cannon.ballFront.getDepth() + "hello hello");
trace(maskmovie12_mc.getDepth() + " my name is my name is Depth");
this.onEnterFrame = function () {
_root.tempScore = score;
};
Symbol 150 MovieClip [game] Frame 30
stop();
maskmovie12_mc.swapDepths(dialog.getNextHighestDepth());
maskmovie12_mc.gotoAndStop(4);
this.onEnterFrame = function () {
_root.tempScore = score;
};
_root.level2 = levelnum;
trace(level2 + " hello");
_root.playerDetails.data.lev = level2;
Symbol 150 MovieClip [game] Frame 40
stop();
maskmovie12_mc.swapDepths(dialog.getNextHighestDepth());
maskmovie12_mc.gotoAndStop(5);
this.onEnterFrame = function () {
_root.tempScore = score;
};
Symbol 150 MovieClip [game] Frame 50
stop();
maskmovie12_mc.swapDepths(dialog.getNextHighestDepth());
maskmovie12_mc.gotoAndStop(6);
this.onEnterFrame = function () {
_root.tempScore = score;
};
Symbol 150 MovieClip [game] Frame 60
stop();
maskmovie12_mc.swapDepths(dialog.getNextHighestDepth());
maskmovie12_mc.gotoAndStop(7);
this.onEnterFrame = function () {
_root.tempScore = score;
};
Symbol 150 MovieClip [game] Frame 70
stop();
maskmovie12_mc.swapDepths(dialog.getNextHighestDepth());
maskmovie12_mc.gotoAndStop(8);
this.onEnterFrame = function () {
_root.tempScore = score;
};
Symbol 150 MovieClip [game] Frame 80
stop();
maskmovie12_mc.swapDepths(dialog.getNextHighestDepth());
maskmovie12_mc.gotoAndStop(9);
this.onEnterFrame = function () {
_root.tempScore = score;
};
Symbol 150 MovieClip [game] Frame 90
stop();
maskmovie12_mc.swapDepths(dialog.getNextHighestDepth());
maskmovie12_mc.gotoAndStop(10);
this.onEnterFrame = function () {
_root.score_txt2.text = score;
};
Symbol 156 MovieClip [star] Frame 1
#initclip 19
Object.registerClass("star", com.gamecode.flashgames.marble.Star);
#endinitclip
Symbol 172 MovieClip [explode] Frame 1
#initclip 20
Object.registerClass("explode", com.gamecode.flashgames.marble.Explode);
#endinitclip
Symbol 203 Button
on (release) {
_root.tempLevel = 1;
_root.gotoAndStop("game");
}
on (rollOver) {
_root.btn1Snd.start(0, 1);
}
Symbol 204 Button
on (release) {
_root.gotoAndPlay("levels");
}
on (rollOver) {
_root.btn1Snd.start(0, 1);
}
Symbol 205 Button
on (release) {
_root.gotoAndStop("instructions");
}
on (rollOver) {
_root.btn1Snd.start(0, 1);
}
Symbol 206 Button
on (release) {
_root.moreGames();
}
on (rollOver) {
_root.btn1Snd.start(0, 1);
}
Symbol 207 Button
on (release) {
_root.highScore();
}
on (rollOver) {
_root.btn1Snd.start(0, 1);
}
Symbol 208 MovieClip Frame 1
var moon1_sound = new Sound();
moon1_sound.attachSound("moon");
moon1_sound.start(0, 1);
Symbol 208 MovieClip Frame 13
stop();
Symbol 209 MovieClip Frame 4
var moon_sound = new Sound();
moon_sound.attachSound("moon");
moon_sound.start(0, 1);
Symbol 209 MovieClip Frame 10
Symbol 209 MovieClip Frame 50
stop();
Symbol 213 Button
on (release) {
_root.gotoAndStop("game");
}
on (rollOver) {
_root.btn1Snd.start(0, 1);
}
Symbol 229 MovieClip Frame 6
stop();
Symbol 243 Button
on (release) {
_root.gotoAndStop("game");
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Symbol 251 Button
on (release) {
_root.gotoAndStop("title");
}
on (rollOver) {
_root.btn1Snd.start(0, 1);
}
Symbol 252 Button
on (release) {
_root.submit();
_root.gotoAndStop("game");
}
on (rollOver) {
_root.btn1Snd.start(0, 1);
}
Symbol 253 Button
on (release) {
_root.moreGames();
}
on (rollOver) {
_root.btn1Snd.start(0, 1);
}
Symbol 254 MovieClip Frame 21
stop();
Symbol 260 MovieClip Frame 20
stop();
Symbol 265 Button
on (release) {
_root.gotoAndStop("game");
}
on (rollOver) {
_root.btn_sound.start(0, 1);
}
Symbol 266 Button
on (release) {
_root.submitscore();
_root.gotoAndStop("game");
}
on (rollOver) {
_root.btn1Snd.start(0, 1);
}
Symbol 267 MovieClip Frame 21
stop();
Symbol 270 MovieClip Frame 20
stop();
Symbol 273 MovieClip Frame 4
var moon_sound = new Sound();
moon_sound.attachSound("moon");
moon_sound.start(0, 1);
Symbol 273 MovieClip Frame 10
var name_sound = new Sound();
name_sound.attachSound("name");
name_sound.start(0, 2);
Symbol 273 MovieClip Frame 50
stop();
Symbol 278 MovieClip Frame 1
stop();
Symbol 278 MovieClip Frame 2
stop();
Symbol 281 MovieClip Frame 1
stop();
Symbol 281 MovieClip Frame 2
stop();
Symbol 285 MovieClip Frame 1
stop();
Symbol 285 MovieClip Frame 2
stop();
Symbol 288 MovieClip Frame 1
stop();
Symbol 288 MovieClip Frame 2
stop();
Symbol 290 MovieClip Frame 1
stop();
Symbol 290 MovieClip Frame 2
stop();
Symbol 292 MovieClip Frame 1
stop();
Symbol 292 MovieClip Frame 2
stop();
Symbol 294 MovieClip Frame 1
stop();
Symbol 294 MovieClip Frame 2
stop();
Symbol 297 MovieClip Frame 1
stop();
Symbol 297 MovieClip Frame 2
stop();
Symbol 301 MovieClip Frame 1
stop();
Symbol 301 MovieClip Frame 2
stop();
Symbol 305 MovieClip Frame 1
stop();
Symbol 305 MovieClip Frame 2
stop();