Instance of Symbol 65 MovieClip [Preloader] in Frame 1
//component parameters
onClipEvent (construct) {
background = "logo";
barBorderColour = "0xFFFFFF";
barBorderThickness = 2;
barColourBottom = "0x9999FF";
barColourTop = "0x9999FF";
barHeight = 15;
barWidth = 100;
barX = 250;
barY = 350;
minShowTime = 3000;
playOrStop = "stop";
startFrame = "title";
}
Frame 21
com.novelgames.flashgames.common.MainDevelopment.initialize(this);
Instance of Symbol 55 MovieClip [HighScores] "highScores" in Frame 21
//component parameters
onClipEvent (construct) {
backgroundAlpha = 50;
backgroundColour = "0x000000";
dialogAlpha = 100;
dialogBorderAlpha = 100;
dialogBorderColour = "0x000000";
dialogBorderThickness = 1;
dialogColour = "0xFFFFFF";
gameID = 108;
loadScoresAtStart = "false";
loadScoresURL = "loadScores.php";
maxNoOfScores = 50;
saveScoreURL = "saveScore.php";
}
Symbol 55 MovieClip [HighScores] Frame 1
#initclip 17
Object.registerClass("HighScores", com.novelgames.flashgames.highscores.HighScores);
#endinitclip
stop();
Symbol 55 MovieClip [HighScores] Frame 7
stop();
Symbol 55 MovieClip [HighScores] Frame 17
stop();
Symbol 55 MovieClip [HighScores] Frame 27
stop();
Symbol 55 MovieClip [HighScores] Frame 34
stop();
Symbol 55 MovieClip [HighScores] Frame 58
stop();
Symbol 64 MovieClip [bar] Frame 1
#initclip 18
Object.registerClass("bar", com.novelgames.flashgames.preloader.Bar);
#endinitclip
Symbol 65 MovieClip [Preloader] Frame 1
#initclip 19
Object.registerClass("Preloader", com.novelgames.flashgames.preloader.Preloader);
#endinitclip
Symbol 136 MovieClip [__Packages.com.novelgames.flashgames.juggling.ScorePopup] Frame 0
class com.novelgames.flashgames.juggling.ScorePopup extends MovieClip
{
var _x, _y, score, startY, startTime, cacheAsBitmap, intervalID, removeMovieClip, _alpha;
function ScorePopup () {
super();
}
function initialize(x, y, score) {
_x = x;
_y = y;
this.score = score;
startY = y;
startTime = getTimer();
cacheAsBitmap = true;
intervalID = setInterval(this, "onTime", 1);
}
function onTime() {
var _local2 = getTimer();
var _local4 = (_local2 - startTime) / com.novelgames.flashgames.juggling.Config.SCOREPOPUP_MOVETIME;
var _local3 = ((_local2 - startTime) - com.novelgames.flashgames.juggling.Config.SCOREPOPUP_DISAPPEARTIME) / (com.novelgames.flashgames.juggling.Config.SCOREPOPUP_MOVETIME - com.novelgames.flashgames.juggling.Config.SCOREPOPUP_DISAPPEARTIME);
if (_local4 >= 1) {
clearInterval(intervalID);
removeMovieClip();
return(undefined);
}
_y = startY - (_local4 * com.novelgames.flashgames.juggling.Config.SCOREPOPUP_MOVEHEIGHT);
if (_local3 > 0) {
_alpha = 100 * (1 - _local3);
}
updateAfterEvent();
}
}
Symbol 137 MovieClip [__Packages.com.novelgames.flashgames.juggling.Config] Frame 0
class com.novelgames.flashgames.juggling.Config
{
function Config () {
}
static var HAND_LEFTCATCHX = 220;
static var HAND_LEFTRELEASEX = 250;
static var HAND_RIGHTCATCHX = 380;
static var HAND_RIGHTRELEASEX = 350;
static var HAND_Y = 310;
static var HAND_CATCHTOLERANCE = 50;
static var HAND_MAXRELEASETIME = 300;
static var HAND_MINRELEASETIME = 50;
static var HAND_RETURNTIME = 100;
static var BALLS_ACCELERATION = 500;
static var BALLS_MINY = 10;
static var BALLS_MAXY = 190;
static var BALLS_COLOURS = [16711680, 65280, 255, 16776960, 65535, 16711935];
static var BALLS_ADDCATCHCOUNT = 3;
static var BALLS_GROUNDY = 376;
static var EXPLODE_STAYTIME = 300;
static var EXPLODE_DISAPPEARTIME = 200;
static var LIFE = 10;
static var SCORE_BALL = 50;
static var SCOREPOPUP_LEFTX = 180;
static var SCOREPOPUP_RIGHTX = 430;
static var SCOREPOPUP_Y = HAND_Y;
static var SCOREPOPUP_MOVEHEIGHT = 100;
static var SCOREPOPUP_MOVETIME = 1000;
static var SCOREPOPUP_DISAPPEARTIME = 500;
}
Symbol 138 MovieClip [__Packages.com.novelgames.flashgames.juggling.LifeBar] Frame 0
class com.novelgames.flashgames.juggling.LifeBar extends MovieClip
{
var gotoAndStop;
function LifeBar () {
super();
}
function setLife(life) {
gotoAndStop(11 - life);
}
}
Symbol 139 MovieClip [__Packages.com.novelgames.flashgames.juggling.Explode] Frame 0
class com.novelgames.flashgames.juggling.Explode extends MovieClip
{
var intervalID, startTime, _alpha, removeMovieClip;
function Explode () {
super();
intervalID = setInterval(this, "startDisappear", com.novelgames.flashgames.juggling.Config.EXPLODE_STAYTIME);
}
function startDisappear() {
clearInterval(intervalID);
startTime = getTimer();
intervalID = setInterval(this, "onDisappearTime", 1);
}
function onDisappearTime() {
var _local3 = getTimer();
var _local2 = (_local3 - startTime) / com.novelgames.flashgames.juggling.Config.EXPLODE_DISAPPEARTIME;
if (_local2 > 1) {
_local2 = 1;
}
_alpha = 100 * (1 - _local2);
if (_local2 == 1) {
clearInterval(intervalID);
removeMovieClip();
}
updateAfterEvent();
}
}
Symbol 140 MovieClip [__Packages.com.novelgames.flashgames.juggling.Ball] Frame 0
class com.novelgames.flashgames.juggling.Ball extends MovieClip
{
var noOfTimesCaught, colourDisplay, cacheAsBitmap, startX, _x, startY, _y, startSpeedX, startSpeedY, startTime, isCaught, canBeCaught;
function Ball () {
super();
}
function initialize() {
noOfTimesCaught = 0;
new Color(colourDisplay).setRGB(com.novelgames.flashgames.juggling.Config.BALLS_COLOURS[Math.floor(Math.random() * com.novelgames.flashgames.juggling.Config.BALLS_COLOURS.length)]);
cacheAsBitmap = true;
}
function startMoving(speedX, speedY) {
startX = _x;
startY = _y;
startSpeedX = speedX;
startSpeedY = speedY;
startTime = getTimer();
isCaught = false;
canBeCaught = false;
}
function move(time) {
var _local3 = _y;
if (isCaught) {
return(undefined);
}
_x = startX + ((startSpeedX * (time - startTime)) / 1000);
_y = (startY + ((startSpeedY * (time - startTime)) / 1000)) + (((com.novelgames.flashgames.juggling.Config.BALLS_ACCELERATION * (time - startTime)) * (time - startTime)) / 2000000);
canBeCaught = _y > _local3;
}
}
Symbol 141 MovieClip [__Packages.com.novelgames.flashgames.juggling.Hand] Frame 0
class com.novelgames.flashgames.juggling.Hand extends MovieClip
{
var isLeftHand, keyCode, catchPosition, releasePosition, moveCentre, moveRadius, holdingBall, keyPressed, move, cacheAsBitmap, _parent, _x, _y, startX, startY, startTime, isHighCatch, straightMoveX, straightMoveY, moveBeginRatio, moveDuration, releaseHeightRatio, straightMoveTimeRatio;
function Hand () {
super();
}
function initialize(isLeftHand) {
this.isLeftHand = isLeftHand;
keyCode = (isLeftHand ? 37 : 39);
catchPosition = (isLeftHand ? (com.novelgames.flashgames.juggling.Config.HAND_LEFTCATCHX) : (com.novelgames.flashgames.juggling.Config.HAND_RIGHTCATCHX));
releasePosition = (isLeftHand ? (com.novelgames.flashgames.juggling.Config.HAND_LEFTRELEASEX) : (com.novelgames.flashgames.juggling.Config.HAND_RIGHTRELEASEX));
moveCentre = (catchPosition + releasePosition) / 2;
moveRadius = Math.abs(catchPosition - releasePosition) / 2;
holdingBall = null;
keyPressed = false;
move = onEmptyMove;
cacheAsBitmap = true;
}
function onEmptyMove(time) {
var _local3 = Key.isDown(keyCode);
var _local2;
if (keyPressed) {
if (!_local3) {
keyPressed = false;
return(undefined);
}
return(undefined);
}
if (!_local3) {
return(undefined);
}
keyPressed = true;
_local2 = _parent.getCaughtBall(this);
if (_local2 == null) {
return(undefined);
}
_parent.ballCaught(_local2);
_local2.noOfTimesCaught++;
_local2.isCaught = true;
holdingBall = _local2;
_x = _local2._x;
_y = _local2._y;
startX = _x;
startY = _y;
startTime = time;
isHighCatch = startY <= com.novelgames.flashgames.juggling.Config.HAND_Y;
if (isHighCatch) {
straightMoveX = catchPosition;
straightMoveY = com.novelgames.flashgames.juggling.Config.HAND_Y;
} else {
straightMoveX = moveCentre;
straightMoveY = com.novelgames.flashgames.juggling.Config.HAND_Y + moveRadius;
}
getStraightMoveTimeRatio();
moveBeginRatio = 0;
moveDuration = com.novelgames.flashgames.juggling.Config.HAND_MAXRELEASETIME;
releaseHeightRatio = 1;
move = onHoldMove;
}
function onHoldMove(time) {
var _local3 = Key.isDown(keyCode);
if (_local3) {
onReleaseMove(time);
} else {
keyPressed = false;
releaseHeightRatio = (time - startTime) / com.novelgames.flashgames.juggling.Config.HAND_MAXRELEASETIME;
moveBeginRatio = (time - startTime) / moveDuration;
moveDuration = com.novelgames.flashgames.juggling.Config.HAND_MINRELEASETIME;
startTime = time;
move = onReleaseMove;
}
}
function onReleaseMove(time) {
var _local3 = time - startTime;
var _local4 = _local3 / moveDuration;
var _local2 = moveBeginRatio + ((1 - moveBeginRatio) * _local4);
if (moveHand(_local2)) {
releaseBall();
startTime = time;
move = onReturnMove;
}
}
function onReturnMove(time) {
var _local2 = (time - startTime) / com.novelgames.flashgames.juggling.Config.HAND_RETURNTIME;
if (_local2 > 1) {
_local2 = 1;
}
_x = (releasePosition * (1 - _local2)) + (catchPosition * _local2);
if (_local2 == 1) {
keyPressed = false;
move = onEmptyMove;
}
}
function getStraightMoveTimeRatio() {
var _local3;
var _local2;
var _local5;
var _local4;
if (isHighCatch) {
if (_y >= com.novelgames.flashgames.juggling.Config.HAND_Y) {
straightMoveTimeRatio = 0;
return(undefined);
}
_local4 = moveRadius * Math.PI;
} else {
if (Math.abs(_x - releasePosition) <= Math.abs(_x - catchPosition)) {
straightMoveTimeRatio = 0;
return(undefined);
}
_local4 = (moveRadius * Math.PI) / 2;
}
_local3 = _x - straightMoveX;
_local2 = _y - straightMoveY;
_local5 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
straightMoveTimeRatio = _local5 / (_local5 + _local4);
}
function moveHand(ratio) {
var _local3;
if (ratio < straightMoveTimeRatio) {
ratio = ratio / straightMoveTimeRatio;
_x = (startX * (1 - ratio)) + (straightMoveX * ratio);
_y = (startY * (1 - ratio)) + (straightMoveY * ratio);
holdingBall._x = _x;
holdingBall._y = _y;
return(false);
}
ratio = (ratio - straightMoveTimeRatio) / (1 - straightMoveTimeRatio);
if (ratio > 1) {
ratio = 1;
}
if (isHighCatch) {
_local3 = ratio * Math.PI;
} else {
_local3 = (Math.PI/2) + ((ratio * Math.PI) / 2);
}
if (isLeftHand) {
_x = moveCentre - (Math.cos(_local3) * moveRadius);
} else {
_x = moveCentre + (Math.cos(_local3) * moveRadius);
}
_y = com.novelgames.flashgames.juggling.Config.HAND_Y + (Math.sin(_local3) * moveRadius);
holdingBall._x = _x;
holdingBall._y = _y;
if (ratio == 1) {
return(true);
}
}
function releaseBall() {
var _local5 = (isLeftHand ? (com.novelgames.flashgames.juggling.Config.HAND_RIGHTCATCHX - com.novelgames.flashgames.juggling.Config.HAND_LEFTRELEASEX) : (com.novelgames.flashgames.juggling.Config.HAND_LEFTCATCHX - com.novelgames.flashgames.juggling.Config.HAND_RIGHTRELEASEX));
var _local4 = com.novelgames.flashgames.juggling.Config.HAND_Y - ((com.novelgames.flashgames.juggling.Config.BALLS_MINY * releaseHeightRatio) + (com.novelgames.flashgames.juggling.Config.BALLS_MAXY * (1 - releaseHeightRatio)));
var _local2 = Math.sqrt((2 * _local4) / com.novelgames.flashgames.juggling.Config.BALLS_ACCELERATION);
var _local3 = _local5 / (_local2 * 2);
var _local6 = (-com.novelgames.flashgames.juggling.Config.BALLS_ACCELERATION) * _local2;
holdingBall.isCaught = false;
holdingBall.startMoving(_local3, _local6);
holdingBall = null;
}
}
Symbol 142 MovieClip [__Packages.com.novelgames.flashgames.common.MuteButton] Frame 0
class com.novelgames.flashgames.common.MuteButton extends MovieClip
{
var gotoAndStop;
function MuteButton () {
super();
if (com.novelgames.flashgames.common.NewSound.getIsMuteAll()) {
showOff();
} else {
showOn();
}
}
function onPress() {
if (com.novelgames.flashgames.common.NewSound.getIsMuteAll()) {
com.novelgames.flashgames.common.NewSound.unmuteAll();
showOn();
} else {
com.novelgames.flashgames.common.NewSound.muteAll();
showOff();
}
}
function showOff() {
gotoAndStop("off");
}
function showOn() {
gotoAndStop("on");
}
}
Symbol 143 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 144 MovieClip [__Packages.com.novelgames.flashgames.juggling.Game] Frame 0
class com.novelgames.flashgames.juggling.Game extends MovieClip
{
var score, life, lifeBar, handLeft, handRight, soundCatch, soundDead, soundGameOver, balls, scoresHolder, _parent, intervalID, ballsHolder, explodesHolder, gameOverDialog;
function Game () {
super();
score = 0;
life = com.novelgames.flashgames.juggling.Config.LIFE;
lifeBar.__proto__ = com.novelgames.flashgames.juggling.LifeBar.prototype;
lifeBar.setLife(life);
handLeft.__proto__ = com.novelgames.flashgames.juggling.Hand.prototype;
handRight.__proto__ = com.novelgames.flashgames.juggling.Hand.prototype;
soundCatch = new com.novelgames.flashgames.common.NewSound(this, "soundCatch");
soundDead = new com.novelgames.flashgames.common.NewSound(this, "soundDead");
soundGameOver = new com.novelgames.flashgames.common.NewSound(this, "soundGameOver");
startGame();
}
function getCaughtBall(hand) {
var _local4 = null;
var _local3 = 0;
var _local2;
_local2 = 0;
for ( ; _local2 < balls.length ; _local2++) {
if (balls[_local2].isCaught) {
} else if (!balls[_local2].canBeCaught) {
} else {
if (hand.isLeftHand) {
if (balls[_local2]._x > ((com.novelgames.flashgames.juggling.Config.HAND_LEFTCATCHX + com.novelgames.flashgames.juggling.Config.HAND_RIGHTCATCHX) / 2)) {
continue;
}
} else if (balls[_local2]._x < ((com.novelgames.flashgames.juggling.Config.HAND_LEFTCATCHX + com.novelgames.flashgames.juggling.Config.HAND_RIGHTCATCHX) / 2)) {
} else if (balls[_local2]._y < (com.novelgames.flashgames.juggling.Config.HAND_Y - com.novelgames.flashgames.juggling.Config.HAND_CATCHTOLERANCE)) {
} else if (balls[_local2]._y > (com.novelgames.flashgames.juggling.Config.HAND_Y + com.novelgames.flashgames.juggling.Config.HAND_CATCHTOLERANCE)) {
} else if (balls[_local2]._y > _local3) {
_local4 = balls[_local2];
_local3 = balls[_local2]._y;
}
if (balls[_local2]._y < (com.novelgames.flashgames.juggling.Config.HAND_Y - com.novelgames.flashgames.juggling.Config.HAND_CATCHTOLERANCE)) {
} else if (balls[_local2]._y > (com.novelgames.flashgames.juggling.Config.HAND_Y + com.novelgames.flashgames.juggling.Config.HAND_CATCHTOLERANCE)) {
} else if (balls[_local2]._y > _local3) {
_local4 = balls[_local2];
_local3 = balls[_local2]._y;
}
}
}
return(_local4);
}
function ballCaught(ball) {
var _local3 = balls.length * com.novelgames.flashgames.juggling.Config.SCORE_BALL;
var _local2;
var _local4;
var _local5;
score = score + _local3;
_local2 = scoresHolder.getNextHighestDepth();
_local4 = scoresHolder.attachMovie("scorePopup", "scorePopup" + _local2, _local2);
_local5 = _local4;
_local5.initialize(((ball._x < ((com.novelgames.flashgames.juggling.Config.HAND_LEFTCATCHX + com.novelgames.flashgames.juggling.Config.HAND_RIGHTCATCHX) / 2)) ? (com.novelgames.flashgames.juggling.Config.SCOREPOPUP_LEFTX) : (com.novelgames.flashgames.juggling.Config.SCOREPOPUP_RIGHTX)), com.novelgames.flashgames.juggling.Config.SCOREPOPUP_Y, _local3);
soundCatch.start();
}
function showEnterHighScore() {
_parent.showEnterHighScore(score);
}
function startGame() {
balls = new Array();
handLeft.initialize(true);
handRight.initialize(false);
intervalID = setInterval(this, "onPlayTime", 1);
}
function addBall() {
var _local3 = ballsHolder.getNextHighestDepth();
var _local4 = ballsHolder.attachMovie("ball", "ball" + _local3, _local3);
var _local2 = _local4;
_local2.initialize();
_local2._x = ((Math.random() < 0.5) ? (com.novelgames.flashgames.juggling.Config.HAND_LEFTCATCHX) : (com.novelgames.flashgames.juggling.Config.HAND_RIGHTCATCHX));
_local2._y = (-_local2._height) / 2;
_local2.startMoving(0, 0);
balls.push(_local2);
}
function onPlayTime() {
var _local2 = getTimer();
moveBalls(_local2);
moveHands(_local2);
checkDeadBall();
checkAddBall();
updateAfterEvent();
}
function moveBalls(time) {
var _local2;
_local2 = 0;
while (_local2 < balls.length) {
balls[_local2].move(time);
_local2++;
}
}
function moveHands(time) {
handLeft.move(time);
handRight.move(time);
}
function checkDeadBall() {
var _local3;
var _local4;
var _local2;
_local2 = 0;
while (_local2 < balls.length) {
if (balls[_local2]._y < com.novelgames.flashgames.juggling.Config.BALLS_GROUNDY) {
} else {
_local3 = explodesHolder.getNextHighestDepth();
_local4 = explodesHolder.attachMovie("explode", "explode" + _local3, _local3);
_local4._x = balls[_local2]._x;
_local4._y = balls[_local2]._y;
life--;
if (life < 0) {
life = 0;
}
lifeBar.setLife(life);
balls[_local2].removeMovieClip();
balls.splice(_local2, 1);
_local2--;
soundDead.start();
}
_local2++;
}
if (life <= 0) {
gameOver();
}
}
function checkAddBall() {
var _local2;
_local2 = 0;
while (_local2 < balls.length) {
if (balls[_local2].noOfTimesCaught < com.novelgames.flashgames.juggling.Config.BALLS_ADDCATCHCOUNT) {
return(undefined);
}
_local2++;
}
addBall();
_local2 = 0;
while (_local2 < balls.length) {
balls[_local2].noOfTimesCaught = 0;
_local2++;
}
}
function gameOver() {
clearInterval(intervalID);
gameOverDialog.show();
soundGameOver.start();
}
}
Symbol 145 MovieClip [__Packages.com.novelgames.flashgames.juggling.GameOverDialog] Frame 0
class com.novelgames.flashgames.juggling.GameOverDialog extends MovieClip
{
var stop, gotoAndPlay, playAgainButton, _parent;
function GameOverDialog () {
super();
stop();
}
function show() {
gotoAndPlay("show");
}
function showFinished() {
stop();
playAgainButton.onRelease = function () {
this._parent._parent._parent.gotoTitlePage();
};
_parent.showEnterHighScore();
}
}
Symbol 146 MovieClip [__Packages.com.novelgames.flashgames.common.MainDevelopment] Frame 0
class com.novelgames.flashgames.common.MainDevelopment extends MovieClip
{
var gotoAndStop, startButton, highScoresButton, moreGamesButton, highScores;
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://freegames.watfordoutlet.com", "_blank");
};
}
function gotoInstructionsPage() {
gotoAndStop("instructions");
startButton.onRelease = function () {
this._parent.gotoGamePage();
};
}
function gotoGamePage() {
gotoAndStop("game");
}
function showHighScores() {
highScores.showHighScores();
}
function showEnterHighScore(score) {
highScores.showEnterHighScore(score);
}
}
Symbol 4 MovieClip [__Packages.com.novelgames.flashgames.highscores.HighScores] Frame 0
class com.novelgames.flashgames.highscores.HighScores extends MovieClip
{
var width, _width, height, _height, loadingHighScores, showingHighScores, records, _xscale, _yscale, _visible, gotoAndStop, __loadScoresAtStart, __gameID, __loadScoresURL, __saveScoreURL, __dialogColour, __dialogAlpha, __dialogBorderThickness, __dialogBorderColour, __dialogBorderAlpha, __backgroundColour, __backgroundAlpha, __maxNoOfScores, boundingBox, highScoresModuleText, okButton, score, nameText, enterText, scoreText, yourScoreText, cancelButton, loadingHighScoresText, loadHighScoresFailedText, savingScoresText, saveScoreFailedText, scoreRange, globalToLocal, backgroundHolder, titleText, ranksHolder, namesHolder, scoresHolder, ranksMask, namesMask, scoresMask, upArrowButton, downArrowButton, scrollDirection, scrollStartTime, scrollStartY, scrollIntervalID, name;
function HighScores () {
super();
width = _width;
height = _height;
loadingHighScores = false;
showingHighScores = false;
records = null;
_xscale = 100;
_yscale = 100;
_visible = false;
(gotoAndStop("authoring"));// not popped
if (__loadScoresAtStart) {
loadScores();
}
}
function set gameID(id) {
__gameID = Number(id);
//return(gameID);
}
function get gameID() {
return(__gameID);
}
function set loadScoresURL(url) {
__loadScoresURL = url;
//return(loadScoresURL);
}
function get loadScoresURL() {
return(__loadScoresURL);
}
function set saveScoreURL(url) {
__saveScoreURL = url;
//return(saveScoreURL);
}
function get saveScoreURL() {
return(__saveScoreURL);
}
function set loadScoresAtStart(load) {
__loadScoresAtStart = load == "true";
//return(loadScoresAtStart);
}
function get loadScoresAtStart() {
return(__loadScoresAtStart);
}
function set dialogColour(colour) {
__dialogColour = colour;
//return(dialogColour);
}
function get dialogColour() {
return(__dialogColour);
}
function set dialogAlpha(alpha) {
__dialogAlpha = alpha;
//return(dialogAlpha);
}
function get dialogAlpha() {
return(__dialogAlpha);
}
function set dialogBorderThickness(thickness) {
__dialogBorderThickness = thickness;
//return(dialogBorderThickness);
}
function get dialogBorderThickness() {
return(__dialogBorderThickness);
}
function set dialogBorderColour(colour) {
__dialogBorderColour = colour;
//return(dialogBorderColour);
}
function get dialogBorderColour() {
return(__dialogBorderColour);
}
function set dialogBorderAlpha(alpha) {
__dialogBorderAlpha = alpha;
//return(dialogBorderAlpha);
}
function get dialogBorderAlpha() {
return(__dialogBorderAlpha);
}
function set backgroundColour(colour) {
__backgroundColour = Number(colour);
//return(backgroundColour);
}
function get backgroundColour() {
return(__backgroundColour);
}
function set backgroundAlpha(alpha) {
__backgroundAlpha = Number(alpha);
//return(backgroundAlpha);
}
function get backgroundAlpha() {
return(__backgroundAlpha);
}
function set maxNoOfScores(no) {
__maxNoOfScores = Number(no);
//return(maxNoOfScores);
}
function get maxNoOfScores() {
return(__maxNoOfScores);
}
function setSize(width, height) {
this.width = width;
this.height = height;
boundingBox._width = width;
boundingBox._height = height;
highScoresModuleText._x = width / 2;
highScoresModuleText._y = height / 2;
}
function showHighScores() {
showingHighScores = true;
if (loadingHighScores) {
showLoadingHighScores();
return(undefined);
}
if (records == null) {
loadScores();
return(undefined);
}
(gotoAndStop("highScores"));// not popped
drawBackground();
setTitleText();
drawRecords();
setArrowButtons();
okButton._x = width / 2;
okButton._y = height - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_BUTTONFROMBOTTOM;
okButton.onRelease = function () {
this._parent.hide();
};
_visible = true;
}
function showEnterHighScore(score) {
var _local3;
var _local2;
showingHighScores = false;
this.score = score;
(gotoAndStop("enter"));// not popped
drawBackground();
_local3 = (((((((yourScoreText._height + com.novelgames.flashgames.highscores.Config.ENTER_LABELFIELDSPACING) + scoreText._height) + com.novelgames.flashgames.highscores.Config.ENTER_SECTIONSPACING) + enterText._height) + com.novelgames.flashgames.highscores.Config.ENTER_LABELFIELDSPACING) + nameText._height) + com.novelgames.flashgames.highscores.Config.ENTER_SECTIONSPACING) + okButton._height;
_local2 = (height - _local3) / 2;
yourScoreText._x = width / 2;
yourScoreText._y = _local2 + (yourScoreText._height / 2);
_local2 = _local2 + (yourScoreText._height + com.novelgames.flashgames.highscores.Config.ENTER_LABELFIELDSPACING);
scoreText.autoSize = "center";
scoreText._x = (width - scoreText._width) / 2;
scoreText._y = _local2;
_local2 = _local2 + (scoreText._height + com.novelgames.flashgames.highscores.Config.ENTER_SECTIONSPACING);
enterText._x = width / 2;
enterText._y = _local2 + (enterText._height / 2);
_local2 = _local2 + (enterText._height + com.novelgames.flashgames.highscores.Config.ENTER_LABELFIELDSPACING);
nameText._width = width - (com.novelgames.flashgames.highscores.Config.ENTER_NAMEFIELDORDER * 2);
nameText._x = (width - nameText._width) / 2;
nameText._y = _local2;
_local2 = _local2 + (nameText._height + com.novelgames.flashgames.highscores.Config.ENTER_SECTIONSPACING);
okButton._x = (width - com.novelgames.flashgames.highscores.Config.ENTER_BUTTONSSPACING) / 2;
okButton._y = _local2 + (okButton._height / 2);
cancelButton._x = (width + com.novelgames.flashgames.highscores.Config.ENTER_BUTTONSSPACING) / 2;
cancelButton._y = _local2 + (cancelButton._height / 2);
okButton.onRelease = function () {
this._parent.saveScore();
};
cancelButton.onRelease = function () {
this._parent.hide();
};
_visible = true;
}
function hide() {
showingHighScores = false;
(gotoAndStop("authoring"));// not popped
_visible = false;
}
function loadScores() {
var highScores = this;
var _local2 = new XML();
loadingHighScores = true;
_local2.ignoreWhite = true;
_local2.onLoad = function (success) {
highScores.finishedLoadingScores(this.firstChild, success);
};
_local2.load((__loadScoresURL + ((__loadScoresURL.indexOf("?") == -1) ? "?id=" : "&id=")) + __gameID);
if (showingHighScores) {
showLoadingHighScores();
}
}
function finishedLoadingScores(rootNode, success) {
var _local2;
loadingHighScores = false;
if (!success) {
if (showingHighScores) {
showLoadHighScoresFailed();
}
return(undefined);
}
parseScoreRange(rootNode.attributes.scoreRange);
records = new Array();
_local2 = rootNode.firstChild;
while (_local2) {
if (_local2.nodeName != "RECORD") {
} else {
records.push(new com.novelgames.flashgames.highscores.Record(_local2.attributes.name, Number(_local2.attributes.score)));
if (records.length >= __maxNoOfScores) {
break;
}
}
_local2 = _local2.nextSibling;
}
if (showingHighScores) {
showHighScores();
}
}
function showLoadingHighScores() {
(gotoAndStop("loadingHighScores"));// not popped
drawBackground();
loadingHighScoresText._x = width / 2;
loadingHighScoresText._y = height / 2;
_visible = true;
}
function showLoadHighScoresFailed() {
(gotoAndStop("loadHighScoresFailed"));// not popped
drawBackground();
loadHighScoresFailedText._x = width / 2;
loadHighScoresFailedText._y = (height / 2) - (com.novelgames.flashgames.highscores.Config.FAILED_TEXTBUTTONSPACING / 2);
okButton._x = width / 2;
okButton._y = (height / 2) + (com.novelgames.flashgames.highscores.Config.FAILED_TEXTBUTTONSPACING / 2);
okButton.onRelease = function () {
this._parent.hide();
};
_visible = true;
}
function showSavingScore() {
(gotoAndStop("savingScore"));// not popped
drawBackground();
savingScoresText._x = width / 2;
savingScoresText._y = height / 2;
_visible = true;
}
function showSaveScoreFailed() {
(gotoAndStop("saveScoreFailed"));// not popped
drawBackground();
saveScoreFailedText._x = width / 2;
saveScoreFailedText._y = (height / 2) - (com.novelgames.flashgames.highscores.Config.FAILED_TEXTBUTTONSPACING / 2);
okButton._x = width / 2;
okButton._y = (height / 2) + (com.novelgames.flashgames.highscores.Config.FAILED_TEXTBUTTONSPACING / 2);
okButton.onRelease = function () {
this._parent.hide();
};
_visible = true;
}
function parseScoreRange(rangeText) {
switch (rangeText) {
case "eternity" :
scoreRange = SCORERANGE_ETERNITY;
break;
case "pastDay" :
scoreRange = SCORERANGE_PASTDAY;
break;
case "pastWeek" :
scoreRange = SCORERANGE_PASTWEEK;
break;
case "pastMonth" :
scoreRange = SCORERANGE_PASTMONTH;
break;
case "pastYear" :
scoreRange = SCORERANGE_PASTYEAR;
break;
case "thisDay" :
scoreRange = SCORERANGE_THISDAY;
break;
case "thisWeek" :
scoreRange = SCORERANGE_THISWEEK;
break;
case "thisMonth" :
scoreRange = SCORERANGE_THISMONTH;
break;
case "thisYear" :
scoreRange = SCORERANGE_THISYEAR;
}
}
function drawBackground() {
var _local2 = {x:0, y:0};
var _local4 = {x:Stage.width, y:0};
var _local5 = {x:0, y:Stage.height};
var _local3 = {x:Stage.width, y:Stage.height};
globalToLocal(_local2);
globalToLocal(_local4);
globalToLocal(_local5);
globalToLocal(_local3);
backgroundHolder.clear();
backgroundHolder.beginFill(__backgroundColour, __backgroundAlpha);
backgroundHolder.moveTo(_local2.x, _local2.y);
backgroundHolder.lineTo(_local4.x, _local4.y);
backgroundHolder.lineTo(_local3.x, _local3.y);
backgroundHolder.lineTo(_local5.x, _local5.y);
backgroundHolder.lineTo(_local2.x, _local2.y);
backgroundHolder.endFill();
backgroundHolder.lineStyle(__dialogBorderThickness, __dialogBorderColour, __dialogBorderAlpha);
backgroundHolder.beginFill(__dialogColour, __dialogAlpha);
backgroundHolder.moveTo(0, 0);
backgroundHolder.lineTo(width, 0);
backgroundHolder.lineTo(width, height);
backgroundHolder.lineTo(0, height);
backgroundHolder.lineTo(0, 0);
backgroundHolder.endFill();
backgroundHolder.onPress = function () {
};
backgroundHolder.useHandCursor = false;
}
function setTitleText() {
switch (scoreRange) {
case SCORERANGE_ETERNITY :
titleText.gotoAndStop("eternity");
break;
case SCORERANGE_PASTDAY :
titleText.gotoAndStop("pastDay");
break;
case SCORERANGE_PASTWEEK :
titleText.gotoAndStop("pastWeek");
break;
case SCORERANGE_PASTMONTH :
titleText.gotoAndStop("pastMonth");
break;
case SCORERANGE_PASTYEAR :
titleText.gotoAndStop("pastYear");
break;
case SCORERANGE_THISDAY :
titleText.gotoAndStop("thisDay");
break;
case SCORERANGE_THISWEEK :
titleText.gotoAndStop("thisWeek");
break;
case SCORERANGE_THISMONTH :
titleText.gotoAndStop("thisMonth");
break;
case SCORERANGE_THISYEAR :
titleText.gotoAndStop("thisYear");
}
titleText._x = width / 2;
titleText._y = com.novelgames.flashgames.highscores.Config.HIGHSCORES_TITLEY;
}
function drawRecords() {
var _local6 = new Array();
var _local5 = new Array();
var _local4 = new Array();
var _local7 = 0;
var _local10 = 0;
var _local8;
var _local9;
var _local3;
var _local2;
_local2 = 0;
while (_local2 < __maxNoOfScores) {
if (_local2 < records.length) {
_local8 = records[_local2].name;
_local9 = records[_local2].score;
} else {
_local8 = com.novelgames.flashgames.highscores.Config.HIGHSCORES_NONEDISPLAY;
_local9 = com.novelgames.flashgames.highscores.Config.HIGHSCORES_NONEDISPLAY;
}
_local3 = ranksHolder.seedText.duplicateMovieClip("textText" + _local2, _local2);
_local3.textText.autoSize = "left";
_local3.textText.text = _local2 + 1;
if (_local3._width > _local7) {
_local7 = _local3._width;
}
_local6.push(_local3);
_local3 = namesHolder.seedText.duplicateMovieClip("textText" + _local2, _local2);
_local3.textText.autoSize = "left";
_local3.textText.text = _local8;
_local5.push(_local3);
_local3 = scoresHolder.seedText.duplicateMovieClip("textText" + _local2, _local2);
_local3.textText.autoSize = "left";
_local3.textText.text = _local9;
if (_local3._width > _local10) {
_local10 = _local3._width;
}
_local4.push(_local3);
_local2++;
}
_local2 = 0;
while (_local2 < __maxNoOfScores) {
_local6[_local2]._x = com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMLEFT;
_local6[_local2]._y = com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMTOP + (_local2 * com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_ROWSPACING);
_local5[_local2]._x = (com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMLEFT + _local7) + com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_COLUMNSPACING;
_local5[_local2]._y = com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMTOP + (_local2 * com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_ROWSPACING);
_local4[_local2]._x = (width - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMRIGHT) - _local4[_local2]._width;
_local4[_local2]._y = com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMTOP + (_local2 * com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_ROWSPACING);
_local2++;
}
ranksMask._x = com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMLEFT;
ranksMask._y = com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMTOP;
ranksMask._width = (((width - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMRIGHT) - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMLEFT) - _local10) - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_COLUMNSPACING;
ranksMask._height = (height - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMBOTTOM) - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMTOP;
namesMask._x = com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMLEFT;
namesMask._y = com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMTOP;
namesMask._width = (((width - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMRIGHT) - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMLEFT) - _local10) - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_COLUMNSPACING;
namesMask._height = (height - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMBOTTOM) - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMTOP;
scoresMask._x = (width - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMRIGHT) - _local10;
scoresMask._y = com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMTOP;
scoresMask._width = _local10;
scoresMask._height = (height - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMBOTTOM) - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMTOP;
ranksHolder.setMask(ranksMask);
namesHolder.setMask(namesMask);
scoresHolder.setMask(scoresMask);
}
function setArrowButtons() {
if (ranksHolder._height > namesMask._height) {
upArrowButton._x = width - com.novelgames.flashgames.highscores.Config.HIGHSCORES_UPARROW_FROMRIGHT;
upArrowButton._y = height - com.novelgames.flashgames.highscores.Config.HIGHSCORES_UPARROW_FROMBOTTOM;
downArrowButton._x = width - com.novelgames.flashgames.highscores.Config.HIGHSCORES_DOWNARROW_FROMRIGHT;
downArrowButton._y = height - com.novelgames.flashgames.highscores.Config.HIGHSCORES_DOWNARROW_FROMBOTTOM;
upArrowButton.onPress = function () {
this._parent.startScroll(com.novelgames.flashgames.highscores.HighScores.SCROLL_UP);
};
downArrowButton.onPress = function () {
this._parent.startScroll(com.novelgames.flashgames.highscores.HighScores.SCROLL_DOWN);
};
upArrowButton.onRelease = function () {
this._parent.stopScroll();
};
upArrowButton.onReleaseOutside = upArrowButton.onRelease;
downArrowButton.onRelease = upArrowButton.onRelease;
downArrowButton.onReleaseOutside = upArrowButton.onRelease;
upArrowButton._visible = false;
} else {
upArrowButton._visible = false;
downArrowButton._visible = false;
}
}
function startScroll(direction) {
scrollDirection = direction;
scrollStartTime = getTimer();
scrollStartY = ranksHolder._y;
clearInterval(scrollIntervalID);
scrollIntervalID = setInterval(this, "performScroll", 1);
}
function stopScroll() {
clearInterval(scrollIntervalID);
}
function performScroll() {
var _local2;
if (scrollDirection == SCROLL_DOWN) {
_local2 = scrollStartY - (((getTimer() - scrollStartTime) * com.novelgames.flashgames.highscores.Config.HIGHSCORES_SCROLLSPEED) / 1000);
if (((_local2 + com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMTOP) + (__maxNoOfScores * com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_ROWSPACING)) <= (height - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMBOTTOM)) {
_local2 = ((height - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMBOTTOM) - (__maxNoOfScores * com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_ROWSPACING)) - com.novelgames.flashgames.highscores.Config.HIGHSCORES_LIST_FROMTOP;
stopScroll();
downArrowButton._visible = false;
}
ranksHolder._y = _local2;
namesHolder._y = _local2;
scoresHolder._y = _local2;
upArrowButton._visible = true;
} else {
_local2 = scrollStartY + (((getTimer() - scrollStartTime) * com.novelgames.flashgames.highscores.Config.HIGHSCORES_SCROLLSPEED) / 1000);
if (_local2 >= 0) {
_local2 = 0;
stopScroll();
upArrowButton._visible = false;
}
ranksHolder._y = _local2;
namesHolder._y = _local2;
scoresHolder._y = _local2;
downArrowButton._visible = true;
}
}
function saveScore() {
var highScores = this;
var _local3 = new LoadVars();
var _local2;
_local2 = 0;
while (_local2 < records.length) {
if (records[_local2].score <= score) {
break;
}
_local2++;
}
records.splice(_local2, 0, new com.novelgames.flashgames.highscores.Record(name, score));
records.splice(__maxNoOfScores);
_local3.id = __gameID;
_local3.name = name;
_local3.score = score;
_local3.onLoad = function (success) {
highScores.finishedSavingScore(this, success);
};
_local3.sendAndLoad(__saveScoreURL, _local3, "POST");
showSavingScore();
}
function finishedSavingScore(loadVars, success) {
if ((!success) || (loadVars.success != "true")) {
showSaveScoreFailed();
return(undefined);
}
showHighScores();
}
static var SCORERANGE_ETERNITY = 1;
static var SCORERANGE_PASTDAY = 2;
static var SCORERANGE_PASTWEEK = 3;
static var SCORERANGE_PASTMONTH = 4;
static var SCORERANGE_PASTYEAR = 5;
static var SCORERANGE_THISDAY = 6;
static var SCORERANGE_THISWEEK = 7;
static var SCORERANGE_THISMONTH = 8;
static var SCORERANGE_THISYEAR = 9;
static var SCROLL_UP = 1;
static var SCROLL_DOWN = 2;
}
Symbol 56 MovieClip [__Packages.com.novelgames.flashgames.highscores.Config] Frame 0
class com.novelgames.flashgames.highscores.Config
{
function Config () {
}
static var HIGHSCORES_TITLEY = 20;
static var HIGHSCORES_LIST_FROMLEFT = 10;
static var HIGHSCORES_LIST_FROMTOP = 50;
static var HIGHSCORES_LIST_FROMRIGHT = 10;
static var HIGHSCORES_LIST_FROMBOTTOM = 50;
static var HIGHSCORES_LIST_ROWSPACING = 15;
static var HIGHSCORES_LIST_COLUMNSPACING = 10;
static var HIGHSCORES_LIST_BUTTONFROMBOTTOM = 20;
static var HIGHSCORES_UPARROW_FROMRIGHT = 34;
static var HIGHSCORES_UPARROW_FROMBOTTOM = 40;
static var HIGHSCORES_DOWNARROW_FROMRIGHT = 18;
static var HIGHSCORES_DOWNARROW_FROMBOTTOM = 40;
static var HIGHSCORES_SCROLLSPEED = 100;
static var HIGHSCORES_NONEDISPLAY = "-";
static var ENTER_LABELFIELDSPACING = 5;
static var ENTER_SECTIONSPACING = 30;
static var ENTER_NAMEFIELDORDER = 20;
static var ENTER_BUTTONSSPACING = 70;
static var FAILED_TEXTBUTTONSPACING = 50;
}
Symbol 57 MovieClip [__Packages.com.novelgames.flashgames.highscores.Record] Frame 0
class com.novelgames.flashgames.highscores.Record
{
var name, score;
function Record (name, score) {
this.name = name;
this.score = score;
}
}
Symbol 58 MovieClip [__Packages.com.novelgames.flashgames.preloader.Preloader] Frame 0
class com.novelgames.flashgames.preloader.Preloader extends MovieClip
{
var width, _width, height, _height, _xscale, _yscale, bytesLoaded, _parent, bytesTotal, bar, __barX, __barY, __barWidth, __barHeight, __barColourTop, __barColourBottom, __barBorderThickness, __barBorderColour, stop, startTime, intervalID, __background, backgroundHolder, backgroundMovieClip, boundingBox, preloaderText, __startFrame, __playOrStop, __minShowTime;
function Preloader () {
super();
width = _width;
height = _height;
_xscale = 100;
_yscale = 100;
bytesLoaded = _parent.getBytesLoaded();
bytesTotal = _parent.getBytesTotal();
bar.__proto__ = com.novelgames.flashgames.preloader.Bar.prototype;
bar.initialize(__barX, __barY, __barWidth, __barHeight, __barColourTop, __barColourBottom, __barBorderThickness, __barBorderColour);
bar.setPercent((bytesLoaded * 100) / bytesTotal);
(stop());// not popped
_parent.stop();
startTime = getTimer();
intervalID = setInterval(this, "onTime", 1);
}
function set background(name) {
var _local2;
__background = name;
_local2 = backgroundHolder.attachMovie(name, "background", 0);
if (!_local2) {
backgroundMovieClip.removeMovieClip();
boundingBox._visible = true;
preloaderText._visible = true;
} else {
backgroundMovieClip = _local2;
boundingBox._visible = false;
preloaderText._visible = false;
}
//return(background);
}
function get background() {
return(__background);
}
function set barX(x) {
__barX = x;
bar._x = x;
//return(barX);
}
function get barX() {
return(__barX);
}
function set barY(y) {
__barY = y;
bar._y = y;
//return(barY);
}
function get barY() {
return(__barX);
}
function set barWidth(width) {
__barWidth = width;
bar.setWidth(width);
//return(barWidth);
}
function get barWidth() {
return(__barWidth);
}
function set barHeight(height) {
__barHeight = height;
bar.setHeight(height);
//return(barHeight);
}
function get barHeight() {
return(__barHeight);
}
function set barColourTop(colour) {
__barColourTop = colour;
bar.setColourTop(colour);
//return(barColourTop);
}
function get barColourTop() {
return(__barColourTop);
}
function set barColourBottom(colour) {
__barColourBottom = colour;
bar.setColourBottom(colour);
//return(barColourBottom);
}
function get barColourBottom() {
return(__barColourBottom);
}
function set barBorderThickness(thickness) {
__barBorderThickness = thickness;
bar.setBorderThickness(thickness);
//return(barBorderThickness);
}
function get barBorderThickness() {
return(__barBorderThickness);
}
function set barBorderColour(colour) {
__barBorderColour = colour;
bar.setBorderColour(colour);
//return(barBorderColour);
}
function get barBorderColour() {
return(__barBorderColour);
}
function set startFrame(frame) {
__startFrame = frame;
//return(startFrame);
}
function get startFrame() {
return(__startFrame);
}
function set playOrStop(playOrStop) {
__playOrStop = playOrStop;
//return(this.playOrStop);
}
function get playOrStop() {
return(__playOrStop);
}
function set minShowTime(minShowTime) {
__minShowTime = minShowTime;
//return(this.minShowTime);
}
function get minShowTime() {
return(__minShowTime);
}
function setSize(width, height) {
this.width = width;
this.height = height;
boundingBox._width = width;
boundingBox._height = height;
preloaderText._x = width / 2;
preloaderText._y = height / 2;
}
function onTime() {
var _local4;
var _local3;
var _local2;
bytesLoaded = _parent.getBytesLoaded();
_local4 = (bytesLoaded * 100) / bytesTotal;
_local3 = ((getTimer() - startTime) * 100) / minShowTime;
_local2 = Math.min(_local4, _local3);
bar.setPercent(_local2);
if (_local2 >= 100) {
clearInterval(intervalID);
if (__playOrStop == "play") {
_parent.gotoAndPlay(__startFrame);
} else {
_parent.gotoAndStop(__startFrame);
}
}
updateAfterEvent();
}
}
Symbol 66 MovieClip [__Packages.com.novelgames.flashgames.preloader.Bar] Frame 0
class com.novelgames.flashgames.preloader.Bar extends MovieClip
{
var _x, _y, width, height, colourTop, colourBottom, borderThickness, borderColour, percent, clear, beginGradientFill, moveTo, lineTo, endFill, border;
function Bar () {
super();
}
function initialize(x, y, width, height, colourTop, colourBottom, borderThickness, borderColour) {
_x = x;
_y = y;
this.width = width;
this.height = height;
this.colourTop = colourTop;
this.colourBottom = colourBottom;
this.borderThickness = borderThickness;
this.borderColour = borderColour;
updateBorder();
updateBar();
}
function setWidth(width) {
this.width = width;
updateBorder();
updateBar();
}
function setHeight(height) {
this.height = height;
updateBorder();
updateBar();
}
function setColourTop(colour) {
colourTop = colour;
updateBar();
}
function setColourBottom(colour) {
colourBottom = colour;
updateBar();
}
function setBorderThickness(thickness) {
borderThickness = thickness;
updateBorder();
}
function setBorderColour(colour) {
borderColour = colour;
updateBorder();
}
function setPercent(percent) {
this.percent = percent;
updateBar();
}
function updateBar() {
var _local2 = (width * percent) / 100;
var _local3 = new flash.geom.Matrix();
_local3.createGradientBox(_local2, height, (Math.PI/2), 0, 0);
clear();
beginGradientFill("linear", [colourTop, colourBottom], [100, 100], [0, 255], _local3);
moveTo(0, 0);
lineTo(_local2, 0);
lineTo(_local2, height);
lineTo(0, height);
lineTo(0, 0);
endFill();
}
function updateBorder() {
border.clear();
border.lineStyle(borderThickness, borderColour, 100, false, "normal", "square", "miter");
border.moveTo(0, 0);
border.lineTo(width, 0);
border.lineTo(width, height);
border.lineTo(0, height);
border.lineTo(0, 0);
}
}
Symbol 74 MovieClip [gameOverDialog] Frame 1
#initclip 27
Object.registerClass("gameOverDialog", com.novelgames.flashgames.juggling.GameOverDialog);
#endinitclip
Symbol 74 MovieClip [gameOverDialog] Frame 20
showFinished();
Symbol 76 MovieClip [scorePopup] Frame 1
#initclip 20
Object.registerClass("scorePopup", com.novelgames.flashgames.juggling.ScorePopup);
#endinitclip
Symbol 87 MovieClip [lifeBar] Frame 1
#initclip 21
Object.registerClass("lifeBar", com.novelgames.flashgames.juggling.LifeBar);
#endinitclip
Symbol 89 MovieClip [explode] Frame 1
#initclip 22
Object.registerClass("explode", com.novelgames.flashgames.juggling.Explode);
#endinitclip
Symbol 92 MovieClip [ball] Frame 1
#initclip 23
Object.registerClass("ball", com.novelgames.flashgames.juggling.Ball);
#endinitclip
Symbol 94 MovieClip [hand] Frame 1
#initclip 24
Object.registerClass("hand", com.novelgames.flashgames.juggling.Hand);
#endinitclip
Symbol 100 MovieClip [muteButton] Frame 1
#initclip 25
Object.registerClass("muteButton", com.novelgames.flashgames.common.MuteButton);
#endinitclip
Symbol 105 MovieClip [game] Frame 1
#initclip 26
Object.registerClass("game", com.novelgames.flashgames.juggling.Game);
#endinitclip