Frame 1
_root.gameData = "<gamedata seed=\"204057540\" mode=\"short2\">\t<text id=\"livesleft\">Lives</text> <text id=\"instructions_starts_in\">Game starts in {0} seconds</text> <text id=\"time_bonus\">Time Bonus</text> <text id=\"timeleft\">Time left</text> <text id=\"score\">Score</text> <text id=\"gameover_sad_header\">AY AY AY!</text> <text id=\"gameover_happy_header\">ARriba!</text> <text id=\"gameover_total_score\">Total Score</text> <text id=\"gameover_time_to_exit\">Time to exit {0}</text> <text id=\"instructions_text1\">Welcome to Boneyard Bonanza. Try to build complete skeletons. Single coloured ones gives more points.</text> <text id=\"instructions_text2\">Click coffin to add bones...</text> <text id=\"instructions_text3\">But not same bone twice!</text> <text id=\"instructions_text4\">Complete in same color to get to the bonus mode.</text> <text id=\"instructions_text5\">Send bone in same color to increase bonus score</text> <text id=\"instructions_text6\">To achieve bonus throw in a bone in another colour.</text> <text id=\"instructions_text7\">To achieve bonus throw in a bone in another colour.</text>\t<text id=\"open_game_over\">Register to continue playing and complete the game!</text></gamedata>";
_root.gamemode = 2;
var game = (new com.midasplayer.game.boneyardbonanza.Game());
_root.gamemode = 2;
var game = (new com.midasplayer.game.boneyardbonanza.Game());
stop();
Symbol 22 MovieClip [zzzzzzzz] Frame 1
#initclip 44
Object.registerClass("zzzzzzzz", IF3_2304340382);
#endinitclip
Symbol 811 MovieClip [skeleton_part] Frame 1
#initclip 45
Object.registerClass("skeleton_part", com.midasplayer.game.boneyardbonanza.SkeletonPart);
#endinitclip
Symbol 863 MovieClip [gui] Frame 1
#initclip 43
Object.registerClass("gui", com.midasplayer.game.boneyardbonanza.GUI);
#endinitclip
Symbol 1045 MovieClip [coffin] Frame 1
#initclip 46
Object.registerClass("coffin", com.midasplayer.game.boneyardbonanza.Coffin);
#endinitclip
Symbol 1207 MovieClip [instructions] Frame 1
_root.gameData = "<gamedata seed=\"204057540\" mode=\"short2\">\t<text id=\"livesleft\">Liv</text> <text id=\"time_bonus\">Time Bonus</text> <text id=\"timeleft\">Tid kvar</text> <text id=\"score\">Po\u00E4ng</text> <text id=\"gameover_sad_header\">AY Caramba!</text> <text id=\"gameover_happy_header\">ARriba!</text> <text id=\"gameover_total_score\">Total Score</text> <text id=\"gameover_time_to_exit\">Time to exit {0}</text> <text id=\"instructions_text1\">Welcome to Boneyard Bonanza. Try to build complete skeletons. Single coloured ones gives more points.</text> <text id=\"instructions_text2\">Click coffin to add bones...</text> <text id=\"instructions_text3\">But not same bone twice!</text> <text id=\"instructions_text4\">Complete in same color to get to the bonus mode.</text> <text id=\"instructions_text5\">Send bone in same color to increase bonus score</text> <text id=\"instructions_text6\">To achieve bonus throw in a bone in another colour.</text> <text id=\"instructions_text7\">To achieve bonus throw in a bone in another colour.</text>\t<text id=\"open_game_over\">Register to continue playing and complete the game!</text></gamedata>";
_root.gamemode = 2;
var game = (new com.midasplayer.game.boneyardbonanza.Game());
Symbol 1208 MovieClip [__Packages.IF3_2304340382] Frame 0
class IF3_2304340382
{
function IF3_2304340382 () {
}
}
Symbol 1209 MovieClip [__Packages.com.midasplayer.util.GameBase] Frame 0
class com.midasplayer.util.GameBase
{
static var playDataEntryId_, playData_, gameData, game_, checkGameDataIntervalId_;
function GameBase () {
gameMode_ = GAME_MODE_MONEY;
playDataEntryId_ = 0;
playData_ = "";
}
function startGame() {
}
static function setGameMode(gameMode) {
gameMode_ = gameMode;
}
static function getGameMode() {
return(gameMode_);
}
static function setGameType(gameType) {
gameType_ = gameType;
}
static function getGameType() {
return(gameType_);
}
static function getGameData() {
return(gameData);
}
static function reportGameStart() {
com.midasplayer.util.Log.debug("gameStart");
}
static function reportGameEnd(score) {
com.midasplayer.util.Log.debug("gameEnd " + String(score));
playData_ = (("<result><![CDATA[" + score) + "]]></result>\n") + playData_;
}
static function reportGameQuit() {
com.midasplayer.util.Log.debug("gameQuit");
}
function reportGameOver(score) {
com.midasplayer.util.Log.debug("gameOver " + String(score));
}
static function reportPlayData(pCode, pData, pScore) {
if (gameMode_ != GAME_MODE_MONEY) {
return(undefined);
}
var Register_1_ = undefined;
Register_1_ = String(pCode);
if ((pData != null) && (pData.length > 0)) {
Register_1_ = Register_1_ + ("," + pData);
}
if (((pScore != undefined) && (pScore != null)) && (pScore.length > 0)) {
Register_1_ = Register_1_ + ("=" + pScore);
}
com.midasplayer.util.Log.debug("playData " + Register_1_);
playDataEntryId_++;
playData_ = playData_ + (("<entry id=\"" + playDataEntryId_) + "\"");
playData_ = playData_ + " time=\"2007-08-27 12:13:45\">";
playData_ = playData_ + (("<![CDATA[" + Register_1_) + "]]></entry>\n");
}
static function getPlayData() {
trace("get Play Data");
var Register_1_ = newline;
Register_1_ = Register_1_ + "<midas>\n";
Register_1_ = Register_1_ + "<client action=\"gameover\" slotId=\"57990\" playId=\"0\" request=\"3\" magic=\"443172449\">\n";
Register_1_ = Register_1_ + (("<gameover time=\"2007-08-27 12:14:01\" lastplaydataid=\"" + playDataEntryId_) + "\" elapsed=\"18000\" sync=\"0\" cheat=\"0\">\n");
Register_1_ = Register_1_ + playData_;
Register_1_ = Register_1_ + "</gameover>\n";
Register_1_ = Register_1_ + "</client>\n";
Register_1_ = Register_1_ + "</midas>";
return(Register_1_);
}
static function runsLocal() {
return(_root._URL.substr(0, 5).toLowerCase() == "file:");
}
function init(game) {
trace("init");
game_ = game;
checkGameDataIntervalId_ = setInterval(this, "checkGameData", 200);
}
function checkGameData() {
if (!hasGameData_) {
if (((_root.gameData != null) && (_root.gameData != undefined)) && (_root.gameData != "")) {
trace("Poiner");
hasGameData_ = true;
parseGameData(_root.gameData);
clearInterval(checkGameDataIntervalId_);
game_.startGame();
}
}
}
function parseGameData(myData) {
gameData = new com.midasplayer.util.Map();
var Register_2_ = new XML();
Register_2_.ignoreWhite = true;
Register_2_.parseXML(myData);
var Register_3_ = Register_2_.firstChild;
if (Register_3_.nodeName == "gamedata") {
trace("Pointer2");
parseChild(Register_3_, "");
}
}
function parseGameFileData() {
var Register_5_ = _root.gameFileData;
var Register_3_ = new XML();
Register_3_.ignoreWhite = true;
Register_3_.parseXML(Register_5_);
var Register_4_ = Register_3_.firstChild;
if (Register_4_.nodeName == "gamedata") {
parseChild(Register_4_, "");
}
}
function parseChild(child, parentName) {
if (child == null) {
return(undefined);
}
var Register_3_ = parentName;
if (child.nodeName == "gamedata") {
Register_3_ = "";
} else if (parentName.length > 0) {
Register_3_ = (parentName + ".") + child.nodeName;
} else {
Register_3_ = child.nodeName;
}
if (child.nodeName == "text") {
com.midasplayer.util.I18n.addTranslation(String(child.attributes.id), String(child.firstChild));
}
for (var Register_6_ in child.attributes) {
var Register_5_ = undefined;
var Register_2_ = child.attributes[Register_6_];
if (Register_6_ == "id") {
Register_3_ = Register_3_ + ("." + Register_2_);
} else if (Register_3_.length > 0) {
gameData.put((Register_3_ + ".") + Register_6_, Register_2_);
} else {
gameData.put(Register_6_, Register_2_);
}
}
if (!child.firstChild.hasChildNodes()) {
gameData.put(Register_3_, child.firstChild);
} else {
parseChild(child.firstChild, Register_3_);
}
if (child.nextSibling != null) {
parseChild(child.nextSibling, parentName);
}
}
static var GAME_MODE_DEBUG = 0;
static var GAME_MODE_PRACTICE = 1;
static var GAME_MODE_MONEY = 2;
static var GAME_TYPE_SINGLE = 0;
static var GAME_TYPE_MULTI = 1;
static var gameMode_ = GAME_MODE_DEBUG;
static var gameType_ = GAME_TYPE_SINGLE;
static var hasGameData_ = false;
}
Symbol 1210 MovieClip [__Packages.com.midasplayer.util.ArrayList] Frame 0
class com.midasplayer.util.ArrayList
{
var value;
function ArrayList () {
value = new Array();
}
function insert(obj, pos) {
var Register_3_ = value.length;
if (pos == undefined) {
value.push(obj);
return(Register_3_);
}
if (pos > Register_3_) {
pos = Register_3_;
}
var Register_2_ = (Register_3_ - 1);
while (Register_2_ > (pos - 1)) {
value[Register_2_ + 1] = value[Register_2_];
Register_2_--;
}
value[pos] = obj;
return(pos);
}
function get(pos) {
return(value[pos]);
}
function indexOf(obj) {
var Register_2_ = 0;
while (Register_2_ < value.length) {
if (obj == value[Register_2_]) {
return(Register_2_);
}
Register_2_++;
}
return(-1);
}
function remove(obj) {
return(removeByIndex(indexOf(obj)));
}
function removeByIndex(pos) {
var Register_5_ = undefined;
var Register_3_ = value.length;
if ((pos < Register_3_) && (pos >= 0)) {
Register_5_ = value[pos];
delete value[pos];
var Register_2_ = pos;
while (Register_2_ < (Register_3_ - 1)) {
value[Register_2_] = value[Register_2_ + 1];
Register_2_++;
}
value.length = Register_3_ - 1;
}
return(Register_5_);
}
function size() {
return(value.length);
}
function clear() {
value = new Array();
}
function toArray() {
return(value);
}
function foreach(fn) {
var Register_2_ = 0;
var Register_3_ = value.length;
while (Register_2_ < Register_3_) {
if (fn(Register_2_, value[Register_2_]) == false) {
return(undefined);
}
Register_2_++;
}
}
function sortOn(field) {
value.sortOn(field);
}
function sort() {
value.sort();
}
function subList(from, to) {
if (!to) {
to = value.length;
}
var Register_3_ = (new com.midasplayer.util.ArrayList());
var Register_2_ = from;
while (Register_2_ < to) {
Register_3_.insert(get(Register_2_));
Register_2_++;
}
return(Register_3_);
}
}
Symbol 1211 MovieClip [__Packages.com.midasplayer.util.Log] Frame 0
class com.midasplayer.util.Log
{
function Log () {
}
static function setLevel(level) {
level_ = level;
}
static function debug(msg) {
if (level_ <= LEVEL_DEBUG) {
log_.insert(new com.midasplayer.util.LogEntry(LEVEL_DEBUG, msg));
}
}
static function warning(msg) {
if (level_ <= LEVEL_WARNING) {
log_.insert(new com.midasplayer.util.LogEntry(LEVEL_WARNING, msg));
}
}
static function error(msg) {
if (level_ <= LEVEL_ERROR) {
log_.insert(new com.midasplayer.util.LogEntry(LEVEL_ERROR, msg));
}
}
static function getLog() {
if (log_.size() != logStringLastUpdatedSize_) {
logString_ = "";
var Register_1_ = 0;
while (Register_1_ < log_.size()) {
var Register_2_ = com.midasplayer.util.LogEntry(log_.get(Register_1_));
if (Register_1_ > 0) {
logString_ = logString_ + newline;
}
logString_ = logString_ + LEVEL_STRINGS[Register_2_.getLevel()];
logString_ = logString_ + ": ";
logString_ = logString_ + Register_2_.getMessage();
logStringLastUpdatedSize_ = log_.size();
Register_1_++;
}
}
return(logString_);
}
static var LEVEL_ALL = -1;
static var LEVEL_NONE = 1000;
static var LEVEL_DEBUG = 0;
static var LEVEL_WARNING = 1;
static var LEVEL_ERROR = 2;
static var LEVEL_STRINGS = ["DEBUG", "WARNING", "ERROR"];
static var level_ = LEVEL_ALL;
static var log_ = new com.midasplayer.util.ArrayList();
static var logString_ = "";
static var logStringLastUpdatedSize_ = 0;
}
Symbol 1212 MovieClip [__Packages.com.midasplayer.util.LogEntry] Frame 0
class com.midasplayer.util.LogEntry
{
var level_, message_;
function LogEntry (level, msg) {
level_ = level;
message_ = msg;
}
function getLevel() {
return(level_);
}
function getMessage() {
return(message_);
}
}
Symbol 1213 MovieClip [__Packages.com.midasplayer.util.Map] Frame 0
class com.midasplayer.util.Map
{
var map, lastSize;
function Map (init) {
map = new Object();
for (var Register_3_ in init) {
map["@" + Register_3_] = init[Register_3_];
}
lastSize = -1;
}
function put(key, value) {
map["@" + key] = value;
lastSize = -1;
}
function get(key) {
return(map["@" + key]);
}
function remove(key) {
var Register_2_ = map["@" + key];
delete map["@" + key];
lastSize = -1;
return(Register_2_);
}
function count() {
if (lastSize < 0) {
lastSize = 0;
for (var Register_2_ in map) {
lastSize++;
}
}
return(lastSize);
}
function size() {
return(count());
}
function clear() {
map = {};
lastSize = 0;
}
function dump() {
var Register_2_ = "";
for (var Register_3_ in map) {
Register_2_ = Register_2_ + "x";
Register_2_ = Register_2_ + (((Register_3_ + "=>") + map[Register_3_]) + newline);
}
trace(Register_2_);
}
function toArray() {
var Register_2_ = [];
for (var Register_3_ in map) {
Register_2_[Register_2_.length] = map[Register_3_];
}
return(Register_2_);
}
function keySet() {
var Register_2_ = [];
for (var Register_3_ in map) {
Register_2_[Register_2_.length] = Register_3_.substring(1);
}
return(Register_2_);
}
function foreach(fn) {
do {
if ((in map) == null) {
break;
}
var Register_3_ = (in map);
} while (fn(Register_3_.substring(1), map[Register_3_]) != false);
do {
} while ("foreach" != null);
lastSize = -1;
}
}
Symbol 1214 MovieClip [__Packages.com.midasplayer.util.I18n] Frame 0
class com.midasplayer.util.I18n
{
function I18n () {
}
static function addTranslation(name, val) {
val = val.split("'").join("'");
val = val.split("&").join("&");
val = val.split("\r\n").join(newline);
translations_.put(name, val);
}
static function format(name, replace0, replace1, replace2) {
var Register_3_ = translations_.get(name);
if (Register_3_ == undefined) {
return(("{" + name) + "}");
}
var Register_1_ = Register_3_.toString();
if (replace0 != undefined) {
var Register_2_ = Register_1_.split("{0}");
Register_1_ = Register_2_.join(replace0);
if (replace1 != undefined) {
Register_2_ = Register_1_.split("{1}");
Register_1_ = Register_2_.join(replace1);
if (replace2 != undefined) {
Register_2_ = Register_1_.split("{2}");
Register_1_ = Register_2_.join(replace2);
}
}
}
return(Register_1_);
}
static var translations_ = new com.midasplayer.util.Map();
}
Symbol 1215 MovieClip [__Packages.com.midasplayer.timing.Timeable] Frame 0
interface com.midasplayer.timing.Timeable
{
}
Symbol 1216 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.Game] Frame 0
class com.midasplayer.game.boneyardbonanza.Game extends com.midasplayer.util.GameBase implements com.midasplayer.timing.Timeable
{
var init, seed_, baseLayer_, sceneLayer_, overlayLayer_, scene_, gui_, timer_, introAnimId_, gameEnded_, drScore;
function Game () {
super();
trace("game");
Stage.scaleMode = "noScale";
Stage.showMenu = false;
_root._quality = "high";
_root._focusrect = false;
com.midasplayer.util.GameBase.setGameMode(_root.gamemode);
init(this);
trace("game_mode:" + _root.gamemode);
}
function startGame() {
trace("startgame");
seed_ = int(Math.random() * 10000000000) + 1;
trace("seed" + seed_);
baseLayer_ = _root;
sceneLayer_ = baseLayer_.createEmptyMovieClip("scenelayer", baseLayer_.getNextHighestDepth());
overlayLayer_ = baseLayer_.createEmptyMovieClip("overlaylayer", baseLayer_.getNextHighestDepth());
sceneLayer_.attachMovie("bg", "bg", sceneLayer_.getNextHighestDepth());
scene_ = new com.midasplayer.game.boneyardbonanza.Scene(this, sceneLayer_);
gui_ = com.midasplayer.game.boneyardbonanza.GUI(overlayLayer_.attachMovie("gui", "gui", overlayLayer_.getNextHighestDepth()));
timer_ = new com.midasplayer.timing.Timer(this, TPS);
var Register_3_ = _root.createEmptyMovieClip("gametimer", _root.getNextHighestDepth());
Register_3_.onEnterFrame = mx.utils.Delegate.create(timer_, timer_.advanceTime2);
showIntro();
}
function showIntro() {
var Register_2_ = (new com.midasplayer.game.boneyardbonanza.anim.IntroAnim(this, scene_, sceneLayer_));
introAnimId_ = com.midasplayer.util.AnimPlayer.addAnim(Register_2_);
}
function introEnd() {
start();
}
function tick(tick) {
com.midasplayer.util.AnimPlayer.tick(tick);
if ((scene_ != undefined) && (!gameEnded_)) {
scene_.tick(tick);
}
}
function render(tick, alpha) {
com.midasplayer.util.TimeVerifier.checkTime();
com.midasplayer.util.AnimPlayer.render(tick, alpha);
if ((scene_ != undefined) && (!gameEnded_)) {
scene_.render(tick, alpha);
}
}
function start() {
trace("start");
com.midasplayer.util.GameBase.reportGameStart();
com.midasplayer.util.GameBase.reportPlayData(19, (("" + VERSION) + " ") + seed_, "0");
com.midasplayer.fx.SoundManager.play("VariableNamed_boneyard_loopk2", 35, true);
gui_.removeMovieClip();
scene_.start();
}
function getSeed() {
return(seed_);
}
function getScene() {
return(scene_);
}
function getSceneLayer() {
return(sceneLayer_);
}
function getOverlayLayer() {
return(overlayLayer_);
}
function endGamePressed() {
endGame();
}
function endGame(score) {
trace("DR-Endgame" + score);
drScore = score;
if (gameEnded_) {
return(undefined);
}
gameEnded_ = true;
com.midasplayer.util.GameBase.reportGameEnd(score);
com.midasplayer.fx.SoundManager.stopAll();
com.midasplayer.fx.SoundManager.play("VariableNamed_boneyard_outrok2", 50);
if (scene_.getNumSkeletonsCompleted() >= 10) {
var Register_2_ = (new com.midasplayer.game.boneyardbonanza.anim.GameOverHappyAnim(this, scene_, sceneLayer_));
introAnimId_ = com.midasplayer.util.AnimPlayer.addAnim(Register_2_);
return(undefined);
}
var Register_2_ = (new com.midasplayer.game.boneyardbonanza.anim.GameOverSadAnim(this, scene_, sceneLayer_));
introAnimId_ = com.midasplayer.util.AnimPlayer.addAnim(Register_2_);
}
function quitGame() {
trace("quitGame+" + drScore);
sendscore = new LoadVars();
sendscore.gscore = drScore;
sendscore.gname = "BoneyardBonanzaAS2v2DR";
sendscore.send("index.php?act=Arcade&do=newscore", "_self", "POST");
}
function quitGame2() {
com.midasplayer.fx.SoundManager.stopAll();
com.midasplayer.util.GameBase.reportGameQuit();
}
static var TPS = 25;
static var VERSION = "1";
static var DEBUG_MODE = true;
}
Symbol 1217 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.Scene] Frame 0
class com.midasplayer.game.boneyardbonanza.Scene
{
var game_, layer_, tick_, score_, bonus_, numSkeletonsCompleted_, timeWarningPlayed_, cuePlayed_, lifeOverClip_, numParts_, numCoffins_, numColors_, maxTime_, numLives_, spawnTime_, bonusTime_, random_, guiLayer_, coffinsLayer_, spawnLayer_, skeletonLayer_, scorePopLayer_, gui_, coffins_, spawnArea_, started_, clickedCoffin_, endGamePressed_, endGameTick_;
function Scene (game, layer) {
game_ = game;
layer_ = layer;
tick_ = 0;
score_ = 0;
bonus_ = 0;
numSkeletonsCompleted_ = 0;
timeWarningPlayed_ = false;
cuePlayed_ = false;
lifeOverClip_ = undefined;
numParts_ = 6;
numCoffins_ = 6;
numColors_ = 3;
maxTime_ = 180;
if (com.midasplayer.util.GameBase.gameData.get("mode") == "short") {
maxTime_ = 60;
}
numLives_ = 5;
spawnTime_ = 5;
bonusTime_ = 15;
}
function init() {
random_ = new com.midasplayer.util.Random(game_.getSeed());
guiLayer_ = layer_.createEmptyMovieClip("guilayer", layer_.getNextHighestDepth());
coffinsLayer_ = layer_.createEmptyMovieClip("coffinsLayer", layer_.getNextHighestDepth());
spawnLayer_ = layer_.createEmptyMovieClip("spawnLayer", layer_.getNextHighestDepth());
skeletonLayer_ = layer_.createEmptyMovieClip("skeletonLayer", layer_.getNextHighestDepth());
scorePopLayer_ = layer_.createEmptyMovieClip("scorepopLayer", layer_.getNextHighestDepth());
initGUI();
initCoffins();
initSpawnArea();
}
function random(n) {
return(random_.nextInt(n));
}
function initGUI() {
gui_ = com.midasplayer.game.boneyardbonanza.GUI(guiLayer_.attachMovie("gui", "gui", guiLayer_.getNextHighestDepth()));
gui_.init(this);
}
function initCoffins() {
coffins_ = new com.midasplayer.util.ArrayList();
var Register_2_ = 0;
while (Register_2_ < 6) {
var Register_4_ = coffinsLayer_.getNextHighestDepth();
var Register_3_ = com.midasplayer.game.boneyardbonanza.Coffin(coffinsLayer_.attachMovie("coffin", "coffin" + Register_2_, Register_4_));
Register_3_.init(this, game_, Register_2_);
Register_3_._visible = false;
coffins_.insert(Register_3_);
Register_2_++;
}
}
function initSpawnArea() {
spawnArea_ = new com.midasplayer.game.boneyardbonanza.SpawnArea(this, game_.getSeed(), spawnLayer_, skeletonLayer_);
}
function getCoffins() {
return(coffins_);
}
function getScorePopLayer() {
return(scorePopLayer_);
}
function addSpawnTime() {
spawnTime_++;
}
function subSpawnTime() {
if (spawnTime_ > 1) {
spawnTime_--;
}
}
function addBonusTime() {
bonusTime_++;
}
function subBonusTime() {
if (bonusTime_ > 2) {
bonusTime_--;
}
}
function addCoffin() {
if (numCoffins_ < 6) {
numCoffins_++;
}
}
function subCoffin() {
if (numCoffins_ > 1) {
var Register_2_ = com.midasplayer.game.boneyardbonanza.Coffin(coffins_.get(numCoffins_ - 1));
Register_2_.removeSkeletonNormal();
Register_2_.empty();
numCoffins_--;
}
}
function addColor() {
if (numColors_ < 6) {
numColors_++;
}
}
function subColor() {
if (numColors_ > 1) {
numColors_--;
}
}
function start() {
init();
started_ = true;
}
function getNumCoffins() {
return(numCoffins_);
}
function getNumColors() {
return(numColors_);
}
function getNumParts() {
return(numParts_);
}
function skeletonCompleted() {
numSkeletonsCompleted_++;
}
function getNumSkeletonsCompleted() {
return(numSkeletonsCompleted_);
}
function isPlaceable(part) {
var Register_2_ = 0;
while (Register_2_ < numCoffins_) {
var Register_3_ = com.midasplayer.game.boneyardbonanza.Coffin(coffins_.get(Register_2_));
if (Register_3_.isBonus()) {
return(true);
}
if (!Register_3_.hasPart(part)) {
return(true);
}
Register_2_++;
}
return(false);
}
function getTimeLeft() {
var Register_2_ = (maxTime_ - Math.floor(tick_ / com.midasplayer.game.boneyardbonanza.Game.TPS));
if (Register_2_ < 0) {
Register_2_ = 0;
}
return(Register_2_);
}
function getScore() {
return(score_);
}
function addScore(score) {
score_ = score_ + score;
if (score_ < 0) {
score_ = 0;
}
}
function addBonus(bonus) {
bonus_ = bonus_ + bonus;
}
function getBonus() {
return(bonus_);
}
function getNumLives() {
return(numLives_);
}
function getSpawnTime() {
return(com.midasplayer.game.boneyardbonanza.Game.TPS * spawnTime_);
}
function getBonusTime() {
return(com.midasplayer.game.boneyardbonanza.Game.TPS * bonusTime_);
}
function removeLife() {
numLives_--;
if (numLives_ < 0) {
numLives_ = 0;
}
com.midasplayer.fx.SoundManager.play("VariableNamed_loose_lifek2", 100);
if (numLives_ == 0) {
com.midasplayer.fx.SoundManager.play("VariableNamed_no_more_lifek1", 50);
}
gui_.removeLife();
}
function coffinClicked(coffin) {
clickedCoffin_ = com.midasplayer.game.boneyardbonanza.Coffin(coffins_.get(coffin));
}
function isEndGamePressed() {
return(endGamePressed_);
}
function endGamePressed() {
if (!endGamePressed_) {
com.midasplayer.util.GameBase.reportPlayData(33, "" + tick_, "0");
endGamePressed_ = true;
}
}
function endGame() {
com.midasplayer.util.GameBase.reportPlayData(17, "" + tick_, "0");
game_.endGame(score_);
}
function enterBonusMode() {
var Register_4_ = 0;
var Register_2_ = 0;
while (Register_2_ < numCoffins_) {
var Register_3_ = com.midasplayer.game.boneyardbonanza.Coffin(coffins_.get(Register_2_));
if (Register_3_.isBonus()) {
Register_4_++;
}
Register_2_++;
}
if ((!cuePlayed_) && (Register_4_ == 1)) {
com.midasplayer.fx.SoundManager.stop("VariableNamed_boneyard_loopk2");
com.midasplayer.fx.SoundManager.play("VariableNamed_bonus_cuek2", 40, false, mx.utils.Delegate.create(this, playBonusSound));
return(undefined);
}
if (cuePlayed_ && (Register_4_ == 1)) {
com.midasplayer.fx.SoundManager.play("VariableNamed_boneyard_bonusloopk3", 40, true);
return(undefined);
}
if (cuePlayed_ && (Register_4_ == 2)) {
com.midasplayer.fx.SoundManager.stop("VariableNamed_boneyard_bonusloopk3");
com.midasplayer.fx.SoundManager.play("VariableNamed_boneyard_bonusloop_raise1k2", 40, true);
return(undefined);
}
if (cuePlayed_ && (Register_4_ == 3)) {
com.midasplayer.fx.SoundManager.stop("VariableNamed_boneyard_bonusloop_raise1k2");
com.midasplayer.fx.SoundManager.play("VariableNamed_boneyard_bonusloop_raise2k2", 40, true);
}
}
function playBonusSound() {
cuePlayed_ = true;
com.midasplayer.fx.SoundManager.play("VariableNamed_maraccas_loopk1", 40, true);
enterBonusMode();
}
function leaveBonusMode(success) {
var Register_4_ = 0;
var Register_2_ = 0;
while (Register_2_ < numCoffins_) {
var Register_3_ = com.midasplayer.game.boneyardbonanza.Coffin(coffins_.get(Register_2_));
if (Register_3_.isBonus()) {
Register_4_++;
}
Register_2_++;
}
if (success) {
com.midasplayer.fx.SoundManager.play("VariableNamed_arribak2", 60);
} else if (Register_4_ == 0) {
com.midasplayer.fx.SoundManager.play("VariableNamed_ayayayk2", 60);
} else {
com.midasplayer.fx.SoundManager.play("VariableNamed_ayayayk3", 60);
}
if (Register_4_ == 0) {
com.midasplayer.fx.SoundManager.stop("VariableNamed_bonus_cuek2");
com.midasplayer.fx.SoundManager.stop("VariableNamed_boneyard_bonusloopk3");
com.midasplayer.fx.SoundManager.stop("VariableNamed_maraccas_loopk1");
com.midasplayer.fx.SoundManager.play("VariableNamed_boneyard_loopk2", 35, true);
cuePlayed_ = false;
return(undefined);
}
if (Register_4_ == 1) {
com.midasplayer.fx.SoundManager.stop("VariableNamed_boneyard_bonusloop_raise1k2");
com.midasplayer.fx.SoundManager.play("VariableNamed_boneyard_bonusloopk3", 40, true);
return(undefined);
}
if (Register_4_ == 2) {
com.midasplayer.fx.SoundManager.stop("VariableNamed_boneyard_bonusloop_raise2k2");
com.midasplayer.fx.SoundManager.play("VariableNamed_boneyard_bonusloop_raise1k2", 40, true);
}
}
function tick(tick) {
if (!started_) {
return(undefined);
}
if (((numLives_ == 0) || (getTimeLeft() == 0)) || (endGamePressed_)) {
if (numLives_ == 0) {
if (lifeOverClip_ == undefined) {
lifeOverClip_ = scorePopLayer_.attachMovie("gameover_life", "gameover_life", scorePopLayer_.getNextHighestDepth());
lifeOverClip_.clip.txt.text = com.midasplayer.util.I18n.format("out_of_lives");
lifeOverClip_.clip.txt2.text = com.midasplayer.util.I18n.format("out_of_lives");
lifeOverClip_._x = 165;
lifeOverClip_._y = 150;
}
}
var Register_2_ = 0;
while (Register_2_ < 6) {
var Register_3_ = com.midasplayer.game.boneyardbonanza.Coffin(coffins_.get(Register_2_));
if (Register_3_.isBonus()) {
Register_3_.collectBonus();
}
Register_3_.noMouseOver();
Register_2_++;
}
if (com.midasplayer.util.AnimPlayer.getNumAnims() == 0) {
if (endGameTick_ == undefined) {
endGameTick_ = tick;
}
var Register_4_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, endGameTick_, 10);
if (Register_4_ == 1) {
endGame();
}
}
return(undefined);
}
if ((getTimeLeft() == 5) && (!timeWarningPlayed_)) {
com.midasplayer.fx.SoundManager.play("VariableNamed_time_warningk2", 40);
timeWarningPlayed_ = true;
}
if (spawnArea_.isEmpty()) {
spawnArea_.spawn(getSpawnTime());
}
spawnArea_.increaseTime();
spawnArea_.displayTime();
if (clickedCoffin_ != undefined) {
com.midasplayer.util.GameBase.reportPlayData(21, (("" + tick_) + " ") + clickedCoffin_.getNum(), "0");
if ((!spawnArea_.isEmpty()) && (!spawnArea_.isTimesUp())) {
if ((!clickedCoffin_.isBonus()) && (clickedCoffin_.hasPart(spawnArea_.getPart()))) {
clickedCoffin_.wrongClick(spawnArea_.getPart());
} else {
clickedCoffin_.addPart(spawnArea_.getPart());
spawnArea_.removePart();
}
}
clickedCoffin_ = undefined;
}
var Register_2_ = 0;
while (Register_2_ < 6) {
var Register_3_ = com.midasplayer.game.boneyardbonanza.Coffin(coffins_.get(Register_2_));
Register_3_.tick();
Register_2_++;
}
tick_++;
}
function render(tick, alpha) {
if (!started_) {
return(undefined);
}
var Register_2_ = 0;
while (Register_2_ < 6) {
var Register_3_ = com.midasplayer.game.boneyardbonanza.Coffin(coffins_.get(Register_2_));
if (Register_2_ < numCoffins_) {
Register_3_._visible = true;
} else {
Register_3_._visible = false;
}
Register_2_++;
}
gui_.render(tick, alpha);
}
}
Symbol 1218 MovieClip [__Packages.com.midasplayer.util.Random] Frame 0
class com.midasplayer.util.Random
{
var mta, mti, lastSeed;
function Random (aSeed) {
mta = new Array(N);
mti = N + 1;
if (aSeed != undefined) {
init_genrand(aSeed);
}
}
function set seed(s) {
init_genrand(s);
//return(seed);
}
function get seed() {
return(lastSeed);
}
function nextInt(n) {
return((genrand_int32() & 2147483647) % n);
}
function nextFloat() {
return(next(24) / 16777216);
}
function next(bits) {
if (bits < 32) {
return(genrand_int32() & ((1 << bits) - 1));
}
return(genrand_int32());
}
function init_genrand(s) {
var Register_5_ = getTimer();
lastSeed = s;
mta[0] = s;
var Register_2_ = s;
var Register_3_ = (new com.midasplayer.util.Integer64());
mti = 1;
while (mti < N) {
Register_3_.init32((Register_2_ >>> 30) ^ Register_2_);
Register_3_.mulu32(1812433253);
Register_2_ = (mta[mti] = Register_3_.lsb + mti);
mti++;
}
var Register_6_ = getTimer();
}
function genrand_int32() {
var Register_3_ = 0;
if (mti >= N) {
if (mti == (N + 1)) {
init_genrand(5489);
}
var Register_4_ = getTimer();
var Register_2_ = 0;
Register_2_ = 0;
while (Register_2_ < (N - M)) {
Register_3_ = (mta[Register_2_] & UPPER_MASK) | (mta[Register_2_ + 1] & LOWER_MASK);
mta[Register_2_] = (mta[Register_2_ + M] ^ (Register_3_ >>> 1)) ^ mag01[Register_3_ & 1];
Register_2_++;
}
Register_2_ = Register_2_;
while (Register_2_ < (N - 1)) {
Register_3_ = (mta[Register_2_] & UPPER_MASK) | (mta[Register_2_ + 1] & LOWER_MASK);
mta[Register_2_] = (mta[Register_2_ + (M - N)] ^ (Register_3_ >>> 1)) ^ mag01[Register_3_ & 1];
Register_2_++;
}
Register_3_ = (mta[N - 1] & UPPER_MASK) | (mta[0] & LOWER_MASK);
mta[N - 1] = (mta[M - 1] ^ (Register_3_ >>> 1)) ^ mag01[Register_3_ & 1];
mti = 0;
var Register_5_ = getTimer();
}
Register_3_ = mta[mti++];
Register_3_ = Register_3_ ^ (Register_3_ >>> 11);
Register_3_ = Register_3_ ^ ((Register_3_ << 7) & 2636928640);
Register_3_ = Register_3_ ^ ((Register_3_ << 15) & 4022730752);
Register_3_ = Register_3_ ^ (Register_3_ >>> 18);
return(Register_3_);
}
static var N = 624;
static var M = 397;
static var MATRIX_A = 2567483615;
static var UPPER_MASK = 2147483648;
static var LOWER_MASK = 2147483647;
static var mag01 = [0, 2567483615];
}
Symbol 1219 MovieClip [__Packages.com.midasplayer.util.Integer64] Frame 0
class com.midasplayer.util.Integer64
{
var r, p, s;
function Integer64 (lowInt) {
r = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]];
p = [0, 0, 0, 0, 0];
s = [0, 0, 0];
if (lowInt != undefined) {
merge(lowInt);
}
}
function init(v) {
var Register_2_ = 0;
while (Register_2_ < p.length) {
p[Register_2_] = v.p[Register_2_];
Register_2_++;
}
}
function init32(n) {
p[0] = n & 32767;
n = n >>> 15;
p[1] = n & 32767;
n = n >>> 15;
p[2] = n & 3;
p[3] = 0;
p[4] = 0;
}
function get lsb() {
return((p[0] | (p[1] << SH)) | ((p[2] & 3) << 30));
}
function get msb() {
return((((p[2] >> 2) | ((p[3] << SH) >> 2)) | ((p[4] << (SH * 2)) >> 2)) & 2147483647);
}
function binaryShiftLeft(step) {
var Register_2_ = 0;
while (Register_2_ < step) {
shl();
Register_2_++;
}
}
function binaryShiftRight(step) {
var Register_4_ = ((step / SH) >> 0);
var Register_5_ = (step - (Register_4_ * SH));
var Register_2_ = (p.length - 1);
while (Register_2_ > 0) {
var Register_3_ = 0;
while (Register_3_ < Register_4_) {
p[Register_3_] = p[Register_3_ + 1];
Register_3_++;
}
p[Register_2_--] = 0;
}
if (Register_5_ > 0) {
var Register_3_ = 0;
while (Register_3_ < Register_5_) {
shr();
Register_3_++;
}
}
}
function binaryNot(o) {
p[0] = p[0] ^ o.p[0];
p[1] = p[1] ^ o.p[1];
p[2] = p[2] ^ o.p[2];
p[3] = p[3] ^ o.p[3];
p[4] = p[4] ^ o.p[4];
}
function add64(o) {
var Register_4_ = 0;
var Register_3_ = 1;
var Register_2_ = 0;
Register_3_ = Register_3_;
while ((Register_3_ < p.length) && (o.p[Register_2_] != 0)) {
Register_3_++;
}
Register_2_ = 0;
while (Register_2_ < Register_3_) {
p[Register_2_] = ((Register_4_ = Register_4_ + (p[Register_2_] + o.p[Register_2_]))) & MASK;
Register_4_ = Register_4_ >> SH;
Register_2_++;
}
}
function add32(num) {
var Register_2_ = 0;
var Register_5_ = (num & MASK);
num = num >> SH;
var Register_6_ = (num & MASK);
num = num >> SH;
var Register_4_ = (num & 3);
p[0] = ((Register_2_ = Register_2_ + (p[0] + Register_5_))) & MASK;
Register_2_ = Register_2_ >> SH;
p[1] = ((Register_2_ = Register_2_ + (p[1] + Register_6_))) & MASK;
Register_2_ = Register_2_ >> SH;
p[2] = ((Register_2_ = Register_2_ + (p[2] + Register_4_))) & MASK;
}
function mulu32(num) {
var Register_3_ = 0;
s[0] = num & MASK;
num = num >>> 15;
s[1] = num & MASK;
num = num >>> 15;
s[2] = num & 3;
var Register_2_ = 0;
while (Register_2_ < 3) {
var Register_4_ = s[Register_2_];
r[Register_2_][0] = ((Register_3_ = Register_4_ * p[0])) & MASK;
Register_3_ = Register_3_ >> SH;
r[Register_2_][1] = ((Register_3_ = Register_3_ + (Register_4_ * p[1]))) & MASK;
Register_3_ = Register_3_ >> SH;
r[Register_2_][2] = ((Register_3_ = Register_3_ + (Register_4_ * p[2]))) & 3;
Register_2_++;
}
Register_3_ = r[0][0];
p[0] = Register_3_ & MASK;
Register_3_ = Register_3_ >> SH;
Register_3_ = Register_3_ + (r[0][1] + r[1][0]);
p[1] = Register_3_ & MASK;
Register_3_ = Register_3_ >> SH;
Register_3_ = Register_3_ + ((r[0][2] + r[1][1]) + r[2][0]);
p[2] = Register_3_ & 3;
p[3] = 0;
p[4] = 0;
}
function mul64(o) {
var Register_2_ = 0;
var Register_3_ = 0;
while (Register_3_ < 5) {
var Register_4_ = o.p[Register_3_];
r[Register_3_][0] = ((Register_2_ = Register_4_ * p[0])) & MASK;
Register_2_ = Register_2_ >> SH;
r[Register_3_][1] = ((Register_2_ = Register_2_ + (Register_4_ * p[1]))) & MASK;
Register_2_ = Register_2_ >> SH;
r[Register_3_][2] = ((Register_2_ = Register_2_ + (Register_4_ * p[2]))) & MASK;
Register_2_ = Register_2_ >> SH;
r[Register_3_][3] = ((Register_2_ = Register_2_ + (Register_4_ * p[3]))) & MASK;
Register_2_ = Register_2_ >> SH;
r[Register_3_][4] = ((Register_2_ = Register_2_ + (Register_4_ * p[4]))) & MASK;
Register_3_++;
}
Register_2_ = r[0][0];
p[0] = Register_2_ & MASK;
Register_2_ = Register_2_ >> SH;
Register_2_ = Register_2_ + (r[0][1] + r[1][0]);
p[1] = Register_2_ & MASK;
Register_2_ = Register_2_ >> SH;
Register_2_ = Register_2_ + ((r[0][2] + r[1][1]) + r[2][0]);
p[2] = Register_2_ & MASK;
Register_2_ = Register_2_ >> SH;
Register_2_ = Register_2_ + (((r[0][3] + r[1][2]) + r[2][1]) + r[3][0]);
p[3] = Register_2_ & MASK;
Register_2_ = Register_2_ >> SH;
Register_2_ = Register_2_ + ((((r[0][4] + r[1][3]) + r[2][2]) + r[3][1]) + r[4][0]);
p[4] = Register_2_ & 7;
}
function mul32(value) {
mul64(new com.midasplayer.util.Integer64(value));
}
function toString() {
return(((((("Integer64[value=0x" + com.midasplayer.util.Numbers.dec2hex(msb)) + ":") + com.midasplayer.util.Numbers.dec2hex(lsb)) + ":(") + p) + ")]");
}
function merge(a) {
var Register_2_ = 0;
while (Register_2_ < 3) {
p[Register_2_] = p[Register_2_] + (a & 32767);
a = a >>> 15;
Register_2_++;
}
return(a);
}
function shl() {
var Register_5_ = 0;
var Register_4_ = 0;
var Register_2_ = 0;
var Register_3_ = p.length;
while (Register_2_ < Register_3_) {
Register_5_ = (p[Register_2_] & 16384) >> 14;
p[Register_2_] = p[Register_2_] << 1;
p[Register_2_] = (p[Register_2_] | Register_4_) & 32767;
Register_2_++;
Register_4_ = Register_5_;
}
}
function shr() {
var Register_4_ = 0;
var Register_3_ = 0;
var Register_2_ = (p.length - 1);
while (Register_2_ >= 0) {
Register_4_ = (p[Register_2_] & 1) << 14;
p[Register_2_] = p[Register_2_] >> 1;
p[Register_2_] = (p[Register_2_] | Register_3_) & 32767;
Register_2_--;
Register_3_ = Register_4_;
}
}
static var MASK = 32767;
static var SH = 15;
}
Symbol 1220 MovieClip [__Packages.com.midasplayer.util.Numbers] Frame 0
class com.midasplayer.util.Numbers
{
function Numbers () {
}
static function dec2hex(iValue, padding) {
var Register_1_ = "";
while (iValue != 0) {
Register_1_ = "0123456789abcdef".charAt(iValue & 15) + Register_1_;
iValue = iValue >>> 4;
}
if (padding) {
if (Register_1_.length == 0) {
Register_1_ = "00";
}
if (Register_1_.length < 2) {
Register_1_ = "0" + Register_1_;
}
} else if (Register_1_.length == 0) {
Register_1_ = "0";
}
return(Register_1_);
}
static function itoa(value, numZeroPadding) {
var Register_2_ = ("" + value);
if (numZeroPadding) {
var Register_1_ = (numZeroPadding - 1);
while (Register_1_ > 0) {
if (value < Math.pow(10, Register_1_)) {
Register_2_ = "0" + Register_2_;
}
Register_1_--;
}
}
return(Register_2_);
}
static function asTime(millis, alwaysHours, alwaysMinutes) {
if (alwaysHours) {
alwaysMinutes = true;
}
if (millis < 0) {
millis = 0;
}
millis = Math.floor((millis = millis / 1000));
var Register_3_ = Math.floor(millis / 3600);
var Register_4_ = (Math.floor(millis / 60) % 60);
var Register_5_ = (millis % 60);
var Register_1_ = "";
if (alwaysHours || (Register_3_ > 0)) {
Register_1_ = Register_1_ + itoa(Register_3_, 2);
}
if (alwaysHours || (Register_1_.length > 0)) {
Register_1_ = Register_1_ + ":";
}
var Register_6_ = Register_1_.length;
if ((alwaysMinutes || (Register_4_ > 0)) || (Register_3_ > 0)) {
Register_1_ = Register_1_ + itoa(Register_4_, 2);
}
if (alwaysMinutes || (Register_1_.length != Register_6_)) {
Register_1_ = Register_1_ + ":";
}
return(Register_1_ + itoa(Register_5_, 2));
}
}
Symbol 1221 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.GUI] Frame 0
class com.midasplayer.game.boneyardbonanza.GUI extends MovieClip
{
var hens_, branch1, branch2, quitbtn, soundbtn, logo, scene_, textFormat1_;
function GUI () {
super();
hens_ = new com.midasplayer.util.ArrayList();
hens_.insert(branch1.hen0);
hens_.insert(branch1.hen1);
hens_.insert(branch1.hen2);
hens_.insert(branch1.hen3);
hens_.insert(branch1.hen4);
var Register_3_ = 0;
while (Register_3_ < 5) {
hens_.get(Register_3_).anim.gotoAndStop(1);
Register_3_++;
}
branch2.timeleft.gotoAndStop(1);
quitbtn.gotoAndStop(1);
soundbtn.gotoAndStop(1);
if (!com.midasplayer.fx.SoundManager.isSoundEnabled()) {
soundbtn.gotoAndStop(10);
}
soundbtn.onRollOver = mx.utils.Delegate.create(this, soundOver);
soundbtn.onRollOut = mx.utils.Delegate.create(this, soundOut);
soundbtn.onPress = mx.utils.Delegate.create(this, soundPressed);
quitbtn.onRollOver = mx.utils.Delegate.create(this, quitOver);
quitbtn.onRollOut = mx.utils.Delegate.create(this, quitOut);
quitbtn.onPress = mx.utils.Delegate.create(this, quitPressed);
branch1._visible = false;
branch2._visible = false;
quitbtn._visible = false;
logo._visible = false;
}
function init(scene) {
scene_ = scene;
textFormat1_ = new TextFormat();
textFormat1_.letterSpacing = 3;
branch1.txt_numlives.text = com.midasplayer.util.I18n.format("livesleft");
branch2.txt_score.text = com.midasplayer.util.I18n.format("score");
branch2.txt_timeleft.text = com.midasplayer.util.I18n.format("timeleft");
displayScore();
displayTime();
branch2.score.setTextFormat(textFormat1_);
branch2.timeleft.time.setTextFormat(textFormat1_);
branch1._visible = true;
branch2._visible = true;
quitbtn._visible = true;
logo._visible = true;
}
function quitOver() {
if (scene_.isEndGamePressed()) {
quitbtn.gotoAndStop(10);
return(undefined);
}
quitbtn.gotoAndStop(9);
}
function quitOut() {
if (scene_.isEndGamePressed()) {
quitbtn.gotoAndStop(15);
return(undefined);
}
quitbtn.gotoAndStop(1);
}
function quitPressed() {
scene_.endGamePressed();
quitbtn.gotoAndStop(15);
}
function soundOver() {
if (com.midasplayer.fx.SoundManager.isSoundEnabled()) {
soundbtn.gotoAndStop(9);
return(undefined);
}
soundbtn.gotoAndStop(10);
}
function soundOut() {
if (com.midasplayer.fx.SoundManager.isSoundEnabled()) {
soundbtn.gotoAndStop(1);
return(undefined);
}
soundbtn.gotoAndStop(15);
}
function soundPressed() {
if (com.midasplayer.fx.SoundManager.isSoundEnabled()) {
com.midasplayer.fx.SoundManager.enableSounds(false);
soundbtn.gotoAndStop(10);
return(undefined);
}
com.midasplayer.fx.SoundManager.enableSounds(true);
soundbtn.gotoAndStop(1);
}
function displayScore() {
if (branch2.score.text != scene_.getScore()) {
branch2.score.text = scene_.getScore();
}
}
function displayTime() {
var Register_3_ = scene_.getTimeLeft();
if (Register_3_ <= 15) {
branch2.timeleft.gotoAndStop(2);
}
var Register_4_ = Math.floor(Register_3_ / 60);
var Register_2_ = (Register_3_ % 60);
if (Register_2_ <= 9) {
Register_2_ = "0" + Register_2_;
}
if (((Register_4_ + ":") + Register_2_) != branch2.timeleft.time.text) {
branch2.timeleft.time.text = (Register_4_ + ":") + Register_2_;
branch2.timeleft.time.setTextFormat(textFormat1_);
}
}
function displayNumLives() {
var Register_2_ = scene_.getNumLives();
if (branch1.numlives.text != Register_2_) {
branch1.numlives.text = Register_2_;
}
}
function removeLife() {
var Register_2_ = MovieClip(hens_.removeByIndex(0));
if (Register_2_ != undefined) {
var Register_3_ = (new com.midasplayer.game.boneyardbonanza.anim.RemoveHenAnim(Register_2_));
var Register_4_ = com.midasplayer.util.AnimPlayer.addAnim(Register_3_);
}
}
function tick() {
}
function render(tick, alpha) {
displayScore();
displayTime();
displayNumLives();
}
}
Symbol 1222 MovieClip [__Packages.com.midasplayer.fx.SoundManager] Frame 0
class com.midasplayer.fx.SoundManager
{
function SoundManager () {
}
static function isSoundEnabled() {
return(soundEnabled);
}
static function enableSounds(enabled) {
soundEnabled = enabled;
if (!enabled) {
muteAll();
return(undefined);
}
restoreMuteAll();
}
static function stopAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.stop();
soundEntry.playStatus = false;
});
}
static function muteAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.setVolume(0);
});
}
static function restoreMuteAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.setVolume(soundEntry.realVol);
});
}
static function stop(resource) {
var Register_1_ = sounds.get(resource);
if (Register_1_ != undefined) {
Register_1_.sound.stop();
Register_1_.playStatus = false;
}
}
static function getCalibratedVolume(flashVolume) {
flashVolume = Math.min(100, flashVolume);
flashVolume = Math.max(0, flashVolume);
return(Math.ceil(Math.pow(flashVolume / 100, 1.46) * 100));
}
static function setVolume(resource, percent) {
var Register_1_ = sounds.get(resource);
if (Register_1_ == undefined) {
var Register_3_ = new Array();
Register_3_.push(resource);
initialize(Register_3_);
}
Register_1_ = sounds.get(resource);
if (Register_1_ != undefined) {
var Register_2_ = percent;
Register_1_.sound.setVolume(Register_2_);
Register_1_.sound.volume = Register_2_;
}
}
static function getVolume(resource) {
var Register_1_ = sounds.get(resource);
if (Register_1_ != undefined) {
return(Register_1_.sound.getVolume());
}
return(100);
}
static function isPlaying(resource) {
var Register_1_ = sounds.get(resource);
return((Register_1_ != undefined) && (Register_1_.playStatus == true));
}
static function initialize(list) {
for (var Register_9_ in list) {
var resource = list[Register_9_];
var Register_3_ = _root.getNextHighestDepth();
var Register_2_ = new Sound(_root.createEmptyMovieClip("sm_sndhold_" + Register_3_, Register_3_));
Register_2_.attachSound(resource);
Register_2_.onSoundComplete = function () {
var Register_1_ = com.midasplayer.fx.SoundManager.sounds.get(resource);
Register_1_.playStatus = false;
};
sounds.put(resource, {realVol:100, sound:Register_2_, playStatus:false});
}
}
static function play(resource, volume, isLoop, fn, ll, lr, rr, rl) {
if (volume == undefined) {
volume = getVolume(resource);
}
if (isLoop == undefined) {
isLoop = false;
}
if (ll == undefined) {
ll = 100;
lr = 0;
rr = 100;
rl = 0;
}
var Register_2_ = sounds.get(resource);
if (Register_2_ != undefined) {
Register_2_.sound.setVolume((soundEnabled ? (volume) : 0));
Register_2_.realVol = volume;
Register_2_.playStatus = true;
Register_2_.onPlayedFn = fn;
var Register_4_ = new Object();
Register_4_.ll = ll;
Register_4_.lr = lr;
Register_4_.rr = rr;
Register_4_.rl = rl;
Register_2_.sound.setTransform(Register_4_);
Register_2_.sound.start(0, (isLoop ? 32767 : 1));
return(undefined);
}
var Register_8_ = _root.getNextHighestDepth();
var Register_3_ = new Sound(_root.createEmptyMovieClip("sm_sndhold_" + Register_8_, Register_8_));
Register_3_.attachSound(resource);
Register_3_.onSoundComplete = function () {
var Register_1_ = com.midasplayer.fx.SoundManager.sounds.get(resource);
Register_1_.playStatus = false;
com.midasplayer.fx.SoundManager.onPlayed_(resource);
};
Register_3_.setVolume((soundEnabled ? (volume) : 0));
var Register_4_ = new Object();
Register_4_.ll = ll;
Register_4_.lr = lr;
Register_4_.rr = rr;
Register_4_.rl = rl;
Register_3_.setTransform(Register_4_);
Register_3_.start(0, (isLoop ? 32767 : 1));
sounds.put(resource, {realVol:volume, onPlayedFn:fn, sound:Register_3_, playStatus:true});
}
static function onPlayed_(name) {
var Register_1_ = sounds.get(name);
if ((Register_1_ != undefined) && (Register_1_.onPlayedFn != undefined)) {
Register_1_.onPlayedFn();
}
}
static var sounds = new com.midasplayer.util.Map();
static var soundEnabled = true;
}
Symbol 1223 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var Register_2_ = function () {
var Register_2_ = arguments.callee.target;
var Register_3_ = arguments.callee.func;
return(Register_3_.apply(Register_2_, arguments));
};
Register_2_.target = obj;
Register_2_.func = func;
return(Register_2_);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 1224 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.RemoveHenAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.RemoveHenAnim
{
var hen_, time_, y, oy, sy, dy, ay;
function RemoveHenAnim (hen) {
hen_ = hen;
time_ = 10;
y = hen_._y;
oy = y;
sy = y;
dy = 0;
ay = hen_.anim._y;
}
function tick(tick) {
var Register_2_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, time_);
var Register_4_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, time_ - 5, 5);
hen_.anim.gotoAndStop(Math.floor(Register_2_ * 10) + 1);
oy = y;
y = sy + (com.midasplayer.util.AnimPlayer.easeInOutQuad(Register_2_, 0, 1, 1) * dy);
return(Register_2_ == 1);
}
function end() {
hen_._alpha = 0;
hen_.removeMovieClip();
}
function render(alpha) {
hen_._y = oy + ((y - oy) * alpha);
hen_.anim._y = ay + (sy - hen_._y);
}
}
Symbol 1225 MovieClip [__Packages.com.midasplayer.util.AnimPlayer] Frame 0
class com.midasplayer.util.AnimPlayer
{
static var clip_;
function AnimPlayer () {
}
static function staticInitializer(Void) {
clip_ = _root.createEmptyMovieClip("timer", _root.getNextHighestDepth());
clip_.onEnterFrame = function () {
com.midasplayer.util.AnimPlayer.onEnterFrame();
};
return(true);
}
static function addAnim(a) {
id_++;
anims_.insert(a);
a.animId = id_;
return(id_);
}
static function getNumAnims() {
return(anims_.size());
}
static function endAnim(id) {
var Register_3_ = anims_.size();
var Register_1_ = (Register_3_ - 1);
while (Register_1_ >= 0) {
var Register_2_ = anims_.get(Register_1_);
if (Register_2_.animId == id) {
anims_.removeByIndex(Register_1_);
return(undefined);
}
Register_1_--;
}
}
static function tick(tick) {
var Register_4_ = anims_.size();
var Register_2_ = (Register_4_ - 1);
while (Register_2_ >= 0) {
var Register_1_ = anims_.get(Register_2_);
if (Register_1_.startTick == undefined) {
Register_1_.startTick = tick;
}
if (Register_1_.lastTick != true) {
Register_1_.lastTick = Register_1_.tick(tick - Register_1_.startTick);
if (Register_1_.lastTick) {
Register_1_.end();
Register_1_.lastRender = true;
}
}
Register_2_--;
}
}
static function render(tick, alpha) {
var Register_3_ = anims_.size();
var Register_1_ = (Register_3_ - 1);
while (Register_1_ >= 0) {
var Register_2_ = anims_.get(Register_1_);
Register_2_.render(alpha);
if (Register_2_.lastRender) {
anims_.removeByIndex(Register_1_);
}
Register_1_--;
}
}
static function play(props) {
animId_++;
var Register_3_ = props.playlist;
var Register_4_ = props.callback;
var Register_5_ = props.callback_scope;
var Register_1_ = props.tps;
if (Register_1_ == undefined) {
Register_1_ = 100;
}
callbacks_.put(animId_, Register_4_);
callbackScopes_.put(animId_, Register_5_);
animEntries_.put(animId_, new com.midasplayer.util.AnimEntry(Register_3_, animId_));
timers_.put(animId_, new com.midasplayer.timing.Timer(com.midasplayer.util.AnimEntry(animEntries_.get(animId_)), Register_1_));
return(animId_);
}
static function end(animId) {
delete eval (timers_.get(animId));
timers_.remove(animId);
delete eval (animEntries_.get(animId));
animEntries_.remove(animId);
var Register_2_ = callbacks_.get(animId);
callbacks_.remove(animId);
var Register_3_ = callbackScopes_.get(animId);
callbackScopes_.remove(animId);
Register_2_.call(Register_3_);
}
static function stop(animId) {
delete eval (timers_.get(animId));
timers_.remove(animId);
delete eval (animEntries_.get(animId));
animEntries_.remove(animId);
var Register_2_ = callbacks_.get(animId);
callbacks_.remove(animId);
var Register_3_ = callbackScopes_.get(animId);
callbackScopes_.remove(animId);
}
static function setTps(animId, tps) {
timers_.get(animId).setTps(tps);
}
static function tickToPercent(tick, startTick, numTicks) {
var Register_1_ = ((tick - startTick) / numTicks);
Register_1_ = ((Register_1_ < 0) ? 0 : (Register_1_));
if (Register_1_ <= 1) {
return(Register_1_);
}
Register_1_ = 1;
return(Register_1_);
}
static function delay(props) {
return(play({playlist:[{obj:com.midasplayer.util.AnimPlayer, func:delayAnim, params:{millis:props.millis}}], callback:props.callback, callback_scope:props.callback_scope, tps:50}));
}
static function delayAnim(tick, alpha, params) {
if ((tick / 50) >= (params.millis / 1000)) {
return(true);
}
return(false);
}
static function easeInOutQuad(t, b, c, d) {
if (((t = t / (d / 2))) < 1) {
return((((c / 2) * t) * t) + b);
}
return((((-c) / 2) * (((--t) * (t - 2)) - 1)) + b);
}
static function easeInOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
if (((t = t / (d / 2))) < 1) {
return(((((c / 2) * t) * t) * (((((s = s * 1.525)) + 1) * t) - s)) + b);
}
return(((c / 2) * (((((t = t - 2)) * t) * (((((s = s * 1.525)) + 1) * t) + s)) + 2)) + b);
}
static function onEnterFrame() {
timers_.foreach(function (key, obj) {
com.midasplayer.timing.Timer(obj).advanceTime2();
});
}
static var animId_ = 0;
static var animEntries_ = new com.midasplayer.util.Map();
static var timers_ = new com.midasplayer.util.Map();
static var callbacks_ = new com.midasplayer.util.Map();
static var callbackScopes_ = new com.midasplayer.util.Map();
static var id_ = 0;
static var anims_ = new com.midasplayer.util.ArrayList();
static var staticInitialized = staticInitializer();
}
Symbol 1226 MovieClip [__Packages.com.midasplayer.util.AnimEntry] Frame 0
class com.midasplayer.util.AnimEntry implements com.midasplayer.timing.Timeable
{
var playList_, animId_;
function AnimEntry (playList, animId) {
playList_ = playList;
animId_ = animId;
}
function tick(tick) {
}
function render(tick, alpha) {
if (baseTick_ == -1) {
baseTick_ = tick;
}
var Register_2_ = play(playList_, tick - baseTick_, alpha);
if (Register_2_) {
com.midasplayer.util.AnimPlayer.end(animId_);
}
}
function play(playList, tick, alpha) {
var Register_C_ = playList.length;
var Register_4_ = true;
var Register_3_ = 0;
while (Register_3_ < Register_C_) {
var Register_2_ = playList[Register_3_];
if (Register_2_ == undefined) {
} else if (Register_2_.length == undefined) {
var Register_9_ = Register_2_.func;
var Register_8_ = Register_2_.obj;
var Register_A_ = Register_2_.params;
var Register_6_ = Register_9_.call(Register_8_, tick, alpha, Register_A_);
if (Register_6_) {
playList[Register_3_] = undefined;
} else {
Register_4_ = false;
}
} else {
Register_6_ = play(Register_2_, tick, alpha);
if (Register_6_) {
playList[Register_3_] = undefined;
baseTick_ = baseTick_ + tick;
Register_4_ = false;
break;
}
Register_4_ = false;
break;
}
Register_3_++;
}
return(Register_4_);
}
var baseTick_ = -1;
}
Symbol 1227 MovieClip [__Packages.com.midasplayer.timing.Timer] Frame 0
class com.midasplayer.timing.Timer
{
var timeable;
function Timer (timeable, gameTicksPerSecond) {
millisPerGameTick = 1000 / gameTicksPerSecond;
this.gameTicksPerSecond = gameTicksPerSecond;
this.timeable = timeable;
maxTickTime = 500;
}
function getMillisPerTick() {
return(millisPerGameTick);
}
function getTicksPerSecond() {
return(gameTicksPerSecond);
}
function setMaxTickTime(millis) {
maxTickTime = millis;
}
function advanceTime2() {
var Register_3_ = getTimer();
if (startTime < 0) {
startTime = Register_3_;
unprocessedTime = millisPerGameTick;
}
time = Register_3_ - startTime;
var Register_5_ = (time - lastTime);
lastTime = time;
unprocessedTime = unprocessedTime + Register_5_;
if (unprocessedTime >= millisPerGameTick) {
var Register_2_ = (maxTickTime + Register_3_);
do {
timeable.tick(tick);
tick++;
if ((tick % gameTicksPerSecond) == 0) {
fps = frames;
frames = 0;
}
unprocessedTime = unprocessedTime - millisPerGameTick;
} while ((unprocessedTime >= millisPerGameTick) && (getTimer() < Register_2_));
}
var Register_4_ = ((unprocessedTime % millisPerGameTick) / millisPerGameTick);
com.midasplayer.timing.IFloat.setAlpha(Register_4_);
timeable.render(tick, Register_4_);
frames++;
}
function advanceTime() {
time = getTimer();
var Register_3_ = (time - lastTime);
lastTime = time;
unprocessedTime = unprocessedTime + Register_3_;
var Register_2_ = 0;
while (unprocessedTime > millisPerGameTick) {
unprocessedTime = unprocessedTime - millisPerGameTick;
timeable.tick(tick);
tick++;
Register_2_++;
if (Register_2_ >= 10) {
unprocessedTime = 0;
}
}
var Register_4_ = (unprocessedTime / millisPerGameTick);
timeable.render(tick, Register_4_);
}
var time = 0;
var startTime = -1;
var lastTime = 0;
var unprocessedTime = 0;
var gameTicksPerSecond = 0;
var tick = 0;
var millisPerGameTick = 0;
var maxTickTime = -1;
var frames = 0;
var fps = 0;
}
Symbol 1228 MovieClip [__Packages.com.midasplayer.timing.IFloat] Frame 0
class com.midasplayer.timing.IFloat
{
static var alpha;
var ivalue, lastValue;
function IFloat (initial) {
ivalue = initial;
lastValue = initial;
alpha = 0;
}
function setTo(initial) {
ivalue = initial;
lastValue = initial;
}
function set(newValue) {
lastValue = ivalue;
ivalue = newValue;
}
function get(lalpha) {
return(lastValue + ((ivalue - lastValue) * lalpha));
}
static function setAlpha(na) {
alpha = na;
}
function get value() {
return(lastValue + ((ivalue - lastValue) * alpha));
}
function set value(v) {
ivalue = v;
lastValue = v;
//return(value);
}
}
Symbol 1229 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.Coffin] Frame 0
class com.midasplayer.game.boneyardbonanza.Coffin extends MovieClip
{
var over, parts_, isBonus_, scene_, game_, num_, _x, _y, bonusNotFedTime_, bonusNumFeeds_, bonusAnim_;
function Coffin () {
super();
over._alpha = 0;
parts_ = new Array();
isBonus_ = false;
}
function init(scene, game, num) {
scene_ = scene;
game_ = game;
num_ = num;
_x = POS[(num * 2) + 0];
_y = POS[(num * 2) + 1];
}
function getNum() {
return(num_);
}
function getScene() {
return(scene_);
}
function getParts() {
return(parts_);
}
function hasPart(part) {
return(parts_[part.getPartNum()] != undefined);
}
function hasPartNum(partNum) {
return(parts_[partNum] != undefined);
}
function isFull() {
var Register_2_ = 0;
while (Register_2_ < scene_.getNumParts()) {
if (parts_[Register_2_] == undefined) {
return(false);
}
Register_2_++;
}
return(true);
}
function isSingleColored() {
var Register_3_ = -1;
var Register_2_ = 0;
while (Register_2_ < scene_.getNumParts()) {
if (parts_[Register_2_] == undefined) {
return(false);
}
if (Register_3_ == -1) {
Register_3_ = parts_[Register_2_].getColor();
} else if (Register_3_ != parts_[Register_2_].getColor()) {
return(false);
}
Register_2_++;
}
return(true);
}
function getNumOfColor(color) {
var Register_3_ = 0;
var Register_2_ = 0;
while (Register_2_ < scene_.getNumParts()) {
if (parts_[Register_2_] != undefined) {
if (parts_[Register_2_].getColor() == color) {
Register_3_++;
}
}
Register_2_++;
}
return(Register_3_);
}
function getNumOfMaxColor() {
var Register_4_ = 0;
var Register_2_ = 0;
while (Register_2_ < 6) {
var Register_3_ = getNumOfColor(Register_2_);
Register_4_ = ((Register_3_ > Register_4_) ? (Register_3_) : (Register_4_));
Register_2_++;
}
return(Register_4_);
}
function addPart(part) {
if ((!isBonus_) && (hasPart(part))) {
var Register_4_ = (new com.midasplayer.game.boneyardbonanza.anim.PartToCoffinAnim(part, this, 18, false));
var Register_6_ = com.midasplayer.util.AnimPlayer.addAnim(Register_4_);
trace("should not happen!");
return(undefined);
}
if (isBonus_ && (part.getColor() == parts_[0].getColor())) {
com.midasplayer.fx.SoundManager.play("place#" + (random(4) + 1), 25);
bonusNotFedTime_ = 0;
bonusNumFeeds_++;
var Register_4_ = (new com.midasplayer.game.boneyardbonanza.anim.PartToCoffinAnim(part, this, 3, true));
var Register_6_ = com.midasplayer.util.AnimPlayer.addAnim(Register_4_);
var Register_3_ = (new com.midasplayer.game.boneyardbonanza.anim.AddedBonusAnim(this, game_.getOverlayLayer(), bonusNumFeeds_));
var Register_5_ = com.midasplayer.util.AnimPlayer.addAnim(Register_3_);
return(undefined);
}
if (isBonus_) {
collectBonus();
empty();
parts_[part.getPartNum()] = part;
var Register_4_ = (new com.midasplayer.game.boneyardbonanza.anim.PartToCoffinAnim(part, this, 3, true));
var Register_6_ = com.midasplayer.util.AnimPlayer.addAnim(Register_4_);
return(undefined);
}
parts_[part.getPartNum()] = part;
var Register_4_ = (new com.midasplayer.game.boneyardbonanza.anim.PartToCoffinAnim(part, this, 3, true));
var Register_6_ = com.midasplayer.util.AnimPlayer.addAnim(Register_4_);
scorePlacement(part);
if (isFull()) {
scene_.skeletonCompleted();
if (isSingleColored() && (!isBonus_)) {
isBonus_ = true;
scene_.enterBonusMode();
bonusNotFedTime_ = 0;
bonusNumFeeds_ = 0;
bonusAnim_ = new com.midasplayer.game.boneyardbonanza.anim.CoffinBonusAnim(this, 3, 10);
var Register_5_ = com.midasplayer.util.AnimPlayer.addAnim(bonusAnim_);
return(undefined);
}
removeSkeletonNormal();
scoreFinished();
empty();
}
}
function wrongClick(part) {
com.midasplayer.fx.SoundManager.play("VariableNamed_Bone_bonus_bonek2", 40);
var Register_3_ = (new com.midasplayer.game.boneyardbonanza.anim.WrongClickAnim(this, game_.getOverlayLayer(), part));
var Register_6_ = com.midasplayer.util.AnimPlayer.addAnim(Register_3_);
var Register_2_ = -10;
scene_.addScore(Register_2_);
var Register_5_ = (_x + 95);
var Register_4_ = (_y + 90);
new com.midasplayer.game.boneyardbonanza.ScorePop(scene_, com.midasplayer.game.boneyardbonanza.ScorePop.TYPE_NEGATIVE, Register_2_, Register_5_, Register_4_);
}
function scoreFinished() {
com.midasplayer.fx.SoundManager.play("VariableNamed_skeleton_disappeark1", 50);
var Register_5_ = (_x + 200);
var Register_4_ = (_y + 70);
var Register_2_ = 100;
var Register_3_ = getNumOfMaxColor();
if (Register_3_ == 4) {
Register_2_ = 150;
}
if (Register_3_ == 5) {
Register_2_ = 200;
}
Register_5_ = _x + 95;
Register_4_ = _y + 90;
new com.midasplayer.game.boneyardbonanza.ScorePop(scene_, com.midasplayer.game.boneyardbonanza.ScorePop.TYPE_COMPLETE, Register_2_, Register_5_, Register_4_);
scene_.addScore(Register_2_);
}
function scoreFinishedBonus() {
scene_.leaveBonusMode(true);
var Register_5_ = (_x + 200);
var Register_4_ = (_y + 70);
var Register_2_ = 400;
var Register_6_ = bonusNumFeeds_;
var Register_3_ = ((bonusNumFeeds_ * 100) + (((50 * bonusNumFeeds_) * (bonusNumFeeds_ - 1)) / 2));
Register_2_ = Register_2_ + Register_3_;
Register_5_ = _x + 95;
Register_4_ = _y + 90;
new com.midasplayer.game.boneyardbonanza.ScorePop(scene_, com.midasplayer.game.boneyardbonanza.ScorePop.TYPE_BONUS, Register_2_, Register_5_, Register_4_);
scene_.addScore(Register_2_);
scene_.addBonus(Register_3_);
}
function scoreFinishedBonusFailed() {
scene_.leaveBonusMode(false);
var Register_4_ = (_x + 200);
var Register_2_ = (_y + 70);
var Register_3_ = 400;
Register_4_ = _x + 95;
Register_2_ = _y + 90;
new com.midasplayer.game.boneyardbonanza.ScorePop(scene_, com.midasplayer.game.boneyardbonanza.ScorePop.TYPE_NORMAL, Register_3_, Register_4_, Register_2_);
scene_.addScore(Register_3_);
}
function scorePlacement(part) {
com.midasplayer.fx.SoundManager.play("VariableNamed_Bone_negativek2", 50);
var Register_6_ = (getPartXPos(part) + (part._width / 2));
var Register_4_ = (getPartYPos(part) + (part._height / 2));
var Register_3_ = getNumOfColor(part.getColor());
var Register_5_ = ((Register_3_ < 6) ? (Register_3_ * 2) : 20);
Register_6_ = _x + 95;
Register_4_ = _y + 90;
new com.midasplayer.game.boneyardbonanza.ScorePop(scene_, com.midasplayer.game.boneyardbonanza.ScorePop.TYPE_NORMAL, Register_5_, Register_6_, Register_4_);
scene_.addScore(Register_5_);
}
function collectBonus() {
bonusAnim_.end();
isBonus_ = false;
scoreFinishedBonus();
var Register_3_ = (new com.midasplayer.game.boneyardbonanza.anim.RemoveSkeletonAnim(this, 10, 10));
var Register_5_ = com.midasplayer.util.AnimPlayer.addAnim(Register_3_);
var Register_2_ = (new com.midasplayer.game.boneyardbonanza.anim.BonusAnim(this, game_.getOverlayLayer()));
var Register_4_ = com.midasplayer.util.AnimPlayer.addAnim(Register_2_);
}
function removeSkeletonNormal() {
var Register_2_ = (new com.midasplayer.game.boneyardbonanza.anim.RemoveSkeletonAnim(this, 10, 10));
var Register_3_ = com.midasplayer.util.AnimPlayer.addAnim(Register_2_);
}
function empty() {
var Register_2_ = 0;
while (Register_2_ < scene_.getNumParts()) {
parts_[Register_2_] = undefined;
Register_2_++;
}
}
function getPartXPos(part) {
var Register_2_ = PART_POS[(2 * part.getPartNum()) + 0];
Register_2_ = Register_2_ + (26.8 + _x);
return(Register_2_);
}
function getPartYPos(part) {
var Register_2_ = PART_POS[(2 * part.getPartNum()) + 1];
Register_2_ = Register_2_ + (21 + _y);
return(Register_2_);
}
function isBonus() {
return(isBonus_);
}
function onRollOver() {
over._alpha = 100;
}
function onDragOver() {
over._alpha = 100;
}
function onRollOut() {
over._alpha = 0;
}
function onDragOut() {
over._alpha = 0;
}
function noMouseOver() {
over.removeMovieClip();
}
function onPress() {
scene_.coffinClicked(num_);
}
function bonusFailed() {
bonusAnim_.end();
isBonus_ = false;
scoreFinishedBonusFailed();
var Register_3_ = (new com.midasplayer.game.boneyardbonanza.anim.RemoveSkeletonAnim(this, 10, 10));
var Register_5_ = com.midasplayer.util.AnimPlayer.addAnim(Register_3_);
empty();
var Register_2_ = (new com.midasplayer.game.boneyardbonanza.anim.NoBonusAnim(this, game_.getOverlayLayer()));
var Register_4_ = com.midasplayer.util.AnimPlayer.addAnim(Register_2_);
}
function getNotFedTime() {
return(bonusNotFedTime_);
}
function getNumBonusFeeds() {
return(bonusNumFeeds_);
}
function getMaxNotFedTime() {
var Register_2_ = scene_.getBonusTime();
Register_2_ = Register_2_ * Math.pow(0.9, bonusNumFeeds_);
if (Register_2_ < (com.midasplayer.game.boneyardbonanza.Game.TPS * 2)) {
Register_2_ = com.midasplayer.game.boneyardbonanza.Game.TPS * 2;
}
return(Math.ceil(Register_2_));
}
function tick() {
if (isBonus_) {
bonusNotFedTime_++;
if (bonusNotFedTime_ >= getMaxNotFedTime()) {
bonusFailed();
}
}
}
static var POS = [76, 105, 494, 105, 76, 340, 494, 340, 284, 379, 284, 28];
static var PART_POS = [0, 33.4, 22.8, 92, 88.5, 33.4, 75.8, 92, 47.1, 0, 43.4, 42];
}
Symbol 1230 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.PartToCoffinAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.PartToCoffinAnim
{
var part_, coffin_, time_, placeOk_, sx, sy, x, y, ox, oy, dx, dy, bonus_;
function PartToCoffinAnim (part, coffin, time, placeOk) {
part_ = part;
coffin_ = coffin;
time_ = time;
placeOk_ = placeOk;
sx = part_._x;
sy = part_._y;
x = part_._x;
y = part_._y;
ox = x;
oy = y;
dx = coffin_.getPartXPos(part_) - part_._x;
dy = coffin_.getPartYPos(part_) - part_._y;
bonus_ = coffin_.isBonus();
if (!placeOk_) {
dx = 0.7 * dx;
dy = 0.7 * dy;
}
}
function tick(tick) {
var Register_2_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, time_);
Register_2_ = com.midasplayer.util.AnimPlayer.easeInOutQuad(Register_2_, 0, 1, 1);
ox = x;
oy = y;
x = sx + (dx * Register_2_);
y = sy + (dy * Register_2_);
return(Register_2_ == 1);
}
function end() {
if (!placeOk_) {
part_.removeMovieClip();
}
if (bonus_) {
var Register_2_ = coffin_.getParts();
if (Register_2_[part_.getPartNum()] != part_) {
part_.removeMovieClip();
}
}
ox = x;
oy = y;
}
function render(alpha) {
part_._x = ox + ((x - ox) * alpha);
part_._y = oy + ((y - oy) * alpha);
}
}
Symbol 1231 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.AddedBonusAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.AddedBonusAnim
{
var coffin_, layer_, tick_, clip_;
function AddedBonusAnim (coffin, layer, num) {
coffin_ = coffin;
layer_ = layer;
tick_ = 0;
clip_ = layer_.attachMovie("bonuscountbig", "bonus", layer_.getNextHighestDepth());
clip_._x = coffin._x + 90;
clip_._y = coffin._y + 90;
clip_.numbonus.text = "" + num;
clip_.numbonus2.text = "" + num;
clip_.onPress = mx.utils.Delegate.create(coffin_, coffin_.onPress);
}
function tick(tick) {
var Register_2_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, 6);
tick_++;
return(Register_2_ == 1);
}
function end() {
clip_.removeMovieClip();
}
function render(alpha) {
}
}
Symbol 1232 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.CoffinBonusAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.CoffinBonusAnim
{
var coffin_, tick_, ended_, swirl_, skeletonAnim_;
function CoffinBonusAnim (coffin) {
coffin_ = coffin;
tick_ = 0;
ended_ = false;
swirl_ = coffin_.attachMovie("swirl", "swirl", coffin_.getNextHighestDepth());
swirl_._x = -30;
swirl_._y = -28;
swirl_.gotoAndStop(1);
swirl_.bonuscount.numbonus.text = "0";
swirl_.bonuscount.numbonus2.text = "0";
var Register_3_ = coffin_.getParts();
var Register_2_ = 0;
while (Register_2_ < Register_3_.length) {
Register_3_[Register_2_]._visible = false;
Register_2_++;
}
skeletonAnim_ = coffin_.attachMovie("skeleton_bonus", "skeleton_bonus", coffin_.getNextHighestDepth());
skeletonAnim_._x = 94;
skeletonAnim_._y = 90;
skeletonAnim_.gotoAndStop(com.midasplayer.game.boneyardbonanza.SkeletonPart.COLOR_FRAME[Register_3_[0].getColor()]);
skeletonAnim_.anim.gotoAndStop(1);
}
function tick(tick) {
tick_++;
var Register_3_ = coffin_.getNotFedTime();
var Register_2_ = coffin_.getMaxNotFedTime();
var Register_4_ = ((100 * (Register_2_ - Register_3_)) / Register_2_);
skeletonAnim_._xscale = (skeletonAnim_._yscale = Register_4_);
return(ended_);
}
function end() {
ended_ = true;
swirl_.removeMovieClip();
skeletonAnim_.removeMovieClip();
}
function render(alpha) {
swirl_.gotoAndStop((tick_ % 28) + 1);
swirl_.bonuscount.numbonus.text = "" + coffin_.getNumBonusFeeds();
swirl_.bonuscount.numbonus2.text = "" + coffin_.getNumBonusFeeds();
skeletonAnim_.anim.gotoAndStop((tick_ % 9) + 1);
}
}
Symbol 1233 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.SkeletonPart] Frame 0
class com.midasplayer.game.boneyardbonanza.SkeletonPart extends MovieClip
{
var _visible, scene_, part_, color_, gotoAndStop, part;
function SkeletonPart () {
super();
_visible = false;
}
function init(scene, part, color) {
scene_ = scene;
part_ = part;
color_ = color;
gotoAndStop(PART_FRAME[part_]);
this.part.gotoAndStop(COLOR_FRAME[color_]);
}
function getPartNum() {
return(part_);
}
function getColor() {
return(color_);
}
static var COLOR_FRAME = [2, 3, 5, 6, 1, 4];
static var PART_FRAME = [1, 2, 3, 4, 5, 6];
}
Symbol 1234 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.WrongClickAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.WrongClickAnim
{
var coffin_, layer_, tick_, clip_;
function WrongClickAnim (coffin, layer, part) {
coffin_ = coffin;
layer_ = layer;
tick_ = 0;
clip_ = layer.attachMovie("wrongClickAnim", "wrongClickAnim", layer.getNextHighestDepth());
clip_._x = coffin_._x + WRONGPART_POS[part.getPartNum() * 2];
clip_._y = coffin_._y + WRONGPART_POS[(part.getPartNum() * 2) + 1];
clip_.anim.gotoAndStop(1);
}
function tick(tick) {
var Register_2_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, 20);
tick_++;
return(Register_2_ == 1);
}
function end() {
clip_.removeMovieClip();
}
function render(alpha) {
clip_.anim.gotoAndStop((tick_ % 9) + 1);
}
static var WRONGPART_POS = [20, 10, 33, 70, 113, 10, 93, 70, 72, -37, 71, 10];
}
Symbol 1235 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.ScorePop] Frame 0
class com.midasplayer.game.boneyardbonanza.ScorePop
{
var scene_, type_, clip_;
function ScorePop (scene, type, score, x, y) {
scene_ = scene;
type_ = type;
var Register_3_ = scene_.getScorePopLayer();
if (type == TYPE_NORMAL) {
var Register_5_ = Register_3_.getNextHighestDepth();
clip_ = Register_3_.attachMovie("scorepop_normal", "scorepop" + Register_5_, Register_5_);
clip_._x = x;
clip_._y = y;
clip_.score.text = score;
}
if (type == TYPE_NEGATIVE) {
var Register_5_ = Register_3_.getNextHighestDepth();
clip_ = Register_3_.attachMovie("scorepop_negative", "scorepop" + Register_5_, Register_5_);
clip_._x = x;
clip_._y = y;
clip_.score.text = score;
}
if (type == TYPE_COMPLETE) {
var Register_5_ = Register_3_.getNextHighestDepth();
clip_ = Register_3_.attachMovie("scorepop_complete", "scorepop" + Register_5_, Register_5_);
clip_._x = x;
clip_._y = y;
clip_.score0.text = score % 10;
clip_.score1.text = Math.floor(score / 10) % 10;
clip_.score2.text = Math.floor(score / 100) % 10;
}
if (type == TYPE_BONUS) {
var Register_5_ = Register_3_.getNextHighestDepth();
clip_ = Register_3_.attachMovie("scorepop_bonus", "scorepop" + Register_5_, Register_5_);
clip_._x = x;
clip_._y = y;
clip_.score0.text = score % 10;
clip_.score1.text = Math.floor(score / 10) % 10;
clip_.score2.text = Math.floor(score / 100) % 10;
clip_.score3.text = Math.floor(score / 1000) % 10;
clip_.score4.text = Math.floor(score / 10000) % 10;
if ((Math.floor(score / 10000) % 10) == 0) {
clip_.score4.text = "";
if ((Math.floor(score / 1000) % 10) == 0) {
clip_.score3.text = "";
}
}
}
var Register_8_ = (new com.midasplayer.game.boneyardbonanza.anim.ScorePopAnim(this));
var Register_9_ = com.midasplayer.util.AnimPlayer.addAnim(Register_8_);
}
function getType() {
return(type_);
}
function getClip() {
return(clip_);
}
static var TYPE_NORMAL = 1;
static var TYPE_COMPLETE = 2;
static var TYPE_BONUS = 3;
static var TYPE_NEGATIVE = 4;
}
Symbol 1236 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.ScorePopAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.ScorePopAnim
{
var scorePop_, clip_, y, oy, sy, dy, time_;
function ScorePopAnim (scorePop) {
scorePop_ = scorePop;
clip_ = scorePop_.getClip();
y = clip_._y;
oy = y;
sy = y;
dy = -90;
time_ = 16;
if (scorePop_.getType() == com.midasplayer.game.boneyardbonanza.ScorePop.TYPE_COMPLETE) {
dy = -120;
time_ = 30;
}
if (scorePop_.getType() == com.midasplayer.game.boneyardbonanza.ScorePop.TYPE_BONUS) {
dy = -120;
time_ = 30;
}
if ((clip_._y + dy) < 20) {
dy = 20 - clip_._y;
}
}
function tick(tick) {
var Register_2_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, time_);
Register_2_ = com.midasplayer.util.AnimPlayer.easeInOutQuad(Register_2_, 0, 1, 1);
oy = y;
y = sy + (dy * Register_2_);
return(Register_2_ == 1);
}
function end() {
clip_.removeMovieClip();
}
function render(alpha) {
clip_._y = oy + ((y - oy) * alpha);
}
}
Symbol 1237 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.RemoveSkeletonAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.RemoveSkeletonAnim
{
var coffin_, startTime_, time_, scene_, parts_;
function RemoveSkeletonAnim (coffin, startTime, time) {
coffin_ = coffin;
startTime_ = startTime;
time_ = time;
scene_ = coffin_.getScene();
parts_ = new Array();
var Register_3_ = coffin_.getParts();
var Register_2_ = 0;
while (Register_2_ < scene_.getNumParts()) {
parts_[Register_2_] = Register_3_[Register_2_];
Register_2_++;
}
}
function tick(tick) {
var Register_3_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, startTime_, time_);
var Register_2_ = 0;
while (Register_2_ < scene_.getNumParts()) {
parts_[Register_2_]._alpha = (1 - Register_3_) * 100;
Register_2_++;
}
return(Register_3_ == 1);
}
function end() {
var Register_2_ = 0;
while (Register_2_ < scene_.getNumParts()) {
parts_[Register_2_].removeMovieClip();
Register_2_++;
}
}
function render(alpha) {
}
}
Symbol 1238 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.BonusAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.BonusAnim
{
var coffin_, layer_, tick_, clip_;
function BonusAnim (coffin, layer) {
coffin_ = coffin;
layer_ = layer;
tick_ = 0;
clip_ = layer_.attachMovie("bonus", "bonus", layer_.getNextHighestDepth());
clip_._x = coffin_._x + 5;
clip_._y = coffin_._y + 15;
clip_.anim.gotoAndStop(1);
clip_.anim.spin.gotoAndStop(1);
}
function tick(tick) {
var Register_2_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, 25);
tick_++;
return(Register_2_ == 1);
}
function end() {
clip_.removeMovieClip();
}
function render(alpha) {
clip_.anim.gotoAndStop((tick_ % 7) + 1);
clip_.anim.spin.gotoAndStop((tick_ % 8) + 1);
}
}
Symbol 1239 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.NoBonusAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.NoBonusAnim
{
var coffin_, layer_, tick_, clip_;
function NoBonusAnim (coffin, layer) {
coffin_ = coffin;
layer_ = layer;
tick_ = 0;
clip_ = layer_.attachMovie("nobonus", "nobonus", layer_.getNextHighestDepth());
clip_._x = coffin_._x - 14;
clip_._y = coffin_._y + 15;
clip_.anim.gotoAndStop(1);
}
function tick(tick) {
var Register_2_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, 25);
tick_++;
return(Register_2_ == 1);
}
function end() {
clip_.removeMovieClip();
}
function render(alpha) {
clip_.anim.gotoAndStop((tick_ % 19) + 1);
}
}
Symbol 1240 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.SpawnArea] Frame 0
class com.midasplayer.game.boneyardbonanza.SpawnArea
{
var scene_, layer_, skeletonLayer_, timesUp_, colorRandom_, partRandom_, nextColor_, clip_, part_, time_, maxTime_;
function SpawnArea (scene, seed, layer, skeletonLayer) {
scene_ = scene;
layer_ = layer;
skeletonLayer_ = skeletonLayer;
timesUp_ = false;
colorRandom_ = new com.midasplayer.util.Random(seed);
partRandom_ = new com.midasplayer.util.Random(seed);
nextColor_ = nextColor();
clip_ = layer_.attachMovie("spawnArea", "spawnArea", layer_.getNextHighestDepth());
clip_._x = POS[0];
clip_._y = POS[1];
clip_.gotoAndStop(1);
clip_.timer.gotoAndStop(1);
}
function getPart() {
return(part_);
}
function isTimesUp() {
return(timesUp_);
}
function removePart() {
part_ = undefined;
}
function isEmpty() {
if (part_ == undefined) {
return(true);
}
return(false);
}
function nextColor() {
return(colorRandom_.nextInt(scene_.getNumColors()));
}
function nextPart() {
return(partRandom_.nextInt(scene_.getNumParts()));
}
function spawn(time) {
time_ = 0;
maxTime_ = time;
var Register_9_ = skeletonLayer_.getNextHighestDepth();
part_ = com.midasplayer.game.boneyardbonanza.SkeletonPart(skeletonLayer_.attachMovie("skeleton_part", "part" + Register_9_, Register_9_));
var Register_6_ = scene_.getCoffins();
var Register_7_ = scene_.getNumCoffins();
var Register_8_ = scene_.getNumParts();
var Register_5_ = new Array();
var Register_4_ = 0;
while (Register_4_ < Register_8_) {
var Register_2_ = 0;
while (Register_2_ < Register_7_) {
var Register_3_ = com.midasplayer.game.boneyardbonanza.Coffin(Register_6_.get(Register_2_));
if (!Register_3_.hasPartNum(Register_4_)) {
Register_5_.push(Register_4_);
}
Register_2_++;
}
Register_4_++;
}
if (Register_5_.length == 0) {
Register_4_ = 0;
while (Register_4_ < Register_8_) {
Register_5_.push(Register_4_);
Register_4_++;
}
}
var Register_B_ = Register_5_[partRandom_.nextInt(Register_5_.length)];
var Register_A_ = nextColor_;
part_.init(scene_, Register_B_, Register_A_);
part_._x = (POS[0] + (clip_._width / 2)) - (part_._width / 2);
part_._y = (POS[1] + (clip_._height / 2)) - (part_._height / 2);
timesUp_ = false;
nextColor_ = nextColor();
clip_.gotoAndStop(com.midasplayer.game.boneyardbonanza.SkeletonPart.COLOR_FRAME[nextColor_]);
var Register_C_ = (new com.midasplayer.game.boneyardbonanza.anim.SpawnAppearAnim(this));
var Register_D_ = com.midasplayer.util.AnimPlayer.addAnim(Register_C_);
}
function increaseTime() {
if (timesUp_) {
return(undefined);
}
time_++;
if (time_ >= maxTime_) {
time_ = maxTime_;
timesUp_ = true;
var Register_2_ = (new com.midasplayer.game.boneyardbonanza.anim.SpawnTimesUpAnim(this));
var Register_3_ = com.midasplayer.util.AnimPlayer.addAnim(Register_2_);
scene_.removeLife();
}
}
function displayTime() {
var Register_2_ = (time_ / maxTime_);
var Register_3_ = (Math.floor(24 * Register_2_) + 1);
clip_.gotoAndStop(com.midasplayer.game.boneyardbonanza.SkeletonPart.COLOR_FRAME[nextColor_]);
clip_.timer.gotoAndStop(Register_3_);
}
static var POS = [311, 238];
}
Symbol 1241 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.SpawnAppearAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.SpawnAppearAnim
{
var spawnArea_, time_, part_;
function SpawnAppearAnim (spawnArea) {
spawnArea_ = spawnArea;
time_ = 5;
part_ = spawnArea_.getPart();
part_._alpha = 0;
part_._visible = true;
}
function tick(tick) {
var Register_2_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, time_);
part_._alpha = Register_2_ * 100;
return(Register_2_ == 1);
}
function end() {
part_._alpha = 100;
}
function render(alpha) {
}
}
Symbol 1242 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.SpawnTimesUpAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.SpawnTimesUpAnim
{
var spawnArea_, time_, part_, cloud_;
function SpawnTimesUpAnim (spawnArea) {
spawnArea_ = spawnArea;
time_ = 15;
part_ = spawnArea_.getPart();
cloud_ = part_.attachMovie("cloud", "cloud", part_.getNextHighestDepth());
cloud_.gotoAndStop(1);
cloud_._x = cloud_._x - 25;
cloud_._y = cloud_._y - 5;
}
function tick(tick) {
var Register_3_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, 4);
var Register_2_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, time_);
cloud_.gotoAndStop(Math.floor(Register_2_ * 19) + 1);
part_.part._alpha = 100 - (Register_3_ * 100);
return(Register_2_ == 1);
}
function end() {
part_.removeMovieClip();
spawnArea_.removePart();
}
function render(alpha) {
}
}
Symbol 1243 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.IntroAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.IntroAnim
{
var game_, scene_, layer_, instructions_, clickArea_, sx, ox, x, sy, oy, y, ss, os, s, dx, dy, ds, introDriver_, animEndTick_, pressedTick_, control_;
function IntroAnim (game, scene, layer) {
game_ = game;
scene_ = scene;
layer_ = layer;
instructions_ = layer_.attachMovie("instructions", "instructions", layer_.getNextHighestDepth());
clickArea_ = layer_.attachMovie("bg", "clickarea", layer_.getNextHighestDepth());
clickArea_._alpha = 0;
clickArea_._height = 550;
sx = (ox = (x = 134));
sy = (oy = (y = 70));
ss = (os = (s = 87));
dx = 73 - x;
dy = 563 - y;
ds = 58 - s;
instructions_._x = 18.1;
instructions_._y = 61.4;
instructions_.stop();
introDriver_ = new com.midasplayer.util.AnimDriver(instructions_, 25);
introDriver_.playOnce();
clickArea_.onPress = function () {
this.pressed = true;
};
animEndTick_ = -1;
pressedTick_ = -1;
_root.introtext1 = com.midasplayer.util.I18n.format("instructions_text1");
_root.introtext2 = com.midasplayer.util.I18n.format("instructions_text2");
_root.introtext3 = com.midasplayer.util.I18n.format("instructions_text3");
_root.introtext4 = com.midasplayer.util.I18n.format("instructions_text4");
_root.introtext5 = com.midasplayer.util.I18n.format("instructions_text5");
_root.introtext6 = com.midasplayer.util.I18n.format("instructions_text6");
_root.introtext7 = com.midasplayer.util.I18n.format("instructions_text7");
_root.introtext8 = com.midasplayer.util.I18n.format("instructions_text8");
_root.introtext9 = com.midasplayer.util.I18n.format("instructions_text9");
_root.introtext10 = com.midasplayer.util.I18n.format("instructions_text10");
_root.introtext11 = com.midasplayer.util.I18n.format("instructions_text11");
com.midasplayer.fx.SoundManager.play("VariableNamed_boneyard_introk2", 50, true);
}
function tick(tick) {
var Register_5_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, com.midasplayer.game.boneyardbonanza.Game.TPS * 36);
if (instructions_.introtext10 != undefined) {
instructions_.introtext10.autoSize = true;
var Register_6_ = instructions_.introtext10._height;
instructions_.introtext10._y = -43 + ((79.5 - Register_6_) / 2);
}
if (instructions_.introtext != undefined) {
var Register_3_ = instructions_.introtext.getTextFormat();
var Register_2_ = 39;
instructions_.introtext.autoSize = true;
while ((instructions_.introtext._height > 90) && (Register_2_ > 10)) {
Register_3_.size = Register_2_;
instructions_.introtext.setTextFormat(Register_3_);
Register_2_--;
}
}
instructions_.starts_txt.text = com.midasplayer.util.I18n.format("instructions_starts_in", "" + (36 - Math.floor(Register_5_ * 36)));
if (animEndTick_ > 0) {
control_.removeMovieClip();
return(true);
}
if (pressedTick_ > 0) {
Register_5_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, pressedTick_, 10);
instructions_._alpha = 100 - (Register_5_ * 100);
if (Register_5_ == 1) {
animEndTick_ = tick;
}
return(false);
}
if (clickArea_.pressed) {
pressedTick_ = tick;
}
if (!introDriver_.isRunning()) {
animEndTick_ = tick;
}
return(false);
}
function end() {
ox = x;
oy = y;
os = s;
render(1);
clickArea_.removeMovieClip();
instructions_.removeMovieClip();
game_.introEnd();
com.midasplayer.fx.SoundManager.stop("VariableNamed_boneyard_introk2");
}
function render(alpha) {
control_.txt_coffins.text = scene_.getNumCoffins();
control_.txt_colors.text = scene_.getNumColors();
control_.txt_spawn.text = "" + Math.round(scene_.getSpawnTime() / com.midasplayer.game.boneyardbonanza.Game.TPS);
control_.txt_bonus.text = "" + Math.round(scene_.getBonusTime() / com.midasplayer.game.boneyardbonanza.Game.TPS);
}
}
Symbol 1244 MovieClip [__Packages.com.midasplayer.util.AnimDriver] Frame 0
class com.midasplayer.util.AnimDriver
{
var m_clip, m_isFrozen, m_ticks, m_direction, m_frameRate, m_frameTime, m_frameCounts, m_toFrames, m_clips, m_stopped, m_once, m_lastTime, m_numTimes, m_fromFrame, m_toFrame;
function AnimDriver (clip, frameRate) {
m_clip = clip;
m_isFrozen = false;
m_ticks = 0;
m_direction = 1;
m_frameRate = frameRate;
m_frameTime = (1 / m_frameRate) * 1000;
m_frameCounts = {};
m_toFrames = {};
m_clips = new Array();
find(m_clip);
m_stopped = true;
m_once = false;
m_lastTime = getTimer();
}
function drive() {
if (m_stopped) {
m_clip.onEnterFrame = undefined;
return(undefined);
}
for (var Register_9_ in m_clip) {
var Register_2_ = m_clip[Register_9_];
if ((Register_2_._totalframes > 0) && (!Register_2_._isDriving)) {
Register_2_._isDriving = true;
Register_2_.stop();
m_clips.push(Register_2_);
m_frameCounts[Register_2_._name] = 0;
m_toFrames[Register_2_._name] = Register_2_._totalFrames;
}
}
var Register_A_ = getTimer();
var Register_B_ = (Register_A_ - m_lastTime);
m_lastTime = Register_A_;
m_ticks = m_ticks + (Register_B_ / m_frameTime);
var Register_7_ = int(m_ticks);
if (Register_7_ > 0) {
if (m_direction > 0) {
m_ticks = m_ticks - (m_direction * Register_7_);
} else if (m_direction < 0) {
m_ticks = m_ticks + (m_direction * Register_7_);
}
var Register_6_ = 0;
var Register_8_ = 0;
for (var Register_9_ in m_clips) {
var Register_3_ = m_clips[Register_9_];
if (com.midasplayer.util.AnimDriver(Register_3_) != null) {
var Register_5_ = com.midasplayer.util.AnimDriver(Register_3_);
if (Register_5_.frozen == true) {
continue;
}
}
m_frameCounts[Register_3_._name] = m_frameCounts[Register_3_._name] + (m_direction * Register_7_);
if (m_once) {
if ((m_direction > 0) && (m_frameCounts[Register_3_._name] >= m_toFrames[Register_3_._name])) {
m_frameCounts[Register_3_._name] = m_toFrames[Register_3_._name] - 1;
Register_3_.frozen = true;
Register_6_++;
if (Register_3_ != m_clip) {
m_frameCounts[Register_3_._name] = 0;
Register_3_.gotoAndStop(m_frameCounts[Register_3_._name] + 1);
Register_3_.frozen = false;
}
}
if ((m_direction < 0) && (m_frameCounts[Register_3_._name] <= 0)) {
m_frameCounts[Register_3_._name] = 0;
Register_3_.frozen = true;
Register_6_++;
}
}
var Register_4_ = ((m_frameCounts[Register_3_._name] % m_toFrames[Register_3_._name]) + 1);
Register_3_.gotoAndStop(Register_4_);
Register_8_++;
}
if (Register_6_ == Register_8_) {
m_numTimes--;
if (m_numTimes == 0) {
m_stopped = true;
return(undefined);
}
for (var Register_9_ in m_clips) {
var Register_3_ = m_clips[Register_9_];
m_frameCounts[Register_3_._name] = m_fromFrame;
Register_3_.gotoAndStop(m_frameCounts[Register_3_._name] + 1);
Register_3_.frozen = false;
}
}
}
}
function get frozen() {
return(m_isFrozen);
}
function set frozen(b) {
m_isFrozen = b;
//return(frozen);
}
function forceCompleted() {
m_clip.onEnterFrame = undefined;
var Register_7_ = 0;
var Register_6_ = 0;
for (var Register_5_ in m_clips) {
var Register_2_ = m_clips[Register_5_];
if (com.midasplayer.util.AnimDriver(Register_2_) != null) {
var Register_4_ = com.midasplayer.util.AnimDriver(Register_2_);
if (Register_4_.frozen == true) {
continue;
}
}
m_frameCounts[Register_2_._name] = m_frameCounts[Register_2_._name] + (m_direction * 10000);
if (m_once) {
if ((m_direction > 0) && (m_frameCounts[Register_2_._name] >= m_toFrames[Register_2_._name])) {
m_frameCounts[Register_2_._name] = m_toFrames[Register_2_._name] - 1;
Register_2_.frozen = true;
}
if ((m_direction < 0) && (m_frameCounts[Register_2_._name] <= 0)) {
m_frameCounts[Register_2_._name] = 0;
Register_2_.frozen = true;
}
var Register_3_ = ((m_frameCounts[Register_2_._name] % m_toFrames[Register_2_._name]) + 1);
Register_2_.gotoAndStop(Register_3_);
}
}
}
function isRunning() {
return(m_clip.onEnterFrame != undefined);
}
function playOnce(dir, fromFrame, toFrame, numTimes) {
m_fromFrame = fromFrame;
if (fromFrame == undefined) {
fromFrame = 1;
}
if (dir == undefined) {
m_direction = 1;
} else {
m_direction = dir;
}
if (numTimes == undefined) {
m_numTimes = 1;
} else {
m_numTimes = numTimes;
}
m_toFrame = toFrame;
m_isFrozen = false;
m_ticks = 0;
m_stopped = false;
m_once = true;
m_lastTime = getTimer();
for (var Register_5_ in m_clips) {
var Register_2_ = m_clips[Register_5_];
if (com.midasplayer.util.AnimDriver(Register_2_) != null) {
var Register_3_ = com.midasplayer.util.AnimDriver(Register_2_);
if (Register_3_.frozen == true) {
continue;
}
}
m_frameCounts[Register_2_._name] = fromFrame - 1;
if (m_toFrame == undefined) {
m_toFrames[Register_2_._name] = Register_2_._totalFrames;
} else {
m_toFrames[Register_2_._name] = m_toFrame;
}
Register_2_.gotoAndStop(fromFrame);
}
m_clip.onEnterFrame = mx.utils.Delegate.create(this, drive);
}
function playStart(startFrom) {
if (startFrom == undefined) {
startFrom = 0;
}
m_ticks = 0;
m_stopped = false;
m_lastTime = getTimer();
for (var Register_5_ in m_clips) {
var Register_2_ = m_clips[Register_5_];
if (com.midasplayer.util.AnimDriver(Register_2_) != null) {
var Register_3_ = com.midasplayer.util.AnimDriver(Register_2_);
if (Register_3_.frozen == true) {
continue;
}
}
m_frameCounts[Register_2_._name] = startFrom;
Register_2_.gotoAndStop(1);
}
m_clip.onEnterFrame = mx.utils.Delegate.create(this, drive);
}
function playStop() {
m_stopped = true;
m_clip.onEnterFrame = undefined;
}
function find(clip) {
if (clip._totalframes > 1) {
if (!clip._isDriving) {
clip._isDriving = true;
clip.stop();
m_clips.push(clip);
m_frameCounts[clip._name] = 0;
m_toFrames[clip._name] = clip._totalFrames;
}
}
for (var Register_5_ in clip) {
var Register_3_ = clip[Register_5_];
var Register_4_ = find(Register_3_);
}
}
}
Symbol 1245 MovieClip [__Packages.com.midasplayer.util.TimeVerifier] Frame 0
class com.midasplayer.util.TimeVerifier
{
static var startClientTime, startGetTimer;
function TimeVerifier () {
}
static function checkTime() {
var Register_2_ = _root.clientTime;
if (Register_2_ == undefined) {
Register_2_ = 0;
}
var Register_4_ = getTimer();
if (!hasStarted) {
startClientTime = Register_2_;
startGetTimer = Register_4_;
hasStarted = true;
}
var Register_3_ = (Math.abs(Register_2_ - startClientTime) - (Register_4_ - startGetTimer));
_root.debugtxt.txt.text = (("" + _root.clientTime) + " : ") + Register_3_;
if (_root.clientTime != undefined) {
if (Register_3_ > 8000) {
if (!hasWarned) {
hasWarned = true;
}
}
}
}
static var hasStarted = false;
static var hasWarned = false;
}
Symbol 1246 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.GameOverHappyAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.GameOverHappyAnim
{
var game_, layer_, scene_, clip_, clickArea_;
function GameOverHappyAnim (game, scene, layer) {
game_ = game;
layer_ = layer;
scene_ = scene;
clip_ = layer_.attachMovie("gameover_happy", "gameover", layer_.getNextHighestDepth());
clip_.num_skeletons.text = scene_.getNumSkeletonsCompleted();
clip_.score.text = scene_.getScore();
clip_.header_txt.text = com.midasplayer.util.I18n.format("gameover_happy_header");
clip_.total_score_txt.text = com.midasplayer.util.I18n.format("gameover_total_score");
clip_.time_to_exit_txt.text = com.midasplayer.util.I18n.format("gameover_time_to_exit", "10");
clip_.open_game_over_txt.text = "";
clickArea_ = layer_.attachMovie("bg", "clickarea", layer_.getNextHighestDepth());
clickArea_._alpha = 0;
}
function tick(tick) {
var Register_5_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, (com.midasplayer.game.boneyardbonanza.Game.TPS * 2) - 10);
var Register_2_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, com.midasplayer.game.boneyardbonanza.Game.TPS * 15);
if (tick > 30) {
clickArea_.onPress = function () {
this.clicked = true;
};
}
clip_.gotoAndStop(Math.floor(Register_5_ * 34) + 1);
if (clickArea_.clicked) {
var Register_2_ = 1;
}
var Register_4_ = (15 - Math.floor(Register_2_ * 15));
clip_.num_skeletons.text = scene_.getNumSkeletonsCompleted();
clip_.score.text = scene_.getScore();
clip_.bonus.text = scene_.getBonus();
clip_.header_txt.text = com.midasplayer.util.I18n.format("gameover_happy_header");
clip_.total_score_txt.text = com.midasplayer.util.I18n.format("gameover_total_score");
clip_.time_to_exit_txt.text = com.midasplayer.util.I18n.format("gameover_time_to_exit", "" + Register_4_);
clip_.open_game_over_txt.text = "";
if (com.midasplayer.util.GameBase.gameData.get("mode") == "short") {
clip_.open_game_over_txt.text = com.midasplayer.util.I18n.format("open_game_over");
}
return(Register_2_ == 1);
}
function end() {
game_.quitGame();
}
function render(alpha) {
}
}
Symbol 1247 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.anim.GameOverSadAnim] Frame 0
class com.midasplayer.game.boneyardbonanza.anim.GameOverSadAnim
{
var game_, layer_, scene_, clip_, clickArea_;
function GameOverSadAnim (game, scene, layer) {
game_ = game;
layer_ = layer;
scene_ = scene;
clip_ = layer_.attachMovie("gameover_sad", "gameover", layer_.getNextHighestDepth());
clip_.gotoAndStop(1);
clip_.open_game_over_txt.text = "";
clickArea_ = layer_.attachMovie("bg", "clickarea", layer_.getNextHighestDepth());
clickArea_._alpha = 0;
clickArea_.onPress = function () {
this.clicked = true;
};
}
function tick(tick) {
var Register_5_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, (com.midasplayer.game.boneyardbonanza.Game.TPS * 2) - 10);
var Register_2_ = com.midasplayer.util.AnimPlayer.tickToPercent(tick, 0, com.midasplayer.game.boneyardbonanza.Game.TPS * 15);
if (tick > 30) {
clickArea_.onPress = function () {
this.clicked = true;
};
}
clip_.gotoAndStop(Math.floor(Register_5_ * 34) + 1);
if (clickArea_.clicked) {
var Register_2_ = 1;
}
var Register_4_ = (15 - Math.floor(Register_2_ * 15));
clip_.num_skeletons.text = scene_.getNumSkeletonsCompleted();
clip_.score.text = scene_.getScore();
clip_.bonus.text = scene_.getBonus();
clip_.header_txt.text = com.midasplayer.util.I18n.format("gameover_sad_header");
clip_.total_score_txt.text = com.midasplayer.util.I18n.format("gameover_total_score");
clip_.time_to_exit_txt.text = com.midasplayer.util.I18n.format("gameover_time_to_exit", "" + Register_4_);
clip_.open_game_over_txt.text = "";
if (com.midasplayer.util.GameBase.gameData.get("mode") == "short") {
clip_.open_game_over_txt.text = com.midasplayer.util.I18n.format("open_game_over");
}
return(Register_2_ == 1);
}
function end() {
game_.quitGame();
}
function render(alpha) {
}
}
Symbol 1248 MovieClip [__Packages.com.midasplayer.game.boneyardbonanza.Replayer] Frame 0
class com.midasplayer.game.boneyardbonanza.Replayer implements com.midasplayer.timing.Timeable
{
var game_, clip_, entries_, xml, interval_, nextTick_, timer_, data_, dataIndex_, scene_;
function Replayer (game) {
game_ = game;
clip_ = _root.createEmptyMovieClip("replay", _root.getNextHighestDepth());
entries_ = new Array();
xml = new XML();
xml.ignoreWhite = true;
xml.onLoad = mx.utils.Delegate.create(this, xmlLoaded);
xml.load("xml/playdata.xml");
}
function xmlLoaded(success) {
if (success) {
parse();
doReplay();
}
}
function parse() {
trace("prase");
var Register_3_ = xml.firstChild.firstChild.firstChild.childNodes;
trace("R3: " + Register_3_);
var Register_2_ = 0;
while (Register_2_ < Register_3_.length) {
var Register_4_ = new String(Register_3_[Register_2_].nodeName);
if (Register_4_ == "entry") {
parseEntry(Register_3_[Register_2_]);
}
trace(Register_2_);
Register_2_++;
}
}
function parseEntry(xml) {
var Register_2_ = String(xml.firstChild);
Register_2_ = Register_2_.substring(0, Register_2_.indexOf("="));
var Register_5_ = Register_2_.split(",");
var Register_3_ = Register_5_[1].split(" ");
entries_.push({code:Register_5_[0], data:Register_3_});
}
function doReplay() {
clearInterval(interval_);
var Register_2_ = entriesIndex_;
trace("doReplay" + Register_2_);
if (Register_2_ >= entries_.length) {
nextTick_ = -1;
timer_ = new com.midasplayer.timing.Timer(this, 25);
clip_.timer = timer_;
clip_.onEnterFrame = function () {
this.timer.advanceTime2();
};
return(undefined);
}
if (entries_[Register_2_].code == "19") {
var Register_5_ = entries_[Register_2_].data[1];
com.midasplayer.util.GameBase.gameData.put("seed", Register_5_);
data_ = new Array();
dataIndex_ = 0;
game_.start();
scene_ = game_.getScene();
entriesIndex_++;
doReplay();
return(undefined);
}
if (entries_[Register_2_].code == "21") {
var Register_3_ = entries_[Register_2_].data[0];
var Register_4_ = entries_[Register_2_].data[1];
data_.push(Register_3_);
data_.push(0);
data_.push(Register_4_);
entriesIndex_++;
doReplay();
return(undefined);
}
if (entries_[Register_2_].code == "33") {
var Register_3_ = entries_[Register_2_].data[0];
data_.push(Register_3_);
data_.push(1);
entriesIndex_++;
doReplay();
return(undefined);
}
if (entries_[Register_2_].code == "17") {
var Register_3_ = entries_[Register_2_].data[0];
data_.push(Register_3_);
data_.push(1);
entriesIndex_++;
doReplay();
return(undefined);
}
}
function tick(tick) {
if (nextTick_ == -2) {
return(undefined);
}
if (nextTick_ == -1) {
if (data_.length > 0) {
nextTick_ = data_.shift();
} else {
clip_.onEnterFrame = undefined;
delete timer_;
nextTick_ = -2;
return(undefined);
}
}
while (nextTick_ == tick) {
var Register_2_ = data_.shift();
if (Register_2_ == 0) {
var Register_3_ = data_.shift();
scene_.coffinClicked(Register_3_);
}
Register_2_ != 1;
if (data_.length > 0) {
nextTick_ = data_.shift();
} else {
nextTick_ = -1;
}
}
game_.tick(tick);
}
function render(tick, alpha) {
game_.render(tick, alpha);
}
var entriesIndex_ = 0;
}
Symbol 1249 MovieClip [__Packages.com.midasplayer.util.Base64Decoder] Frame 0
class com.midasplayer.util.Base64Decoder
{
var res, p;
function Base64Decoder (r) {
res = r;
p = 0;
}
function next() {
var Register_2_ = BASE_64_CHARS.indexOf(res.charAt(p++));
Register_2_ = Register_2_ + (BASE_64_CHARS.indexOf(res.charAt(p++)) * 64);
return(Register_2_);
}
function nextShort() {
return(BASE_64_CHARS.indexOf(res.charAt(p++)));
}
function hasMore() {
return(p < res.length);
}
static var BASE_64_CHARS = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz#!";
}